LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 01-07-2006, 10:22 PM   #1
scrupul0us
Member
 
Registered: Jan 2006
Location: Albany, NY
Distribution: CentOS 6.3
Posts: 159

Rep: Reputation: 30
Question PHP wont work


Im using the full install of 10.2 and have followed the instructions .:here:. now, apache is working fine and i am seeing html sites, but i cant get php to execute to save my life... i wont post my httpd.conf file since all i edited was the server string and such and just enabled mod_php (which is installed) and have restarted the httpd... however when i navigate to a php page it just outputs the text in the file, it doesnt process the php

ideas?

Last edited by scrupul0us; 01-07-2006 at 10:34 PM.
 
Old 01-07-2006, 10:53 PM   #2
mdarby
Member
 
Registered: Nov 2004
Location: Columbus, Ohio
Distribution: Slackware-Current / Debian
Posts: 795

Rep: Reputation: 30
Have these in your httpd.conf file?
Code:
LoadModule php5_module        modules/libphp5.so
Addtype application/x-httpd-php .php
 
Old 01-07-2006, 11:13 PM   #3
scrupul0us
Member
 
Registered: Jan 2006
Location: Albany, NY
Distribution: CentOS 6.3
Posts: 159

Original Poster
Rep: Reputation: 30
well far as i know 10.2 came with php 4.x.. and all i did was enable the mod_php in the httpd.conf file (Which was one of the last steps in the link) so im at a loss
 
Old 01-07-2006, 11:19 PM   #4
shilo
Senior Member
 
Registered: Nov 2002
Location: Stockton, CA
Distribution: Slackware 11 - kernel 2.6.19.1 - Dropline Gnome 2.16.2
Posts: 1,132

Rep: Reputation: 50
Code:
#
# DirectoryIndex: Name of the file or files to use as a pre-written HTML
# directory index.  Separate multiple entries with spaces.
#
<IfModule mod_dir.c>
    DirectoryIndex index.html index.htm index.shtml index.shtm index.php
</IfModule>
Code:
# ==> mod_php configuration settings <==
#
# PACKAGES REQUIRED:  openssl-solibs (A series) and/or openssl (N series),
#                     mysql (AP series), gmp (L series), and apache (N series)
#
Include /etc/apache/mod_php.conf

# ==> mod_ssl configuration settings <==
Both done already?
 
Old 01-07-2006, 11:20 PM   #5
scrupul0us
Member
 
Registered: Jan 2006
Location: Albany, NY
Distribution: CentOS 6.3
Posts: 159

Original Poster
Rep: Reputation: 30
yes both are done

as said... i followed the instructions on the site...

mind you ive had about 4-5 years experience with apache in a windows env. so using the httpd.conf isnt new to me... just the linux env is new to me... that all aside i uncommented what the link said and checked the mod_php.conf to make sure it was all uncommented

is there a php file similar to php.ini that needs to be configured?

Last edited by scrupul0us; 01-07-2006 at 11:22 PM.
 
Old 01-07-2006, 11:22 PM   #6
mdarby
Member
 
Registered: Nov 2004
Location: Columbus, Ohio
Distribution: Slackware-Current / Debian
Posts: 795

Rep: Reputation: 30
Quote:
Originally Posted by scrupul0us
well far as i know 10.2 came with php 4.x.. and all i did was enable the mod_php in the httpd.conf file (Which was one of the last steps in the link) so im at a loss
But did you add this?
Addtype application/x-httpd-php .php
 
Old 01-07-2006, 11:29 PM   #7
scrupul0us
Member
 
Registered: Jan 2006
Location: Albany, NY
Distribution: CentOS 6.3
Posts: 159

Original Poster
Rep: Reputation: 30
that is in the mod_php.conf file... which was unknownst to me before i had added that manually to the httpd.conf file... didnt work either way
 
Old 01-07-2006, 11:36 PM   #8
shilo
Senior Member
 
Registered: Nov 2002
Location: Stockton, CA
Distribution: Slackware 11 - kernel 2.6.19.1 - Dropline Gnome 2.16.2
Posts: 1,132

Rep: Reputation: 50
Quote:
Originally Posted by scrupul0us
i uncommented what the link said and checked the mod_php.conf to make sure it was all uncommented

