LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Suse/Novell
User Name
Password
Suse/Novell This Forum is for the discussion of Suse Linux.

Notices



Reply
 
Search this Thread
Old 06-25-2005, 11:06 PM   #1
D4ve G
Member
 
Registered: Jun 2005
Location: Canada
Distribution: XP / Ubuntu
Posts: 55

Rep: Reputation: 15
Setting up Apache


My apache server is up and running but when I try to go to a page with the extension of .PHP it asks what you want to open it with. I open it up and I see the raw php source code so nothing is working help?

Last edited by D4ve G; 06-26-2005 at 02:15 PM.
 
Old 06-26-2005, 10:36 AM   #2
grouge
LQ Newbie
 
Registered: Sep 2004
Location: Seaford, East Sussex, UK
Distribution: SUSE 9.3 Pro, Fedora 2
Posts: 16

Rep: Reputation: 0
Did you install it with YAST? In which case make sure you have selected to install php.

Otherwise it seems like your httpd.conf is not configured to to parse .php files

Have a look at this page from php.net for the Apache 2 install (I am assuming that is what you have)

http://uk.php.net/manual/en/install.unix.apache2.php

Specifically:

15. Tell Apache to parse certain extensions as PHP. For example,
let's have Apache parse the .php extension as PHP. You could
have any extension(s) parse as PHP by simply adding more, with
each separated by a space. We'll add .phtml to demonstrate.

AddType application/x-httpd-php .php .phtml

It's also common to setup the .phps extension to show highlighted PHP
source, this can be done with:

AddType application/x-httpd-php-source .phps


I've only installed php with Apache manually on Red Hat systems, not SUSE, so these are just suggestions as to what might be wrong.

Have fun
 
Old 06-26-2005, 11:29 AM   #3
D4ve G
Member
 
Registered: Jun 2005
Location: Canada
Distribution: XP / Ubuntu
Posts: 55

Original Poster
Rep: Reputation: 15
I think SUSE is different with apache (yes I installed form YaST)

In the http.conf I cannot find any LoadModule commands so I don't know where to edit it?
 
Old 06-26-2005, 12:00 PM   #4
grouge
LQ Newbie
 
Registered: Sep 2004
Location: Seaford, East Sussex, UK
Distribution: SUSE 9.3 Pro, Fedora 2
Posts: 16

Rep: Reputation: 0
I'm not sure really, as you say the set up on SUSE does seem to be different than Red Hat

This link might help:

http://www.aditus.nu/jpgraph/apache2suse.php

It is about installing php5 but also has some useful info about php4 and the location of the correct httpd.conf (BTW note that it is httpd.conf) on SUSE. I thought the section on "Making sure you have the correct Apache2 setup" might be of use to you.

Also to test php create a phpinfo file as follows

Code:
<?php
 phpinfo(); 
?>
put it in the root directory of the webserver "/srv/www/htdocs/" and try to open it with your browser.

When you eventually see this file parsed you'll let out a big cheer
 
Old 06-26-2005, 01:40 PM   #5
D4ve G
Member
 
Registered: Jun 2005
Location: Canada
Distribution: XP / Ubuntu
Posts: 55

Original Poster
Rep: Reputation: 15
I installed 9.2 freshly and it doesn't have apache on the cd

alright I think I found some rpms on it..

:S

I am getting this when I try to start it

Quote:
etc/init.d/apache2 start
Starting httpd2 (prefork) (13)Permission denied: make_sock: could not bind to address [::]:80
no listening sockets available, shutting down
Unable to open logs
startproc: exit status of parent of /usr/sbin/httpd2-prefork: 1

Last edited by D4ve G; 06-26-2005 at 02:09 PM.
 
Old 06-26-2005, 05:22 PM   #6
j-ray
Senior Member
 
Registered: Jan 2002
Location: germany
Distribution: ubuntu
Posts: 1,456

Rep: Reputation: 104Reputation: 104
as far as i know apache and php come with the pro versions of suse. you then can install php and apache thru yast very easily. but u can download php and apache of course, too. this is easiest done with rpm versions that run on suse as well as on redhat.
 
Old 06-26-2005, 06:57 PM   #7
D4ve G
Member
 
Registered: Jun 2005
Location: Canada
Distribution: XP / Ubuntu
Posts: 55

Original Poster
Rep: Reputation: 15
Yeah which I just did ^^ 2 posts up
 
Old 06-27-2005, 08:22 AM   #8
j-ray
Senior Member
 
Registered: Jan 2002
Location: germany
Distribution: ubuntu
Posts: 1,456

Rep: Reputation: 104Reputation: 104
did u start the server as root? it runs on port 80 so u cant start it as user
 
Old 06-27-2005, 12:20 PM   #9
D4ve G
Member
 
Registered: Jun 2005
Location: Canada
Distribution: XP / Ubuntu
Posts: 55

Original Poster
Rep: Reputation: 15
yea ok nm i didnt have the right permissions u were right.. thanks..
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Setting Up LAMP: Getting Linux, Apache, MySQL, and PHP Working Together rhythmking Slackware 2 06-08-2005 05:05 AM
Setting up apache with php and mysql meander Linux - Networking 6 01-26-2005 05:10 AM
apache setting for php tej Linux - Software 2 09-20-2004 08:17 AM
Help Setting Up PHP On Apache AFI_Flame Linux - Networking 3 06-28-2004 01:44 PM
Apache / PHP - OK, what setting am I missing? bkeating Linux - Software 1 12-10-2002 04:57 PM


All times are GMT -5. The time now is 12:50 AM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration