cancel
Showing results for 
Search instead for 
Did you mean: 

PHP libraries installation

womber
Champ in-the-making
Champ in-the-making
Hi there,

I am having issues with installing the PHP libraries and running the examples. I continually get this error:

Fatal error: Uncaught SoapFault exception: [soapenvSmiley Frustratederver.generalException] (null) in /php/includes/alfresco/Service/WebService/AlfrescoWebService.php:65 Stack trace: #0 /php/includes/alfresco/Service/WebService/AlfrescoWebService.php(65): SoapClient->__soapCall('get', Array, Array, Array, Array) #1 /php/includes/alfresco/Service/WebService/AlfrescoWebService.php(47): AlfrescoWebService->__soapCall('get', Array) #2 [internal function]: AlfrescoWebService->__call('get', Array) #3 /php/includes/alfresco/Service/Node.php(421): AlfrescoWebService->get(Array) #4 /php/includes/alfresco/Service/Node.php(339): Node->populateProperties() #5 /php/includes/alfresco/Service/BaseObject.php(37): Node->getType() #6 /php/includes/alfresco/Service/Node.php(274): BaseObject->__get('type') #7 /My Data/Development/EWorkspace/AlfrescoEval/alfresco-php-library/Examples/SimpleBrowse/index.php(149): Node->__get('type') #8 /My Data/Development/EWorkspace/AlfrescoEval/alfresco-php-library/Examples/SimpleBrowse/index.php(259): outputTable('Browse in /php/includes/alfresco/Service/WebService/AlfrescoWebService.php on line 65

I was intermittently getting a different error once I set the log4j.logger.org.alfresco.webservice=debug property in  /usr/local/alfresco/tomcat/webapps/alfresco/WEB-INF/classes/log4j.properties. It was complaining about the password being passed on the callback function. But for this post its conveniently not replicating this error any longer, so I cannot provide it. The error I believe is occurring when the example PHP is trying to read from a node pulled from Alfresco, more specifically the outputTable method in examples/SimpleBrowse/index.php. If anybody could shed light on this it would be much appreciated. I have had to work hard to get this far after having to recompile my PHP  installation to include SOAP and that was certainly far from straightforward as I ran into the classic Apache 64bit/PHP 32bit dichotomy.

With thanks.
5 REPLIES 5

womber
Champ in-the-making
Champ in-the-making
The second type of error I could not report before has now returned once I restarted Apache and Alfresco.

Fatal error: Uncaught SoapFault exception: [soapenvSmiley Frustratederver.generalException] WSDoAllReceiver: security processing failed; nested exception is: org.apache.ws.security.WSSecurityException: General security error (WSSecurityEngine: Callback supplied no password for: username) in /php/includes/alfresco/Service/WebService/AlfrescoWebService.php:65 Stack trace: #0 /php/includes/alfresco/Service/WebService/AlfrescoWebService.php(65): SoapClient->__soapCall('query', Array, Array, Array, Array) #1 /php/includes/alfresco/Service/WebService/AlfrescoWebService.php(47): AlfrescoWebService->__soapCall('query', Array) #2 [internal function]: AlfrescoWebService->__call('query', Array) #3 /php/includes/alfresco/Service/Session.php(226): AlfrescoWebService->query(Array) #4 /php/includes/alfresco/Service/SpacesStore.php(48): Session->query(Object(SpacesStore), 'PATH:"app:compa…') #5 /php/includes/alfresco/Service/BaseObject.php(37): SpacesStore->getCompanyHome() #6 /My Data/Development/EWorkspace/AlfrescoEval/alfresco-php-library/Exampl in /php/includes/alfresco/Service/WebService/AlfrescoWebService.php on line 65

Curiously I get both errors regardless of what the username and password is set to in config.php.
I realise that I  am attempting the use of these PHP libraries on a non-tested setup (MacOS) but surely someone out there has got these libraries/Web Services to work on MacOS.

womber
Champ in-the-making
Champ in-the-making
Just to add to this post again. I managed to get the PHP libraries to work but only by pointing the repositortyURL to my windows machince that also has Alfresco setup Smiley Sad. So the culprit seems to be my MacOS setup. If there is anyone out thee who has got MacOS/Alfresco/PHP comobo to work please tell me how.

With thanks.

womber
Champ in-the-making
Champ in-the-making
Ok. It seems that now my Windows Installation of Alfresco does not work now and it occurred right after I installed the WCM component (it did not have it before). So it seems the security exception is being thrown because of the WCM component :< any guesses anyone out there.

dwilson
Champ in-the-making
Champ in-the-making
I also recently got this error message in my Apache error log on CentOS 5.2 while viewing the SimpleBrowse PHP API example.  Did you have any luck resolving in the past few days?

I wasn't getting the problem until recently on the same installation.  I'll try to look further into what changed on my side and post info here.

Also- I do not have the WCM module installed.

dwilson
Champ in-the-making
Champ in-the-making
Womber,

I read through another thread- The problem we're having is likely an inconsistency between the client session and the server session timeouts. 

You'll notice if you remove your browser cookies and try again you shouldn't get the error.  Read through this thread, and another solution is to edit tomcat/conf/web.xml per the last post by user hbf.

http://forums.alfresco.com/en/viewtopic.php?f=21&t=7461

Good luck.