#27201 [Opn->Fbk]: exec does not wait for completion of cmd

2004-02-11 Thread iliaa
 ID:   27201
 Updated by:   [EMAIL PROTECTED]
 Reported By:  lars at erhardsen dot dk
-Status:   Open
+Status:   Feedback
 Bug Type: Program Execution
 Operating System: debian woody
 PHP Version:  4.3.4
 New Comment:

Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip

The apache2 build bug has been fixed. 
 
As far as the exec() situations I've just tried to 
replicate the bug with the while() example and was unable 
to do so. 


Previous Comments:


[2004-02-11 08:17:09] lars at erhardsen dot dk

Now this appears in the apache error-log:

sh: /hostname: No such file or directory
sh: /uptime: No such file or directory

How can this be?



[2004-02-11 02:53:24] [EMAIL PROTECTED]

If you want it stable, use 1.3.29, setting it to feedback to see if it
works with apache 1.3.

Derick



[2004-02-11 01:55:01] lars at erhardsen dot dk

Sorry, the last posting was a little un-informative.

I tried compiling the cvs snapshot as cli, and set up a program loop
with the contents stated in my previous posting. I let it run to around
5000, and no error appeared.

I compiled the cli executeable with "./configure --disable-all
--disable-cgi --enable-debug".


I then tried to compile the source with --with-apxs2=path - which ended
up with the following error:
/home/admin/debug/php4-STABLE-200402101230/sapi/apache2handler/sapi_apache2.c:
In function `php_apache_request_ctor':
/debug/php4-STABLE-200402101230/sapi/apache2handler/sapi_apache2.c:432:
`f' undeclared (first use in this function)
/debug/php4-STABLE-200402101230/sapi/apache2handler/sapi_apache2.c:432:
(Each undeclared identifier is reported only once
/debug/php4-STABLE-200402101230/sapi/apache2handler/sapi_apache2.c:432:
for each function it appears in.)

I'm currently considering to replace Apache2 with Apache 1.3.xx - to
see, if it could help.



[2004-02-10 17:56:43] [EMAIL PROTECTED]

Can you produce the problem with 4.3.4 CLI binary?
What apache2 error? Compile time? or what??




[2004-02-10 08:56:16] lars at erhardsen dot dk

With the new source, and the following code, I cannot reproduce the
error. 
My concern is now, that it is caused by apache2 - but the strange thing
is, that on the slow machine, this error doesn't occur.

The apache2handler seems broken( or maybe I cannot compile it  - error
40 ;o)) so I cannot check it with the apache server...


The code:




The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/27201

-- 
Edit this bug report at http://bugs.php.net/?id=27201&edit=1


#27201 [Opn->Fbk]: exec does not wait for completion of cmd

2004-02-11 Thread derick
 ID:   27201
 Updated by:   [EMAIL PROTECTED]
 Reported By:  lars at erhardsen dot dk
-Status:   Open
+Status:   Feedback
 Bug Type: Program Execution
 Operating System: debian woody
 PHP Version:  4.3.4
 New Comment:

If you want it stable, use 1.3.29, setting it to feedback to see if it
works with apache 1.3.

Derick


Previous Comments:


[2004-02-11 01:55:01] lars at erhardsen dot dk

Sorry, the last posting was a little un-informative.

I tried compiling the cvs snapshot as cli, and set up a program loop
with the contents stated in my previous posting. I let it run to around
5000, and no error appeared.

I compiled the cli executeable with "./configure --disable-all
--disable-cgi --enable-debug".


I then tried to compile the source with --with-apxs2=path - which ended
up with the following error:
/home/admin/debug/php4-STABLE-200402101230/sapi/apache2handler/sapi_apache2.c:
In function `php_apache_request_ctor':
/debug/php4-STABLE-200402101230/sapi/apache2handler/sapi_apache2.c:432:
`f' undeclared (first use in this function)
/debug/php4-STABLE-200402101230/sapi/apache2handler/sapi_apache2.c:432:
(Each undeclared identifier is reported only once
/debug/php4-STABLE-200402101230/sapi/apache2handler/sapi_apache2.c:432:
for each function it appears in.)

I'm currently considering to replace Apache2 with Apache 1.3.xx - to
see, if it could help.



[2004-02-10 17:56:43] [EMAIL PROTECTED]

