Web Hosting Talk







View Full Version : PHP/APACHE/Linux Mandrake 8.1


MarkUsG
10-06-2001, 10:58 PM
I am having trouble getting .php support to work with Apache. I picked
.PHP during the install. In the httpd.conf file I got rid of:

<IfDefine HAVE_PHP4>
</IfDefine>

and just left

LoadModule php4_module extramodules/libphp4.so

I did the same thing for AddModule, thinking that HAVE_PHP4 was not
defined. I also checked for the correct file types in php.conf and yet
when I view my test.php file I get only:

>?php phpinfo(); ?<

Ideas?

Thanks.

Mark

davidb
10-06-2001, 11:36 PM
Hi, try running ./httpd -l and see if the module is loaded.

MarkUsG
10-06-2001, 11:47 PM
Thanks for the reply. I'm assuming I should see mod_php4.c or something along those lines?

If so, I'm not.

It should be loading the module per the http.conf correct?

Mark

MarkUsG
10-06-2001, 11:50 PM
Also, I am getting this line in my logs:

[Tue Oct 2 15:24:41 2001] [notice] Apache-AdvancedExtranetServer/1.3.20 (Mandrake Linux/3mdk) mod_ssl/2.8.4 OpenSSL/0.9.6b PHP/4.0.6 configured

.. Shouldn't that mean PHP is loaded?

I'm a bit new to the apache thing, so pardon my ignorance.

Thanks,

Mark

allera
10-06-2001, 11:54 PM
Originally posted by MarkUsG
>?php phpinfo(); ?<
It should be <?phpinfo();?> (or <?php phpinfo();?> works too, but that's more typing :)).

Also, you need these lines in your httpd.conf:

AddType application/x-httpd-php .php .phtml .inc .php3
AddType application/x-httpd-php-source .phps .php3s

(php4 will run php3 files too, so I added .php3 to the pool)

Let us know if that doesn't fix your problems. :)

MarkUsG
10-07-2001, 12:03 AM
Duh, I feel dumb.. Hehe. Here I am mangling .conf files and that was the only issue :eek: . If nothing else, I learned how the config files worked : ).

Many thanks.

Mark