php.ini in cgi vs php.ini in cli
php.ini in cgi vs php.ini in cli
am 15.09.2009 00:21:11 von Andres Gonzalez
In the php configurations directories /etc/php5, there are 2
subdirectories, one for
cgi and one for cli. There is a php.ini file in each of these directories.
What would cause a difference of behavior in these 2 environments with
the php.ini
exactly the same in each directory??
I have a command line script that consequently uses the cli version.
This script works
just fine in that it can access API function in modules that are loaded
via cli/php.ini
However, when executing in the cgi environment, I get a "call to
undefined function" error
even though my 2 php.ini files are exactly the same.
Any idea what is causing this?
thanks,
-Andres
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: php.ini in cgi vs php.ini in cli
am 15.09.2009 03:31:42 von Lars Torben Wilson
On Mon, 14 Sep 2009 18:21:11 -0400
Andres Gonzalez wrote:
> In the php configurations directories /etc/php5, there are 2
> subdirectories, one for
> cgi and one for cli. There is a php.ini file in each of these
> directories.
>
> What would cause a difference of behavior in these 2 environments
> with the php.ini
> exactly the same in each directory??
>
> I have a command line script that consequently uses the cli version.
> This script works
> just fine in that it can access API function in modules that are
> loaded via cli/php.ini
>
> However, when executing in the cgi environment, I get a "call to
> undefined function" error
> even though my 2 php.ini files are exactly the same.
>
> Any idea what is causing this?
>
> thanks,
>
> -Andres
>
Hi Andres,
When asking this kind of question, it would be very helpful if you
would tell us *which* function raised this error.
My first thought is that you tried to call a function which was
compiled in to the CLI version but not the CGI. What does phpinfo()
show when run under each?
Torben
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: php.ini in cgi vs php.ini in cli
am 15.09.2009 16:11:56 von Andres Gonzalez
Lars,
Thank you for your response. The function that raised this error is from
my own
extension module. I was not aware of phpinfo() and your suggestion to
run it helped
me resolve this issue. Turns out my CGI version is NOT using cgi/php.ini
but is using
apache2/php.ini instead.
Thanks again for your help--you deserve a raise. :-)
-Andres
Lars Torben Wilson wrote:
> On Mon, 14 Sep 2009 18:21:11 -0400
> Andres Gonzalez wrote:
>
>
>> In the php configurations directories /etc/php5, there are 2
>> subdirectories, one for
>> cgi and one for cli. There is a php.ini file in each of these
>> directories.
>>
>> What would cause a difference of behavior in these 2 environments
>> with the php.ini
>> exactly the same in each directory??
>>
>> I have a command line script that consequently uses the cli version.
>> This script works
>> just fine in that it can access API function in modules that are
>> loaded via cli/php.ini
>>
>> However, when executing in the cgi environment, I get a "call to
>> undefined function" error
>> even though my 2 php.ini files are exactly the same.
>>
>> Any idea what is causing this?
>>
>> thanks,
>>
>> -Andres
>>
>>
>
> Hi Andres,
>
> When asking this kind of question, it would be very helpful if you
> would tell us *which* function raised this error.
>
> My first thought is that you tried to call a function which was
> compiled in to the CLI version but not the CGI. What does phpinfo()
> show when run under each?
>
>
> Torben
>
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: php.ini in cgi vs php.ini in cli
am 15.09.2009 16:47:59 von Lars Torben Wilson
On Tue, 15 Sep 2009 10:11:56 -0400
Andres Gonzalez wrote:
> Lars,
>
> Thank you for your response. The function that raised this error is
> from my own
> extension module. I was not aware of phpinfo() and your suggestion to
> run it helped
> me resolve this issue. Turns out my CGI version is NOT using
> cgi/php.ini but is using
> apache2/php.ini instead.
>
> Thanks again for your help--you deserve a raise. :-)
>
> -Andres
Hi Andres,
Glad it worked!
Regards,
Torben
> Lars Torben Wilson wrote:
> > On Mon, 14 Sep 2009 18:21:11 -0400
> > Andres Gonzalez wrote:
> >
> >
> >> In the php configurations directories /etc/php5, there are 2
> >> subdirectories, one for
> >> cgi and one for cli. There is a php.ini file in each of these
> >> directories.
> >>
> >> What would cause a difference of behavior in these 2 environments
> >> with the php.ini
> >> exactly the same in each directory??
> >>
> >> I have a command line script that consequently uses the cli
> >> version. This script works
> >> just fine in that it can access API function in modules that are
> >> loaded via cli/php.ini
> >>
> >> However, when executing in the cgi environment, I get a "call to
> >> undefined function" error
> >> even though my 2 php.ini files are exactly the same.
> >>
> >> Any idea what is causing this?
> >>
> >> thanks,
> >>
> >> -Andres
> >>
> >>
> >
> > Hi Andres,
> >
> > When asking this kind of question, it would be very helpful if you
> > would tell us *which* function raised this error.
> >
> > My first thought is that you tried to call a function which was
> > compiled in to the CLI version but not the CGI. What does phpinfo()
> > show when run under each?
> >
> >
> > Torben
> >
> >
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php