Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's 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 a fresh installation of Fedora 2 and can't work out if php is installed or just wrongly confirgured.
I final got apache running after starting the httpd service, not as I would have thought by starting 'apache' service. Is there something similar with php?
Create a new php document in your httdocs folder (or another if you changed the /www root) and type:
Code:
<?php phpinfo(); ?>
Save it as phpinfo.php and open Firefox (Mozilla) and go to http://localhost/phpinfo.php. If a page displaying your php info is served, php is properly installed and configured. If not, it is either not configured with Apache or not installed at all.
You misunderstood me. I'm sorry I was under the impression that you have some experience in web development. Open up the php document in a text editor (plain text, not OpenOffice) -- I believe in FC2 you can right-click and open with...) Delete any <html>, <head>, or <body> tags, and copy and paste in that line into it and save it as a php document. Make sure that you open it through localhost (i.e. not through file:///home/www/phpinfo.php), and see if you get the same results.
I have coded with php before and did put the right code in: <? phpinfo(); ?> but the webpage produced was blank - hence me thinking that php wasn't working properly.
I presumed that if apache producted <html><body></body></html> it might mean something.
If your browser displayed <html><body></body></html> then the webpage wasn't being served by Apache, just viewed in plain text. Either Apache isn't working or the source of the webpage is:
Chances are Apache isn't serving the webpage (it's not configured properly). Again, check your address bar and make sure your not viewing the file (file:///home....) and going to localhost.
Hmmm. Have you seen the "Apache has been installed successfully page" yet? Non-dynamic content (html files) can be displayed fine without a web server, but as long as you are going through localhost, that should mean Apache is installed (try going to http://localhost). Otherwise, I can't think of what's wrong.
I have no idea what's wrong then. I hope you can sort out your problem, but seeing as I'm not running FC2 I don't think I can help you much more. Sorry
Yes you do have it installed. Try writing a simple php script and putting it in your webserver directory and see if it works. In fedora core 2 place the test page in /var/www/html and try and access it as follows http://localhost/testpage.php if it's been saved as testpage.php.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.