Fresh Fedora 11 box, install.php showing source

Fresh Fedora 11 box, install.php showing source

by Bryant Sheppard -
Number of replies: 4
Hello everyone.

Basically, I am working on a fresh install of Fedora 11, trying to get Moodle up and running for an internship project. I've done this successfully multiple times without having this issue using Moodle 1.9.4, so maybe someone can shed some light on my problem. From the get-go, I did the following via terminal:

yum -y update
yum -y install mysql mysql-server php php-mysql php-gd

I started and enabled the mysqld and httpd services, then I downloaded the current release (1.9.8+ weekly) and put the folder in /var/www/html/ with permissions rwxr-xr-x belonging to apache - apache. These are the exact settings I have on my fake server (a laptop I used to familiarize myself with Moodle, now working on the actual server).

I created the moodle database in MySQL with all the correct information.

At this point, I went to my web browser and went to http://localhost/moodle which forwarded me to http://localhost/moodle/install.php.

This is where I ran into the issue, basically it's showing me the source of the PHP rather than actually running it.

I created a file named index.php and put it in my server's root directory containing

?php phpinfo(); ? (with brackets, of course)

And this doesn't give me any problem. It displays all the PHP info like it should.

I'm fairly experienced with Fedora, and again, I have installed using this exact process 4 times before, but with Moodle 1.9.4. Any idea?

Thanks in advanced for your help everyone ^.^
Average of ratings: -
In reply to Bryant Sheppard

Re: Fresh Fedora 11 box, install.php showing source

by Colin Fraser -
Picture of Documentation writers Picture of Testers
Sounds like a server issue... maybe. Have a look at Apache conf/httpd.conf file. Look for

# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
#

which should read something like:
<IfModule dir_module>
DirectoryIndex index.php index.php4 index.php3 index.cgi index.pl index.html index.htm index.shtml index.phtml
</IfModule>

It is not picking up on it yet it is reading it. Displaying it as a text file.... mmmmm This is my only thought here - sorry.

In reply to Colin Fraser

Re: Fresh Fedora 11 box, install.php showing source

by Bryant Sheppard -
Nope, that's correctly set. As I said, I created a file named index.php with the phpinfo command and put it in the server's root directory, and that opens fine and shows the info. Only when I go to the Moodle installer do I have the issue.
In reply to Bryant Sheppard

Re: Fresh Fedora 11 box, install.php showing source

by HJWUCGA INC. -
Could you post back to us the results when you execute this:

rpm -qa | grep -i php

details of your:

/etc/httpd/conf.d/php.conf
In reply to HJWUCGA INC.

Re: Fresh Fedora 11 box, install.php showing source

by Bryant Sheppard -
For the requested command, I get the following:

[root@localhost ~]# rpm -qa | grep -i php
php-mysql-5.2.13-1.fc11.i586
php-pdo-5.2.13-1.fc11.i586
php-common-5.2.13-1.fc11.i586
php-gd-5.2.13-1.fc11.i586
php-cli-5.2.13-1.fc11.i586
php-5.2.13-1.fc11.i586
[root@localhost ~]#

The php.conf is attached (Just a copy/paste of the original file, using TigerVNC to access the server, easier to just copy the contents of the file, lol).

Thanks again guys.