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

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.

 

0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x
Scroll to Top