cancel
Showing results for 
Search instead for 
Did you mean: 

errors

mojo-jojo
Champ in-the-making
Champ in-the-making
I am trying to use the PHP Webservices examples that come with the source distribution.  I've configured everything right as far as I can tell but when I try to exectute the script simple.php I get the following errors in my log.

[Tue Feb 28 18:15:45 2006] [error] [client 10.0.0.90] An error was encountered when calling web service: WSDoAllReceiver: security processing failed; nested
exception is: \n\torg.apache.ws.security.WSSecurityException: An error was discovered processing the <wsse:Security> header. (WSSecurityEngine: Invalid times
tamp The security semantics of message have expired)
[Tue Feb 28 18:15:45 2006] [error] [client 10.0.0.90] PHP Notice:  Undefined variable: result_set in /home/httpd/html/alfresco-php/simple.php on line 50
[Tue Feb 28 18:15:45 2006] [error] [client 10.0.0.90] PHP Fatal error:  Call to a member function id() on a non-object in /home/httpd/html/alfresco-php/simpl
e.php on line 50
[Tue Feb 28 18:15:45 2006] [error] [client 10.0.0.90] PHP Notice:  Uninitialized string offset:  213 in /opt/alfresco-php/alfresco/tag/TagFramework.php on li
ne 249


The last line repeats many times.  Any help would be appreciated. Thanks.
9 REPLIES 9

rwetherall
Confirmed Champ
Confirmed Champ
Hi,

In release 1.2 we added the timestamp action to the Security header in order to support .NET.

It looks like the timestamp being added to the header is considered to be expired when it arrives at the server.

Could you check that your PHP server and your Alfresco server have the same system time?

If they don't and you can't change it or they are the same let me know and I'll dig deeper.

Thanks,
Roy

mojo-jojo
Champ in-the-making
Champ in-the-making
Hi,

They are both running on the same server. Thanks.

rwetherall
Confirmed Champ
Confirmed Champ
Ok,  would you mind trying something for me to see if it resolves your problem ….

Open \alfresco\webservice\WebServiceUtils.php

Find


$createdDate = date("Y-m-d\TH:i:s\Z");
$expiresDate = date("Y-m-d\TH:i:s\Z", mktime(date("H")+1, date("i"), date("s"), date("m"), date("d"), date("Y")));


and replace it with


$createdDate = date("Y-m-d\TH:i:s\Z", mktime(date("H")+24, date("i"), date("s"), date("m"), date("d"), date("Y")));
$expiresDate = date("Y-m-d\TH:i:s\Z", mktime(date("H")+25, date("i"), date("s"), date("m"), date("d"), date("Y")));


Save the file and try again.  Let me know how you get on,

Thanks,
Roy

mojo-jojo
Champ in-the-making
Champ in-the-making
Okay I replaced those two lines of code and then I tried executing simple.php again.

Here are the messages from error_log

[Thu Mar 02 11:02:41 2006] [error] [client 10.0.0.90] An error was encountered when calling web service: WSDoAllReceiver: security processing failed (actions number mismatch)
[Thu Mar 02 11:02:41 2006] [error] [client 10.0.0.90] PHP Notice:  Undefined variable: result_set in /home/httpd/html/alfresco-php/simple.php on line 50
[Thu Mar 02 11:02:41 2006] [error] [client 10.0.0.90] PHP Fatal error:  Call to a member function id() on a non-object in /home/httpd/html/alfresco-php/simple.php on line 50
[Thu Mar 02 11:02:41 2006] [error] [client 10.0.0.90] PHP Notice:  Uninitialized string offset:  213 in /opt/alfresco-php/alfresco/tag/TagFramework.php on line 249

That last line repeats a bunch of times.

rwetherall
Confirmed Champ
Confirmed Champ
Are you running this against a 1.2 final release Alfresco server?

If yes then have you also updated your PHP client to 1.2?

Thanks,
Roy

mojo-jojo
Champ in-the-making
Champ in-the-making
Okay I wasn't running Alfresco server 1.2.0 final.  I upgraded the server and php stuff to 1.2.0.  Then I tried running simple.php without modifying WebServiceUtils.php and I got the same error that I was getting earlier.  So I changed the two lines of code in WebServiceUtils.php again and I get this instead.


[Thu Mar 02 12:08:18 2006] [error] [client 10.0.0.90] PHP Fatal error: Exception thrown without a stack frame in Unknown on line 0

mojo-jojo
Champ in-the-making
Champ in-the-making
Okay maybe there is just a problem with simple.php. I was able to run browse/index.php just fine.  I'll keep you updated.

rwetherall
Confirmed Champ
Confirmed Champ
Hi,

Simple.php has the admin/admin user credentials coded into it.  If you've updated your admin password you'll need to update simple.php.

Not sure if this is causing the issue, but it worth checking.

Thanks,
Roy

mojo-jojo
Champ in-the-making
Champ in-the-making
The administrator account info is still admin/admin.
Thanks.