is there a php file similar to php.ini that needs to be configured?
Yes, there is a php.ini. It is usually sufficient to leave it alone. It can be found at
/etc/apache/php.ini if you wanna mess with it.

You should check out /etc/apache/mod_php.conf. Make sure that it is pointing to the correct libphp (verify that the libphp referenced exists).

Quote:
Originally Posted by mdarby
But did you add this?
Addtype application/x-httpd-php .php
This should not be required, as this directive is already included in /etc/apache/mod_php.conf (already called from httpd.conf).
 
Old 01-07-2006, 11:43 PM   #9
mdarby
Member
 
Registered: Nov 2004
Location: Columbus, Ohio
Distribution: Slackware-Current / Debian
Posts: 795

Rep: Reputation: 30
Quote:
Originally Posted by shilo
This should not be required, as this directive is already included in /etc/apache/mod_php.conf
Very true. Same thing, different file.

Could you post your httpd.conf file for those of us that don't have a default version lying around?

Last edited by mdarby; 01-07-2006 at 11:46 PM.
 
Old 01-07-2006, 11:47 PM   #10
scrupul0us
Member
 
Registered: Jan 2006
Location: Albany, NY
Distribution: CentOS 6.3
Posts: 159

Original Poster
Rep: Reputation: 30
all checked... i added /usr/ in front of libexec/apache/libphp4.so

saved and restarted... still no php action
 
Old 01-07-2006, 11:50 PM   #11
scrupul0us
Member
 
Registered: Jan 2006
Location: Albany, NY
Distribution: CentOS 6.3
Posts: 159

Original Poster
Rep: Reputation: 30
huh wierd... i rebooted and now it seems to be working... WTF, restarting httpd isn enough?

oh well it works and im happy


can anyone point me to a good tutorial or tell me how (step by step 'sorry') on updating to apache 2.x and php 5.x ??? i need all the help i can get

Last edited by scrupul0us; 01-07-2006 at 11:53 PM.
 
Old 01-07-2006, 11:51 PM   #12
shilo
Senior Member
 
Registered: Nov 2002
Location: Stockton, CA
Distribution: Slackware 11 - kernel 2.6.19.1 - Dropline Gnome 2.16.2
Posts: 1,132

Rep: Reputation: 50
scrupul0us

Ditch the /usr. Not needed.

mdarby

Were you asking for my httpd.conf? I have two machines in front of me right now, one with stock httpd.conf, the other with my actual webserver setup.
 
Old 01-07-2006, 11:55 PM   #13
scrupul0us
Member
 
Registered: Jan 2006
Location: Albany, NY
Distribution: CentOS 6.3
Posts: 159

Original Poster
Rep: Reputation: 30
@shilo: seems to work ok with the /usr so ill leave it for now
 
Old 01-07-2006, 11:59 PM   #14
shilo
Senior Member
 
Registered: Nov 2002
Location: Stockton, CA
Distribution: Slackware 11 - kernel 2.6.19.1 - Dropline Gnome 2.16.2
Posts: 1,132

Rep: Reputation: 50
Posted before I saw you got it working. It's supposed to work either way, I believe, as it was likely compiled prefix="/usr".

Glad you got it working.
 
Old 01-08-2006, 12:06 AM   #15
scrupul0us
Member
 
Registered: Jan 2006
Location: Albany, NY
Distribution: CentOS 6.3
Posts: 159

Original Poster
Rep: Reputation: 30
me too... i got both samba and apache working for me tonight... just need to updated to the latest versions... any help on that?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
php running as CGI twk Programming 1 05-25-2004 08:26 AM
Tearing My Hair Out: PHP isnt being parsed by Apache 2!! pnh73 Linux - Software 2 01-19-2004 04:01 PM
ALSA driver isnt running? Wut the.... mdlnx Linux - Newbie 0 10-03-2003 02:29 PM
WTF? isnt linux free...how come lindows isnt? Cycopath81090 Linux - Newbie 11 08-22-2003 08:19 PM
why isnt there any program that is currently running in the taskbar? kublador Linux - Newbie 7 03-15-2003 11:14 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 05:24 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration