Home > Archive > PHP Installation > June 2004 > Re: [PHP-INSTALL] Install PHP on Red Hat Linux?
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Re: [PHP-INSTALL] Install PHP on Red Hat Linux?
|
|
| Chris Hewitt 2004-06-19, 8:56 pm |
| Hamilton Keity Rokukawa wrote:
>Hi,
>
> I have Red Hat 8 installed and I try to install Apache/PHP. I follow the
>quick installation instructions that I found in one help file, but when I
>try test php page didn't work.
>
>The steps that I follow:
># tar -zxvf apache_1.3.31.tar.gz
># tar -zxvf php-4.3.7.tar.gz
># cd apache_1.3.31
>#./configure --prefix=/usr/local/apache
># cd ../php-4.3.7
>#
>./configure --with-mysql --with-apache=../apache_1.3.31 --enable-track-vars
># make
># make install
># cd ../apache_1.3.31
>#
>./configure --activate-module=src/modules/php4/libphp4.a --enable-module=php
>4 --prefix=/usr/loca/apache
># make
># make install
># cd ../php-4.3.7
># cp php.ini-dist /usr/local/lib/php.ini
>
> After these steps I edit the file /etc/httpd/conf/httpd.conf and add:
> AddType application/x-httpd-php .php
>
> When I start the browse and try open the localhost, I got the test page.
>I test some *.html pages on /var/www/html and works without problem. But
>when I try a *.php page didn't work.
>
> Somenone can help me? What I did wrong?
>
>Hamilton Keity Rokukawa
>
Hamilton,
You are compiling PHP as an integral apache httpd module rather than a
dynamic module, and a layout I'm not so familiar with so Imay be of
limited help. That is quite valid, just I am not used to it.
Lets take this from the top. RedHat 8 comes with both apache httpd and
PHP. Possibly you did not install them, or you may have wanted to use
later versions. Unless you specifically want two instances of Apache
httpd installed its important to know that you began installing without
an apache httpd already installed. As the apache Group now develop
things other than the webserver now, the package changed its name from
"apache" to "httpd". On my RedHat 7.2 its still "apache", so as root try:
rpm -q httpd
If is says "package httpd not installed" try:
rpm -q apache
If that also says it is not installed then you did begin cleanly, so we
can move forward.
The easiest way to check whether php is working is to make a file called
"phpinfo.php" with contents of just "<?php phpinfo(); ?>" (without the
quotes). Put this in you document root (this is specified in
/etc/httpd/conf/httpd.conf).
Tell us what you get when you put "httpd://localhost/phpinfo.php" into
your web browser. The phrase "it did not work" does not give us much
information to work with.
It is quite a minimal configuration of both apache httpd and PHP that
you have. Normally the configure line for each would occupy half a dozen
lines. The normal way to install this on RedHat would be with RPM
versions, as it puts everything in the right place and checks that all
dependencies are satisfied.
Let us know how it goes.
Regards
Chris
| |
| Hamilton Keity Rokukawa 2004-06-19, 8:56 pm |
| Hi Chris,
I got install both apache and PHP. Now I can see the php information
with the web browse when I open the "phpinfo.php" page. I decide use Apache
version 1.3.27 and PHP version 4.2.3. For some reason the version that I
used before didn't work (or maybe need more configuration that I don't
know).
I decide use the source code and not RPM because I want to know "more
detail" about installation. Maybe later I will install others versions and
see If there's problems.
Thanks,
Hamilton Keity Rokukawa
----- Original Message -----
From: "Chris Hewitt" <g0pae@manordat.demon.co.uk>
To: "Hamilton Keity Rokukawa" <hamilton.rokukawa@sulbbs.com>
Cc: <php-install@lists.php.net>
Sent: Saturday, June 19, 2004 4:37 PM
Subject: Re: [PHP-INSTALL] Install PHP on Red Hat Linux?
> Hamilton Keity Rokukawa wrote:
>
the[color=darkred]
>
>./configure --with-mysql --with-apache=../apache_1.3.31 --enable-track-vars
>
>./configure --activate-module=src/modules/php4/libphp4.a --enable-module=ph
p
page.[color=darkred]
> Hamilton,
>
> You are compiling PHP as an integral apache httpd module rather than a
> dynamic module, and a layout I'm not so familiar with so Imay be of
> limited help. That is quite valid, just I am not used to it.
>
> Lets take this from the top. RedHat 8 comes with both apache httpd and
> PHP. Possibly you did not install them, or you may have wanted to use
> later versions. Unless you specifically want two instances of Apache
> httpd installed its important to know that you began installing without
> an apache httpd already installed. As the apache Group now develop
> things other than the webserver now, the package changed its name from
> "apache" to "httpd". On my RedHat 7.2 its still "apache", so as root try:
> rpm -q httpd
> If is says "package httpd not installed" try:
> rpm -q apache
> If that also says it is not installed then you did begin cleanly, so we
> can move forward.
>
> The easiest way to check whether php is working is to make a file called
> "phpinfo.php" with contents of just "<?php phpinfo(); ?>" (without the
> quotes). Put this in you document root (this is specified in
> /etc/httpd/conf/httpd.conf).
>
> Tell us what you get when you put "httpd://localhost/phpinfo.php" into
> your web browser. The phrase "it did not work" does not give us much
> information to work with.
>
> It is quite a minimal configuration of both apache httpd and PHP that
> you have. Normally the configure line for each would occupy half a dozen
> lines. The normal way to install this on RedHat would be with RPM
> versions, as it puts everything in the right place and checks that all
> dependencies are satisfied.
>
> Let us know how it goes.
>
> Regards
>
> Chris
>
|
|
|
|
|