1

I have a Craft CMS instance that I created a copy of by tarring up the folder and then dumping the mysql database and then transferring that to a different server. On the target server I restored the folder and the database. When I attempt to access the instance, I get an error in the Apache logs:

[Mon Jul 29 15:48:01.415795 2019] AH01071: Got error 'PHP message: PHP Fatal error:  Uncaught Error: Call to a member function run() on integer in /var/www/html/bsf_public/craft/app/index.php:73\nStack trace:\n#0 /var/www/html/bsf_public/public/index.php(19): require_once()\n#1 {main}\n  thrown in /var/www/html/bsf_public/craft/app/index.php on line 73\n'

I have spent multiple hours chasing the errors. A phpinfo() call in a file works so I know that PHP is properly configured. So I focused on line 73 of the index.php file referenced in the error message. It has these lines (in addition to others):

// Load and run Craft
// -----------------------------------------------------------------------------

$app = require 'bootstrap.php';
$app->run();

$app is returning a value of 1. bootstrap.php has these final lines of code:

$appClass = '\Craft\WebApp';
$app = new $appClass($config);

return $app;

I can't quite figure out why the bootstrap.php is returning a 1 which is why the error message occurs. I found one other instance of this being reported in a PHP app but the post had no resolution.

Maybe a Craft CMS guru can point me the right direction although I'll bet it is some kind of permissions or PHP issue. I checked the PHP files and they all have execute permissions.

Ubuntu 16.04.6 LTS

5.7.26 MySQL

PHP 7.1.29 (cli) (built: May 3 2019 09:33:57) ( NTS )

Craft CMS 2.7.5

1

In my particular case, I downgraded the Bitnami LAMP stack using instructions found here: https://community.bitnami.com/t/how-can-i-downgrade-to-php-5-6-from-php-7-0/51792

The downgrade fixed the issue although, had I seen Brad's answer before that, no doubt I could have fixed it using those posts....

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.