Symptoms
- Web Presence Builder installed on a Linux server that uses cPanel's Web Host Manager
-
The site cannot be published via Web Presence Builder while being logged in to end-user's cPanel (11.42.0.23 or higher) as the WebHost Manager (WHM) admin user. The following error appears in the editor:
The site cannot be published to the specified location.
-
One or several of the following errors appear in
sitebuilder.log
:[EMERG] /JsonApi/ SB_Site_Compiler_Target_AuthoriseException: Can't receive authorization to work with the host 'example.com' with login 'end-user'
file: /usr/local/sb/include/SB/Site/Compiler/Target/FTP.php
line: 181
code: 0 203.0.113.2 http://203.0.113.3/Editor Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.146 Safari/537.36[EMERG] /JsonApi/ SB_Exception: Invalid CSRF token has been provided.
file: /usr/local/sb/include/SB/Controller/Plugins/Sb/CsrfProtect.php
line: 21
code: 0
in /usr/local/sb/include/SB/Controller/Plugins/Sb/CsrfProtect.php on line 21
#1 at SB_Controller_Plugins_Sb_CsrfProtect->preDispatch(object(SB_Controller_Request_Http))in /usr/local/sb/include/Zend/Controller/Plugin/Broker.php on line 309
#2 at Zend_Controller_Plugin_Broker->preDispatch(object(SB_Controller_Request_Http))in /usr/local/sb/include/Zend/Controller/Front.php on line 941
#3 at Zend_Controller_Front->dispatch()in /usr/local/sb/include/SB/Application/Web.php on line 262
#4 at SB_Application_Web::run()in /usr/local/sb/htdocs/index.php on line 3[ERR] /JsonApi/ Cannot copy file to '8520e18166b4a618b525a36cf3627a37.php' via FTP (ftp_put(/usr/local/sb/tmp/ftp_publish_cache_zKT0K0_dir/8520e18166b4a618b525a36cf3627a37.php): failed to open stream: No such file or directory)
Cause
Some parameters (particularly FTP passwords) are not propagated from WHM (WebHost Manager) to cPanel and that prevents the publishing process from occurring normally if the WHM admin is performing it.
Resolution
Make sure that you are logged into cPanel directly as a customer by using the customer username and password and that you are not using the option login to cPanel from WHM > Account Information > List Accounts