+ Reply to Thread
Results 1 to 4 of 4

Thread: set_include_path

  1. #1
    dude42 is offline x10Hosting Member dude42 is an unknown quantity at this point
    Join Date
    May 2009
    Posts
    2

    set_include_path

    Hi, using Zend Framework need set include_path to the Zend library in the apllication index.php, something like this:

    PHP Code:
    // Set include path to Zend (and other) libraries
        
    set_include_path(BASE_PATH '/library' .
            
    PATH_SEPARATOR APPLICATION_PATH '/models' .
            
    PATH_SEPARATOR get_include_path() .
            
    PATH_SEPARATOR '.'
        
    ); 
    Site id down for "500 Internal Server Error". In error log I get:

    Code:
    [17-Jul-2009 01:37:34] PHP Fatal error:  Uncaught exception 'Zend_View_Exception' with message 'script 'page.phtml' not found in path (./install/views/)' in /home/dude42/public_html/cms/library/Zend/View/Abstract.php:925
    Stack trace:
    #0 /home/dude42/public_html/cms/library/Zend/View/Abstract.php(828): Zend_View_Abstract->_script('page.phtml')
    #1 /home/dude42/public_html/cms/install/install.php(71): Zend_View_Abstract->render('page.phtml')
    #2 /home/dude42/public_html/cms/index.php(8): require('/home/dude42/pu...')
    #3 {main}
      thrown in /home/dude42/public_html/cms/library/Zend/View/Abstract.php on line 925
    And also attaching my .htaccess:

    SetEnv APPLICATION_ENV development

    Code:
    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} -s [OR]
    RewriteCond %{REQUEST_FILENAME} -l [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^.*$ - [NC,L]
    RewriteRule ^.*$ index.php [NC,L]
    Any suggestions how Ican resolve this problem? Can I use Zend Framework on X10 hosting?

    Thanks

  2. #2
    garrettroyce's Avatar
    garrettroyce is offline Generally Helpful Member garrettroyce is a glorious beacon of lightgarrettroyce is a glorious beacon of light
    Join Date
    Apr 2008
    Location
    IL, USA
    Posts
    3,746

    Re: set_include_path

    It really looks as if the server is working, but it's throwing a file not found error. Does the file exist?
    gjr.gr - coming soon: secrets of OCD coding from a self taught tinkerer

  3. #3
    xav0989's Avatar
    xav0989 is offline Community Public Relation xav0989 is just really nice
    Join Date
    Jul 2008
    Location
    ifk
    Posts
    4,438

    Re: set_include_path

    Try using absolute directory names instead of relative ones.
    Xavier L | Community Public Relations Manager (Free Hosting Support)
    █ Yes, my position is too cool to even exist!
    How am I helping? Rate this post by clicking the icon below! (this is even better than "liking" a post)
    Terms of Service | Acceptable Use Policy | x10Hosting Wiki

  4. #4
    dude42 is offline x10Hosting Member dude42 is an unknown quantity at this point
    Join Date
    May 2009
    Posts
    2

    Re: set_include_path

    Quote Originally Posted by garrettroyce View Post
    It really looks as if the server is working, but it's throwing a file not found error. Does the file exist?
    Ok, I has solved this problem. But, another error continue. I still got 500 Internal Server Error. It looks that it is for .htaccess bug. My file is:

    Code:
    SetEnv APPLICATION_ENV development
    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} -s [OR]
    RewriteCond %{REQUEST_FILENAME} -l [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^.*$ - [NC,L]
    RewriteRule ^.*$ index.php [NC,L]
    Anybody could help me to solve this issue, please?
    Edit:
    Quote Originally Posted by xav0989 View Post
    Try using absolute directory names instead of relative ones.
    How this can solve this issue? Thanks.
    Edit:
    Quote Originally Posted by dude42 View Post
    Ok, I has solved this problem. But, another error continue. I still got 500 Internal Server Error. It looks that it is for .htaccess bug. My file is:

    Code:
    SetEnv APPLICATION_ENV development
    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} -s [OR]
    RewriteCond %{REQUEST_FILENAME} -l [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^.*$ - [NC,L]
    RewriteRule ^.*$ index.php [NC,L]
    Anybody could help me to solve this issue, please?
    Edit:


    How this can solve this issue? Thanks.
    Ok, problem is not in the .htaccess, but in php directive set_include_path in:

    Code:
    // Set include path to Zend (and other) libraries
        set_include_path(BASE_PATH . '/library' .
            PATH_SEPARATOR . APPLICATION_PATH . '/models' .
            PATH_SEPARATOR . get_include_path() .
            PATH_SEPARATOR . '.'
        );
    Anybody pls can solve this problem?

    Thanks
    Last edited by dude42; 07-19-2009 at 11:28 AM. Reason: Automerged Doublepost

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers