How to run PHP within Firefox
Moderator: General Moderators
-
woodplaner
- Forum Newbie
- Posts: 13
- Joined: Sun Jan 02, 2011 8:12 am
How to run PHP within Firefox
Good morning. I am new to Linux, Apache, PHP, and MySql. The software seems to be installed and running .
-Localhost functions from the URL line of Firefox
-PHP scripts run in Terminal
-PHP scripts do not run from the URL line of Firefox, the msg "the requested URL was not found" is displayed
Please provide suggestions of what needs changing to run PHP within Firefox. Thanks.
-Localhost functions from the URL line of Firefox
-PHP scripts run in Terminal
-PHP scripts do not run from the URL line of Firefox, the msg "the requested URL was not found" is displayed
Please provide suggestions of what needs changing to run PHP within Firefox. Thanks.
Re: How to run PHP within Firefox
that the requested url looks like?woodplaner wrote:Good morning. I am new to Linux, Apache, PHP, and MySql. The software seems to be installed and running .
-Localhost functions from the URL line of Firefox
-PHP scripts run in Terminal
-PHP scripts do not run from the URL line of Firefox, the msg "the requested URL was not found" is displayed
Please provide suggestions of what needs changing to run PHP within Firefox. Thanks.
-
woodplaner
- Forum Newbie
- Posts: 13
- Joined: Sun Jan 02, 2011 8:12 am
Re: How to run PHP within Firefox
Thanks for the response. The URL is:
http://localhost/phpinfo.php
phpinfo.php is a simple script that runs within Terminal at the command line.
http://localhost/phpinfo.php
phpinfo.php is a simple script that runs within Terminal at the command line.
Re: How to run PHP within Firefox
Where it is located? It should be in the web server's document root
-
woodplaner
- Forum Newbie
- Posts: 13
- Joined: Sun Jan 02, 2011 8:12 am
Re: How to run PHP within Firefox
I am running Apache as a local server. How do I identify the localhost document root? I hope the fix is as simple as identifying the correct directory/subdirectory to place the scripts.
Re: How to run PHP within Firefox
Look in your httpd.conf (it's most likely in /etc/apache2 or /etc/apache or /etc/httpd)woodplaner wrote:I am running Apache as a local server. How do I identify the localhost document root? I hope the fix is as simple as identifying the correct directory/subdirectory to place the scripts.
Usually the default folder is /var/www/html but can be anywhere
-
woodplaner
- Forum Newbie
- Posts: 13
- Joined: Sun Jan 02, 2011 8:12 am
Re: How to run PHP within Firefox
Thanks. I will track it down later. For now, its off to work I go.
-
woodplaner
- Forum Newbie
- Posts: 13
- Joined: Sun Jan 02, 2011 8:12 am
Re: How to run PHP within Firefox
/etc/apache2/httpd.conf is a read-only, empty file/
there is no /var/www/html/ , unless it is a hidden directory
There is a /var/www/index.html, and this is the html file that runs when i execute http://localhost/. I can open the index.html file, but I lack permission to save a .php file to /var/www/ .
there is no /var/www/html/ , unless it is a hidden directory
There is a /var/www/index.html, and this is the html file that runs when i execute http://localhost/. I can open the index.html file, but I lack permission to save a .php file to /var/www/ .
Re: How to run PHP within Firefox
Are you using ubuntu?
You can run
sudo chmod 777 /var/www/
to grant yourself permissions. Do not run it if it's used for production server however, only if it is your local PC and there are no other users
You can run
sudo chmod 777 /var/www/
to grant yourself permissions. Do not run it if it's used for production server however, only if it is your local PC and there are no other users
-
woodplaner
- Forum Newbie
- Posts: 13
- Joined: Sun Jan 02, 2011 8:12 am
Re: How to run PHP within Firefox
I am running Ubuntu 10.10.
I was able to run a script from the URL line which called phpinfo(), and that is what I have been attempting to do?
Much of what I have read about installing and running Linux and associated software is that it is easy and can be accomplished in 5 min,! However, all the material I have read does not begin at step one. There is an underlying unstated assumption of some level of familiarity. What resources do you suggest I read?
Thanks again.
Re: How to run PHP within Firefox
7 means read(4) + write(2) + execute(1)
777 means owner: 7; group: 7; others: 7
You need to get familiar with linux, but unfortunately I cannot recommend any tutorials. I've been using Linux for more then 3 years at work and I've learnt by need - with googling and asking.
777 means owner: 7; group: 7; others: 7
You need to get familiar with linux, but unfortunately I cannot recommend any tutorials. I've been using Linux for more then 3 years at work and I've learnt by need - with googling and asking.
-
woodplaner
- Forum Newbie
- Posts: 13
- Joined: Sun Jan 02, 2011 8:12 am
Re: How to run PHP within Firefox
Ok. I will view info chmod again. Thank you.