Jump to content

*SOLVED* PHP Pages Don't Load Properly


Recommended Posts

Hi all,

This is my first post. I am having trouble getting php to work with apache. I am currently running FC3. Originally, I was using the built-in apache and php packages installed. I decided to learn how to compile from source, so I uninstalled apache, php and mysql rpm packages.

I first downloaded and installed the latest mysql (5, I believe), and tested that it worked by connecting to the database.

Then I installed the latest apache (2) with these settings - ./configure --prefix=/usr/local/apache --enable-rule=EAPI --enable-module=most --enable-module=so --enable-ssl --enable-rewrite

Then I installed the latest php (5) with these settings - ./configure --with-mysql=/usr/local/mysql --with-xml --enable-track-vars --with-apxs2=/usr/local/apache/bin/apxs --with-mysql-sock=/var/lib/mysql

I then copied php.ini-dist from the source directory to /etc/php.ini,
Added in ServerRoot, Document Root, Directory, DirectoryIndex directives,
LoadModule php5_module /usr/local/apache/modules/libphp5.so,
LoadModule perl_module /usr/local/apache/modules/libperl.so,
AddType application/x-httpd-php .php .phtml
into my httpd.conf file.

I restarted apache using apachectl, and proceeded to the website, but all I see is code. I also created a test.php file, which displayed the code as well. Here is my test.php file:

<?
echo("<h1>PHP and Apache Works!</h1>");
?>

Please tell me what I am doing wrong. Thanks in advance!
twomix
Link to comment
https://forums.phpfreaks.com/topic/7232-solved-php-pages-dont-load-properly/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.