dynamicallystatic Posted August 24, 2008 Share Posted August 24, 2008 Hello! When I try to use this code: <?php function go() { for ($i = 0; $i < 6; $i++) { $r[i] = rand(0, rand(0, 5682)); } for ($i = 0; $i < 16; $i++) { $op = rand(0, 2); if ($op == 0) { $r[rand(0, 6)] += $r[rand(0, 6)]; } elseif ($op == 1) { $r[rand(0, 6)] *= $r[rand(0, 6)]; } } choose(); } function choose() { if ($r[0] != 0) { $result = $r[0]; } elseif ($r[2] != 0) { $result = $r[2]; } elseif ($r[3] != 0) { $result = $r[3]; } elseif ($r[4] != 0) { $result = $r[4]; } elseif ($r[5] != 0) { $result = $r[5]; } else { go(); } } go(); $result *= 42; echo $result; ?> on an Apache 1.341 CentOS server running PHP 2.5.3 (Lunarpages server turan) with this php.ini file: register_globals = Off include_path = .:/usr/local/lib/php:/home/youre12/pear zend_extension="/usr/local/IonCube/ioncube_loader_lin_4.4.so" zend_extension_ts="/usr/local/IonCube/ioncube_loader_lin_4.4_ts.so" extension=ssh2.so [Zend] zend_optimizer.optimization_level=15 zend_extension_manager.optimizer=/usr/local/Zend/lib/Optimizer-3.3.3 zend_extension_manager.optimizer_ts=/usr/local/Zend/lib/Optimizer_TS-3.3.3 zend_optimizer.version=3.3.3 zend_extension=/usr/local/Zend/lib/ZendExtensionManager.so zend_extension_ts=/usr/local/Zend/lib/ZendExtensionManager_TS.so I get a 500 error. Link to comment https://forums.phpfreaks.com/topic/121132-500-internal-server-error/ Share on other sites More sharing options...
cooldude832 Posted August 24, 2008 Share Posted August 24, 2008 can u get the apache error log? it could be an infinite loop Link to comment https://forums.phpfreaks.com/topic/121132-500-internal-server-error/#findComment-624453 Share on other sites More sharing options...
wildteen88 Posted August 24, 2008 Share Posted August 24, 2008 Check Apaches error log. The error will be logged there. Alternatively turn display_errors on and set error_reporting to E_ALL Link to comment https://forums.phpfreaks.com/topic/121132-500-internal-server-error/#findComment-624454 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.