PHP and Redhat 8

Are now coexisting on dear old bunter. And now for the story.

There’s stuff all over the net about Apache 2 not working with PHP version 4.2 and before. A big chunk of the anecdotal evidence for this is that PHP 4.2.x is installed in Redhat 8 and doesn’t work. It turns out there’s a reason for this: httpd.conf doesn’t load it.

If you want to use PHP with Redhat 8 you have to add the lines:

LoadModule php4_module modules/libphp4.so

and

AddType application/x-httpd-php .php

to httpd.conf. Restart and it works.

Almost.

It turns out that Redhat also turned off short_open_tag in php.ini. So any code that starts with just

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.