Re: CGI and Apache install!
| From: | Jim Barcelona | Date: | Tue, 20 Nov 2001 18:45:29 +0000 |
| Subject: | Re: CGI and Apache install! | ||
| References: | 1 | Groups: | php.install |
| Request: | Send a blank email to php-install+get-5042@lists.php.net to get a copy of this message | ||
David,
Here's what I use and it works just fine:
# FOR PHP CGI
./configure --with-gd=/usr/local/src/gd-1.8.4
--with-ttf=/usr/local/src/freetype-1.3.1 --with-jpeg-dir=/usr/local/src/jpeg-6b
--with-mysql=/usr/local/mysql --enable-ftp
--with-pdflib=/usr/local/src/pdflib-4.01 --with-zlib-dir=/usr/local/src/zlib
--with-png-dir=/usr/local/src/libpng --with-xpm-dir=/usr/X11R6
# FOR APACHE
./configure \
"--prefix=/usr/local/apache" \
"--enable-module=so" \
To use the CGI, I edit the httpd.conf. Search for cgi, and look for the entry
below. Delete or rem out the line that says Options None, and change it to
Options ExecCGI:
<Directory "/usr/local/apache/cgi-bin">
AllowOverride None
# Options None
Options ExecCGI
Order allow,deny
Allow from all
</Directory>
Then go into /usr/local/apache/cgi-bin and create two files: testphp and
info.php .
In testphp write:
#!/bin/sh
/usr/local/bin/php info.php
In info.php write:
<?php phpinfo(); ?>
Make sure that testphp is chmod'd to 755. Make sure that your httpd.conf is set
up correctly, and then go to the bin directory for apachectl. Type ./apachectl
configtest . If it says ok, then type ./apachectl start . If you point your
browser to http://localhost/cgi-bin/testphp you
should get a screen that shows
the output for phpinfo() .
Good luck,
Jim
David Tandberg-Johansen wrote:
> Hello!
>
> I am working on a RH 6.2 box and i try to install and configure PHP 4.0.6 as
> CGI and as and Apache module.
> I have all the PHP files in /usr/local/install/php-4.0.6
> There I try to configure as follows:
> #FOR CGI
> ./configure \
> --prefix=/usr/bin \
> --with-exec-dir=/usr/bin/php/bin \
> --with-mysql=/usr/local
> make
> make install
>
> #This work ok until i do..
>
> #FOR APACHE
> ./configure \
> --prefix=/usr/local \
> --with-apxs=/usr/sbin/apxs \
> --with-config-file-path=/etc/httpd/conf \
> #AND OTHER CONFIGURATIONS
> --with-mysql=/usr/local
> make
> make install
>
> WHy and how can I do it?
>
> David
>
> --
> PHP Install Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-install-unsubscribe@lists.php.net
> For additional commands, e-mail: php-install-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
--
Jim Barcelona mailto:jim.barcelona@NOSPAM.maguma.com
better living through php