Linux Format forums Forum Index Linux Format forums
Help, discussion, magazine feedback and more
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

PHP Coding Academy Project 2

 
Post new topic   Reply to topic    Linux Format forums Forum Index -> Programming
View previous topic :: View next topic  
Author Message
Crispy



Joined: Mon May 31, 2010 7:35 pm
Posts: 57

PostPosted: Wed Jul 28, 2010 5:44 pm    Post subject: PHP Coding Academy Project 2 Reply with quote

Hi,

I am working my way through Project2 and I can't seem to get it to display the php file in Firefox. All I get is it asking where to save the .php file.

If I run http://localhost/, i get a message saying "It Works!" but that there are no files eventhough I have copied project2.php into /var/www

Do I need to tell Apache to accept php? I have installed all the packages given in the introduction so do not understand whats gone wrong?

Thanks,
Chris
Back to top
View user's profile Send private message
Ram
LXF regular


Joined: Thu Apr 07, 2005 10:44 pm
Posts: 1667
Location: Guisborough

PostPosted: Wed Jul 28, 2010 6:35 pm    Post subject: Reply with quote

Try:
Code:
http://localhost/project2.php



as http://localhost/ will only load the default index file, hence the reason you see it works.
_________________

lubuntu LXDE 13.10 running on AMD Phenom II*4; ASUS Crosshair III Formula MB; 4 GB Ram.....
Back to top
View user's profile Send private message MSN Messenger
Crispy



Joined: Mon May 31, 2010 7:35 pm
Posts: 57

PostPosted: Thu Jul 29, 2010 1:00 pm    Post subject: Reply with quote

I tried that but all I got was Firefox asking where to save the file. I managed to find the solution though on here

https://help.ubuntu.com/community/ApacheMySQLPHP#Installing%20Apache%202

All I had to do was restart the service using

sudo /etc/init.d/apache2 restart

and it now works.
Back to top
View user's profile Send private message
Hudzilla
Site admin


Joined: Mon Apr 04, 2005 12:52 pm
Posts: 265
Location: LXF Towers

PostPosted: Thu Jul 29, 2010 8:26 pm    Post subject: Reply with quote

Hey!

Yes, restarting Apache is the correct solution. I think in the mini-book I just tell people to restart their whole computer, because it saves having to explain the various different ways of restarting services on Linux Smile


Paul
Back to top
View user's profile Send private message Visit poster's website
View previous topic :: View next topic  
Display posts from previous:   
Post new topic   Reply to topic    Linux Format forums Forum Index -> Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Linux Format forums topic RSS feed 


Powered by phpBB © 2001, 2005 phpBB Group


Copyright 2011 Future Publishing, all rights reserved.


Web hosting by UKFast