LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 02-27-2007, 01:10 AM   #1
sharky
Member
 
Registered: Oct 2002
Posts: 569

Rep: Reputation: 84
/etc/init.d/apache start doesn't work


I execute "sudo /etc/init.d/apache start" and nothing gets returned to the terminal and apache2 doesn't start. I removed and reinstalled apache2 but it didn't help. Also rebooted. "sudo /etc/init.d/apache restart" doesn't work either.

I can start /usr/sbin/apache2 and that seems to work. At least my index.html from http://localhost loads and reloads. I also can't get php working.

Any comments, advice or suggestions are welcome.
 
Old 02-27-2007, 03:02 AM   #2
tbutttbutt
Member
 
Registered: Jan 2006
Location: India
Distribution: Fedora 7, Linuxfromscratch 6.2
Posts: 66

Rep: Reputation: 15
You have to install the PHP files to get PHP to work

In my disro (Fedora Core 6) it is php-5.1.6-3.i386.rpm and should be on your CDs.

In my case Apache starts at boot but MySQL doesn't and I have to start it manually.

Read the Apache manual which should be installed on your system (/var/www/manual) or the Apache man pages for more info. It will at least tell you how to start apache safely.

You can put the line to start Apache in your startup script, e.g. /etc/rc.d/rc.local if all else fails.
 
Old 02-27-2007, 07:12 AM   #3
sharky
Member
 
Registered: Oct 2002
Posts: 569

Original Poster
Rep: Reputation: 84
I got the init script working but php still refuses to cooperate. I've installed php4 and php5. I've removed both and tried each alone. I've removed everything (apache* and php*) and reinstalled and setup according several tutorials and php refuses to work. The browser keeps bringing up the download options dialog whenever I load a .php file.
 
Old 02-28-2007, 02:06 AM   #4
tbutttbutt
Member
 
Registered: Jan 2006
Location: India
Distribution: Fedora 7, Linuxfromscratch 6.2
Posts: 66

Rep: Reputation: 15
Have you got the two required lines in your /etc/httpd/conf.d/php.conf file:

AddHandler php5-script .php
AddType text/html .php

If your system has selinux then put it in permissive mode. It doesn't let php files be executed in enforcing mode. Or you can configure it in enforcing mode to let php files be executed.
 
  


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
Can gui start only in init 5? coolguy_iiit Linux - Newbie 2 07-31-2006 11:36 AM
To start init 2 at boot satimis Fedora 3 10-05-2004 04:02 AM
Boot into / start in INIT 3 svarreby Fedora 3 02-16-2004 09:11 AM
init to Start Oracle GAVollink Linux - Software 0 08-18-2003 03:41 PM
start services at init.d mikeshn Linux - General 1 12-24-2002 05:43 PM

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

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