Test FSOCKENOPEN causes 500 error
Posted: Mon Apr 13, 2009 5:11 pm
Trying to install CMS Made Simple on customer hosting, I have got error 500 on step 2 (checking environment settings).
While debugging I have figured out that the function testRemoteFile() in /lib/test.functions.php causes it. The problem is on this special hosting is that if the call below fails, it returns NULL and not FALSE as described in docs http://de.php.net/manual/en/function.fsockopen.php
In the second line the script checks if $handle is false and the installation is aborted with 500 error, since $handle is not FALSE but NULL. I have replaced the condition with if(false != $handle) and the installation was successful. Module Manager does not work due to the remote check failure (as expected), but all other fuctions are OK.
Server settings from admin panel immediately after installation
----------------------------------------------
Cms Version: 1.5.3
Installed Modules:
* CMSMailer: 1.73.14
* FileManager: 0.4.5
* MenuManager: 1.5.3
* ModuleManager: 1.2.1
* News: 2.9.3
* nuSOAP: 1.0.1
* Printing: 0.2.6
* Search: 1.5.3
* ThemeManager: 1.1.0
* TinyMCE: 2.4.13
Config Information:
* php_memory_limit:
* process_whole_template: false
* max_upload_size: 10000000
* default_upload_permission: 664
* assume_mod_rewrite: false
* page_extension:
* internal_pretty_urls: false
* use_hierarchy: false
Php Information:
* phpversion: 5.2.5
* md5_function: On (True)
* gd_version: 2
* tempnam_function: On (True)
* magic_quotes_runtime: Off (False)
* memory_limit: 32M
* max_execution_time: 30
* safe_mode: Off (False)
* session_save_path: /tmp (1777)
Server Information:
* Server Api: cgi
* Server Db Type: MySQL (mysql)
* Server Db Version: 4.1.18
----------------------------------------------
Can someone see if it worth to correct the issue in the core? Thank you!
EDIT: allow_url_fopen seems to be disabled on this hosting
While debugging I have figured out that the function testRemoteFile() in /lib/test.functions.php causes it. The problem is on this special hosting is that if the call below fails, it returns NULL and not FALSE as described in docs http://de.php.net/manual/en/function.fsockopen.php
Code: Select all
@fsockopen($scheme . $url_info['host'], $port, $errno, $errstr, $timeout);
if(false !== $handle)
{
Server settings from admin panel immediately after installation
----------------------------------------------
Cms Version: 1.5.3
Installed Modules:
* CMSMailer: 1.73.14
* FileManager: 0.4.5
* MenuManager: 1.5.3
* ModuleManager: 1.2.1
* News: 2.9.3
* nuSOAP: 1.0.1
* Printing: 0.2.6
* Search: 1.5.3
* ThemeManager: 1.1.0
* TinyMCE: 2.4.13
Config Information:
* php_memory_limit:
* process_whole_template: false
* max_upload_size: 10000000
* default_upload_permission: 664
* assume_mod_rewrite: false
* page_extension:
* internal_pretty_urls: false
* use_hierarchy: false
Php Information:
* phpversion: 5.2.5
* md5_function: On (True)
* gd_version: 2
* tempnam_function: On (True)
* magic_quotes_runtime: Off (False)
* memory_limit: 32M
* max_execution_time: 30
* safe_mode: Off (False)
* session_save_path: /tmp (1777)
Server Information:
* Server Api: cgi
* Server Db Type: MySQL (mysql)
* Server Db Version: 4.1.18
----------------------------------------------
Can someone see if it worth to correct the issue in the core? Thank you!
EDIT: allow_url_fopen seems to be disabled on this hosting