Re: BUG?
| From: | Michael Hall | Date: | Sat, 02 Sep 2000 00:58:18 +0000 |
| Subject: | Re: BUG? | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-14892@lists.php.net to get a copy of this message | ||
Hi Jason and Rasmus,
Thanks for your patience ... even if
it turns out to be something really dumb that I've done, I'd like to get
things
sorted out, stop pestering the list and move on. See comments below ...
> If you didn't touch php.ini, and there's no chance of PHP/FI 2.0 being
> there, where are those blink and tt tags coming from in the error message?
Definitely no chance of PHP/FI 2.0 ... I've never downloaded or installed
it. Prior to PHP4.0.2, I've only ever installed PHP3.0.16.
> Are you able to carefully and logically go thru the steps of installing
and
> configuring php4 to ensure that something in the configuration isn't mixed
> up?
I followed the INSTALL instructions for a DSO install to the letter, using
./configure --with-mysql --with-apxs --enable-track-vars
Everything went without a hitch (apparently), right through make and make
install. The only mucking about after that involved:
- altering the path to libphp4.so in httpd.conf because initially it was
wrong and httpd wouldn't start. That was solved and httpd fired up happily.
- commenting out all directives related to php3 in httpd.conf (PHP3 is still
installed on the hard disk). While I was at this, I noticed uncommented-out
directives related to PHP/FI 2.0 in httpd.conf so I commented these out too
(particularly because it appeared they would clash with what was needed for
PHP4). Then I added new directives for PHP4. These are the relevant bits of
my current httpd.conf file:
# Extra Modules
LoadModule perl_module modules/libperl.so
LoadModule php_module modules/mod_php.so
#LoadModule php3_module modules/libphp3.so
# Extra Modules
AddModule mod_perl.c
AddModule mod_php.c
#AddModule mod_php3.c
# AddType: allows you to tweak mime.types without actually editing it, or to
# make certain files to be certain types.
#
# For example, the PHP3 module (not part of the Apache distribution - see
# http://www.php.net) will typically use:
#
#<IfModule mod_php3.c>
# AddType application/x-httpd-php3 .php3
# AddType application/x-httpd-php3-source .phps
#</IfModule>
# The following is for PHP/FI (PHP2):
#<IfModule mod_php.c>
# AddType application/x-httpd-php .phtml
#</IfModule>
(I added the following four lines)
<IfModule mod_php.c>
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
</IfModule>
# Allow http put (such as Netscape Gold's publish feature)
# Use htpasswd to generate /etc/httpd/conf/passwd.
# You must unremark these two lines at the top of this file as well:
#LoadModule put_module modules/mod_put.so
#LoadModule php3_module lib/apache/libphp3.so
LoadModule php4_module /usr/lib/apache/libphp4.so
#AddModule mod_put.c
AddModule mod_php4.c
#
> What happens if you do this: <? echo "foobar" ?>
works fine, echoes foobar
> What happens if you do this: <? $fu = "bah"; echo $fu ?>
works fine, echoes bah
This also works fine: <? $fu = "BAH"; $newfu = strtolower($fu); echo
$newfu ?>, it echoes bah
Now for something that makes me think maybe I really am lost in the
Twilight Zone ...
<?php phpinfo(); ?> produces the familiar parse error expecting "("
on line whatever, BUT ...
<? phpinfo() ?> produces a PHP/FI 2.0.1 info page!
This page is attached. Some interesting points are that the SERVER_SOFTWARE
line clearly states PHP/4.0.2, and that I have never enabled GDBM or GD
support, or SAFE MODE, in either PHP3 or 4.
I have searched high and low for any files that could possibly be
related to PHP/FI on my computer (even though I've never installed it) ...
they do not exist (what extensions or other clues would I look for?). Either
I'm going crazy or something has gone astray with
the PHP4 tarball I dowloaded. This PHP/FI stuff can't be coming from
anywhere else but that tarball. If I have installed PHP/FI, then why do I
now have so many files labelled php4 on my box?
if I do httpd -l, i get:
http_core.c
mod_so.c
> What happens if you compile and install your php source tree without
> the --with-apache configure option, and then put this in a file, set it as
> executable and execute it?
>
> #!/usr/local/bin/php
> <? phpinfo() ?>
haven't tried that yet. I'm going to do another download and completely new
install on another box ... this time I'll be more careful and keep a log.
PHP/FI Version 2.0.1 by Rasmus Lerdorf (rasmus@lerdorf.on.ca) The PHP/FI Web Site is at http://php.iquest.net/ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ------------------------------------------------------------------------ Unix version: Linux flash 2.2.14-5.0 #1 Tue Mar 7 21:07:39 EST 2000 i686 unknown ------------------------------------------------------------------------ Environment: INIT_VERSION=sysvinit-2.78 previous=N TERM=linux HOSTTYPE=i386 PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin CONSOLE=/dev/console HOME=/ PREVLEVEL=N RUNLEVEL=5 SHELL=/bin/bash runlevel=5 BOOT_IMAGE=linux OSTYPE=Linux SHLVL=2 _=/bin/nice ------------------------------------------------------------------------ Apache defined variables available to PHP/FI: DOCUMENT_ROOT = /home/httpd/html HTTP_ACCEPT = image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, image/png, */* HTTP_ACCEPT_CHARSET = iso-8859-1,*,utf-8 HTTP_ACCEPT_ENCODING = gzip HTTP_ACCEPT_LANGUAGE = en HTTP_CONNECTION = Keep-Alive HTTP_HOST = localhost HTTP_USER_AGENT = Mozilla/4.72 [en] (X11; U; Linux 2.2.14-5.0 i686) PATH = /sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin REMOTE_ADDR = 127.0.0.1 REMOTE_PORT = 1028 SCRIPT_FILENAME = /home/httpd/html/projects/test4.php PATH_TRANSLATED = /home/httpd/html/projects/test4.php SERVER_ADDR = 127.0.0.1 SERVER_ADMIN = mulga@localhost SERVER_NAME = localhost SERVER_PORT = 80 SERVER_SIGNATURE = Apache/1.3.12 Server at localhost Port 80 SERVER_SOFTWARE = Apache/1.3.12 (Unix) (Red Hat/Linux) PHP/4.0.2 mod_perl/1.21 GATEWAY_INTERFACE = CGI/1.1 SERVER_PROTOCOL = HTTP/1.0 REQUEST_METHOD = GET QUERY_STRING = REQUEST_URI = /projects/test4.php PATH_DIR = /projects PATH_INFO = /projects/test4.php PHP_SELF = /projects/test4.php ------------------------------------------------------------------------ Request HTTP Headers: Accept:image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, image/png, */* Accept-Charset:iso-8859-1,*,utf-8 Accept-Encoding:gzip Accept-Language:en Connection:Keep-Alive Host:localhost User-Agent:Mozilla/4.72 [en] (X11; U; Linux 2.2.14-5.0 i686) ------------------------------------------------------------------------ Send HTTP Headers: Connection:close Content-Type:text/html ------------------------------------------------------------------------ Information on /home/httpd/html/projects/test4.php Type: ordinary file Permission Bits: 0664 Number of Links: 1 Owner: mulga From Group: mulga Group: mulga Size: 17 Last Access: Sat Sep 2 01:01:07 2000 Last Modification: Sat Sep 2 00:25:28 2000 Last Status Change: Sat Sep 2 00:25:28 2000 ------------------------------------------------------------------------ Working Directory: /home/httpd/html/projects Include Path: . GDBM support enabled Apache module support enabled GD support enabled SAFE MODE Enabled!
PHP/FI Version 2.0.1 by Rasmus Lerdorf (rasmus@lerdorf.on.ca) The PHP/FI Web Site is at http://php.iquest.net/ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ------------------------------------------------------------------------ Unix version: Linux flash 2.2.14-5.0 #1 Tue Mar 7 21:07:39 EST 2000 i686 unknown ------------------------------------------------------------------------ Environment: INIT_VERSION=sysvinit-2.78 previous=N TERM=linux HOSTTYPE=i386 PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin CONSOLE=/dev/console HOME=/ PREVLEVEL=N RUNLEVEL=5 SHELL=/bin/bash runlevel=5 BOOT_IMAGE=linux OSTYPE=Linux SHLVL=2 _=/bin/nice ------------------------------------------------------------------------ Apache defined variables available to PHP/FI: DOCUMENT_ROOT = /home/httpd/html HTTP_ACCEPT = image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, image/png, */* HTTP_ACCEPT_CHARSET = iso-8859-1,*,utf-8 HTTP_ACCEPT_ENCODING = gzip HTTP_ACCEPT_LANGUAGE = en HTTP_CONNECTION = Keep-Alive HTTP_HOST = localhost HTTP_USER_AGENT = Mozilla/4.72 [en] (X11; U; Linux 2.2.14-5.0 i686) PATH = /sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin REMOTE_ADDR = 127.0.0.1 REMOTE_PORT = 1028 SCRIPT_FILENAME = /home/httpd/html/projects/test4.php PATH_TRANSLATED = /home/httpd/html/projects/test4.php SERVER_ADDR = 127.0.0.1 SERVER_ADMIN = mulga@localhost SERVER_NAME = localhost SERVER_PORT = 80 SERVER_SIGNATURE = Apache/1.3.12 Server at localhost Port 80 SERVER_SOFTWARE = Apache/1.3.12 (Unix) (Red Hat/Linux) PHP/4.0.2 mod_perl/1.21 GATEWAY_INTERFACE = CGI/1.1 SERVER_PROTOCOL = HTTP/1.0 REQUEST_METHOD = GET QUERY_STRING = REQUEST_URI = /projects/test4.php PATH_DIR = /projects PATH_INFO = /projects/test4.php PHP_SELF = /projects/test4.php ------------------------------------------------------------------------ Request HTTP Headers: Accept:image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, image/png, */* Accept-Charset:iso-8859-1,*,utf-8 Accept-Encoding:gzip Accept-Language:en Connection:Keep-Alive Host:localhost User-Agent:Mozilla/4.72 [en] (X11; U; Linux 2.2.14-5.0 i686) ------------------------------------------------------------------------ Send HTTP Headers: Connection:close Content-Type:text/html ------------------------------------------------------------------------ Information on /home/httpd/html/projects/test4.php Type: ordinary file Permission Bits: 0664 Number of Links: 1 Owner: mulga From Group: mulga Group: mulga Size: 17 Last Access: Sat Sep 2 01:01:07 2000 Last Modification: Sat Sep 2 00:25:28 2000 Last Status Change: Sat Sep 2 00:25:28 2000 ------------------------------------------------------------------------ Working Directory: /home/httpd/html/projects Include Path: . GDBM support enabled Apache module support enabled GD support enabled SAFE MODE Enabled!