Originally posted by jifu
I encountered a weird problem recently
after running /scripts/easyapache
whenever i tried to edit a php file.
for example: index.php
<?php
header('location: http://www.domain.com');
?>
i have omitted the blank lines after the ?>
but eversince the apache upgrade.
a blank line is always added to the end of the file.
this causes the pharse error at line 4...
This is weird cause i have checked permissions and i used pico, filemanager edit in cpanel or even editing locally on my computer and uploading via ftp. a blank line will always be added at the end causing a line error
anyone got a solution for this ?
cPanel.net Support Ticket Number:
php ignores whitespace or blank lines.. especially after the close tag.. but..
if these scripts ran fine on php 4.3.1 and now do not on 4.3.2.. try changing the single quote to a double quote...
might make the difference.. php stops parsing at the ?> tag.
HOWEVER php sometimes returns a parse error at a line FOLLOWING the error.. in this case.. parse error is probably due to the single quotes....
a blank line AFTER the close tag wont do anything.. nor will MANY blank lines..
the issue with a parse error is somewhere between <?php and ?>
Ive had instances where even a SQL call has caused a parse error because an array was enclosed within quotes... once quotes were removed, the code no longer had a problem.. however the header() function requires the arguments to be withing quotes, so I suggest trying double quotes instead.. for the above line at least ....
cPanel.net Support Ticket Number:
cPanel.net Support Ticket Number:
cPanel.net Support Ticket Number: