Jump to content
php.lv forumi

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


Wuu

Recommended Posts

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!

Link to comment
Share on other sites

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>

";}

Link to comment
Share on other sites

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>';			
}

Link to comment
Share on other sites

  • 2 weeks later...
  • 1 month later...

<?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...

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

×
×
  • Create New...