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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.