Re: [Resin-interest] Quercus + Web Services / Zend
On Nov 2, 2008, at 10:39 AM, Daniel Lopez wrote: Hi again, I think I found something related to the issue, as Quercus seems to have some problems with PHP static members. I've files this at: http://bugs.caucho.com/view.php?id=3038 -- Scott I created the following test: *** ? class Test { protected static $_instance = null; protected $_variable = null; /** * Singleton instance */ public static function getInstance() { $reflection = new ReflectionClass('Test'); foreach ($reflection-getProperties() as $property) { $name = $property-getName(); echo Member: .$name.BR / } if (null === self::$_instance) { self::$_instance = new self(); } return self::$_instance; } } $testInstance = Test::getInstance(); ? *** If I execute the test under regular PHP, the result is: --- Member: _instance Member: _variable --- If I execute it under Quercus, I just get --- Member: _variable --- The strange thing is that accessing the $_instance static memeber in this little test works, but a very similar code is inside Zend_Controller_Front class in the Zend framework and there it complains that $_instance has not been declared, even though you can see the declaration a couple of lines above. So, even though is seems it is not the full issue, it seems to be strongly related. In any case, one would say that reflection in Quercus is broken, right? Tested using Resin 3.1.7a and resin 3.2.1. Trying to use Zend in 3.2.1 I don't get the error I was showing above, but a blank page and no error message anywhere. S! D. ___ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest ___ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest
Re: [Resin-interest] Quercus + Web Services / Zend
Hi again, I think I found something related to the issue, as Quercus seems to have some problems with PHP static members. I created the following test: *** ? class Test { protected static $_instance = null; protected $_variable = null; /** * Singleton instance */ public static function getInstance() { $reflection = new ReflectionClass('Test'); foreach ($reflection-getProperties() as $property) { $name = $property-getName(); echo Member: .$name.BR / } if (null === self::$_instance) { self::$_instance = new self(); } return self::$_instance; } } $testInstance = Test::getInstance(); ? *** If I execute the test under regular PHP, the result is: --- Member: _instance Member: _variable --- If I execute it under Quercus, I just get --- Member: _variable --- The strange thing is that accessing the $_instance static memeber in this little test works, but a very similar code is inside Zend_Controller_Front class in the Zend framework and there it complains that $_instance has not been declared, even though you can see the declaration a couple of lines above. So, even though is seems it is not the full issue, it seems to be strongly related. In any case, one would say that reflection in Quercus is broken, right? Tested using Resin 3.1.7a and resin 3.2.1. Trying to use Zend in 3.2.1 I don't get the error I was showing above, but a blank page and no error message anywhere. S! D. ___ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest
Re: [Resin-interest] Quercus + Web Services / Zend
Well, moving forward I've advanced a bit on the 3.2.1 front as the $_instance not defined problem is no longer there, even if reflection is still broken. The next issue I found is that accesing a stack, the isset(stack-{$name}) returns 1 (true) and then stack-{$name} returns false, where isset is expected to return false directly as the object is not really inside the stack. Not sure how that is supposed to work in PHP, but Zend checked with isset() for existance, this failing. This happens in Zend/Controller/Action/HelperBroker.pjp, line 232 Then I also found out PHP_EOL is not defined, which is not exactly a bug, but Zend uses it, so I defined it not to get tons of PHP_EOL all around :). With those changes I was able to render the layout, but not content is being displayed and, if I have to believe the traces, neither the Controller or the View are being called. This time I'm getting no error, trace or anything... Aren't interpreted languages fun? :) S! D. ___ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest
Re: [Resin-interest] Quercus + Web Services / Zend
Hi Adriano, Thanks for your answer. I'm trying with the latest release of Zend, (1.6.2) fresh from their site. I follow their quickstart guide, substituting the Apache .htaccess file with the URLRewrite filter to redirect all requests to WEB-INF/php/public/index.php, storing the Zend framework in WEB-INF/php/library/Zend and creating the WEB-INF/php/application/bootstrap.php file the instructions mandate. If using Resin 3.1.5, accessing the application raises a *** Fatal Error: 'Array' is an unknown function. [spl_autoload_register] *** but that's a well-know bug of Quercus in 3.1.5, fixed in 3.1.7. I then try with 3.1.7a and I get these errors: *** ...bootstrap.php:16: Fatal Error: Zend_Controller_Front::$_instance is an undeclared static property An exception occured while bootstrapping the application. ...bootstrap.php:16: Fatal Error: Zend_Controller_Front::$_instance is an undeclared static property Stack Trace: *** As I used copy/paste and I used the same files in a MAMP environment some days ago, I thought it might be a Quercus thing, but I could not find anything about it. I can send you my setup if you wish, but I just followed the steps in the quickstart guide, copy/pasting the content of index.php and bootstrap.php. Regarding the simple NuSOAP test, I include the library and try one of the samples that issues something like: *** ... $client = new soapclient('http://www.scottnichol.com/samples/hellowsdl3.wsdl', true,$proxyhost, $proxyport, $proxyusername, $proxypassword); ... *** And always in these lines I get Server failed to send headers, even though if I try accessing the WSDL files with my browser, I can see them normally. The debug trace claims that the answer returned an empty answer... but they are answering the browser so... Thanks for your help, S! D. Adriano Bonat [EMAIL PROTECTED] ha escrito: Hello Daniel, I had success running my project that uses ZF 1.5.2 on top of Quercus, as it is using PDO, and the Quercus support at that time (dunno know, I'm not watching its progress) didn't implement some necessary things, I did implement and so it worked fine. Which version of ZF were you using? Share your basic test too, so we can try to figure out what is happening. Regards, -Adriano ___ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest
Re: [Resin-interest] Quercus + Web Services / Zend
Hello Daniel, I had success running my project that uses ZF 1.5.2 on top of Quercus, as it is using PDO, and the Quercus support at that time (dunno know, I'm not watching its progress) didn't implement some necessary things, I did implement and so it worked fine. Which version of ZF were you using? Share your basic test too, so we can try to figure out what is happening. Regards, -Adriano On Thu, Oct 30, 2008 at 11:01 AM, Daniel López [EMAIL PROTECTED] wrote: Hi, I'm doing some experiments with Quercus and one of the things I wanted to do is accessing an already existing web service written in Java. I also tried implementing the experiments using Zend Framework, even though that failed, first with a problem I solved by upgrading to 3.1.7 and then with more problems I found no information about. I then tried to go back to the basics and use NuSoap and all I get when I use it is server failed to send headers and from the error trace, it seems it never reads any answer from the server ( I tried with public servers with WSDLs that work ) but I still have to verify if it is a problem with Quercus or my setup. As all I could find is that the simple 3 lines I wrote should work and they are quite basic... well, I'll check this weekend :). In any case, what's the status of Quercus regarding those subjects? Was anybody able to run the Zend framework under Quercus? Or develop some kind of Web Service client? The information is quite scarce and the documentation is not too thorough, specially the list of applications supported as the link simply goes to the documentation page ;). The forums (http://forum.caucho.com/) are kind of weird... how can one see the replies to the topics? Do I have to be registered for that? As a newbie in this topic, I have to say the information about the subject is spread and difficult to follow. There are different web sites with different styles, the wiki, the mailing lists, the forums... S! D. --- Daniel Lopez Janariz ([EMAIL PROTECTED]) Web Services Centre for Information and Technology Balearic Islands University (SPAIN) --- ___ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest ___ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest