ID:               46477
 User updated by:  rachmel at avaya dot com
 Reported By:      rachmel at avaya dot com
 Status:           Open
 Bug Type:         CGI related
 Operating System: Linux 2.6.14.7
 PHP Version:      5.2CVS-2008-11-05
 New Comment:

Hi,

Tried with the latest version of apache2 and it works OK.
Something with the mode I am using is wrong. Do you have any ideas? Are
you familiar with such errors maybe?


Previous Comments:
------------------------------------------------------------------------

[2008-11-06 11:47:15] rachmel at avaya dot com

1. Here's the output of your script:
array(0) { } int(-1) array(0) { } int(-1) array(0) { } int(-1) array(0)
{ } int(-1) array(0) { } int(-1) array(0) { } int(-1) array(0) { }
int(-1) array(0) { } int(-1) array(0) { } int(-1) array(0) { } int(-1)
array(0) { } int(-1) array(0) { } int(-1) array(0) { } int(-1) array(0)
{ } int(-1) array(0) { } int(-1) array(0) { } int(1) array(0) { }
int(-1) array(0) { } int(-1) array(0) { } int(-1) array(0) { } int(-1) 

2. Regarding the CGI mode. Maybe I don't understand the concept of CGI
well enough - I will try to explain my setting:
a. I compile php and create the libphp5.so. Notice the
"'--enable-embed=shared'" directive in the configure line.
b. I compile my web-server (appWeb). It has an internal module for
running php scripts which dynamically links to the libphp5.so.
Is this referred to as CGI mode or SAPI mode?

------------------------------------------------------------------------

[2008-11-06 11:23:43] [EMAIL PROTECTED]

First of all: You're obviously running PHP as CGI since that's the only
one you're compiling with that configure line. Also, try this script
instead:

<?php
for ($i = 0; $i < 10; ++$i) {
  exec("/bin/true", $out, $status);
  var_dump($out, $status);
  exec("/bin/false", $out, $status);
  var_dump($out, $status);
}
?>




------------------------------------------------------------------------

[2008-11-06 09:51:22] rachmel at avaya dot com

Another important comment - The funny thing is that the command
finishes succesfuly!

I tried using a small c program that I wrote:
#include <stdio.h>
int main(int argc, char **argv)
{
        printf("true was called!");

        return 0;
}

So when printing the $output var, it holds the correct string. It is
just the $status var that holds the wrong value.

------------------------------------------------------------------------

[2008-11-06 09:49:43] rachmel at avaya dot com

1. I tried using "var_dump()" - got the same results.
(it prints "int(-1)" all the time).

2. regarding the apache server - I don't have one installed/configured
on my system but I will give it a try.

------------------------------------------------------------------------

[2008-11-06 09:36:48] rachmel at avaya dot com

Here's the configure line used:
Configure Command =>  './configure'  
'--host=i686-linux' 
'--build=i686-linux' 
'--prefix=/usr/local' 
'--disable-all' 
'--enable-static' 
'--disable-shared' 
'--enable-memory-limit' 
'--disable-safe-mode' 
'--disable-rpath' 
'--disable-ipv6' 
'--disable-wddx' 
'--disable-bcmath' 
'--enable-debug' 
'--disable-calendar' 
'--enable-ftp' 
'--without-aolserver' 
'--without-apache' 
'--without-continuity' 
'--without-pi3web' 
'--enable-releasemode' 
'--enable-xml' 
'--cache-file=config.cache' 
'--enable-libxml' 
'--with-libxml-dir=/usr/local' 
'--disable-simplexml' 
'--enable-dom' 
'--enable-soap' 
'--with-db' 
'--enable-sockets' 
'--enable-track-vars' 
'--enable-trans-sid' 
'--enable-magic-quotes' 
'--without-pear' 
'--with-zlib' 
'--with-exec-dir=/usr/local/appweb' 
'--sysconfdir=/usr/local/appweb' 
'--with-gnu-ld' 
'--with-openssl=/usr' 
'--enable-mbstring' 
'--disable-mbregex' 
'--enable-session' 
'--enable-pcntl' 
'--enable-pdo' 
'--with-pdo-sqlite=/usr/local' 
'--with-pcre-regex' 
'--enable-spl' 
'--enable-tokenizer' 
'--with-snmp=/usr/local' 
'--enable-ctype' 
'--enable-apc' 
'--with-ctype' 
'--without-tsrm-pthreads' 
'--disable-threadsafe' 
'--disable-maintainer-zts' 
'--enable-embed=shared' 
'--enable-cgi' 
'--enable-cli' 
'--enable-inline-optimization' 
'--with-curl=/usr/local' 
'--with-curlwrappers' 
'--enable-cipher'

------------------------------------------------------------------------

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/46477

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

Reply via email to