Jump to content
php.lv forumi

php gluko! Pilnigi atsakas stradat! Parejot no Unix uz Win


Recommended Posts

Posted

Kas varetu but pa vainu?

[Thu May 01 18:04:05 2008] [error] [client 127.0.0.1] PHP Fatal error:  Maximum execution time of 30 seconds exceeded in D:\\Server\\http\\menu.php on line 1
[Thu May 01 18:04:33 2008] [error] [client 127.0.0.1] PHP Fatal error:  Maximum execution time of 30 seconds exceeded in D:\\Server\\http\\login.php on line 2
[Thu May 01 18:06:48 2008] [error] [client 127.0.0.1] PHP Fatal error:  Maximum execution time of 30 seconds exceeded in D:\\Server\\http\\menu.php on line 16
[Thu May 01 18:07:25 2008] [error] [client 127.0.0.1] PHP Fatal error:  Maximum execution time of 30 seconds exceeded in D:\\Server\\http\\menu.php on line 16
[Thu May 01 18:08:28 2008] [error] [client 127.0.0.1] PHP Fatal error:  Maximum execution time of 30 seconds exceeded in D:\\Server\\http\\menu.php on line 16
[Thu May 01 18:23:51 2008] [error] [client 127.0.0.1] PHP Fatal error:  Maximum execution time of 30 seconds exceeded in D:\\Server\\http\\menu.php on line 16
[Thu May 01 21:18:02 2008] [error] [client 127.0.0.1] PHP Notice:  Undefined variable: pageEcho in D:\\Server\\http\\news.php on line 37
[Thu May 01 21:19:08 2008] [error] [client 127.0.0.1] PHP Fatal error:  Maximum execution time of 30 seconds exceeded in D:\\Server\\http\\index.php on line 3, referer: http://localhost/
[Thu May 01 21:19:08 2008] [error] [client 127.0.0.1] PHP Fatal error:  Maximum execution time of 30 seconds exceeded in D:\\Server\\http\\index.php on line 3, referer: http://localhost/

 

Esmu shoka :)

 

http://paste.php.lv/7281?lang=php kods :D Tur tak nav kam bremzet!

 

Pietam phpmyadmin iet uz urra!

Posted
function f($width,$align) {

echo "

 <table align='$align' border='0' width='$width' cellspacing='0' cellpadding='0'>

  <tr>

<td class='table-left-top'></td>

<td class='table-top'></td>

<td class='table-right-top'></td>

  </tr>

Patik noslept html



  <tr>

<td class='table-left'></td>

<td class='table-bc'>

";}



function f_() {

echo "

  </td>

  <td class='table-right'></td>

 </tr>

 <tr>

  <td class='table-left-bottom'></td>

  <td class='table-bottom'></td>

  <td class='table-right-bottom'></td>

 </tr>

</table>

";}

Posted

Esi parliecinats ka shis nav muzigaiz cikls??

tb ... noremo sho fragmentu .... un parliecinies vai DB vispar iet....

while ($r = mysql_fetch_array($result)) 
{
echo '<a href=\'?page=cat&id='.$r[0].'\'> <img src=\'style/bullet.png\' alt=\'*\'> '.$r[1].'</a><br>';			
}

  • 2 weeks later...
Posted

Tu vispār datubāzei esi pieslēdzies pirms mysql_query() lietošanas? Ja ne, tad tās tavas 30 sekundes tikpat labi var būt mysql_query timeout ;)

  • 1 month later...
Posted

<?php
session_start();
include('html_functions.php');
include('admin/config.php');
$link = mysql_connect($db_host,$db_user,$db_pass);
mysql_query('use '.$db_name.';');
 		if (!empty($result)) {
				while ($r = mysql_fetch_array($result)) {
				  echo '<a href=\'?page=cat&id='.$r[0].'\'> <img src=\'style/bullet.png\' alt=\'*\'> '.$r[1].'</a><br>';
				}
		  }
if (mysql_error()) {f(814,'center'); echo 'MySql Error:'.mysql_errno().':'. mysql_error(); f_(); }
mysql_close ($link);
?>

 

Ietesteju sadu codu un viss strada nav vainigs mysql ! Kas tur notiek nesaprotu ludzu help ! Un Linux viss strada =/ Viena vieta to xp...

Posted (edited)

izlasi no sakuma! Isteniba kods iet ,bet NEZELIGI LENI! Kaut kads murgs...

Edited by Wuu
Posted

Dzēs (jeb aizmokentē) no tā bremzējošā skripta kodu pa nelielām daļām ārā (pa vienai funkcijai, jeb vienkārši ik pa 10 rindiņām). Līdzko vairs nebremzēs - tā būs skaidrs, ka vainīga ir pēdējā aizkomentētā koda daļa. Ļoti vienkārši.

Posted

Loti vienkarsi tas gan nav! fsockopen vainigs =/ Uz Win vins vienkarsi strada kaut ka savadak ,netisham uzkeru psc...

Posted (edited)

Tur jau ta lieta ka es pac to netisham iekeru... Nemaz nedomaju ka tam kada vaina scripts 5 rindas =/

fsockopen nevareja pieslegties un meginaja to darit 30 sec... ,pectam palaiz talak bez nekadiem erroriem =]

Edited by Wuu
Posted

Tad viss ir kārtībā. fsockopen tā dara - ilgi gaida uz pieslēgšanos. Izlasi manuālī kā to novērst. Tur ir skaidro norādīts uz argumentu, kurā jāpadod maksimālais laiks, ko var atļauties gadīt.

 

Kā redzi - neviens te nav gaišreģis un nemāk izzīlēt no tukša gaisa kāds tev tur kods.

Posted

Zinu jau zinu! Bet tiesam nevareju iedomaties ka tur ta vaina =/ Vienkarshi uz Win taimaut strada ,bet uz linuxa sanak ka vinam nav nozimes...

×
×
  • Create New...