Can you produce the problem with 4.3.4 CLI binary?
What apache2 error? Compile time? or what??




[2004-02-10 08:56:16] lars at erhardsen dot dk

With the new source, and the following code, I cannot reproduce the
error. 
My concern is now, that it is caused by apache2 - but the strange thing
is, that on the slow machine, this error doesn't occur.

The apache2handler seems broken( or maybe I cannot compile it  - error
40 ;o)) so I cannot check it with the apache server...


The code:




[2004-02-10 07:59:26] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip

And use this configure line (and run the script with sapi/cli/php
binary):

# ./configure --disable-all --disable-cgi --enable-debug




[2004-02-10 04:35:02] lars at erhardsen dot dk

HT is available, but not enabled. The kernel is compiled as
UNIprocessor (or what it's called)



The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/27201

-- 
Edit this bug report at http://bugs.php.net/?id=27201&edit=1


#27201 [Opn->Fbk]: exec does not wait for completion of cmd

2004-02-10 Thread sniper
 ID:   27201
 Updated by:   [EMAIL PROTECTED]
 Reported By:  lars at erhardsen dot dk
-Status:   Open
+Status:   Feedback
 Bug Type: Program Execution
 Operating System: debian woody
 PHP Version:  4.3.4
 New Comment:

Can you produce the problem with 4.3.4 CLI binary?
What apache2 error? Compile time? or what??



Previous Comments:


[2004-02-10 08:56:16] lars at erhardsen dot dk

With the new source, and the following code, I cannot reproduce the
error. 
My concern is now, that it is caused by apache2 - but the strange thing
is, that on the slow machine, this error doesn't occur.

The apache2handler seems broken( or maybe I cannot compile it  - error
40 ;o)) so I cannot check it with the apache server...


The code:




[2004-02-10 07:59:26] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip

And use this configure line (and run the script with sapi/cli/php
binary):

# ./configure --disable-all --disable-cgi --enable-debug




[2004-02-10 04:35:02] lars at erhardsen dot dk

