I do have one problem where apache is binding to localhost at the same port and preventing the wallet from connecting. So it took me shutting down apache and waiting and then starting them up in order. I have no clue why using a curl-php5 would do this. I guess I don't understand tcpip ? Regardless it isn't really acceptable because if the wallet dies, a wallet restart won't work because it fails to bind to that port. I've read all the curl lib options etc and nothing makes sense except that I don't understand tcpip as well as I thought. I doubt it'd be a problem if everything wasn't using localhost.
I'm not sure if it's a curl-php5 problem.. Maybe set different ports for apache and the wallet will work.
Could you post your apache config files here?
And the command line you starting your wallet, and the config.json of your wallet?
And the code how you're using curl-php?
Reminder: don't set CURLOPT_LOCALPORT or set it to a different value in curl-php.