Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
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.
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.
I have just installed RedHat 7.0, MySQL 3.23.33 and Apache 1.3.19. But then, after I have installed Apache, I discovered that the Document Root of Apache Server is /var/www/html, not /usr/local/apache/htdocs.
I have already set the httpd.conf's document root to /usr/local/apache/htdocs, but nothing changed.
Moreover, I have tried to use the following command to restart apache server, then I got the following output.
#/usr/local/apache/bin/apachectl restart
/usr/local/apache/bin/apachectl restart: httpd not running, trying to start
/usr/local/apache/bin/apachectl restart: httpd started
I have tried several times, but still this output.
But does Linux tell me that httpd is not running?
Yup, I have restart the apache server with the following command:
#/usr/local/apache/bin/apachectl restart
/usr/local/apache/bin/apachectl restart: httpd not running, trying to start
/usr/local/apahce/bin/apachectl restart: httpd started.
Because I want to install PHP, but I don't know I can't install it. I have tried to install PHP for many many times, I have edited the httpd.conf for PHP 4, but still, it is not workable. The page only display the code, but not the PHP output.
Can anyone tell me the FULL process for installing the PHP? Thanks a lot.
Okay, I can add my comments, because I've just installed the latest PHP and APACHE and got them going. I'm running Mandrake 8.2 and thought that my installation would deal with the configuration. This turned out to not be the case. After a session on IRC (thanks Morn) I updated my APACHE and then PHP.
Apache first. IIRC, I couldn't go for the rpm install version because it's the same version as my installation one. So I went to apache and downloaded the tar.gz - which turned out to be easier than I thought. I followed the readme's and installed. I recommend you get the latest Apache.
Then, install PHP, and, if you're lucky, it will configure httpd.conf for you (the apache confg file). If you're not lucky then a couple of lines of code should do it (it did for me).
Originally posted by bowen Yup, I have restart the apache server with the following command:
#/usr/local/apache/bin/apachectl restart
/usr/local/apache/bin/apachectl restart: httpd not running, trying to start
/usr/local/apahce/bin/apachectl restart: httpd started.
Because I want to install PHP, but I don't know I can't install it. I have tried to install PHP for many many times, I have edited the httpd.conf for PHP 4, but still, it is not workable. The page only display the code, but not the PHP output.
Can anyone tell me the FULL process for installing the PHP? Thanks a lot.
Try running the deamon /etc/rc.d/init.d/httpd start
You need to configure your httpd.conf file (which is normally in /etc/conf/ but can also be in conf within the apache directory).
This file tells apahce what to do when certain requests are made of it. When Apache receives a request for a PHP file it needs to know where PHP is as PHP is the donkey that does all the work. Once it has done the donkey work, it gives it back to Apache to display.
Clearly, the fact that you are seeing the code means that PHP is not getting it.
Can you display the lines in httpd.conf. It's a shame I'm at work, because if I was at home, I'd post the couple of lines in my httpd.conf and you could try them. If I remember, when I get home, I'll put them up.
I have a problem where I have the httpd.conf in the install dir for apache2 and in /etc/httpd/conf/httpd.conf and in /usr/local/apache2/conf/httpd.conf
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.