View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0006401 | OXID eShop (all versions) | 4.08. Cache | public | 2016-05-27 15:16 | 2016-06-06 16:54 |
Reporter | GM_Alex | Assigned To | |||
Priority | normal | Severity | minor | Reproducibility | unable to reproduce |
Status | acknowledged | Resolution | reopened | ||
Platform | Unix | ||||
Product Version | 4.8.3 / 5.1.3 | ||||
Summary | 0006401: Invalide Reverse Proxy setup breaks backend | ||||
Description | If the Reverse Proxy is not proper stetted up, for example on a staging system without varnish enabled, enabling the Reverse Proxy will break the backend. You are getting errors like the following: oxException (time: 2016-06-06 16:38:51): [0]: EXCEPTION_CURL_ERROR Stack Trace: #0 /var/www/html/core/oxutilsobject.php(180): oxUtilsObject->_getObject('oxexception', 0, Array) #1 [internal function]: oxUtilsObject->oxNew('oxException') #2 /var/www/html/core/oxfunctions.php(363): call_user_func_array(Array, Array) #3 /var/www/html/core/oxcurl.php(302): oxNew('oxException') #4 /var/www/html/core/cache/connectors/oxreverseproxyconnector.php(92): oxCurl->execute() #5 /var/www/html/core/cache/connectors/oxreverseproxyconnector.php(105): oxReverseProxyConnector->_callCurl('PURGE', 'http://schulung...', Array) #6 /var/www/html/core/cache/connectors/oxreverseproxyconnector.php(169): oxReverseProxyConnector->purge('http://schulung...', Array) #7 /var/www/html/core/cache/oxreverseproxybackend.php(165): oxReverseProxyConnector->invalidate('/widget.php?.*a...') #8 /var/www/html/core/oxshopcontrol.php(436): oxReverseProxyBackend->execute() #9 /var/www/html/core/oxshopcontrol.php(131): oxShopControl->_process('article_main', 'save', NULL, NULL) #10 /var/www/html/core/oxid.php(32): oxShopControl->start() 0000011 /var/www/html/index.php(18): Oxid::run() 0000012 /var/www/html/admin/index.php(19): require_once('/var/www/html/i...') 0000013 {main} Changing _callCurl at oxReverseProxyConnector from /** * Build and call CURL request. * * @param string $sRequestMethod Request method (PURGE, REFRESH, BAN). * @param string $sUrl URL to be called. * @param array $aHeaders Additional headers. * * @return null */ protected function _callCurl( $sRequestMethod, $sUrl, $aHeaders = array() ) { $oCurl = oxNew( 'oxCurl' ); $oCurl->setMethod( "GET" ); $oCurl->setUrl( $sUrl ); $oCurl->setHeader( $aHeaders ); $oCurl->setOption( 'CURLOPT_FRESH_CONNECT', true ); $oCurl->setOption( 'CURLOPT_CUSTOMREQUEST', $sRequestMethod ); $oCurl->setOption( 'CURLOPT_HEADER', false ); $oCurl->setOption( 'CURLOPT_NOBODY', true ); $oCurl->execute(); } to /** * Build and call CURL request. * * @param string $sRequestMethod Request method (PURGE, REFRESH, BAN). * @param string $sUrl URL to be called. * @param array $aHeaders Additional headers. * * @return null */ protected function _callCurl( $sRequestMethod, $sUrl, $aHeaders = array() ) { $oCurl = oxNew( 'oxCurl' ); $oCurl->setMethod( "GET" ); $oCurl->setUrl( $sUrl ); $oCurl->setHeader( $aHeaders ); $oCurl->setOption( 'CURLOPT_FRESH_CONNECT', true ); $oCurl->setOption( 'CURLOPT_CUSTOMREQUEST', $sRequestMethod ); $oCurl->setOption( 'CURLOPT_HEADER', false ); $oCurl->setOption( 'CURLOPT_NOBODY', true ); try { $oCurl->execute(); } catch(\Exception $e) { } } will solve the issue. | ||||
Steps To Reproduce | - set up an apache server - set up a varnish server - install shop and configure varnish - change /etc/hosts in apache server that it can't resolve the domain of the varnish server - go to admin and make that shop invalidates varnish cache, e.g. change price of an article | ||||
Tags | No tags attached. | ||||
Theme | Not defined | ||||
Browser | Not defined | ||||
PHP Version | Not defined | ||||
Database Version | Not defined | ||||
|
Reminder sent to: GM_Alex Thank you for submitting the issue. Unfortunately we can't reproduce it. I just activated the reverse proxy an a server without varnish. There are no problems in the admin. Please add the steps to reproduce. |
|
Step to reproduce: 1. Activate the Reverse Proxy 2. Update the product data of a product and save it. |
|
We can't reproduce this issue with your steps to reproduce. So this is closed as unable to reproduce. |
|
The error occurs if the getUrl function of oxCurl returns a not resolvable URL, like a local development address or a page which is protected by htaccess. |
|
Reminder sent to: GM_Alex Thank you for your information. Unfortunately we still can't reproduce it. Please add detailed steps to reproduce. |
|
I changed the stack trace int the description because the original stack trace is probably from another problem. I also added steps to reproduce. |