User Tools

Site Tools


whmcs-csfunblockerv4troubleshooting

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
whmcs-csfunblockerv4troubleshooting [2019/06/25 18:51]
wiki
whmcs-csfunblockerv4troubleshooting [2020/05/11 06:28] (current)
wiki [Cronjob not running properly]
Line 4: Line 4:
  
 If you are not using the default english language. Make sure you had make a copy of the lang/​english.php to the language you are using. For example, if you are using Chinese then copy lang/​english.php -> lang/​chinese.php If you are not using the default english language. Make sure you had make a copy of the lang/​english.php to the language you are using. For example, if you are using Chinese then copy lang/​english.php -> lang/​chinese.php
 +
 +===== Remote server with system(), fileperms(),​ posix_getpwuid(),​ fileowner(),​ filegroup() disabled in PHP =====
 +
 +These functions are only needed for the cronjob. If you had used the one step installer, then it should have copied your /​usr/​local/​lib/​php.ini into /var/www/
 +
 +You may have those functions disabled in that particular php.ini. Therefore, you can simply removed them in the disable_functions in the /​var/​www/​php.ini to allow the cronjob to have access to those functions without impacting your server'​s security. ​
 +
 +===== Things to check when the module is not connecting to the remote server =====
 +
 +If your module is having trouble connecting to the remote server, here is a checklist for you to verify everything is setup correctly
 +
 +  - Click on the Connection Tester on the Server Listing in the Admin Backend. This will reveal whether your WHMCS server can make a http/https connection to your remote server'​s hostname. To test this on your browser, you should be able to goto http://​yourhostname/​CSFUnblockremote.php,​ if it display a white page. Then the remote files are installed properly. If you are getting a 404, then the files are missing in the document root. If you are getting 500 then the permission and ownership is most likely incorrect. ​
 +  - Make sure the remote server module files are in the document root for the hostname of your remote server. For example, with cPanel/DA servers the default document root is /​var/​www/​html. So perform a ls -lah /​var/​www/​html and see if the remote server module files had been installed to that path correctly if using the auto installer. ​
 +  - Check if there is any PHP error_log in the document root and the directory above it. In a cPanel/DA server, it would be /var/www/ or /​var/​www/​html ​
 +  - Check if the remote server have the proper ioncube loader installed for the PHP. For servers with multiple PHP installed check which PHP binary is being run when the remote server file is being run and during the cronjob
 +  - Is the cronjob setup for on the remote server. The cronjob is essential as it will self heal any permission or ownership change. Also make sure the cronjob is running using root
 +
 +
 +===== Remote server passes the connection test but blank rules =====
 +
 +If the remote server'​s **Web Address** is set to use https, try set it back to http.
 +
  
 ===== Module stop connecting to remote server ===== ===== Module stop connecting to remote server =====
Line 10: Line 32:
  
   * The module allows for a 15 minutes padding between server'​s time. So make sure the time between servers are in sync to the actual time   * The module allows for a 15 minutes padding between server'​s time. So make sure the time between servers are in sync to the actual time
-  * The remote server isn'​t ​block the IP of the WHMCS server +  * The remote server isn'​t ​blocking ​the IP of the WHMCS server 
-  * The module files on the remote server is accessible. Check the httpd logs and see if CSFUnblockremote.php is being hit +  * The module files on the remote server is accessible. Check the httpd logs and see if CSFUnblockremote.php is being hit by the WHMCS module 
-  * The ioncube loader ​uploaded ​during a update. Make sure the loader is able to decode the remote server files+  * The ioncube loader ​updated ​during a update. Make sure the loader is able to decode the remote server files 
 + 
 +===== Cronjob not running properly ===== 
 + 
 +If the cronjob is running properly, the ownership for CSFUnblockRemote.php and CSFSettings.php in /​var/​www/​html/​ should be set to the $fileOwner and $fileGroup in CSFSettings.php. 
 + 
 +You should also see the following files in /var/www/ generated by the cronjob 
 + 
 +<​code>​aa.cluster ​ aa.local ​ ar.cluster ​ ar.local csf.allow ​ csf.deny ​ csffilesize.txt ​ csf.tempban ​ daa.local ​ da.cluster ​ da.local ​ dr.cluster ​ dr.local tdr.cluster ​ tdr.local</​code>​ 
 + 
 +If your cronjob isn't working, then check the following. 
 + 
 +  - The PHP binary the cronjob is running have the proper ioncube loader. If you are running multiple PHP environment then check the section below 
 +  - The php.ini in /var/www/ don't have the functions needed ([[https://​wiki.codebox.ca/​doku.php?​id=whmcs-csfunblockerv4troubleshooting#​remote_server_with_system_fileperms_posix_getpwuid_fileowner_filegroup_disabled_in_php|Functions]]) for this module disabled. Removed them in disabled_functions if it is. Note that since only the module'​s cronjob is using the customized php.ini, therefore your system'​s security won't be compromised. 
 + 
 +===== Dealing with Multiple PHP server environments ===== 
 + 
 +The module auto installer will install the cronjob using the native PHP (/​usr/​bin/​php). There are few things you need to watch out for when you have multiple PHP installed on a system 
 + 
 +  - The PHP being run in the web root have ioncube 10 enabled 
 +  - The cronjob being run have ioncube 10 enabled 
 + 
 +For the cronjob, you can make any necessary changes to the PHP binary you desire to run as long as ioncube 10 is included. ​
  
 ===== IP isnt being removed from IPtables even though the IP removal was success via module ===== ===== IP isnt being removed from IPtables even though the IP removal was success via module =====
Line 31: Line 75:
  
 If you don't get the error when running the first command, then make sure there is a CRONJOB installed on the remote server. If you don't get the error when running the first command, then make sure there is a CRONJOB installed on the remote server.
 +
 +===== Submitting Support Ticket =====
 +
 +When submitting a support ticket regarding the module isn't connecting, please make sure to include the following information
 +
 +  - How did you install the remote server modules? ​
 +  - Is the cronjob running?
 +  - Perform <​code>​ls -lah /​var/​www/</​code>​ and <​code>​ls -lah /​var/​www/​html</​code>​ and provide us the result
 +  - Check /​var/​www/​html and see if there is any error_log
 +
whmcs-csfunblockerv4troubleshooting.1561485097.txt.gz · Last modified: 2019/06/25 18:51 by wiki