SmartFAQ is developed by The SmartFactory (, a division of InBox Solutions (

I'm using my ISP's cPanel X File Manager to change / modify my Xoops PHP files, and I keep breaking my site. What's wrong?
Requested and Answered by Danand725 on 2005/1/24 11:28:46 (12019 reads)
cPanel X's File Manager module seems to add trailing carriage returns at the end of the PHP file (after the !>). You need to edit your PHP files some other way and upload them, or re-edit the file remove the extra lines.

Added by Carnuke: I also found this to be the case when editing my mainfile.php with cpanel. It left trailing lines after the !> and caused all kinds of problems.

Mithrandir's comment: Trailing carriage returns after the ?> will start the HTML output and cause errors if the code is subsequently trying to add/modify the header information - such as a header('location:') redirection or other header information

These carriage returns in mainfile.php can essentially result in the dreaded blank pages.

The comments are owned by the author. We aren't responsible for their content.
  • Quite a regular

 what specific problem the trailing CR can produce?

will the added trailing carriage return really cause problems (what kind of problem it can produce?). i have using this method (using the cpanel file manager) to update some of the content of my XOOPS code file (have just updated the mainfile.php for example lately). haven't found any problem so far, but afraid of the above produce some problems in the website which i don't aware of...

I just found the 'remember me' login issue I experienced lately is DUE TO THE TRAILING CR IN THE MAINFILE.PHP!!!! (I have tried all kind of resolution, turning off the protector etc, to resolve the above issue, and it's apparently due to the above cpanel file manager issue!).

Hey, this is very serious! Should announce it to all (Glad to find this great FAQ).

Now, i don't know how should i check the remaining files I edited through this method so far...

  • Just popping in

 Re: what specific problem the trailing CR can produce?

From experiance, editting the file once is fine, it will add a carriage return but it does not seem to affect the php file. The problems start if you then edit the file again and don't clean up the bottom of the file. It seems to add a carriage return on every edit. This is why it took me so long to discover why my site worked once, and then broke.