php 5.3.2 Unable to fork

php 5.3.2 Unable to fork

am 31.03.2010 18:34:38 von Eduardo Nunes

Hello people!

A time before I had issues with my php 5.2.3 that would not fork anything,
neither in shell or via apache, and I figured out that commenting out the
snmp.so extension from php.ini made it fork commands passed to php cli with
an unprivileged user (www) fine, however apache still would not fork
anything.

Now I just compiled 5.3.2 and it doesn't fork at all, neither as root
with -n option.

For example I am running:
root@saturno:/usr/src/apache/php-5.3.2# ./sapi/cli/php -n -r 'echo
shell_exec("echo Test!");'
Warning: shell_exec(): Unable to execute 'echo Test!' in Command line code
on line 1

(neither system, exec, other options work)

Any ideas on what is going on?

(compiled using
.../configure --prefix=/usr --with-apxs2 --disable-cgi --disable-short-tags --disable-ipv6
--without-sqlite3 --with-mysql --with-pdo-mysql --without-pdo-sqlite --enable-sockets
--without-sqlite --with-gnu-ld)

Thanks


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: php 5.3.2 Unable to fork

am 31.03.2010 22:51:18 von Eduardo Nunes

Compiling without mysql support, the cli "php -r 'echo shell_exec("echo
Test!");' works fine even as the apache unprivileged user. However when
running the test.php script with apache the error log still shows the error
Unable to execute / Unable to fork ...


""Eduardo Nunes"" escreveu na mensagem
news:38.94.09265.3A973BB4@pb1.pair.com...
> Hello people!
>
> A time before I had issues with my php 5.2.3 that would not fork anything,
> neither in shell or via apache, and I figured out that commenting out the
> snmp.so extension from php.ini made it fork commands passed to php cli
> with an unprivileged user (www) fine, however apache still would not fork
> anything.
>
> Now I just compiled 5.3.2 and it doesn't fork at all, neither as root
> with -n option.
>
> For example I am running:
> root@saturno:/usr/src/apache/php-5.3.2# ./sapi/cli/php -n -r 'echo
> shell_exec("echo Test!");'
> Warning: shell_exec(): Unable to execute 'echo Test!' in Command line code
> on line 1
>
> (neither system, exec, other options work)
>
> Any ideas on what is going on?
>
> (compiled using
> ../configure --prefix=/usr --with-apxs2 --disable-cgi --disable-short-tags
> --disable-ipv6 --without-sqlite3 --with-mysql --with-pdo-mysql --without-pdo-sqlite
> --enable-sockets --without-sqlite --with-gnu-ld)
>
> Thanks


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: php 5.3.2 Unable to fork

am 01.04.2010 02:40:21 von Nathan Rixham

Eduardo Nunes wrote:
> Compiling without mysql support, the cli "php -r 'echo shell_exec("echo
> Test!");' works fine even as the apache unprivileged user. However when
> running the test.php script with apache the error log still shows the
> error Unable to execute / Unable to fork ...

back in 5.2.3 i had the same problem and found it to be the psql drivers
not mysql.. may be worth checking

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Re: php 5.3.2 Unable to fork

am 01.04.2010 03:53:43 von Nilesh Govindrajan

On 04/01/10 02:21, Eduardo Nunes wrote:
> Compiling without mysql support, the cli "php -r 'echo shell_exec("echo
> Test!");' works fine even as the apache unprivileged user. However when
> running the test.php script with apache the error log still shows the
> error Unable to execute / Unable to fork ...
>
>
> ""Eduardo Nunes"" escreveu na mensagem
> news:38.94.09265.3A973BB4@pb1.pair.com...
>> Hello people!
>>
>> A time before I had issues with my php 5.2.3 that would not fork
>> anything, neither in shell or via apache, and I figured out that
>> commenting out the snmp.so extension from php.ini made it fork
>> commands passed to php cli with an unprivileged user (www) fine,
>> however apache still would not fork anything.
>>
>> Now I just compiled 5.3.2 and it doesn't fork at all, neither as root
>> with -n option.
>>
>> For example I am running:
>> root@saturno:/usr/src/apache/php-5.3.2# ./sapi/cli/php -n -r 'echo
>> shell_exec("echo Test!");'
>> Warning: shell_exec(): Unable to execute 'echo Test!' in Command line
>> code on line 1
>>
>> (neither system, exec, other options work)
>>
>> Any ideas on what is going on?
>>
>> (compiled using ../configure --prefix=/usr --with-apxs2 --disable-cgi
>> --disable-short-tags --disable-ipv6 --without-sqlite3 --with-mysql
>> --with-pdo-mysql --without-pdo-sqlite --enable-sockets
>> --without-sqlite --with-gnu-ld)
>>
>> Thanks
>
>

