Re[4]: A simple question, however it's urgent

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

 



Ash,

Magic quotes are disabled:
http://gviragon.org/study/php.php
Any ideas?
Thanks a lot!


-- 
With best regards from Ukraine,
Andre
Skype: Francophile; Wlm&MSN: arthaelon @ yandex.ru; Jabber: arthaelon @ jabber.org
Yahoo! messenger: andre.polykanine; ICQ: 191749952
Twitter: m_elensule

----- Original message -----
From: Ashley Sheridan <ash@xxxxxxxxxxxxxxxxxxxx>
To: Andre Polykanine <andre@xxxxxxxx>
Date: Monday, May 17, 2010, 3:34:07 PM
Subject:  A simple question, however it's urgent

On Mon, 2010-05-17 at 15:36 +0300, Andre Polykanine wrote:

> Hey Ash,
> 
> I do a print_r($_POST) and see there the \r\n's. Please don't pay
> attention to question marks, there is some Cyrillic here:
> 
> 
> Original POST:
> 
> Array ( [uwork] => asdfsadf\r\nasdfasdf\r\nasdfasdf\r\nasdfasdf\r\nasdfasdf\r\nasdf [lid] => 23 [stud] => 1587 [sfac] => 3 [stid] => 9 [report] => 0 [Add]
> 
> => ????? ?????? ) 
> 
> Modified POST: 
> 
> Array ( [uwork] => asdfsadf\r\nasdfasdf\r\nasdfasdf\r\nasdfasdf\r\nasdfasdf\r\nasdf [lid] => 23 [stud] => 1587 [sfac] => 3 [stid] => 9 [report] => 0 [Add]
> 
> => ????? ?????? ) 
>  
> -- 
> With best regards from Ukraine,
> Andre
> Skype: Francophile; Wlm&MSN: arthaelon @ yandex.ru; Jabber: arthaelon @ jabber.org
> Yahoo! messenger: andre.polykanine; ICQ: 191749952
> Twitter: m_elensule
> 
> ----- Original message -----
> From: Ashley Sheridan <ash@xxxxxxxxxxxxxxxxxxxx>
> To: Andre Polykanine <andre@xxxxxxxx>
> Date: Monday, May 17, 2010, 3:24:37 PM
> Subject:  A simple question, however it's urgent
> 
> On Mon, 2010-05-17 at 15:26 +0300, Andre Polykanine wrote:
> 
> > Hello everyone,
> > Just can't imagine what happens. There is the simplest function in the
> > world:
> > 
> > function LineBreaks ($str) {
> > $what=array("\r\n", "\n", "\r");
> > $with=array("<br>");
> > $str=str_replace($what, $with, $str);
> > return $str;
> > }
> > 
> > And... it does work on one site and doesn't on another. Same hosting
> > provider, same settings, all the same.
> > When I call
> > $_POST['uwork']=LineBreaks($_POST['uwork']);
> > Nothing happens. Yes, it does see \r\n's but it doesn't replace them
> > with <br>'s. Tried built-in nl2br(), but no result...
> > Thank you!..
> > 
> > -- 
> > With best regards from Ukraine,
> > Andre
> > Http://oire.org/ - The Fantasy blogs of Oire
> > Skype: Francophile; Wlm&MSN: arthaelon @ yandex.ru; Jabber: arthaelon @ jabber.org
> > Yahoo! messenger: andre.polykanine; ICQ: 191749952
> > Twitter: http://twitter.com/m_elensule
> > 
> > 
> 
> 
> If nl2br() doesn't even work, are you really sure that those character
> exist in the string? Just for our own sake, could you demonstrate how
> you determine that the carriage return and line break characters exist
> in the string?
> 
> Thanks,
> Ash
> http://www.ashleysheridan.co.uk
> 
> 
> 
> 


You shouldn't actually be able to see the \ chracters, so I would assume
that you're escaping them somehow and magic quotes are getting in the
way on the live server with the problems.

Have you checked the magic quotes settings on both servers. Also, as a
general rule of thumb, if something stops working on a new server, check
to see if the setup is the same. Compare the output of phpinfo() on both
of them first, as that will show you any obvious differences.

Thanks,
Ash
http://www.ashleysheridan.co.uk




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