LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   php set up (https://www.linuxquestions.org/questions/linux-newbie-8/php-set-up-921155/)

willettwork 12-29-2011 10:34 PM

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?

bathory 12-30-2011 12:38 AM

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

willettwork 01-01-2012 06:34 PM

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.

btmiller 01-01-2012 11:28 PM

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).

bathory 01-02-2012 12:21 AM

@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?


All times are GMT -5. The time now is 11:23 PM.