php-install Digest 4 Sep 2002 20:20:48 -0000 Issue 1008
Topics (messages 8322 through 8329):
PHP doesn't see register_globals = On in php.ini
8322 by: Bjorn Solberg
8326 by: Jerry
8327 by: Bjorn Solberg
Problem with PHP and URL variables after upgrade
8323 by: Rick Root
8324 by: Jeffrey_N_Dyke.Keane.com
8325 by: Jim Thome
problem with php variables - possible BUG detected???
8328 by: Sander Hoogwerf
installing PHP 4.2.2 with Apache 1.3.3.2
8329 by: Pascal Gervais
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[EMAIL PROTECTED]
----------------------------------------------------------------------
--- Begin Message ---
On Linux, Apache 1.3.26:
/usr/local/php/php.ini contains:
register_globals = On
phpinfo() says:
PHP Version 4.2.1
[...]
Configure Command './configure' '--enable-track-vars' '--enable-force-cgi-redirect'
'--with-gettext' '--with-config-file-path=/usr/local/php/php.ini'
'--prefix=/usr/local/php' '--with-ldap' '--with-mysql' '--with-pgsql'
'--with-apxs=/usr/local/apache/bin/apxs' Server API
[...]
Configuration File (php.ini) Path /usr/local/php/php.ini
[...]
Local Master
register_globals Off Off
What gives? Isn't it reading php.ini after all? Nothing gets output in
the logs when it parses php.ini (if it does), so this is a little hard to
figure out. (SquirrelMail requires register_globals On.)
Any ideas why it isn't setting register_globals On like php.ini tells it
to? I'm using vanilla copy of php.ini-recommended that comes with the
source, except for setting register_globals to On. I also tried with the
php.ini-dist with the same modification to no avail.
Any pointers and help is greatly appreciated!
Bjorn.
--- End Message ---
--- Begin Message ---
In article <[EMAIL PROTECTED]>,
[EMAIL PROTECTED] (Bjorn Solberg) wrote:
> /usr/local/php/php.ini contains:
>
> register_globals = On
>
> phpinfo() says:
> Configuration File (php.ini) Path /usr/local/php/php.ini
> [...]
> Local Master
> register_globals Off Off
>
> Any ideas why it isn't setting register_globals On like php.ini tells it
> to? I'm using vanilla copy of php.ini-recommended that comes with the
> source, except for setting register_globals to On. I also tried with the
> php.ini-dist with the same modification to no avail.
If phpinfo() says /usr/local/php/php.ini, then that is what you need to
change.
1) make sure that php.ini has the correct permissions. It needs to be
readable by whatever user or group the web server is running as.
2) make sure that you know which /usr/local/php that refers to. If you
are logging in to one server, but the web server is on another server,
as is often the case, you need to make sure that register globals is on
for the web server.
You might also try adding
php_flag register_globals on
to a .htaccess file of the squirrelmail directory.
Jerry
--
http://www.hoboes.com/jerry/
"Give a man a fish and you feed him for a day. Teach him to fish, and you've
depleted the lake."--It Isn't Murder If They're Yankees
(http://www.hoboes.com/jerry/Murder/)
--- End Message ---
--- Begin Message ---
Jerry writes:
[...]
> If phpinfo() says /usr/local/php/php.ini, then that is what you need to
> change.
... and that's what I changed.
> 1) make sure that php.ini has the correct permissions. It needs to be
> readable by whatever user or group the web server is running as.
rx for everyone for directories up to and including /usr/local/php,
php.ini itself is 775 -- i.e. readable for everyone.
> 2) make sure that you know which /usr/local/php that refers to. If you
> are logging in to one server, but the web server is on another server,
> as is often the case, you need to make sure that register globals is on
> for the web server.
It is all on one and the same machine.
> You might also try adding
> php_flag register_globals on
> to a .htaccess file of the squirrelmail directory.
Yooohoooo!! That did it. Thank you for the thorough help, although I
still don't understand why setting register_globals = On in php.ini
doesn't work.
Bjorn.
--- End Message ---
--- Begin Message ---
My server is running RedHat linux 7.2. I had previously used the RPM
installation and was running 4.0.6... I recently uninstalled the RPM version and
installed PHP 4.2.2 from source code, and now I'm having problems with URL
variables.
ie.. http://www.dotkommissar.com/index.php?FolderNum=2
(my friend's site, who pointed out the problem)
The code in question:
echo "FolderNum = $FolderNum<BR>\n";
Why doesn't it return the value of FolderNum? This worked fine prior to the
upgrade.
Thanks!
Rick Root
--- End Message ---
--- Begin Message ---
register_globals is set to off, set it to on in php.ini or use the
$_GET['FolderNum'] notation. see manual for details of why.
Jeff
My server is running RedHat linux 7.2. I had previously used the RPM
installation and was running 4.0.6... I recently uninstalled the RPM
version and
installed PHP 4.2.2 from source code, and now I'm having problems with URL
variables.
ie.. http://www.dotkommissar.com/index.php?FolderNum=2
(my friend's site, who pointed out the problem)
The code in question:
echo "FolderNum = $FolderNum<BR>\n";
Why doesn't it return the value of FolderNum? This worked fine prior to
the
upgrade.
Thanks!
Rick Root
--
PHP Install Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Turn register_globals on in your php.ini file, or more preferrably, access your GET
variables through the array $_GET (i.e., $_GET['FolderNum']) instead of having your
variables automatically created.
-Jim
>>> Rick Root <[EMAIL PROTECTED]> 09/04/02 09:52AM >>>
My server is running RedHat linux 7.2. I had previously used the RPM
installation and was running 4.0.6... I recently uninstalled the RPM version and
installed PHP 4.2.2 from source code, and now I'm having problems with URL
variables.
ie.. http://www.dotkommissar.com/index.php?FolderNum=2
(my friend's site, who pointed out the problem)
The code in question:
echo "FolderNum = $FolderNum<BR>\n";
Why doesn't it return the value of FolderNum? This worked fine prior to the
upgrade.
Thanks!
Rick Root
--
PHP Install Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Hi all,
This might be a bug with how HTTP-request info is parsed. Read this:
I've solved the problem, but I just want you to know how I solved it. It
also may be a 'bug' in the PHP implementation.
The problems started when I did a fresh install of PHP 4.2.2 on our
production server (NT4, IIS4).
Setup was done with the windows installer, so it registred it as a CGI
application. However I did use it successfully on my laptop (W2k, IIS5), it
didn't work correctly on our server.
I had to put " %s %s" after the .php mapping ("c:\php\php.exe %s %s">) to
get it working. At least I thought I had it working...
It appeared that our PHP script always returned "" for the PHP_SELF
variable.
A test with "<? phpinfo(); ?>" returned much fewer variables that it did on
my laptop and also didn't show the pictures.
A short test with ASP did return all variables, so no firewall, security
setting, or anything else appeared to hurt anything.
After a day of struggling around with register_globals, it appeared that an
ISAPI Filter we have running on our server was causing the trouble.
The filter was handling the security of our server and did insert some extra
header fields to the request. Everything OK for ASP, but not for PHP as the
filter also inserted a CRLF character inside the request header, which
caused PHP to abort reading it any further.
After modifying the filter (we were lucky to have the source) to omit the
CRLF character, PHP worked as it is supposed to.
So I think it is a bug of PHP, since it does work on ASP. (I'm not too
certain about that, because Microsoft is known for not following the
standards.)
Must I report this as a bug or is this behavour by design?
If you decide to leave this as it is now, I hope that other users will
benefit from this post.
Regards from this PHP newbie,
Sander
--- End Message ---
--- Begin Message ---
OS AIX 4.3
when I make I get the following error. Any help would be greatly
appreciated.
Making all in apache
/bin/sh /usr/local/php-4.2.2/libtool --silent --mode=compile
cc -I. -I/usr/local/php-4.2.2/sapi/apache -I/usr/local/php-4.2.2/main -I/us
r/local/php-4.2.2 -I/usr/lpp/HTTPServer/include -I/usr/local/php-4.2.2/Zend
-I/usr/local/php-4.2.2/ext/mysql/libmysql -I/usr/local/php-4.2.2/ext/xml/exp
at -DAIX=42 -DAIX_BIND_PROCESSOR -DUSE_HSREGEX -I/usr/local/php-4.2.2/TSRM
-O2 -prefer-pic -c sapi_apache.c
In file included from /usr/lpp/HTTPServer/include/ap_config.h:93,
from /usr/lpp/HTTPServer/include/httpd.h:71,
from sapi_apache.c:32:
/usr/lpp/HTTPServer/include/os.h:111: conflicting types for `dlerror'
/usr/include/dlfcn.h:57: previous declaration of `dlerror'
In file included from /usr/lpp/HTTPServer/include/httpd.h:71,
from sapi_apache.c:32:
/usr/lpp/HTTPServer/include/ap_config.h:1143:1: warning: "XtOffsetOf"
redefined
In file included from sapi_apache.c:30:
/usr/local/php-4.2.2/main/php.h:344:1: warning: this is the location of the
previous definition
sapi_apache.c:35:24: ap_compat.h: No such file or directory
make: 1254-004 The error code from the last command is 1.
Stop.
make: 1254-004 The error code from the last command is 1.
Stop.
make: 1254-004 The error code from the last command is 1.
Stop.
make: 1254-004 The error code from the last command is 1.
Stop.
Thanks
Pascal
--- End Message ---