HT is available, but not enabled. The kernel is compiled as
UNIprocessor (or what it's called)



[2004-02-10 04:29:08] [EMAIL PROTECTED]

If hyperthreading is available and on, turn it off and 
then try the same thing again. It's known to cause some 
problems with older linux kernels.




[2004-02-10 03:45:53] lars at erhardsen dot dk

Description:

I think, I have a similar problem as #11023 - where exec() does not
wait for program completion.



The scenary is: Linux 2.4.22, Apache 2.0.48, PHP 4.3.4 on a Pentium 4,
2.4ghz, 512 mb ram

The page continues without the 'output' from exec thus leaving an
incomplete page. If I press f5/refresh, some times it works, other
times
it does not work.

I have also placed sleeps between commands to ensure it works well, but
imho this should not be nescessary - as this  "bug" does not appear on
a slower machine.

My php config: 
./configure --with-apxs2=/usr/local/apache2/bin/apxs
--with-gd=/usr/local --with-pdflib=/usr/local --with-mysql
--with-config-file-path=/etc/apache2 --with-session
--with-zlib-dir=/usr
--with-png-dir=/usr/lib --with-freetype-dir=/usr --with-jpeg-dir=/usr
--with-tiff-dir=/usr --with-system-regex=yes --enable-debug=no
--with-xml --with-imap-ssl=/usr/local/imap-2002d --enable-exif
--with-openssl --with-gettext --enable-ftp --enable-sysvsem
--enable-sysvshm --enable-calendar --enable-bcmath --enable-sockets
--enable-track-vars --with-mcrypt --enable-gd-native-ttf
--enable-mbstring --enable-gd-native-ttf

My Apache config:
./configure --enable-ssl --enable-rewrite --enable-so --enable-info
--enable-suexec --with-suexec-caller=nobody --enable-dav 
--enable-deflate

Reproduce code:
---
system ( "hostname" );
echo " | ";

$a = exec ( "uptime" );
$b = split(',', $a);
$c = split('up', $b[0]);
$d = split(':', $b[3]);

echo $c[1] . " | " . $d[1] . ", " . $b[4] . ", " . $b[5];


Expected result:

maxmotor | 75 days | 0.00, 0.00, 0.00 

Actual result:
--
Some times, nothing is returned





-- 
Edit this bug report at http://bugs.php.net/?id=27201&edit=1


#27201 [Opn->Fbk]: exec does not wait for completion of cmd

2004-02-10 Thread sniper
 ID:   27201
 Updated by:   [EMAIL PROTECTED]
 Reported By:  lars at erhardsen dot dk
-Status:   Open
+Status:   Feedback
 Bug Type: Program Execution
 Operating System: debian woody
 PHP Version:  4.3.4
 New Comment:

Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip

And use this configure line (and run the script with sapi/cli/php
binary):

# ./configure --disable-all --disable-cgi --enable-debug



Previous Comments:


[2004-02-10 04:35:02] lars at erhardsen dot dk

HT is available, but not enabled. The kernel is compiled as
UNIprocessor (or what it's called)



[2004-02-10 04:29:08] [EMAIL PROTECTED]

If hyperthreading is available and on, turn it off and 
then try the same thing again. It's known to cause some 
problems with older linux kernels.




[2004-02-10 03:45:53] lars at erhardsen dot dk

Description:

I think, I have a similar problem as #11023 - where exec() does not
wait for program completion.



The scenary is: Linux 2.4.22, Apache 2.0.48, PHP 4.3.4 on a Pentium 4,
2.4ghz, 512 mb ram

The page continues without the 'output' from exec thus leaving an
incomplete page. If I press f5/refresh, some times it works, other
times
it does not work.

I have also placed sleeps between commands to ensure it works well, but
imho this should not be nescessary - as this  "bug" does not appear on
a slower machine.

My php config: 
./configure --with-apxs2=/usr/local/apache2/bin/apxs
--with-gd=/usr/local --with-pdflib=/usr/local --with-mysql
--with-config-file-path=/etc/apache2 --with-session
--with-zlib-dir=/usr
--with-png-dir=/usr/lib --with-freetype-dir=/usr --with-jpeg-dir=/usr
--with-tiff-dir=/usr --with-system-regex=yes --enable-debug=no
--with-xml --with-imap-ssl=/usr/local/imap-2002d --enable-exif
--with-openssl --with-gettext --enable-ftp --enable-sysvsem
--enable-sysvshm --enable-calendar --enable-bcmath --enable-sockets
--enable-track-vars --with-mcrypt --enable-gd-native-ttf
--enable-mbstring --enable-gd-native-ttf

My Apache config:
./configure --enable-ssl --enable-rewrite --enable-so --enable-info
--enable-suexec --with-suexec-caller=nobody --enable-dav 
--enable-deflate

Reproduce code:
---
system ( "hostname" );
echo " | ";

$a = exec ( "uptime" );
$b = split(',', $a);
$c = split('up', $b[0]);
$d = split(':', $b[3]);

echo $c[1] . " | " . $d[1] . ", " . $b[4] . ", " . $b[5];


Expected result:

maxmotor | 75 days | 0.00, 0.00, 0.00 

Actual result:
--
Some times, nothing is returned





-- 
Edit this bug report at http://bugs.php.net/?id=27201&edit=1


#27201 [Opn->Fbk]: exec does not wait for completion of cmd

2004-02-10 Thread moriyoshi
 ID:   27201
 Updated by:   [EMAIL PROTECTED]
 Reported By:  lars at erhardsen dot dk
-Status:   Open
+Status:   Feedback
 Bug Type: Program Execution
 Operating System: debian woody
 PHP Version:  4.3.4
 New Comment:

Looks like I forgot to ask some important questions I 
usually ask when the reporter uses Apache 2 :)

1) What MPM is used in Apache? (e.g. prefork, worker)
2) If you are using a MPM other than prefork, Did you 
specify --enable-experimental-zts at configure?



Previous Comments:


[2004-02-10 04:35:02] lars at erhardsen dot dk

