Re: [PHP] php 5 and register_globals=off gives lotsa errors

2006-12-30 Thread Rasmus Lerdorf
You did more than just turn register_globals off. You also changed your error warning level. You have turned notices on. Set the same error warning level in your PHP 4 setup and you will see exactly the same messages. To be notice-free, your code should look like this: $action = isset($_GET['

[PHP] php 5 and register_globals=off gives lotsa errors

2006-12-30 Thread Wikus Moller
Hi to all. I am having huge problems running my script, which worked fine on a server with php 4 and register_globals turned on, on a server with php 5 and register_globals turned off. I get errors around the area in my script where I use $_GET (not the only error). For example the following cod

Re: [PHP] php/ajax question

2006-12-30 Thread Mark Kelly
On Saturday 30 December 2006 18:56, tedd wrote: > Why can't the php script redirect the browser when called via ajax ? The browser will not be expecting a page back, and will ignore headers. The response must be handled by a function you define. For the sake of a quick demo, if your php accepts

Re: [PHP] php/ajax question

2006-12-30 Thread tedd
At 12:55 PM -0800 12/30/06, Paul Novitski wrote: At 12/30/2006 10:56 AM, tedd wrote: Why can't the php script redirect the browser when called via ajax ? Ajax is giving PHP control over just that byte-stream that ajax is receiving and perhaps inserting into the page, not the full page itsel

[PHP] Re: php/ajax question

2006-12-30 Thread tedd
At 1:30 AM +0500 12/31/06, Fahad Pervaiz wrote: When you use "HEADER()", an HTTP header is sent to client browser. So when using with an ajax call the header cannot redirect the page. For the purpose you have to use include or require. If you want to redirect client browser to some other locati

Re: [PHP] mime with php4.4.4 does not work anymore

2006-12-30 Thread Rasmus Lerdorf
Roger Thomas wrote: > I have been serving my community with Invision Power Board (IPB) v1.3.1 > Final. Things are working well with PHP 4.3.8 and Apache 1.3.29. > > Yesterday I just upgraded to PHP4.4.4 and I have problems with Excel and Word > attachments with IPB. Whenever I click on those att

Re: [PHP] php/ajax question

2006-12-30 Thread Paul Novitski
At 12/30/2006 10:56 AM, tedd wrote: Why can't the php script redirect the browser when called via ajax ? Ajax is giving PHP control over just that byte-stream that ajax is receiving and perhaps inserting into the page, not the full page itself. Say you use javascript to set the src of an im

[PHP] Re: php/ajax question

2006-12-30 Thread Fahad Pervaiz
When you use "HEADER()", an HTTP header is sent to client browser. So when using with an ajax call the header cannot redirect the page. For the purpose you have to use include or require. If you want to redirect client browser to some other location then you can work around with javascripts. But

Re: [PHP] php/ajax question

2006-12-30 Thread Mark Kelly
On Saturday 30 December 2006 18:56, tedd wrote: > Why can't the php script redirect the browser when called via ajax ? The browser will not be expecting a page back, and will ignore headers. Just some quick suggestion code, this isn't tested (except createRequest - I use that all the time)... f

[PHP] php/ajax question

2006-12-30 Thread tedd
Hi gang: I have a small php script that behaves differently depending upon who's calling it. The code is: http://www.example.com/b.php";); /* Redirect browser */ exit;?> If the code is called directly, namely http://www.example.com/a.php, then the $_SESSION var is filled