[RESOLVED] Waiting for localhost
Hi,
I've been testing my flash website that uses php in phpdev and WAMP Sever. However, for some reason after submitting the details for a new customer or to log-in the data doesn't get sent to the database and in the status bar of the browser it has "Waiting for localhost...".
If I run the script to create the database I don't receive the "Waiting for localhost..." message and the data gets sent to the database.
What could be the problem? I have checked the code and it appears to be in order.
Thanks,
Nightwalker
Re: Waiting for localhost
This usually happens when PHP gets stuck in a loop, or gets stuck somewhere.
Check out Set Time Limit by placing it at the start of the script (before anything) and see if it times out.
You could also get it to echo stuff to the screen every step of the way.
Should also try this:
PHP Code:
error_reporting (E_ERROR | E_WARNING | E_PARSE | E_NOTICE);
Re: Waiting for localhost
Where would I put that in the *.php files or in the php.ini?
Also, I have never had the problem with the script before! On Monday they were working fine.
I tried the time_limit code:
PHP Code:
set_time_limit(2);
ob_start(); // buffer output
function shutdown () {
// print only first 2000 characters of output
$out = ob_get_clean();
print substr($out, 0, 2000);
}
register_shutdown_function('shutdown');
However, the problem still occurs!
I need a way of testing the scripts and seeing the output on the screen when the scripts are running.
Edit:
The data now gets submitted to the database! In some scripts I had a double up of the same variables possibly because of adding the "mysql_escape string" to the code.