Welcome Guest, Not a member yet? Register   Sign In
NuSOAP based Web Services stop working after Server Upgrade
#11

[eluser]Nathan Pitman (Nine Four)[/eluser]
ok just tried it and it makes no odds, I managed to get web services working though in a scenario where I am not passing any serialized data in the POST from Flash, just raw strings... hmm... stranger and stranger...
#12

[eluser]johnwbaxter[/eluser]
Lord knows what's going on! This is outside of my knowledge i'm afraid, i still think your logs hold the answer, have you turned php error reporting to full?
#13

[eluser]Nathan Pitman (Nine Four)[/eluser]
Ok, I think I've found my problem... somehow upgrading PHP has caused 'unserialize' to stop working as it had done previously. I'm passing a serialized array of values from Flash to the web service and then unserializing them before I start processing anything... at this point instead of getting the serialized data PHP is just seeing "N" in it's place. It's almost like the serialized data is being stripped out at some point somewhere in transit between Flash and the server... oh joy... it's going to be a long night! :/
#14

[eluser]Nathan Pitman (Nine Four)[/eluser]
Ok, so I worked out what the problem is (in a way). Following the upgrade my server is stripping double quotes from posted data and so my nice serialized arrays become useless. As an interim measure I found that adding the following code before I call NuSOAP does the trick:

Code:
$HTTP_RAW_POST_DATA = ereg_replace(""",'"',$HTTP_RAW_POST_DATA);
$HTTP_RAW_POST_DATA = ereg_replace("'","'",$HTTP_RAW_POST_DATA);

I've emailed my hosts to ask if they can look into this since I have access to another machine in the same data centre running the same version of PHP and Apache on which the code runs perfectly... I can only assume some spurious setting somewhere has been changed during the upgrade and not switched back. I'll let you know the outcome and thanks for the word of encouragement! Smile




Theme © iAndrew 2016 - Forum software by © MyBB