HT is available, but not enabled. The kernel is compiled as
UNIprocessor (or what it's called)



[2004-02-10 04:29:08] [EMAIL PROTECTED]

If hyperthreading is available and on, turn it off and 
then try the same thing again. It's known to cause some 
problems with older linux kernels.




[2004-02-10 03:45:53] lars at erhardsen dot dk

Description:

I think, I have a similar problem as #11023 - where exec() does not
wait for program completion.



The scenary is: Linux 2.4.22, Apache 2.0.48, PHP 4.3.4 on a Pentium 4,
2.4ghz, 512 mb ram

The page continues without the 'output' from exec thus leaving an
incomplete page. If I press f5/refresh, some times it works, other
times
it does not work.

I have also placed sleeps between commands to ensure it works well, but
imho this should not be nescessary - as this  "bug" does not appear on
a slower machine.

My php config: 
./configure --with-apxs2=/usr/local/apache2/bin/apxs
--with-gd=/usr/local --with-pdflib=/usr/local --with-mysql
--with-config-file-path=/etc/apache2 --with-session
--with-zlib-dir=/usr
--with-png-dir=/usr/lib --with-freetype-dir=/usr --with-jpeg-dir=/usr
--with-tiff-dir=/usr --with-system-regex=yes --enable-debug=no
--with-xml --with-imap-ssl=/usr/local/imap-2002d --enable-exif
--with-openssl --with-gettext --enable-ftp --enable-sysvsem
--enable-sysvshm --enable-calendar --enable-bcmath --enable-sockets
--enable-track-vars --with-mcrypt --enable-gd-native-ttf
--enable-mbstring --enable-gd-native-ttf

My Apache config:
./configure --enable-ssl --enable-rewrite --enable-so --enable-info
--enable-suexec --with-suexec-caller=nobody --enable-dav 
--enable-deflate

Reproduce code:
---
system ( "hostname" );
echo " | ";

$a = exec ( "uptime" );
$b = split(',', $a);
$c = split('up', $b[0]);
$d = split(':', $b[3]);

echo $c[1] . " | " . $d[1] . ", " . $b[4] . ", " . $b[5];


Expected result:

maxmotor | 75 days | 0.00, 0.00, 0.00 

Actual result:
--
Some times, nothing is returned





-- 
Edit this bug report at http://bugs.php.net/?id=27201&edit=1


#27201 [Opn->Fbk]: exec does not wait for completion of cmd

2004-02-10 Thread moriyoshi
 ID:   27201
 Updated by:   [EMAIL PROTECTED]
 Reported By:  lars at erhardsen dot dk
-Status:   Open
+Status:   Feedback
 Bug Type: Program Execution
 Operating System: debian woody
 PHP Version:  4.3.4
 New Comment:

If hyperthreading is available and on, turn it off and 
then try the same thing again. It's known to cause some 
problems with older linux kernels.



Previous Comments:


[2004-02-10 03:45:53] lars at erhardsen dot dk

Description:

I think, I have a similar problem as #11023 - where exec() does not
wait for program completion.



The scenary is: Linux 2.4.22, Apache 2.0.48, PHP 4.3.4 on a Pentium 4,
2.4ghz, 512 mb ram

The page continues without the 'output' from exec thus leaving an
incomplete page. If I press f5/refresh, some times it works, other
times
it does not work.

I have also placed sleeps between commands to ensure it works well, but
imho this should not be nescessary - as this  "bug" does not appear on
a slower machine.

My php config: 
./configure --with-apxs2=/usr/local/apache2/bin/apxs
--with-gd=/usr/local --with-pdflib=/usr/local --with-mysql
--with-config-file-path=/etc/apache2 --with-session
--with-zlib-dir=/usr
--with-png-dir=/usr/lib --with-freetype-dir=/usr --with-jpeg-dir=/usr
--with-tiff-dir=/usr --with-system-regex=yes --enable-debug=no
--with-xml --with-imap-ssl=/usr/local/imap-2002d --enable-exif
--with-openssl --with-gettext --enable-ftp --enable-sysvsem
--enable-sysvshm --enable-calendar --enable-bcmath --enable-sockets
--enable-track-vars --with-mcrypt --enable-gd-native-ttf
--enable-mbstring --enable-gd-native-ttf

My Apache config:
./configure --enable-ssl --enable-rewrite --enable-so --enable-info
--enable-suexec --with-suexec-caller=nobody --enable-dav 
--enable-deflate

Reproduce code:
---
system ( "hostname" );
echo " | ";

$a = exec ( "uptime" );
$b = split(',', $a);
$c = split('up', $b[0]);
$d = split(':', $b[3]);

echo $c[1] . " | " . $d[1] . ", " . $b[4] . ", " . $b[5];


Expected result:

maxmotor | 75 days | 0.00, 0.00, 0.00 

Actual result:
--
Some times, nothing is returned





-- 
Edit this bug report at http://bugs.php.net/?id=27201&edit=1