require_once() error

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
gmseed
Forum Newbie
Posts: 9
Joined: Wed Jul 04, 2007 2:42 pm
Location: Edinburgh, Scotland, UK

require_once() error

Post by gmseed »

Hi

In my index.php file I have a call to require_once():

// html page settings
require_once('php/page.php');

Warning: require_once(php/page.php) [function.require-once]: failed to open stream: Permission denied in /home/gmseed/public_html/web/trunk/index.php on line 27

Fatal error: require_once() [function.require]: Failed opening required 'php/page.php' (include_path='.:/usr/share/php:/usr/share/pear') in /home/gmseed/public_html/web/trunk/index.php on line 27

Does anyone know why I'm getting this error message?

I'm using the php5 version installed as part of Netbeans 6.5 on Ubuntu 8.1.

Thanks for an help.

Cheers

Graham
User avatar
aceconcepts
DevNet Resident
Posts: 1424
Joined: Mon Feb 06, 2006 11:26 am
Location: London

Re: require_once() error

Post by aceconcepts »

What are the permissions set on the "php" directory?
gmseed
Forum Newbie
Posts: 9
Joined: Wed Jul 04, 2007 2:42 pm
Location: Edinburgh, Scotland, UK

Re: require_once() error

Post by gmseed »

Hi

Thanks for your reply.

Having just moved over for good from Windows to Ubuntu Linux I for got to check the dir/file permissions.

Changing the access permissions has now sorted out my problem.

Thanks again.

Graham
Post Reply