OK, I'm seeing to much of this error messages, and they are not related to the config files main.inc.php or db.inc.php.
Some script has a new line at the end, after the closing "?>".
Now, I have a proposle, backed up by a mail from Rasmus Leardorf:
http://marc.theaimsgroup.com/?l=php-dev&m=106896382030183&w=2
Why not get ride of the closing "?>" at the end of the scripts?
Lic. Martín Marqués | SELECT 'mmarques' || Centro de Telemática | '@' || 'unl.edu.ar'; Universidad Nacional | DBA, Programador, del Litoral | Administrador
On Fri, 21 Jul 2006 9:34:19 -0300, Martin Marques martin@bugs.unl.edu.ar wrote:
OK, I'm seeing to much of this error messages, and they are not related to the config files main.inc.php or db.inc.php.
Some script has a new line at the end, after the closing "?>".
Now, I have a proposle, backed up by a mail from Rasmus Leardorf:
http://marc.theaimsgroup.com/?l=php-dev&m=106896382030183&w=2
Why not get ride of the closing "?>" at the end of the scripts?
OK, found the new line that was messing up everything:
$ svn diff Index: program/lib/Mail/mime.php =================================================================== --- program/lib/Mail/mime.php (revision 278) +++ program/lib/Mail/mime.php (working copy) @@ -909,4 +909,3 @@
} // End of class ?>
Hope it helps. Anyway, getting the "?>" away fixes everything. ;-)
Lic. Martín Marqués | SELECT 'mmarques' || Centro de Telemática | '@' || 'unl.edu.ar'; Universidad Nacional | DBA, Programador, del Litoral | Administrador
On Jul 21, 2006, at 6:01 AM, Martin Marques wrote:
On Fri, 21 Jul 2006 9:34:19 -0300, Martin Marques
martin@bugs.unl.edu.ar wrote:OK, I'm seeing to much of this error messages, and they are not
related to the config files main.inc.php or db.inc.php.Some script has a new line at the end, after the closing "?>".
Now, I have a proposle, backed up by a mail from Rasmus Leardorf:
http://marc.theaimsgroup.com/?l=php-dev&m=106896382030183&w=2
Why not get ride of the closing "?>" at the end of the scripts?
OK, found the new line that was messing up everything:
$ svn diff Index: program/lib/Mail/mime.php =================================================================== --- program/lib/Mail/mime.php (revision 278) +++ program/lib/Mail/mime.php (working copy) @@ -909,4 +909,3 @@
} // End of class ?>
While this file indeed had an extra line at the end for me, I still
get errors after fixing it, so there's yet another culprit. :-/
-- Mark Edwards
On Fri, 21 Jul 2006, Mark Edwards wrote:
On Jul 21, 2006, at 6:01 AM, Martin Marques wrote:
While this file indeed had an extra line at the end for me, I still get errors after fixing it, so there's yet another culprit. :-/
Yes, one of the language translation files. Anyway, this would be solved if all the PHP scripts don't have closing "?>".
Lic. Martín Marqués | SELECT 'mmarques' || Centro de Telemática | '@' || 'unl.edu.ar'; Universidad Nacional | DBA, Programador, del Litoral | Administrador
On Fri, 21 Jul 2006, Eric Stadtherr wrote:
I like the idea of leaving off the "?>" in included files, but we should be careful to leave it in place for "standalone" php files (i.e. those that can be the target of a URL requested by a client). Is that only the "index.php" file for this application?
I'm lost. Where are the standalone php files? AFAIK everything is requested via apache (or your favorite web server).
-- 21:50:04 up 2 days, 9:07, 0 users, load average: 0.92, 0.37, 0.18
Lic. Martín Marqués | SELECT 'mmarques' || Centro de Telemática | '@' || 'unl.edu.ar'; Universidad Nacional | DBA, Programador, del Litoral | Administrador
On Jul 21, 2006, at 1:28 PM, Martin Marques wrote:
On Fri, 21 Jul 2006, Eric Stadtherr wrote:
I like the idea of leaving off the "?>" in included files, but we
should be careful to leave it in place for "standalone" php files
(i.e. those that can be the target of a URL requested by a client). Is
that only the "index.php" file for this application?I'm lost. Where are the standalone php files? AFAIK everything is
requested via apache (or your favorite web server).
Standalone, as in not included by another file. At some point the
data has to have a closing ?> or it isn't valid PHP. I guess it is
legal (?) to not have a ?> at the end of included files, or at least
that it works, but I'm pretty sure at some point the data has to be
closed with ?> or there will be errors thrown.
A PHP file starts with <?PHP and ends with ?> or its not a PHP file.
Right?
-- Mark Edwards
That's what this whole conversation is about. Someone linked to
a post by "jon@php.net", whoever he is, who said it doesn't matter if the closing tag is there or not. Seems sort of shaky to me, and doesn't stop the situation where there are spaces at the front, but I guess that happens less. The real answer is that people have to be careful what they do with source.
On Fri, 21 Jul 2006, Mark Edwards wrote:
On Jul 21, 2006, at 1:28 PM, Martin Marques wrote:
On Fri, 21 Jul 2006, Eric Stadtherr wrote:
I like the idea of leaving off the "?>" in included files, but we should be careful to leave it in place for "standalone" php files (i.e. those that can be the target of a URL requested by a client). Is that only the "index.php" file for this application?
I'm lost. Where are the standalone php files? AFAIK everything is requested via apache (or your favorite web server).
Standalone, as in not included by another file. At some point the data has to have a closing ?> or it isn't valid PHP. I guess it is legal (?) to not have a ?> at the end of included files, or at least that it works, but I'm pretty sure at some point the data has to be closed with ?> or there will be errors thrown.
A PHP file starts with <?PHP and ends with ?> or its not a PHP file. Right?
-- Mark Edwards
On Fri, 21 Jul 2006, Mark Edwards wrote:
A PHP file starts with <?PHP and ends with ?> or its not a PHP file. Right?
No.
<?php tells apache to start parsing PHP and ?> tells it to stop parsing
PHP and resume with normal HTML parsing. Once the script ends, it ends.
Check it out. Eliminate the last ?> from the roundcube index.php file and see what happens. ;-)
-- 21:50:04 up 2 days, 9:07, 0 users, load average: 0.92, 0.37, 0.18
Lic. Martín Marqués | SELECT 'mmarques' || Centro de Telemática | '@' || 'unl.edu.ar'; Universidad Nacional | DBA, Programador, del Litoral | Administrador