Delos Chang
Delos Chang

Reputation: 1853

Frustrating Smarty Error : call to undefined function phperror_reporting

I am trying to upload my site onto the server but I keep getting the following error:

Fatal error: Call to undefined function phperror_reporting() in /home/jagani/public_html/theforum/forumfiles.php on line 1

First few lines of the file are:

<?php

error_reporting(E_ALL^E_NOTICE);

session_start();

Seems that the space between the php and error_reporting isn't being registered. I'd appreciate any insight on this problem.

Upvotes: 0

Views: 1679

Answers (1)

Jeremy Warne
Jeremy Warne

Reputation: 3429

As you said, it sounds like a problem with the whitespace. If you've got ssh access, I'd try creating a test php file by typing vi test.php and then putting the following code:

<?php

print("test");

?>

Try viewing that file and see if it works; if so, then your problem is an encoding issue, which you might be able to fix by running dos2unix on the affected file. Does it only affect that one file (and/or others) or is it any php file on the system?

Upvotes: 2

Related Questions