LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 12-29-2011, 11:34 PM   #1
willettwork
LQ Newbie
 
Registered: Dec 2011
Distribution: Ubuntu 11.01 64bit
Posts: 5

Rep: Reputation: Disabled
php set up


Through ADD/Remove programs I installed mysql, apache, and php, What else do i need to do to get php scripts to run?
 
Old 12-30-2011, 01:38 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,516

Rep: Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501
Hi,

It should work. Put the following code in a php file in the docroot of your server (that is /var/www/html for fedora) and use http://localhost/myfile.php to see what you get
Code:
<?php
phpinfo();
?>
egards
 
Old 01-01-2012, 07:34 PM   #3
willettwork
LQ Newbie
 
Registered: Dec 2011
Distribution: Ubuntu 11.01 64bit
Posts: 5

Original Poster
Rep: Reputation: Disabled
here is what I get

[root@localhost workspace]# http://localhost/what.php
bash: http://localhost/what.php: No such file or directory
[root@localhost workspace]#

still will not open in browser as well.
 
Old 01-02-2012, 12:28 AM   #4
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,275

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370
A URL (http://localhost/what.php) is not a command. You can't just type it into the shell and expect it to display. If you don't have a browser on your system, you can install Firefox or whatever from the package manager. If this is a server that doesn't have a GUI installed, you should be able to go to http://your.server.ip.address/what.php from another machine on your local network and see the page (obviously, you need to replace "your.server.ip.address" with the actual IP of your server).
 
Old 01-02-2012, 01:21 AM   #5
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,516

Rep: Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501
@OP

A URL is supposed to be used in a browser address bar, not typed in command line, as btmiller already mentioned above.

Quote:
still will not open in browser as well.
So, could you give more details? What you mean will not open?
Do you get a 404 error, the php source code, a prompt to save the page, or what?

Last edited by bathory; 01-02-2012 at 01:33 AM.
 
  


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
[SOLVED] phpinfo display_errors not set to On after value set to On in php.ini famsinyi Programming 4 03-25-2011 08:41 PM
set handler php without panel Ariyan Linux - Newbie 1 02-24-2010 10:17 AM
how do i set up a php forum site turkeybrain Programming 11 06-21-2006 04:55 AM
PHP: set the FROM to an email purefan Programming 2 02-13-2006 04:04 AM
PHP set of variables increment? Ctawp Programming 6 06-18-2004 02:03 PM


All times are GMT -5. The time now is 03:49 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration