Troubleshooting PHP and SOAP Web Services
The following table provides solutions for problems that may be encountered when using PHP with NetSuiteās SOAP web services.
Problem |
Solution |
---|---|
The following error is returned when attempting to send requests over https: Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'https: |
Edit the php.ini file by uncommenting "extension=php_openssl.dll" under Dynamic Extensions. Windows only: Make sure that libeay32.dll and ssleay32.dll files are in your path. You can do this by copying the files to your System32 folder. |
The following time out error is returned: Fatal error: Maximum execution time of 30 seconds exceeded. |
Edit the php.ini file and change max_execution_time -30 (or default value) to 200. |
The following error message is returned: Debug Error: Uncaught SoapFault exception: [HTTP] Error Fetching http headers. |
Edit the php.ini file and by setting default_socket_timeout =200. |
The following error message is returned: Warning: It is not yet possible to assign complex types to properties. |
Open the php.ini file and edit error_reporting. Set it to E_ERROR instead of E_ALL. |
The execution of script stops and error was not shown, or notices are being shown on the page. |
Open the php.ini file and set error_reporting =E_ERROR & ~E_NOTICE. |
The following error is returned: Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 3024 bytes). |
Open the php.ini file and set memory_limit =80M. |
Performance issue: Every time a SOAP web services request executes, PHP performs a GET on the wsdl. |
For a non-Windows installation of PHP, look for property soap.wsdl_cache_dir in the php.ini file and make sure that the specified folder ("/tmp" -> c:\tmp) exists in the host.
Note:
For a Windows installation of PHP, change the caching directory to something similar to: soap.wsdl_cache_dir="c:/Windows/Temp" Also, since a NetSuite WSDL version does not change after its release, you can increase the wsdl_cache_ttl to six months, until the release of the next WSDL version. This way you avoid downloading the WSDL multiple times, limiting the available room for errors and performance issues. |
You have made a change in your php.ini file, yet the value you set is not respected. |
Make sure that the property exists only one time in the php.ini file. |