RE: \r\n in data breaks php

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



\r\n is what displays in the logs on the linux server where the code breaks.

-----Original Message-----
From: Jeffry Killen [mailto:jekillen@xxxxxxxxxxx] 
Sent: Thursday, March 27, 2014 7:27 PM
To: Marc Fromm
Subject: Re:  \r\n in data breaks php


On Mar 27, 2014, at 1:58 PM, Marc Fromm wrote:

> Server1:
> CENTOS 6.4
> Postgresql-8.4
> PHP 5.3
>
> Server2:
> RHEL 5.2
> Postgresql-8.1
> PHP 5.1
>
> Bother servers serve the same php pages that connect to a postgresql 
> database. Both servers have magic quotes turned off.
>
> I have a problem with carriage returns in the database. They are 
> stored fine but when selected in a query there is a problem. The twist 
> is the problem only happens on the server2. Any record with a carriage 
> return, when selected by a php page, does not display any of the 
> fields values in the form that the data should populate. All the boxes 
> are empty. If I manually remove the carriage returns through 
> phpPgAdmin then the form does display all the field data.
>
> Since the same code works on server1 but not on sever2, I must assume 
> the problem is a configuration issue. Not sure if it's with PHP or 
> postgresql.
>
> Any insight is most welcomed.
>
> Marc

In your subject line you have \r\n which, I assume is a Windows style line break. When I do html of Windows in the context of <pre> tags, for instance,  I use \n\r to create a line break.
Other wise I suppose you are aware that unix line breaks are \n. This may not make a difference in your situation but it also may be worth consideration.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php






[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux