SmartFAQ is developed by The SmartFactory (https://www.smartfactory.ca), a division of InBox Solutions (https://www.inboxsolutions.net)

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?
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.
user

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

EDITED:
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...

 
user

 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.

 


Login

Who's Online

338 user(s) are online (2 user(s) are browsing XOOPS FAQ)


Members: 0


Guests: 338


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Did you know ?

Myths about autologin + email hack.

Random question

How do I install Xoops on IIS ?