Click to See Complete Forum and Search --> : PHP install oddity regarding argv


tz^
05-08-2007, 07:15 AM
I installed php5.2.1 on a BSD machine from the ports tree (/usr/ports/lang/php5). I started setting up openqdb, and all was fine, until I noticed that it failed when using $_SYSTEM['argv'][x]. Quickly doing a phpinfo(), i found this under "Configure Command":

'./configure' '--enable-versioning' '--with-layout=GNU'
'--with-config-file-scan-dir=/usr/local/etc/php' '--disable-all' '--enable-libxml' '--with-libxml-dir=/usr/local' '--enable-reflection' '--program-prefix=' '--enable-fastcgi' '--with-regex=php' '--with-zend-vm=CALL' '--prefix=/usr/local'


Looks like --disable-all disables stuff like register_globals and register_argc_argv. Next, I

* deinstalled php
* erased the line containing "disable-all" from the Makefile
* reinstalled (make install)
* edited php.ini to make sure register_argc_argv was set to "On"

and fired up the phpinfo file again. It still reports "disable-all" and argc/argv off (but the correct /usr/local/etc/php.ini).

Here's the really weird part though: if i just run php from the command line (/usr/local/bin/php phpinfo.php), it shows up as not having the "disable-all" flag, and argc/argv is "on". However normal execution of the scripts using the browser do not work, and the phpinfo (accessed via browser) is still the same as before.

I'm getting a bit irritated over this, as I'm by no means a wizard and can't figure out what to do next. Any thoughts on what I'm missing?

bradgrafelman
05-08-2007, 06:58 PM
Did you restart your webserver after making these changes?

tz^
05-09-2007, 04:41 AM
Yup, several times.