LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 02-27-2005, 12:10 AM   #1
dickohead
Member
 
Registered: Feb 2003
Location: Melbourne, VIC, Australia
Distribution: Ubuntu 6.06
Posts: 101

Rep: Reputation: 15
Apache 2, PHP 5, SuSE 9.2 - cannot run php files


Hey guys,

I had everything running in mandrake 10.1, and have now upgraded to SuSE 9.2, along with the changes of /etc/apache2 and /srv/www i cannot seem to get either of the following working:

users public_html directories - can't find what i am supposed to add to /etc/apache2/httpd.conf

and

php5 - nothing, nada, zip. Not a thing works, it asks me (when running locally) if i want to save the file or open it with a program.... i don't want either, i want it to display my web page!

I have the LoadModule section in httpd.cong being imported, i also have the directory index file set to:
index.php index.html index.htm

the reason for that is cos the main site will run php, but users home dirs will run html/php - so i needed both

has anyone here, successfully got Apache 2 and PHP 5 working on SuSE 9.2 (the download one, not professional) i do have a copy of 8.2 pro which i bought a couple of years back... but am seeing if 9.2 can do what i want first - so far - php is all it won't do.... 90% aint bad! but that 10% is making me lose sleep.... :

i hope what i have done wrong is very simple.... and hopefully you will make me look stupid! at least then i'll remember next time!
 
Old 02-27-2005, 12:30 AM   #2
xowl
Member
 
Registered: Jan 2005
Distribution: Slackware current (and others)
Posts: 188

Rep: Reputation: 30
to fix the php problem add the line

Include /etc/apache/mod_php.conf

to the /etc/apache/httpd.conf
 
Old 02-27-2005, 01:29 AM   #3
dickohead
Member
 
Registered: Feb 2003
Location: Melbourne, VIC, Australia
Distribution: Ubuntu 6.06
Posts: 101

Original Poster
Rep: Reputation: 15
i don't have the /etc/apache/mod_php.conf file though..... which strikes me as very strange, i have installed the rpms for mod-php and php5 in SuSE and via SSH at the command line.... so thye are there.... but mod_php.conf is not...
 
Old 02-27-2005, 01:37 AM   #4
dickohead
Member
 
Registered: Feb 2003
Location: Melbourne, VIC, Australia
Distribution: Ubuntu 6.06
Posts: 101

Original Poster
Rep: Reputation: 15
i just made a file called mod_php.conf under /etc/apache2 and upun executing "/etc/init.d/apache2 restart" it informas me that "module php5_module is already loaded"

here is my mod_php.conf file:
Code:
#
# mod_php - PHP Hypertext Preprocessor module
#

# Load the PHP module:
LoadModule php5_module libexec/apache/libphp5.so

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

# This will display PHP files in colored syntax form.  Use with caution.
#AddType application/x-httpd-php-source .phps
and my httpd.conf file:
Code:
### Virtual server configuration ############################################
#
# VirtualHost: If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them. Most configurations
# use only name-based virtual hosts so the server doesn't need to worry about
# IP addresses. This is indicated by the asterisks in the directives below.
#
# Please see the documentation at
# <URL:http://httpd.apache.org/docs-2.0/vhosts/>
# for further details before you try to setup virtual hosts.
#
# You may use the command line option '-S' to verify your virtual host
# configuration.
#
Include /etc/apache2/vhosts.d/*.conf


# Note: instead of adding your own configuration here, consider
#       adding it in your own file (/etc/apache2/httpd.conf.local)
#       putting its name into APACHE_CONF_INCLUDE_FILES in
#       /etc/sysconfig/apache2 -- this will make system updates
#       easier :)
Include /etc/apache2/mod_php.conf
"httpd.conf" 209L, 8227C                                      209,21        Bot
# and never show them
<Files ~ "^\.ht">
    Order allow,deny
    Deny from all
</Files>

# List of resources to look for when the client requests a directory
DirectoryIndex index.php index.html index.htm

### 'Main' server configuration #############################################
#
# The directives in this section set up the values used by the 'main'
# server, which responds to any requests that aren't handled by a
# <VirtualHost> definition.  These values also provide defaults for
# any <VirtualHost> containers you may define later in the file.
#
# All of these directives may appear inside <VirtualHost> containers,
# in which case these default settings will be overridden for the
# virtual host being defined.
#
Include /etc/apache2/default-server.conf


# Another way to include your own files
#
# The file below is generated from /etc/sysconfig/apache2,
# include arbitrary files as named in APACHE_CONF_INCLUDE_FILES and
# APACHE_CONF_INCLUDE_DIRS
Include /etc/apache2/sysconfig.d/include.conf


### Virtual server configuration ############################################
#
# VirtualHost: If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them. Most configurations
# use only name-based virtual hosts so the server doesn't need to worry about
# IP addresses. This is indicated by the asterisks in the directives below.
#
# Please see the documentation at
# <URL:http://httpd.apache.org/docs-2.0/vhosts/>
# for further details before you try to setup virtual hosts.
#
# You may use the command line option '-S' to verify your virtual host
# configuration.
#
Include /etc/apache2/vhosts.d/*.conf


# Note: instead of adding your own configuration here, consider
#       adding it in your own file (/etc/apache2/httpd.conf.local)
#       putting its name into APACHE_CONF_INCLUDE_FILES in
#       /etc/sysconfig/apache2 -- this will make system updates
#       easier :)
if there appears to be nothing wrong, i shall try and reinstall apache along with all modules etc.
 
Old 02-28-2005, 06:20 PM   #5
dickohead
Member
 
Registered: Feb 2003
Location: Melbourne, VIC, Australia
Distribution: Ubuntu 6.06
Posts: 101

Original Poster
Rep: Reputation: 15
i've also noticed that there is no http module in yast... would this be a problem?
 
Old 06-27-2006, 11:26 PM   #6
imagineers7
Member
 
Registered: Mar 2006
Distribution: BackTrack, RHEL, FC, CentOS, IPCop, Ubuntu, 64Studio, Elive, Dream Linux, Trix Box
Posts: 310

Rep: Reputation: 30
Hi,

this is for those who may find this thread in future for answer:-


Read this documentation
http://in2.php.net/manual/en/install.unix.apache2.php
or
Read this thread
http://www.linuxquestions.org/questi...hreadid=103392


Hope, this will help someone
 
Old 06-28-2006, 10:25 AM   #7
saavik
Member
 
Registered: Nov 2001
Location: NRW, Germany
Distribution: SLES / FC/ OES / CentOS
Posts: 614

Rep: Reputation: 32
For suse you need to use /etc/sysconfig/apache2 (dont know the exact filename might be apache2.conf)

Add all modules here and than run SuSEconfig!!

Modules do not need to appear in yast (depending on the exact version)
 
  


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
apache config files and php waynejkruse10 Linux - Software 8 12-05-2006 09:40 PM
php apache or php cgi - php learner rblampain Linux - Security 3 12-17-2004 11:10 PM
apache not able to recognize php files phamtranquocvie Linux - Newbie 2 10-06-2004 11:32 AM
help getting pptp-php-gtk.php to run as root mrtwice Linux - Software 0 11-21-2003 12:49 PM
reinstalled apache, php, still no php support SuSE 8.2 hindenbergbaby Linux - Software 1 10-14-2003 01:42 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:02 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