Jump to content
  • 0

Backup download problems


fossxplorer

Question

It seems backup download doesn't work:

2017/05/10 20:52:07 [error] 25065#25065: *1472 FastCGI sent in stderr: "PHP message: PHP Fatal error:  The file /home/domain/blesta/app/app_model.php was encoded by the ionCube Encoder for PHP 5.4 and cannot run under PHP 7.0.
 Please ask the provider of the script to provide a version encoded with the ionCube Encoder for PHP 5.6. in Unknown on line 0", client: xxx.xxx.xx server: blesta.domain.com, request: "GET / HTTP/1.1", host: "blesta.domain.com", referrer: "http://blesta.domain.com/admin/settings/system/backup/download/"

Is this known?

 

Link to comment
Share on other sites

14 answers to this question

Recommended Posts

  • 0
15 hours ago, Licensecart said:

you haven't applied the hotfix & also ensure you run /admin/upgrade/

If applying hotfix means simply copying the files inside hotfix-php7/blesta/app into blesta installation folder, then it's done.

$ diff tmp/hotfix-php7/blesta/app/app_model.php  blesta/app/app_model.php
$

And i've run the upgrade as well. Still i can't download the backup, samme error:

/blesta/app/app_model.php was encoded by the ionCube Encoder for PHP 5.4 and cannot run under PHP 7.0.

 

Link to comment
Share on other sites

  • 0

Also, my attempt to import from WHMCS times out

 upstream timed out (110: Connection timed out) while reading upstream

request: "POST /admin/settings/company/plugins/manage/8/whmcs/5.2/?action=import HTTP/1.1", upstream: "fastcgi

My PHP max exec timeout is 1 hour though. Is there somewhere else i need to configure Blesta timeouts?

 

Link to comment
Share on other sites

  • 0

Alright, not quite everything. Although the error messages are gone, i still can't backup. Now tried over SFTP and direct download. In both cases, i see a PHP-FPM process running with 100% load and obviously doing nothing (i've strace'd the process).

I've enabled debug (Configure::set("System.debug", true);), still nothing in the logs in Blesta or webserver. :(

EDIT: just read https://docs.blesta.com/display/user/Requirements

There is no mentioned about Nginx which i use..but i doubt that could be the reason?

 

 

Link to comment
Share on other sites

  • 0
3 hours ago, fossxplorer said:

Alright, not quite everything. Although the error messages are gone, i still can't backup. Now tried over SFTP and direct download. In both cases, i see a PHP-FPM process running with 100% load and obviously doing nothing (i've strace'd the process).

I've enabled debug (Configure::set("System.debug", true);), still nothing in the logs in Blesta or webserver. :(

EDIT: just read https://docs.blesta.com/display/user/Requirements

There is no mentioned about Nginx which i use..but i doubt that could be the reason?

 

 

It could be depending how you've set it up there's a few tutorials on here which work for users.

Link to comment
Share on other sites

  • 0

I thought I had replied to this earlier, but I guess I never hit submit -

Web server shouldn't matter for doing backups, except for the username that it runs as. You should check the following:

  • Does mysqldump exist on your server? To test, SSH in as your user and run "mysqldump", it should show usage.
  • Does your web server user have permissions to execute mysqldump?
  • Is the temp directory set under Settings > System > General > Temp Directory, and is it writable by your web server user?

Via SSH, you can run a test database export to see if it should work:

mysqldump -u MYSQLUSERNAME -pMYSQLPASSWORD DATABASENAME -r database.sql

MYSQLUSERNAME, MYSQLPASSWORD, and DATABASENAME should be replaced with the correct details, which you can find in your ~/config/blesta.php config file if you aren't sure. (NOTE that there is no space between "-p" and the password, this is important).

After it runs, what's the size of database.sql? (ls -la)

Link to comment
Share on other sites

  • 0

Thanks Paul.

I check each of your points and answer is yes to each of them. The DB dump has size of 70MB (since i've imported data from WHMCS).

Obviously, there is nothing wrong with running mysqldump as the web server user. Strange i don't get anything is the logs when i run the backup from web UI though :(

 

 

Link to comment
Share on other sites

  • 0

@paul

This reminds me of improving the code for this kind of issues in a shared hosting. Perhaps do a check for whether PHP's exec and  shell_exec  and give a warning if there are disabled? ;)

Right now, the process runs with 100% CPU usage without doing anything (as confirmed by strace) when these functions are disabled on the system. It's a bit bad behavior of a software.

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...