Apache 2.0.52, PHP 5.0.3 on Slackware 10 not working -- HELP

Forum for you who has PHP installation issues

Moderators: macek, egami, gesf

User avatar
gk1980
New php-forum User
New php-forum User
Posts: 4
Joined: Sun Feb 06, 2005 10:02 am
Contact:

Apache 2.0.52, PHP 5.0.3 on Slackware 10 not working -- HELP

Postby gk1980 » Sun Feb 06, 2005 10:07 am

Need help: I've read all the post regarding Apache+PHP installation procedures and I can't see what I'm doing wrong.

I've installed Apache+Tomcat from a built package for Slackware, then I've installed PHP 5 package for slackware and updated my httpd.conf file to use the mod_php.conf file.

There exist the parts regarding: (1) Loading the library. (2) Hooks for dealing with .php files

Started my Apache server, no errors reported.

Eventhough I can't seem to see php files. When I try and open them via a browser I just get the source of the php as the page.

I've tried reading the FAQ in the PHP site but couldn't find anything that I've done wrong :(

Does anybody know what my problem is?

User avatar
ruturajv
php-forum Super User
php-forum Super User
Posts: 1280
Joined: Sat Mar 22, 2003 9:42 am
Location: Mumbai, India
Contact:

Postby ruturajv » Sun Feb 06, 2005 7:09 pm

have you done
1. Load module mod_php5
2. AddModule
3. AddType

User avatar
gk1980
New php-forum User
New php-forum User
Posts: 4
Joined: Sun Feb 06, 2005 10:02 am
Contact:

Postby gk1980 » Sun Feb 06, 2005 11:17 pm

I did the LoadModule directive, however I didn't try also the AddModule directive.
When I do try to put it in my httpd.conf file I get an error saying: "Invalid command AddModule".

?????

User avatar
WiZARD
Moderator
Moderator
Posts: 1257
Joined: Thu Jun 20, 2002 10:14 pm
Location: Ukraine, Crimea, Simferopol
Contact:

Postby WiZARD » Tue Feb 08, 2005 8:14 am

gk1980 wrote:I did the LoadModule directive, however I didn't try also the AddModule directive.
When I do try to put it in my httpd.conf file I get an error saying: "Invalid command AddModule".

?????

His mean what to you need change httpd.conf

User avatar
gk1980
New php-forum User
New php-forum User
Posts: 4
Joined: Sun Feb 06, 2005 10:02 am
Contact:

WHAT?

Postby gk1980 » Tue Feb 08, 2005 10:19 am

WIZARD, I didn't understand your comment. Ofcourse I did the changes in httpd.conf.

However, apache thrown an error regarding the AddModule directive.

????

User avatar
Alexej Kubarev
Site Admin
Site Admin
Posts: 2223
Joined: Fri Mar 05, 2004 7:15 am
Location: Täby, Stockholms län
Contact:

Postby Alexej Kubarev » Tue Feb 08, 2005 11:30 am

AddModule is not needed..

LoadModule
AddType

Those 2 are needed... how did those lines look like in your apache conf?

User avatar
gk1980
New php-forum User
New php-forum User
Posts: 4
Joined: Sun Feb 06, 2005 10:02 am
Contact:

My httpd.conf file

Postby gk1980 » Tue Feb 08, 2005 11:41 am

Hi,
The lines are in a seperate conf file called mod_php.conf, which its contents is:

Code: Select all

#
# mod_php - PHP Hypertext Preprocessor module
#

LoadModule php5_module lib/apache2/libphp5.so

# Tell Apache to feed all *.php files through the PHP module
AddType application/x-httpd-php .php .php3 .phtml

# This will display PHP files in colored syntax form.  Use with caution.
#AddType application/x-httpd-php-source .phps


Then, my httpd.conf file simply loads this conf as:

Code: Select all

Include /etc/apache2/mod_php.conf


Can you see anything wrong?

User avatar
Alexej Kubarev
Site Admin
Site Admin
Posts: 2223
Joined: Fri Mar 05, 2004 7:15 am
Location: Täby, Stockholms län
Contact:

Postby Alexej Kubarev » Tue Feb 08, 2005 12:36 pm

Well..if it loads the module then it finds it... therefore nothing is supposed to be wrong..

Try installing a copy from PHP.net... you will have to compile it thou..


Return to “PHP Installation”

Who is online

Users browsing this forum: No registered users and 1 guest

cron