LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 05-16-2011, 05:54 AM   #1
blakey
LQ Newbie
 
Registered: Apr 2011
Posts: 16

Rep: Reputation: 0
PHP Help


I would like to start learning PHP and have installed apache2, php5, and libapache2-mod-php5 from the command line. I then opened up Firefox and typed: http://localhost and got the reply, It Works! But i can't find PHP in the main Ubuntu menu (i am running Ubuntu 11.04) and i can't start it from the command line? Would someone help me out here please!
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 05-16-2011, 05:56 AM   #2
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hello,

Create a file named index.php in your document root (/var/www?) and put the following in it:
Code:
<?php

// Show all information, defaults to INFO_ALL
phpinfo();

?>
Then access the page at http://localhost/index.php. If PHP is installed correctly you'll notice.

Kind regards,

Eric
 
2 members found this post helpful.
Old 05-16-2011, 06:00 AM   #3
corp769
LQ Guru
 
Registered: Apr 2005
Location: /dev/null
Posts: 5,818

Rep: Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007
Hello,

To add to what Eric said.... PHP is a programming language, and the packages you have installed just add PHP capabilities to apache, which is your web server. As far as the language itself goes, here are a few references and tutorials to start:
http://php.net/manual/en/tutorial.php
http://www.w3schools.com/php/php_intro.asp
http://devzone.zend.com/article/627

Hope that helps man!

Cheers,

Josh
 
2 members found this post helpful.
Old 05-16-2011, 06:30 AM   #4
blakey
LQ Newbie
 
Registered: Apr 2011
Posts: 16

Original Poster
Rep: Reputation: 0
Thanks for the help plus links EricTRA and corp769. Shall really get stuck in now and learn all i can. Cheers!
 
Old 05-16-2011, 06:32 AM   #5
corp769
LQ Guru
 
Registered: Apr 2005
Location: /dev/null
Posts: 5,818

Rep: Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007
Cheers dude! If the information we provided is good enough, you can mark your thread as solved and give rep if applicable. If not, leave it open and you can always come back ask away again

Josh
 
1 members found this post helpful.
  


Reply



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
LXer: Installing Nginx With PHP 5.3 And PHP-FPM On Ubuntu Lucid Lynx (10.04) LXer Syndicated Linux News 0 06-14-2010 11:42 PM
Yesterday PHP worked just fine and today it wants to serve up the php code. orsty9001 Linux - Server 10 12-12-2008 10:48 AM
Are PHP session variables held in memory when you leave a PHP site? Locura Programming 11 11-16-2008 08:37 PM
php5 apache2 mysql4 don't work, php does not seem to read php.ini atom Linux - Software 5 03-24-2005 11:05 AM
php apache or php cgi - php learner rblampain Linux - Security 3 12-17-2004 11:10 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 06:52 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
Open Source Consulting | Domain Registration