php parsing

liunx

Guest
I had PHP 4.3.3 running before I updated. When a page was loading, all the php/html that was doing simple prints of tables and images would load while an sql query was running. When the sql finished, the rest of the page displayed.

I have now updated to 5.2.3 and when I go to the exact same page, nothing displays until the sql has completely finished.

The issue with this whole thing is the javascript I had loading on certain pages that displayed an image telling the visitor "please wait, processing......". This no longer displays since the page will not parse till the sql query is finished.

I was wondering if this is a php issue or and apache issue or maybe both. If anyone has run across this or has any input, I would appreciate it greatly.I suspect it's an Apache issue. However, you might try putting a flush(); command in your script after the output before you start the query, to see if you can convince Apache to output its current buffer. If that doesn't do it, then I'll have to leave you to the Apache gurus for help.It could be to do with output buffering is now set to on.

<!-- m --><a class="postlink" href="http://uk3.php.net/outcontrol">http://uk3.php.net/outcontrol</a><!-- m -->.

Can keep the whole page in memory so headers can be dealt with later in code.
Eg. with it on you could go
echo "Monkey";
header('Location: <!-- m --><a class="postlink" href="http://www.phpbuilder.com'">http://www.phpbuilder.com'</a><!-- m --> );php 4.3.3 was long ago.... very long ago
there can have been many changes in mysql functions,
in php execution and in php.ini settings since then4.3.3

* Released: 25 August 2003
* Announcement: English French
* ChangeLog
* Download: Source (tar.gz) Source (tar.bz2) Windows binary

Regards :)Try using: ob_start();

<!-- m --><a class="postlink" href="http://uk3.php.net/manual/en/function.ob-start.php">http://uk3.php.net/manual/en/function.ob-start.php</a><!-- m -->
 
Back
Top