Jump to content

Access Rights/CHMOD trouble


ignace

Recommended Posts

Hi

 

I'm fairly new to Linux and I have already ran into a problem I have a web-application running onder /var/www/html which uses the Zend framework in my bootstrap file I have this code:

 

define('URI_ROOT', dirname(__FILE__) . DIRECTORY_SEPARATOR);
define('URI_LIBRARY', URI_ROOT . 'libraries' . DIRECTORY_SEPARATOR);

function add_include_path($include_path) {
    $include_path = implode(PATH_SEPARATOR,
        array(get_include_path(), $include_path));
    set_include_path($include_path);
}

add_include_path(URI_LIBRARY);
require_once('Zend/Application.php');

 

But I get an error which says it can't find Zend/Application.php Thus I tried:

print is_readable(URI_LIBRARY) ? 'readable' : 'not readable';

 

Which returns not readable and explains why Zend_Application was not loaded. So I tried changing the path to library and ./library afterwards to no avail. Also changing the CHMOD on both the bootstrap or the library (which are currently 755) does not help.

 

Any advice?

Link to comment
Share on other sites

This will ensure that the /var/www directory structure and all files within it are accessible by apache.

find /var/www -type d -exec chmod 775 {} \;
find /var/www -type f -exec chmod 644 {} \;

 

You should also be setting you include_path within your php.ini as it'll give you better performance than using set_include_path().

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.