Jump to content


*SOLVED* PHP Pages Don't Load Properly

  • Please log in to reply
1 reply to this topic

#1 twomix

  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 12 April 2006 - 06:01 PM

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!

#2 twomix

  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 12 April 2006 - 08:10 PM

Figured out what was wrong. Apache was pointing to the wrong conf file, so the changes I made had no effect.

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users