Zend Session saves in the right path, but gc try to clean elsewhere - zend-framework

My Project is running under ZF 1.11, and it throws this error randomly:
Fatal error: Uncaught exception 'Zend_Session_Exception' with message 'Zend_Session::start() - /home/user/www/MyProject/library/Zend/Session.php(Line:469): Error #8 session_start() [<a href='function.session-start'>function.session-start</a>]: ps_files_cleanup_dir: opendir(/tmp) failed: Permission denied (13) Array' in /home/user/www/MyProject/library/Zend/Session.php:482 Stack trace:
#0 /home/user/www/MyProject/library/Zend/Session/Namespace.php(143): Zend_Session::start(true)
#1 /home/user/www/MyProject/library/Dlx/Acl/Permissao.php(8): Zend_Session_Namespace->__construct('user_info')
#2 /home/user/www/MyProject/application/Bootstrap.php(72): Dlx_Acl_Permissao->__construct(Object(Zend_Db_Adapter_Pdo_Mysql))
#3 /home/user/www/MyProject/library/Zend/Application/Bootstrap/BootstrapAbstract.php(669): Bootstrap->_initLoaders()
#4 /home/user/www/MyProject/library/Zend/Application/Bootstrap/BootstrapAbstract.php(622): Zend_Application_Bootstrap_BootstrapAbstract->_executeResource('loaders')
#5 /home/user/ in /home/user/www/MyProject/library/Zend/Session.php on line 482
As you can see, it tries to clean the session in /tmp directory, but in my application.ini the configuration sets session.save_path to APPLICATION_PATH "/../data/session" (ZF default conf), and it saves the session in this path, but when gc runs, it tries to clean in the wrong directory
This is my application.ini session configuration:
http://codepad.org/mJUyipG0
Btw, /data and /data/session permission are set to 777
Any ideas ?

Check your php.ini /tmp seems top be the default directory for php session saves. Although in my installation the save path line is commented out. ;session.save_path = "/tmp"
You can also debug by dumping Zend_Session::getOptions(); (it is a static method) to make sure your parameters are being correctly set.
This might be the cause of the exception:
string save_path - The correct value is system dependent, and should
be provided by the developer using an absolute path to a directory
readable and writable by the PHP process. If a writable path is not
supplied, then Zend_Session will throw an exception when started
(i.e., when start() is called).
Hopefully it's this simple, just supply an absolute path and check permissions.
The .. in the path may be the problem. APPLICATION_PATH "/../data/session"

Related

how to overcome filetime() error in typo3

(1/1) #1476107295 TYPO3\CMS\Core\Error\Exception PHP Warning:
filemtime(): stat failed for
/opt/lampp/htdocs/typonew/public/fileadmin/templates/main_1_column_with_menu.html
in
/opt/lampp/htdocs/typonew/vendor/typo3fluid/fluid/src/View/TemplatePaths.php
line 625
It seems that the file fileadmin/templates/main_1_column_with_menu.htmldoesn't exist. Create the file, check the file permission or change the path in your configuration.

Can't find file Logfile

Dr-Memory won't debug my application, I tried allready the -logdir option (I use -logdir C:\Users\r0b3\temp\drmemory).
The Error Message is
WARNING: unable to locate results file since can't open
C:\Users\r0b3\temp\drmemory/resfile.7116: 2
~~Dr.M~~ WARNING: application exited with abnormal code 0xc0000005
Any hints?

ZF - How to render a view with its controller?

I want to call another view from my view, but I need this new one to be processed with its controller, so I can have my SQL queries.
I am using $this->render('new-view.phtml') but this does not process the controller together, it returns only the view.
Anybody know how to do it? Thanks!
EDITED
Using $this->_forward(); i got this error:
Fatal error: Uncaught exception 'Zend_Loader_PluginLoader_Exception' with message 'Plugin by name 'RenderScript' was not found in the registry; used paths: Zend_View_Helper_: Zend/View/Helper/;C:/Program Files (x86)/Zend/Apache2/htdocs/dentallab/application/modules/default/views\helpers/' in C:\Program Files (x86)\Zend\ZendServer\data\libraries\Zend_Framework_1\1.12.3\library\Zend\Loader\PluginLoader.php:412 Stack trace: #0 C:\Program Files (x86)\Zend\ZendServer\data\libraries\Zend_Framework_1\1.12.3\library\Zend\View\Abstract.php(1182): Zend_Loader_PluginLoader->load('RenderScript') #1 C:\Program Files (x86)\Zend\ZendServer\data\libraries\Zend_Framework_1\1.12.3\library\Zend\View\Abstract.php(618): Zend_View_Abstract->_getPlugin('helper', 'renderScript') #2 C:\Program Files (x86)\Zend\ZendServer\data\libraries\Zend_Framework_1\1.12.3\library\Zend\View\Abstract.php(344): Zend_View_Abstract->getHelper('renderScript') #3 C:\Program Files (x86)\Zend\Apache2\htdocs\dentallab\application\modules\default\views\scripts\instituci in C:\Program Files (x86)\Zend\ZendServer\data\libraries\Zend_Framework_1\1.12.3\library\Zend\Controller\Plugin\Broker.php on line 336
You can use
$this->_forward($action, $controller);
as thom suggested if you want to use you controller and view script from another view script .

Zend Framework Disapatcher error so suddnly

is about a week I work for an application and now, yesterday i receive this error and than so suddnly has disappeared and I continued to work! now i receive again this error but without any change!
how can i solve it?
thanks
Warning: include_once(/www/zendsvr/htdocs/TassiWeb/application/controllers/LoginController.php) [function.include-once]: failed to open stream: Too many open files in /usr/local/zendsvr/share/ZendFramework/library/Zend/Controller/Dispatcher/Standard.php on line 344
Warning: include_once() [function.include]: Failed opening '/www/zendsvr/htdocs/TassiWeb/application/controllers/LoginController.php' for inclusion (include_path='/www/zendsvr/htdocs/TassiWeb/application/../library:/www/zendsvr/htdocs/TassiWeb/library:.:/usr/local/zendsvr/share/ZendFramework/library:/usr/local/zendsvr/share/pear') in /usr/local/zendsvr/share/ZendFramework/library/Zend/Controller/Dispatcher/Standard.php on line 344
Warning: include_once(/www/zendsvr/htdocs/TassiWeb/application/controllers/ErrorController.php) [function.include-once]: failed to open stream: Too many open files in /usr/local/zendsvr/share/ZendFramework/library/Zend/Controller/Dispatcher/Standard.php on line 344
Warning: include_once() [function.include]: Failed opening '/www/zendsvr/htdocs/TassiWeb/application/controllers/ErrorController.php' for inclusion (include_path='/www/zendsvr/htdocs/TassiWeb/application/../library:/www/zendsvr/htdocs/TassiWeb/library:.:/usr/local/zendsvr/share/ZendFramework/library:/usr/local/zendsvr/share/pear') in /usr/local/zendsvr/share/ZendFramework/library/Zend/Controller/Dispatcher/Standard.php on line 344
Fatal error: Uncaught exception 'Zend_Controller_Dispatcher_Exception' with message 'Invalid controller class ("ErrorController")' in /usr/local/zendsvr/share/ZendFramework/library/Zend/Controller/Dispatcher/Standard.php:352
Stack trace:
/usr/local/zendsvr/share/ZendFramework/library/Zend/Controller/Dispatcher/Standard.php(262): Zend_Controller_Dispatcher_Standard->loadClass('ErrorController')
/usr/local/zendsvr/share/ZendFramework/library/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
/usr/local/zendsvr/share/ZendFramework/library/Zend/Application/Bootstrap/Bootstrap.php(97): Zend_Controller_Front->dispatch()
/usr/local/zendsvr/share/ZendFramework/library/Zend/Application.php(366): Zend_Application_Bootstrap_Bootstrap->run()
/www/zendsvr/htdocs/TassiWeb/public/index.php(26): Zend_Application->run()
{main}
thrown in /usr/local/zendsvr/share/ZendFramework/library/Zend/Controller/Dispatcher/Standard.php on line 352
Zend needs a lot of files open. But the 'too many open files' issue is connected with recursion; particularly a loop of files where A includes B includes C includes A (for instance.)
With Zend you shouldn't need to manually include files for the most part, since it uses auto-loading. In that week's time I'm thinking you may have introduced an accidental recursion.
Remove that recursion (or make sure the includes are include_once/require_once) and you will address the issue.
I had a similar 'too many files' open error and it ended up being that I was extending the wrong Bootstrap class in my module. I was using Zend_Application_Bootstrap_Bootstrap instead of Zend_Application_Module_Bootstrap. So check if you have more than one implementation of Zend_Application_Bootstrap_Bootstrap. Hope that applies to your situation.

Always get this error when I use upload images - Using Zend Framework

Warning: include_once(Zend/Http/Client.php) [function.include-once]: failed to open stream: No such file or directory in /home/hotbuzz/public_html/include/Zend/Loader.php on line 83
Warning: include_once() [function.include]: Failed opening 'Zend/Http/Client.php' for inclusion (include_path='/home/hotbuzz/public_html/include;.:/usr/lib/php:/usr/local/lib/php') in /home/hotbuzz/public_html/include/Zend/Loader.php on line 83
Warning: require_once(Zend/Exception.php) [function.require-once]: failed to open stream: No such file or directory in /home/hotbuzz/public_html/include/Zend/Loader.php on line 87
Fatal error: require_once() [function.require]: Failed opening required 'Zend/Exception.php' (include_path='/home/hotbuzz/public_html/include;.:/usr/lib/php:/usr/local/lib/php') in /home/hotbuzz/public_html/include/Zend/Loader.php on line 87
Always get this error when i use image upload in the script .. I m using Zend Framework .. I i dont know what to do ?
My Zend path : public_html/include/zend
phpinfo : hotbuzz.in/phpinfo.php
I have not configured path to Zend in .htaccess
?
try this
set_include_path(dirname(realpath(__FILE__)).PATH_SEPARATOR.get_include_path());
Does your include path point to the library files or just the root of the Zend project. The include path needs to point to the directory that contains the directory structure
Zend
Acl
Auth
etc...
which maybe the library directory of the files you downloaded.
There is something weird in your include path ;.:
I think you probably have use the syntax of windows in a linux server.
You should use PATH_SEPARATOR the be sure that you will have the right one on every server.