LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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, 10: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, 12:38 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
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, 06: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-01-2012, 11:28 PM   #4
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
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, 12:21 AM   #5
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
@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 12:33 AM.
 
  


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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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