Ubuntu 8.04 lamp PHP5 include command not working

  • devilwood
  • Silver Member
  • Silver Member
  • User avatar
  • Posts: 436

Post 3+ Months Ago

im trying to connect to my db on a new lamp server i setup.

the php query script (myquery.php) uses an include file that contains the connection information as typical of most. However, I get a error about pear.

Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0

Fatal error: Unknown: Failed opening required '/var/www/myquery.php' (include_path='.:/usr/share/php:/usr/share/pear') in Unknown on line 0

So,
I installed the pear package php-pear which installed php5-cli and php-db but that did not fix the php command include.

If I place my connection information and my queries in one file then I have no problems with querying my db. So, all my other code is correct.

It seems I'm to require_once PHP.db in all of my php scripts, but can be made easier by declaring the path of the pear file in my php.ini. Not sure if that's right.

Please advise my next course of action. Many thnks in advance.
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • devilwood
  • Silver Member
  • Silver Member
  • User avatar
  • Posts: 436

Post 3+ Months Ago

Ok,
It was the file permission for the myquery.php.

I moved it to the directory using nautilus and wasn't aware I could not view the file using a web browser locally.

The file myquery.php i changed to 777, but what should the php file that gets included be which contains my connection information.

I solved my main problem, but help with getting my permissions right will smooth the edges.

thx.

Post Information

  • Total Posts in this topic: 2 posts
  • Users browsing this forum: No registered users and 69 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.