Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 01-14-2009, 07:40 PM   #1
Registered: Mar 2008
Posts: 147

Rep: Reputation: 15
php in UBUNTU problem

Dear all,

I am working on ubuntu 8.1

I have loaded php5 and apache2 and mysql. Mysql is working properly...but i could not execute my php codes(written with vi editor) in a browser.

I tried to execute the code in opera and mozilla. In opera(latest version) the browser is showing the entire code and in mozilla i am facing a pecular problem. When i first time tried to open it in mozilla the browser kept asking me want to save the file as or open it? Then i did something (i dont remember) now when i try to open the code in mozilla multiple tabs or getting opened(uncountable). I have to forcely kill the browser.

What to do? Here when i give localhost/ in mozilla address bar it is giving the following error.

Not Found

The requested URL / was not found on this server.
Apache/2.2.9 (Ubuntu) PHP/5.2.6-2ubuntu4 with Suhosin-Patch Server at localhost Port 80

in opera

Could not open file

You tried to access the address file://localhost/, which is currently unavailable. Please make sure that the Web address (URL) is correctly spelled and punctuated, then try reloading the page.
Old 01-15-2009, 03:45 AM   #2
Senior Member
Registered: Jan 2002
Location: germany
Distribution: ubuntu, mint, suse
Posts: 1,591

Rep: Reputation: 145Reputation: 145
you have to give the file a ".php" extension. If the extension is "info" the parser will not start his job and as the downloaded file doesn't have a mime declaration there will be a lot of problems processing it for the browser...

If the browser says "file not found" then maybe the file's name is different? Or you placed it in a wrong directory? Default document root is /var/www on ubuntu as far as i remember.

Last edited by j-ray; 01-15-2009 at 03:48 AM.
Old 01-15-2009, 08:37 AM   #3
Registered: Jul 2008
Location: Northern CA USA
Distribution: Ubuntu, Slackware, Gentoo, Fedora, Red Hat, Puppy Linux
Posts: 370

Rep: Reputation: 35
Rename your file to "info.php",
place it in the /var/www directory,
chown www-data:www-data info.php
and see if that works.

Last edited by AuroraCA; 01-15-2009 at 08:39 AM.


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
php, ubuntu & no-ip problem wrstrong Linux - Server 0 01-11-2008 04:49 PM
php comment problem // and /* on Fedora Core 5 and PHP 5.1.4 shakeel_125 Linux - Server 4 09-29-2006 05:42 AM
php comment problem // and /* on Fedora Core 5 and PHP 5.1.4 shakeel_125 Fedora 4 09-29-2006 03:14 AM
New to PHP and Postgressql. Is this a PHP problem or a sql problem. Please help sendas4 Linux - General 2 11-05-2004 02:54 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:13 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration