Re: [fw-general] How to catch exception from Zend\Soap\Client\Client
Just guessing, but shouldn't the $client-login() call be inside the try block? Looking at the Client constructor and setWsdl(), I don't think the SoapFault exception can be thrown from those. -- Mon On Tue, Jun 8, 2010 at 1:44 PM, Jonathan Maron jonathan.a.ma...@gmail.comwrote: Hello all I am currently in the process of porting Zend_Service_LiveDocx to ZF2. In the case that Zend\Soap\Client\Client cannot be instantiated, an exception is thrown. However, I cannot find a way to catch this exception. Below is a snippet, which illustrates the issue: http://gist.github.com/429653 The uncaught exception error message is: PHP Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://invald.example.com/missing.wsdl' : failed to load external entity http://invald.example.com/missing.wsdl; I have tried catching SoapFault and \SoapFault, but to no avail. In ZF 1.10, Zend_Soap_Client_Exception was thrown in such cases. Should Zend\Soap\Client\Client throw \Zend\Soap\Client\Exception? Or how should we catch SoapFault in the current implementation? Thanks in advance. Jonathan Maron
[fw-general] Re: breadcrumbs
There is a view helper to do this but you must populate your navigation resource first. See Zend_Navigation, Zend_Application_Resource_Navigation and Zend_View_Navigation_Breadcrumbs. -- View this message in context: http://zend-framework-community.634137.n4.nabble.com/breadcrumbs-tp2244731p2247239.html Sent from the Zend Framework mailing list archive at Nabble.com.
Re: [fw-general] How to catch exception from Zend\Soap\Client\Client
Hi Mom You are absolutely right. The exception is thrown in logIn and hence can be caught. Here is the corrected version: http://gist.github.com/429896 :-) Jonathan On Tue, Jun 8, 2010 at 10:40 AM, Mon Zafra mon...@gmail.com wrote: Just guessing, but shouldn't the $client-login() call be inside the try block? Looking at the Client constructor and setWsdl(), I don't think the SoapFault exception can be thrown from those. -- Mon On Tue, Jun 8, 2010 at 1:44 PM, Jonathan Maron jonathan.a.ma...@gmail.com wrote: Hello all I am currently in the process of porting Zend_Service_LiveDocx to ZF2. In the case that Zend\Soap\Client\Client cannot be instantiated, an exception is thrown. However, I cannot find a way to catch this exception. Below is a snippet, which illustrates the issue: http://gist.github.com/429653 The uncaught exception error message is: PHP Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://invald.example.com/missing.wsdl' : failed to load external entity http://invald.example.com/missing.wsdl; I have tried catching SoapFault and \SoapFault, but to no avail. In ZF 1.10, Zend_Soap_Client_Exception was thrown in such cases. Should Zend\Soap\Client\Client throw \Zend\Soap\Client\Exception? Or how should we catch SoapFault in the current implementation? Thanks in advance. Jonathan Maron
[fw-general] Re: problem with Zend_Loader_Autoloader_Resource
Have you solved your problem ? Else try new App_Model_Test(), it's so logical. -- View this message in context: http://zend-framework-community.634137.n4.nabble.com/problem-with-Zend-Loader-Autoloader-Resource-tp2244044p2247248.html Sent from the Zend Framework mailing list archive at Nabble.com.
Re: [fw-general] Disable prepare statement in Zend_Db_Select
Hi, On Tue, Jun 8, 2010 at 12:47 AM, Bill Karwin b...@karwin.com wrote: Keep in mind that the round-trip you fear incurs too much overhead is actually not always a problem. This article shows that at least in some cases, a prepared MySQL query actually runs 14% _faster_ than a non-prepared query: http://www.mysqlperformanceblog.com/2006/08/02/mysql-prepared-statements/ After reading the article, I think 'Query cache does not work is a strong enough reason not to use prepare statement.
[fw-general] Re: problem with Zend_Loader_Autoloader_Resource
Following the document, it should be fine because the 'namespace' = '' or remove namespace 'model' = array( 'path' = 'models/' ), The problem is still there. I don't want the name Model in the class name, just App_Test instead of App_Model_Test -- View this message in context: http://zend-framework-community.634137.n4.nabble.com/problem-with-Zend-Loader-Autoloader-Resource-tp2244044p2247395.html Sent from the Zend Framework mailing list archive at Nabble.com.
[fw-general] Re: problem with Zend_Loader_Autoloader_Resource
then use your own library. A resource type have obligatory a namespace. -- View this message in context: http://zend-framework-community.634137.n4.nabble.com/problem-with-Zend-Loader-Autoloader-Resource-tp2244044p2247445.html Sent from the Zend Framework mailing list archive at Nabble.com.
[fw-general] Unable to write session data when using session resource plugin
Hello everyone. For the last few days I'm trying to find out why no object is being saved when I authenticate a user. To store my sessions I'm using Zend_Application_Resource_Session with the following corrosponding entry in my application.ini: ; Session ; http://framework.zend.com/issues/browse/ZF-8636 ; http://framework.zend.com/issues/browse/ZF-7000 resources.session.gc_maxlifetime = 86400 resources.session.use_cookies = 1 resources.session.use_only_cookies= 1 resources.session.save_path = APPLICATION_PATH /../tmp/session/ resources.session.use_only_cookies= true resources.session.remember_me_seconds = 864000 resources.session.saveHandler.class = Zend_Session_SaveHandler_DbTable resources.session.saveHandler.options.name= session resources.session.saveHandler.options.primary.0 = session_id resources.session.saveHandler.options.primary.1 = save_path resources.session.saveHandler.options.primary.2 = name resources.session.saveHandler.options.primaryAssignment.0 = sessionId resources.session.saveHandler.options.primaryAssignment.1 = sessionSavePath resources.session.saveHandler.options.primaryAssignment.2 = sessionName resources.session.saveHandler.options.modifiedColumn = modified resources.session.saveHandler.options.dataColumn = session_data resources.session.saveHandler.options.lifetimeColumn = lifetime The sessions are stored in the database, but I get the following warning when dumping the contents of Zend_Auth::getInstance()-authenticate($adapter): Warning: session_write_close() [function.session-write-close]: Failed to write session data (user). Please verify that the current setting of session.save_path is correct (/opt/local/apache2/htdocs/fmdbv3/application/../tmp/session/) in /opt/local/apache2/htdocs/fmdbv3/library/Zend/Session.php on line 0 The path is there and it also has the mode 777. Additionally the following fatal error is thrown: Fatal error: Exception thrown without a stack frame in Unknown on line 0 Maybe something went wrong with my auth adapter which can be found here: https://gist.github.com/154cf1aac9a2311ceb70 Any help is appricated. All the best, Marcus
RE: [fw-general] Disable prepare statement in Zend_Db_Select
Hi, Ryan Chan wrote: After reading the article, I think 'Query cache does not work is a strong enough reason not to use prepare statement. @Bill: Remember our conversation from last month? Quoting such sources, if the reader isn't able to fully understand the content is as dangerous as talking about the overhead and prepared statements ;-) @Ryan: You need to understand, which prepared statements cannot utilize the query cache. There are binary and text statements and there is a different between calling just prepare() on a SQL command or on a SQL command, containing placeholders like ? (=using binded parameters). This problem depends also on the used MySQL version. Because Zend_Db* is just calling prepare() and doesn't bind or use placeholders, we can easily say, that Zend_Db* isn't affected by any problems. You can check this too: Flush the query cache and reset the counters. Run a Zend_Db* query twice. Check the counters, the second run should be answered from the query cache. -- Regards, Thomas
Re: [fw-general] using of two auth in zend
Hello, Finally I found where problems were. Indeed request don't know about module upon bootstrap. So this can be achieved via controller plug-in. Full article about such plug-in you can read in my blog (1) or look at it's code on github (2). Also I have attached sample application with this plug-in to this message as well. [1] http://blog.ixti.ru/archives/425 [2] http://gist.github.com/430204 2010/6/7 shahrzad khorrami shahrzad.khorr...@gmail.com: thanks alot dear Aleksey... :) I placed _initsession in bootstrap.php.. in /application/bootstrap.php but when I login, /admin... and when I click on /account ..still it login! http://localhost/reseller/public/admin http://localhost/reseller/public/account I set everything you said but don't work! let me know whether each module has it's bootstrap file?.. have you a complete sample? mercc -- Sincerely yours, Aleksey V. Zapparov A.K.A. ixti FSF Member #7118 Mobile Phone: +34 617 179 344 Homepage: http://www.ixti.ru JID: zappa...@jabber.ru *Origin: Happy Hacking! modular-auth-app.tar.gz Description: GNU Zip compressed data
Re: [fw-general] Disable prepare statement in Zend_Db_Select
On Jun 8, 2010, at 8:11 AM, Thomas D. wrote: Ryan Chan wrote: After reading the article, I think 'Query cache does not work is a strong enough reason not to use prepare statement. @Ryan: You need to understand, which prepared statements cannot utilize the query cache. At the time that blog was written (2006-08-02), the GA release of MySQL was 5.0.24. In that release, the query cache would not benefit *any* prepared statement. MySQL 5.1.17 added some more intelligence so prepared statements could benefit from the query cache under compatible conditions, described here: http://dev.mysql.com/doc/refman/5.1/en/query-cache-operation.html Also, some queries can never use the query cache regardless of whether you use prepared statements or whether you execute the query directly. E.g. if it contains references to functions or user variables that might change the result set on successive executions. Regards, Bill Karwin
Re: [fw-general] using of two auth in zend
wow thanks alot Alekse I'm going to test... B-) merc