function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
dburnistondburniston 

Soap wsdl error

I'm using a php script to pull data from Salesforce to put it on a Wordpress page. The script seems to run fine when the actual page is displayed and I get the relevant data from Salesforce.

When I try to edit the page again in the Wordpress backend, I get an error and can't edit the page.

Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'enterprise-wsdl.xml' : failed to load external entity "enterprise-wsdl.xml" in /home2/xxxx/public_html/soapclient/SforceBaseClient.php:64 Stack trace: #0 /home2/xxxx/public_html/soapclient/SforceBaseClient.php(64): SoapClient->SoapClient('enterprise-wsdl...', Array) #1 /home2/xxxx/public_html/soapclient/SforceBaseClient.php(128): SforceBaseClient->getSoapClient('enterprise-wsdl...', Array) #2 /home2/xxxx/test/wp-content/plugins/insert-php/includes/shortcodes/shortcode-php.php(45) : eval()'d code(28): SforceBaseClient->createConnection('enterprise-wsdl...') #3 /home2/xxxx/test/wp-content/plugins/insert-php/includes/shortcodes/shortcode-php.php(45): eval() #4 /home2/xxxx/test/wp-content/plugins/insert-php/libs/factory/shortcodes/shortcode.class.php(287): WINP_SnippetShortcodePhp->html(Array, '') #5 /home2/xxxx/test/wp-content/plugins/insert-php/libs/factory/shortcodes/shortcodes.php(97): Wbcr_FactoryShortcodes325_S in /home2/xxxx/public_html/soapclient/SforceBaseClient.php on line 64

The enterprise-wsdl.xml file is in the public-html folder (/home2/xxxx/public_html). Wordpress is running from the public-html folder. How can I make sure that SFBaseClient.php always gets the correct path to the WSDL? It works ok when the webpage that includes my script runs, just fails in the admin backend.

Thanks,

...Dave