when i use phpmyadmin 2.8.1 on windows xp, and i run
the setup script, it creates the config file as it
should
when i open the created configuration file, it is all
on one line and almost impossible to edit
Suggestion:
store get_defined_constants() to a variable
then if that ["PHP_OS"] is WINNT store "\r\n" to a
string
if its MAC then store "\r" to the string
otherwise store "\n" to that string
at all places where "\n" is printed, print the string
instead
Logged In: YES
user_id=1383652
>if its MAC then store "\r" to the string...
is not a good idea, as PHP doesn't like that.
but adding "\r\n" to a string can be helpful.
Logged In: YES
user_id=1383652
To avoid such problems, the best way is to use an editor on win
that is capable of dealing with all three versions like:
http://www.flos-freeware.ch/notepad2.html
(small&fast, can replace notepad)
Logged In: YES
user_id=1527566
i, and a lot of ppl i know, dislike using alternatives to
notepad, because they are untested, un virus free, etc
the only windows packaged alternateive to notepad is
wordpad which is extremely slow
Logged In: YES
user_id=1527566
what problems are there with using \r in php
from the little fooling around i did, i could find no error
i'm currently using php 5.1.4 on apache 2.2.2 and i'm
curious as to which operating systems and servers and
versions of php this error occurs in
Logged In: YES
user_id=1383652
i read it in the pma docs,
here is someone who obviously had that problem:
http://forum.textdrive.com/viewtopic.php?pid=83323
>...my FTP client (Fetch) was set for Mac line breaks ...
>...Having corrected the line break setting in my fpt
client, I ... reloaded my site; voila, posts look complete
Logged In: YES
user_id=1383652
another example :
http://de.php.net/echo
a user comment:
"If you want to use echo <<<ENDOFECHO (here document style)
and you notice that the server does not seem to recognise
this form (you get a blank page with no content at all),
chances are your editor uses a wrong type of line break.... "
Logged In: YES
user_id=192186
Should this decision be based on server or user OS?
Logged In: YES
user_id=192186
I made it configurable (with detection based on user
operating system).
Logged In: YES
user_id=1383652
nijel,
don't forget the config.sample.php, a remember some WIN
users also reported problems
using the standard editor in the help forum!
Logged In: YES
user_id=192186
File included in tarball can be only in one format, so it
can not satisfy all. Maybe we could add explaining comment
to the top of this file?
Logged In: YES
user_id=1383652
i never heard of any *ix editor having problems with win
format ;)
so using \r\n should be ok for 99% of all users.
Logged In: YES
user_id=192186
Well in worst case you end up with ^M at the end of each
line. ... Let's open this topic on list.