LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 01-14-2009, 06:40 PM   #1
visitnag
Member
 
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/php.info in mozilla address bar it is giving the following error.


Not Found

The requested URL /php.info 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

Error!
Could not open file

You tried to access the address file://localhost/php.info, 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, 02:45 AM   #2
j-ray
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 02:48 AM.
 
Old 01-15-2009, 07:37 AM   #3
AuroraCA
Member
 
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 07:39 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
php, ubuntu & no-ip problem wrstrong Linux - Server 0 01-11-2008 03:49 PM
php comment problem // and /* on Fedora Core 5 and PHP 5.1.4 shakeel_125 Linux - Server 4 09-29-2006 04:42 AM
php comment problem // and /* on Fedora Core 5 and PHP 5.1.4 shakeel_125 Fedora 4 09-29-2006 02: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 01:54 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:40 AM.

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