Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
02-27-2005, 12:10 AM
|
#1
|
Member
Registered: Feb 2003
Location: Melbourne, VIC, Australia
Distribution: Ubuntu 6.06
Posts: 101
Rep:
|
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!
|
|
|
02-27-2005, 12:30 AM
|
#2
|
Member
Registered: Jan 2005
Distribution: Slackware current (and others)
Posts: 188
Rep:
|
to fix the php problem add the line
Include /etc/apache/mod_php.conf
to the /etc/apache/httpd.conf
|
|
|
02-27-2005, 01:29 AM
|
#3
|
Member
Registered: Feb 2003
Location: Melbourne, VIC, Australia
Distribution: Ubuntu 6.06
Posts: 101
Original Poster
Rep:
|
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...
|
|
|
02-27-2005, 01:37 AM
|
#4
|
Member
Registered: Feb 2003
Location: Melbourne, VIC, Australia
Distribution: Ubuntu 6.06
Posts: 101
Original Poster
Rep:
|
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.
|
|
|
02-28-2005, 06:20 PM
|
#5
|
Member
Registered: Feb 2003
Location: Melbourne, VIC, Australia
Distribution: Ubuntu 6.06
Posts: 101
Original Poster
Rep:
|
i've also noticed that there is no http module in yast... would this be a problem?
|
|
|
06-27-2006, 11:26 PM
|
#6
|
Member
Registered: Mar 2006
Distribution: BackTrack, RHEL, FC, CentOS, IPCop, Ubuntu, 64Studio, Elive, Dream Linux, Trix Box
Posts: 310
Rep:
|
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
|
|
|
06-28-2006, 10:25 AM
|
#7
|
Member
Registered: Nov 2001
Location: NRW, Germany
Distribution: SLES / FC/ OES / CentOS
Posts: 614
Rep:
|
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)
|
|
|
All times are GMT -5. The time now is 02:31 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|