Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error that I cannot fix!!!

Status
Not open for further replies.

TheFoxy

Programmer
Nov 22, 2002
48
GB
When I run my script I get this error after a short time:

Expiries timeout!
The probable reasons:

Fatal script error.
File php.exe is bad.
If you use PHP extension, PHP not find one of extension file (*.dll).Incorrect parameter extension_dir in section
PHP:
 in php.ini.

I have tried editing the folowing entry in php.ini:

from this:

extension_dir = "./"

to all these different combinations:

extension_dir = ".;c:\php\extensions\"

extension_dir = ".;c:\php\extensions"

extension_dir = "c:\php\extensions"

extension_dir = ".\extensions\"

And some other variants, but nothing works!!!!! Help!!!!!

I'm running Win98.
Latest stable PHP version.

My script uses these kinda things:

MySQL (another script that uses MySQL but not the other stuff works fine).
rand()
file manipulation
array sorting

(I can't post the full script, sorry :( )
 
The error you claim of Expiries timeout! is most likely due to a bum SQL statement or some screwy code in your page - - not a program (php.exe or mysqld.exe error)

Do other php pages work? You seem to indicate that they do: (another script that uses MySQL but not the other stuff works fine).


- - picklefish - -
 
If there is a MySQL command that takes up a lot of time observe what the MySQL server does.
Run a window with the shell and cd into the mysql/bin/ folder. Log into the server using
mysql -h localhost -u root -p
While the page is running look at the processes:
SHOW PROCESSLIST;

This will give a clue.
 
I fixed that bug, but now I've got another one...

Code:

Code:
$i = 0;
while($i <= $result_row_num) {
	$row = mysql_fetch_row($result);
	$percent_arr[$i] = $row[1];
    $i++;
    }

//sort array ascending
array_multisort($percent_arr[0], SORT_ASC, SORT_NUMERIC);

The error says that array_multisort is expecting an array as the 1st argument. But I am passing it an array! :S

($percent_arr has not been used before the loop above in the script snippet)
 
Huh? I copied that way of doing it from the PHP manual. *hmph*

I tried without the '[0]', and it did that damn annoying 'Expiries timeout!' thing again :(
 
What are trying to do?
Are you attempting to display a progress bar on the screen?
If so, that will not work. ;)
 
I tried it again, and it worked. Huh??!?!? :S
 
It isn't a percetage bar. I worked out a long time ago that you can't do that very easily, lol. :)
 
TheFoxy:
Are you talking about this example from the array_multisort() page of the online manual?

Code:
$ar = array (array (&quot;10&quot;, 100, 100, &quot;a&quot;), array (1, 3, &quot;2&quot;, 1));
array_multisort ($ar[0], SORT_ASC, SORT_STRING,
                 $ar[1], SORT_NUMERIC, SORT_DESC);

In that example, $ar is multidimensional. $ar[0] and $ar[1] are themselves arrays.

Want the best answers? Ask the best questions: TANSTAAFL!!
 
To make your array multi dimensional you would need:
Code:
while($i <= $result_row_num) {
    $row = mysql_fetch_row($result);
    $percent_arr[$i]
[]
Code:
 = $row[1];
    $i++;
    }
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top