I think you need to check your PATH environment variable. Add the
directory to it where your PHP interpreter sits.

PS: This just a guess. Don't bash me if I'm wrong.

--
Nilesh Govindarajan
Site & Server Administrator
www.itech7.com
मेरा भारत महान !
मम भारत: महत्तम भवतु !

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: php 5.3.2 Unable to fork

am 01.04.2010 17:44:43 von Eduardo Nunes

Hi, thanks for the reply, just tried without any db bases and the scenario
did not change (besides for mysql).
With and without pear.. nothing changed from the initial scene.


"Nathan Rixham" escreveu na mensagem
news:4BB3EB75.4020008@gmail.com...
> Eduardo Nunes wrote:
>> Compiling without mysql support, the cli "php -r 'echo shell_exec("echo
>> Test!");' works fine even as the apache unprivileged user. However when
>> running the test.php script with apache the error log still shows the
>> error Unable to execute / Unable to fork ...
>
> back in 5.2.3 i had the same problem and found it to be the psql drivers
> not mysql.. may be worth checking


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Re: php 5.3.2 Unable to fork

am 01.04.2010 17:55:19 von Eduardo Nunes

I would try your setenv path idea while compiling php without mysql, however
I don't get why compiling php with mysql does not fork nor execute even
running the php cli as root...

Thanks for the reply Nilesh!

"Nilesh Govindarajan" escreveu na mensagem
news:4BB3FCA7.4030806@itech7.com...
> On 04/01/10 02:21, Eduardo Nunes wrote:
>> Compiling without mysql support, the cli "php -r 'echo shell_exec("echo
>> Test!");' works fine even as the apache unprivileged user. However when
>> running the test.php script with apache the error log still shows the
>> error Unable to execute / Unable to fork ...
>>
>>
>> ""Eduardo Nunes"" escreveu na mensagem
>> news:38.94.09265.3A973BB4@pb1.pair.com...
>>> Hello people!
>>>
>>> A time before I had issues with my php 5.2.3 that would not fork
>>> anything, neither in shell or via apache, and I figured out that
>>> commenting out the snmp.so extension from php.ini made it fork
>>> commands passed to php cli with an unprivileged user (www) fine,
>>> however apache still would not fork anything.
>>>
>>> Now I just compiled 5.3.2 and it doesn't fork at all, neither as root
>>> with -n option.
>>>
>>> For example I am running:
>>> root@saturno:/usr/src/apache/php-5.3.2# ./sapi/cli/php -n -r 'echo
>>> shell_exec("echo Test!");'
>>> Warning: shell_exec(): Unable to execute 'echo Test!' in Command line
>>> code on line 1
>>>
>>> (neither system, exec, other options work)
>>>
>>> Any ideas on what is going on?
>>>
>>> (compiled using ../configure --prefix=/usr --with-apxs2 --disable-cgi
>>> --disable-short-tags --disable-ipv6 --without-sqlite3 --with-mysql
>>> --with-pdo-mysql --without-pdo-sqlite --enable-sockets
>>> --without-sqlite --with-gnu-ld)
>>>
>>> Thanks
>>
>>
>
> I think you need to check your PATH environment variable. Add the
> directory to it where your PHP interpreter sits.
>
> PS: This just a guess. Don't bash me if I'm wrong.
>
> --
> Nilesh Govindarajan
> Site & Server Administrator
> www.itech7.com
> मेरा भारत महान !
> मम भारत: महत्तम भवतु !


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php