<p>In my particular case, I downgraded the Bitnami LAMP stack using instructions found here: <a href="https://community.bitnami.com/t/how-can-i-downgrade-to-php-5-6-from-php-7-0/51792" rel="nofollow noreferrer">https://community.bitnami.com/t/how-can-i-downgrade-to-php-5-6-from-php-7-0/51792</a></p>

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

CC BY-SA 4.0
2019-07-31T15:54:10.783Z
2019-07-31T15:54:10.783Z
Pete Helgren
<p>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:</p>

<pre><code>[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'
</code></pre>

<p>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):</p>

<pre><code>// Load and run Craft
// -----------------------------------------------------------------------------

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

</code></pre>

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

<pre><code>$appClass = '\Craft\WebApp';
$app = new $appClass($config);

return $app;
</code></pre>

<p>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.</p>

<p>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.</p>

<p>Ubuntu 16.04.6 LTS</p>

<p>5.7.26 MySQL</p>

<p>PHP 7.1.29 (cli) (built: May  3 2019 09:33:57) ( NTS )</p>

<p>Craft CMS 2.7.5</p>

CC BY-SA 4.0
2019-07-30T21:51:42.577Z
There's a couple of other similar posts here that might help? https://craftcms.stackexchange.com/questions/19332/500-error-with-no-details-on-site-migration and https://craftcms.stackexchange.com/questions/26499/500-error-on-aws-bitnami-instance
Brad Bell
CC BY-SA 4.0
2019-07-31T15:50:35.533Z
Thanks Brad...not sure how I missed those in my search.  They point directly to the problem and environment.  Wish I had seen them.  I decided the Bitnami LAMP stack was the issue and downgraded to version 5 stack that installed PHP 5.6 (in particular). That fixed it although I am intrigued by the later posted you cited.
Pete Helgren
<craft2>
bootstrap.php returns a value of 1 in Craft CMS
# bootstrap.php returns a value of 1 in Craft CMS

(Asked by: username_0 on 2019-07-29)

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

**Tags:** craft2
> **Comments:**
> **username_1**: There's a couple of other similar posts here that might help? https://craftcms.stackexchange.com/questions/19332/500-error-with-no-details-on-site-migration and https://craftcms.stackexchange.com/questions/26499/500-error-on-aws-bitnami-instance  
> **username_0**: Thanks Brad...not sure how I missed those in my search.  They point directly to the problem and environment.  Wish I had seen them.  I decided the Bitnami LAMP stack was the issue and downgraded to version 5 stack that installed PHP 5.6 (in particular). That fixed it although I am intrigued by the later posted you cited.  

---

## 1 answers

### Answer by username_0 on 2019-07-31. Score: 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....


---

