I looking for some help and being that I am new to this listing, I hope
someone
can see where I may be going wrong with my installation.  I can't exec
any PHP scripts via my browser.  My Apache server knows that I have PHP
installed, as per the output of my error_log, when I start my Apache
server.

[Mon Aug 20 23:44:16 2001] [notice] Apache/1.3.20 (Unix) PHP/4.0.6
mod_perl/1.26 mod_ssl/2.8.4 OpenSSL/0.9.6b configured -- resuming normal
operations
[Mon Aug 20 23:44:16 2001] [notice] suEXEC mechanism enabled (wrapper:
/usr/local/apache/bin/suexec)

When I run my test.php script from cgi-bin directory, via my browser I
get:

[Mon Aug 20 23:44:40 2001] [error] (13)Permission denied: exec of
/usr/local/apache/cgi-bin/test.php failed

So, I fix the permissions and set to 755 on my test.php script.  Re-run
it via my browser and:

[Mon Aug 20 23:44:40 2001] [error] [client 192.168.0.1] Premature end of
script headers: /usr/local/apache/cgi-bin/test.php
[Mon Aug 20 23:45:46 2001] [error] (8)Exec format error: exec of
/usr/local/apache/cgi-bin/test.php failed
[Mon Aug 20 23:45:46 2001] [error] [client 192.168.0.1] Premature end of
script headers: /usr/local/apache/cgi-bin/test.php

In my browser I get a 505 error:

Internal Server Error
The server encountered an internal error or misconfiguration and was
unable to complete your request.
Please contact the server administrator, [EMAIL PROTECTED] and
inform them of the time the error occurred, and anything you might have
done that may have caused the error.
More information about this error may be available in the server error
log.

Apache/1.3.20 Server at joeboo.fr-tech.net Port 80

My test.php script looks like so:   <?php phpinfo() ?>  It does not
matter if I do <?php phpinfo(); ?>, both results in the same.

Here is the output of my httpd -l:

[root@joeboo bin]# ./httpd -l
Compiled-in modules:
  http_core.c
  mod_env.c
  mod_log_config.c
  mod_mime.c
  mod_negotiation.c
  mod_status.c
  mod_include.c
  mod_autoindex.c
  mod_dir.c
  mod_cgi.c
  mod_asis.c
  mod_imap.c
  mod_actions.c
  mod_userdir.c
  mod_alias.c
  mod_access.c
  mod_auth.c
  mod_setenvif.c
  mod_ssl.c
  mod_perl.c
  mod_php4.c
suexec: enabled; valid wrapper /usr/local/apache/bin/suexec

Here are the step-by-step installation procedures:

1) Build perl 5.6.1 - Installation dir = /usr/local/bin

cd /latest/perl-5.6.1
rm config.sh Policy.sh
./Configure -de
make
make test
make install

2) Install Open SSL version 0.9.6b

cd /latest/openssl-0.9.6b
./config no-threads -fPIC --prefix=/usr/local/openssl
make
make test
make install

3) Install MM memory management tool version 1.1.3

cd /latest/mm-1.1.3
./configure --disable-shared --prefix=/usr/local/mm
make
make test
make install

4) Install Postgres version 7.1.2

cd /latest/postgresql-7.1.2
./configure --prefix=/usr/local/postgres --with-perl \
--with-openssl=/usr/local/openssl \
--with-apache=/latest/apache_1.3.20
gmake
gmake install
mkdir /usr/local/postgres/datachown postgres:postgres
/usr/local/postgres/data
/usr/local/postgres/bin/initdb --pgdata /usr/local/postgres/data
/usr/local/postgres/bin/postmaster -D /usr/local/postgres/data -l >
logfile 2>&1 &

5) Install Mod SSL version 2.8.4-1.3.20

cd /latest/mod_ssl-2.8.4-1.3.20
./configure --with-apache=/latest/apache_1.3.20 \
--with-mm=/latest/mm-1.1.3

cd /latest/apache_1.3.20
SSL_BASE=/usr/local/openssl; export SSL_BASE
./configure --prefix=/usr/local/apache \
--enable-module=ssl

make
make certificate
make install

6) Build Mod Perl

cd /latest/mod_perl-1.26
/usr/bin/perl Makefile.PL APACHE_SRC=/latest/apache_1.3.20 \
EVERYTHING=1 USE_APACI=1 PREP_HTTPD=1 DO_HTTPD=1
make
make install

7) Build MySql - This is a binary installation, no make, no compile, a
tar
    ball extracteuseradd -g mysql mysql
cd /usr/local/mysql
gunzip < /path/to/mysql-VERSION-OS.tar.gz | tar xvf -

groupadd mysql
useradd -g mysql mysql
scripts/mysql_install_db
chown -R root  /usr/local/mysql
chown -R mysql /usr/local/mysql/data
chgrp -R mysql /usr/local/mysql
chown -R root /usr/local/mysql/bin
bin/safe_mysqld --user=mysql &
./bin/mysqladmin -u root password 'MY-PASSWORD'

8) Build PHP 4

cd /latest/php-4.0.6
./configure --prefix=/usr/local/php4 \
--with-xml \
--with-apache=/latest/apache_1.3.20 \
--with-config-file-path=/usr/local/lib \
--enable-shared-pdflib \
--enable-track-vars \
--with-mysql=/usr/local/mysql \
--with-openssl=/usr/local/openssl \
--with-pgsql=/usr/local/postgres
make
make install
9) Build Apache with two static complied modules and DSO support, with
SUEXEC

cd /latest/apache-1.3.20
SSL_BASE=/usr/local/openssl; export SSL_BASE
./configure --prefix=/usr/local/apache \
--libexecdir=/usr/local/apache/libexec \
--enable-suexec \
--suexec-caller=www \
--suexec-userdir=.www \
--suexec-docroot=/usr/local/apache/htdocs \
--suexec-logfile=/usr/local/apache/logs/suexec_log \
--suexec-uidmin=1000 \
--suexec-gidmin=1000 \
--suexec-safepath="/bin:/usr/bin:/usr/local/bin" \
--enable-module=ssl \
--activate-module=src/modules/perl/libperl.a \
--activate-module=src/modules/php4/libphp4.a
make
make certificate
make install





-- 
PHP Install Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to