SysAdmin

Call-time pass-by-reference fatal error on PHP 5.4

JJ
Jobin Joseph · Founder and CEO
·Published 21 January 2013·1 min read

Hey

I recently upgraded one our shared server from PHP 5.3 to PHP 5.4.10. As it is a shared hosting there are many application running on it.

Issue:

One of our customer complained that his main page is resulting in “Internal Server Error”

This was the error from application log,

`PHP Fatal error: Call-time pass-by-reference has been removed in /home/username/public_html/includes/application.php on line 50`

How to fix this issue:

Open the file in a text editor, Navigate to the line (in my case its 50 from the error log),

Replace the code `$this->assign(‘app’,&$this);` with `$this->assign(‘app’,$this);` ,

ie remove the & sign from the Line.

Thats it, Now reload the page and your site will be back again.

Please comment if helpful.

Jobin Joseph
Jobin Joseph, Founder and CEO
5x AWS Certified, ISO 27001:2022 Lead Implementer, 17+ years building cloud infrastructure for regulated industries.
About Jobin →

Reading this because your AWS bill or uptime is a problem?

30 minutes, direct with the founder, no sales pitch: one specific recommendation for your AWS workload.

Book a free 30-minute review
30 min Free Consultation →