ID: 26633
User updated by: jruffer at hss dot co dot uk
Reported By: jruffer at hss dot co dot uk
Status: Bogus
Bug Type: Apache related
Operating System: DG/UX
PHP Version: 4.3.4
New Comment:
DG/UX is the OS used by Data General Unix machines. It uses GNU C. I
made the changes because it would not compile without them.
Previous Comments:
------------------------------------------------------------------------
[2003-12-15 17:14:11] [EMAIL PROTECTED]
Dunno what DG/UX even is, apparently not any OS we can support. (and as
you have modified the sources yourself..)
------------------------------------------------------------------------
[2003-12-15 12:53:00] jruffer at hss dot co dot uk
set_time_limit(0) makes it work.
------------------------------------------------------------------------
[2003-12-15 12:28:32] jruffer at hss dot co dot uk
Description:
------------
These functions work fine using the CLI but when used with Apache give
a spurious execution timeout error. I tried setting the timeout to
30000 and it still happened immediately. The problem occurs with any
command that I try to call using system(), exec() or backtick. I do
not have safe-mode enabled.
I did have a couple of porting problems with DG/UX. I had to add
#include <sys/dir.h> to main/php_scandir.h and
double expm1(double x)
{
return(exp(x));
}
before #include "php.h" in ext/standard/math.c
'./configure' '--with-ingres=/OI/ingres' '--without-mysql'
'--enable-ftp' '--enable-cli' '--enable-cgi'
'--with-apache=/usr/opt/apache/apache_1.3.29'
php.ini:
safe_mode_exec_dir = /usr/
log_errors = On
report_memleaks = Off
track_errors = On
error_log = /usr/opt/apache/www/logs/php.log
sendmail_from = [EMAIL PROTECTED]
ingres.allow_persistent = Off
ingres.default_database = divtest
ingres.default_user = devdba
Reproduce code:
---------------
<?php
print "<html>\n";
print "<h2 align='center'>Attempting to run `ls -l` </h2>\n";
$list = `ls -l`;
foreach($list as $value) {
print "$list<br>\n";
print "</html>\n";
?>
Expected result:
----------------
Attempting to run `ls -l`
total 97 -rw-r--r-- 1 jeremy general 5520 Dec 12 09:56 build_status.php
-rw-r--r
-- 1 jeremy general 501 Dec 12 10:24 cr.menu -rw-r--r-- 1 jeremy
general 365 Dec
2 08:49 debug.inc lrwxrwxrwx 1 jeremy general 11 Dec 2 09:36 doc ->
/phase3/doc
-rw-r--r-- 1 jeremy general 3868 Dec 10 18:29 image_request.php
-rw-r--r-- 1 je
remy other 2543 Dec 2 17:31 images.php -rw-r--r-- 1 jeremy general 86
Dec 12 11:
00 index.html -rw-r--r-- 1 jeremy general 362 Dec 1 16:12
index.old.html -rw-r--
r-- 1 jeremy general 77 Dec 10 12:08 info.php -rw-r--r-- 1 jeremy
general 105 De
c 12 11:21 ingkey.err -rw-r--r-- 1 jeremy general 386 Dec 12 12:21
init.inc -rw-
r--r-- 1 jeremy general 786 Dec 12 15:17 login.inc -rw-r--r-- 1 jeremy
general 2
05 Dec 12 11:10 login.php -rw-r--r-- 1 jeremy general 863 Dec 12 10:55
menu.php
-rw-r--r-- 1 jeremy general 1899 Dec 3 10:31 release.php -rw-r--r-- 1
jeremy gen
eral 569 Dec 7 10:08 resume.php -rw-r--r-- 1 jeremy general 1041 Dec 11
17:52 ru
n_signoff.php -rw-r--r-- 1 jeremy general 857 Dec 12 15:18 secure.inc
-rw-r--r--
1 jeremy general 6712 Dec 15 09:30 signoff.php -rw-r--r-- 1 jeremy
general 1046
Dec 3 11:37 suspend.php -rw-r--r-- 1 jeremy general 619 Dec 5 16:45
tech.html -
rw-r--r-- 1 jeremy general 155 Dec 15 17:08 test.php -rw-r--r-- 1
jeremy general
2379 Dec 10 16:51 update_queue.php -rw-r--r-- 1 jeremy general 2783
Dec 10 16:4
8 update_queue.v1.php -rw-r--r-- 1 jeremy general 277 Dec 12 12:23
wrap.inc
Actual result:
--------------
Attempting to run `ls -l`
Fatal error: Maximum execution time of 30 seconds exceeded in
/usr/opt/apache/www/htdocs/image/test.php on line 4
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=26633&edit=1