set_include_path

dude42

New Member
Messages
2
Reaction score
0
Points
0
Hi, using Zend Framework need set include_path to the Zend library in the apllication index.php, something like this:

PHP:
// 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
 

garrettroyce

Community Support
Community Support
Messages
5,609
Reaction score
250
Points
63
It really looks as if the server is working, but it's throwing a file not found error. Does the file exist?
 

xav0989

Community Public Relation
Community Support
Messages
4,467
Reaction score
95
Points
0
Try using absolute directory names instead of relative ones.
 

dude42

New Member
Messages
2
Reaction score
0
Points
0
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:
Try using absolute directory names instead of relative ones.

How this can solve this issue? Thanks.
Edit:
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:
Top