leopard16 Posted October 17, 2015 Share Posted October 17, 2015 I am running v6.1.1 and noticed a few months back (best I could tell it was likely August or Septemer) my invoices were not being generated automatically. I am not sure but I think the problem is likely one of the many udpates provided by WHMCS. If I visit the clients profile page and select: Generate Due Invoices it will then generate and e-mail the client the invoice. So I recreated my cron jobs (which were working fine for several years) to make sure it was not a server setting. I have read and followed these instructions: http://docs.whmcs.com/Invoicing_Issues but am still having issues. I contacted my hosting company and they tell me my cron paths are correct for their server. In the Invoicing Issues instructions it says this: If the cron still doesn't complete with the increased memory limit please ensure display_errors is enabled in the server's PHP configuration and enable the Setup > General Settings > Other tab > Display Errors option, then run the cron manually by visiting the cron.php file in your browser. You should now see an error output to the screen. But when I visit the cron page directly it just shows a blank page with no errors. I don't know what should happen when I visit the cron page, but since there are no errors I can only wonder is this points to my issue. As you know not being able to generate invoices is a major problem. Please help. - - - Updated - - - I should have provided the cron paths. My server cron job looks like this: 18 3 * * * php -q /home/MYUSERNAME/public_html/WHMCSFOLDER/crons/cron.php In WHMCS under automation settings I have this: Create the following Cron Job using PHP: php -q /home/MYUSERNAME/public_html/WHMCSFOLDER/crons/cron.php Create the following Cron Job using GET: GET http://www.MYDOMAIN.com/WHMCSFOLDER/crons/cron.php According to my hosting company the php -q is a correct command. Hope these details help. - - - Updated - - - One last detail. As stated in the Invoicing Issues section: Utilities > Logs > Activity Log and ensure you see a number of entries beginning "Cron Job" each day. There are no cron jobs listed in the activity log. 0 Quote Link to comment Share on other sites More sharing options...
web2008 Posted October 17, 2015 Share Posted October 17, 2015 So you only see a blank page when you try to run the cron job manually? Which attribute does cron.php have ? If 644 try to change it to 755. Otherwise I recommend that you move the cron dir outside the public_html dir ( http://docs.whmcs.com/Further_Security_Steps ) 0 Quote Link to comment Share on other sites More sharing options...
leopard16 Posted October 17, 2015 Author Share Posted October 17, 2015 So you only see a blank page when you try to run the cron job manually?Which attribute does cron.php have ? If 644 try to change it to 755. Otherwise I recommend that you move the cron dir outside the public_html dir ( http://docs.whmcs.com/Further_Security_Steps ) I don't know about running the cron job manually, but I open cron job file location in my browser: http://www.MYDOMAIN.com/WHMCSFOLDER/crons/cron.php and when I do all I see it a blank page. I did change the file from 644 to 755 and I still see a blank page when I go to the cron file in my browser. 0 Quote Link to comment Share on other sites More sharing options...
web2008 Posted October 18, 2015 Share Posted October 18, 2015 Try to enable Display Errors and run it in your browser again. If you still see a blank page, login to your server and run cron.php as the following: php -q /home/yourname/public_html/WHMCSFOLDER/crons/cron.php debug This should view data so you can see what is going on. 0 Quote Link to comment Share on other sites More sharing options...
leopard16 Posted October 18, 2015 Author Share Posted October 18, 2015 OK. I enabled Display Errors and ran it it my browser again. No errors show on the cron page. When I look at the source code of my cron.php page in the browser the code is blank. However, when I type the cron.php URL into the browser manually it does appear the cron.php page is runningthe tasks (its just not showing PHP debugging error like it should). Now, I can see in my WHMCS logs all the cron activities are running plus all my overdue invoices are now being generated. So at least when I manually enter the cron.php file into my browser, it does seem to be properly executing my crons. But I am not sure (unless I wait a few days) if the cron setup is running this cron file or if these crons were all the manual attempts I made the past few days. Should I try and re-upload my cron folder from my latest WHMCS update to make sure none of the cron files are corrrupt? Maybe during one of these updates one of my cron files became corrupted. It seems as if my server settings are proper, it seems as if my settings in WHMCS are proper, yet my cron.php file does not seem to be actived by my servers cron job which has the proper path according to my host. - - - Updated - - - My hosting company has a ticket created to see how I can enter the debug line you provided. Should I create a new cron or just add the debug to the back of the cron I already have set up? Where will the debug file be shown? I am running CPanel. 0 Quote Link to comment Share on other sites More sharing options...
web2008 Posted October 20, 2015 Share Posted October 20, 2015 You login in to the server via SSH and enter the following at the command line: php -q /home/yourname/public_html/WHMCSFOLDER/crons/cron.php debug When the cron.php run, you see on the screen what happens. It is important that the cron job ends with "Cron Job: Completed". Otherwise, as I said, I recommend that you move the cron dir outside public_html, so that not just anyone can run cron jobs. 0 Quote Link to comment Share on other sites More sharing options...
panacheweb Posted October 21, 2015 Share Posted October 21, 2015 I ran this and I am getting the error related to modules/servers/cpanel/cpanel.php seriously.. I am looking at selling my license because of this insanity.. how the hell can I run a business when your software does not work. At this point I am looking at moving to the competition ASAP. PHP Warning: Illegal string offset 'DOMAIN' in /home/small/public_html/clients/ modules/servers/cpanel/cpanel.php on line 0 PHP Warning: Illegal string offset 'DISKUSED' in /home/small/public_html/client s/modules/servers/cpanel/cpanel.php on line 0 PHP Warning: Illegal string offset 'DISKLIMIT' in /home/small/public_html/clien ts/modules/servers/cpanel/cpanel.php on line 0 PHP Warning: Illegal string offset 'DOMAIN' in /home/small/public_html/clients/ modules/servers/cpanel/cpanel.php on line 0 PHP Warning: Illegal string offset 'DISKUSED' in /home/small/public_html/client s/modules/servers/cpanel/cpanel.php on line 0 PHP Warning: Illegal string offset 'DISKLIMIT' in /home/small/public_html/clien ts/modules/servers/cpanel/cpanel.php on line 0 PHP Warning: Illegal string offset 'MAINDOMAIN' in /home/small/public_html/clie nts/modules/servers/cpanel/cpanel.php on line 0 PHP Warning: Illegal string offset 'TOTALBYTES' in /home/small/public_html/clie nts/modules/servers/cpanel/cpanel.php on line 0 PHP Warning: Illegal string offset 'LIMIT' in /home/small/public_html/clients/m odules/servers/cpanel/cpanel.php on line 0 PHP Warning: Illegal string offset 'MAINDOMAIN' in /home/small/public_html/clie nts/modules/servers/cpanel/cpanel.php on line 0 PHP Warning: Illegal string offset 'TOTALBYTES' in /home/small/public_html/clie nts/modules/servers/cpanel/cpanel.php on line 0 PHP Warning: Illegal string offset 'LIMIT' in /home/small/public_html/clients/m odules/servers/cpanel/cpanel.php on line 0 PHP Warning: Illegal string offset 'MAINDOMAIN' in /home/small/public_html/clie nts/modules/servers/cpanel/cpanel.php on line 0 PHP Warning: Illegal string offset 'TOTALBYTES' in /home/small/public_html/clie nts/modules/servers/cpanel/cpanel.php on line 0 PHP Warning: Illegal string offset 'LIMIT' in /home/small/public_html/clients/m odules/servers/cpanel/cpanel.php on line 0 PHP Warning: Illegal string offset 'MAINDOMAIN' in /home/small/public_html/clie nts/modules/servers/cpanel/cpanel.php on line 0 PHP Warning: Illegal string offset 'TOTALBYTES' in /home/small/public_html/clie nts/modules/servers/cpanel/cpanel.php on line 0 PHP Warning: Illegal string offset 'LIMIT' in /home/small/public_html/clients/m odules/servers/cpanel/cpanel.php on line 0 PHP Warning: Illegal string offset 'DOMAIN' in /home/small/public_html/clients/ modules/servers/cpanel/cpanel.php on line 0 PHP Warning: Illegal string offset 'DISKUSED' in /home/small/public_html/client s/modules/servers/cpanel/cpanel.php on line 0 PHP Warning: Illegal string offset 'DISKLIMIT' in /home/small/public_html/clien ts/modules/servers/cpanel/cpanel.php on line 0 PHP Warning: Illegal string offset 'DOMAIN' in /home/small/public_html/clients/ modules/servers/cpanel/cpanel.php on line 0 PHP Warning: Illegal string offset 'DISKUSED' in /home/small/public_html/client s/modules/servers/cpanel/cpanel.php on line 0 PHP Warning: Illegal string offset 'DISKLIMIT' in /home/small/public_html/clien ts/modules/servers/cpanel/cpanel.php on line 0 PHP Warning: Illegal string offset 'MAINDOMAIN' in /home/small/public_html/clie nts/modules/servers/cpanel/cpanel.php on line 0 PHP Warning: Illegal string offset 'TOTALBYTES' in /home/small/public_html/clie nts/modules/servers/cpanel/cpanel.php on line 0 PHP Warning: Illegal string offset 'LIMIT' in /home/small/public_html/clients/m odules/servers/cpanel/cpanel.php on line 0 PHP Warning: Illegal string offset 'MAINDOMAIN' in /home/small/public_html/clie nts/modules/servers/cpanel/cpanel.php on line 0 PHP Warning: Illegal string offset 'TOTALBYTES' in /home/small/public_html/clie nts/modules/servers/cpanel/cpanel.php on line 0 PHP Warning: Illegal string offset 'LIMIT' in /home/small/public_html/clients/m odules/servers/cpanel/cpanel.php on line 0 PHP Warning: Illegal string offset 'MAINDOMAIN' in /home/small/public_html/clie nts/modules/servers/cpanel/cpanel.php on line 0 PHP Warning: Illegal string offset 'TOTALBYTES' in /home/small/public_html/clie nts/modules/servers/cpanel/cpanel.php on line 0 PHP Warning: Illegal string offset 'LIMIT' in /home/small/public_html/clients/m odules/servers/cpanel/cpanel.php on line 0 PHP Warning: Illegal string offset 'MAINDOMAIN' in /home/small/public_html/clie nts/modules/servers/cpanel/cpanel.php on line 0 PHP Warning: Illegal string offset 'TOTALBYTES' in /home/small/public_html/clie nts/modules/servers/cpanel/cpanel.php on line 0 and does it matter where the damned cron dir is if you use an htaccess file to restrict access? seriously get with the program and restrict access to the dir. 0 Quote Link to comment Share on other sites More sharing options...
leopard16 Posted October 21, 2015 Author Share Posted October 21, 2015 OK my issue has been resolved. The problem for me is my PHP version on the cron did not match the PHP version on my server. Here is my hosting companies response to my issue: "Looking through the cron logs it appears that your cron is running reliably, but testing the cron I have found that it is not compatible with php 5.4, so I have updated the cron job to run with php 5.3 as follows: /opt/php53/bin/php -q /home/yourname/public_html/WHMCSFOLDER/crons/cron.php Additionally the path variable needed to be corrected at /home/yourname/public_html/WHMCSFOLDER/crons/config.php You may want to ensure that WHMCS is up to date on the most recent version so that it is compatible with more recent versions of PHP." I don't know when or how my PHP version and the WHMCS became uncompatible but it must have been during one of the recent updates within the past few months. This is when it broke. Anyway all is well now. I hope this helps others with the same issue! 0 Quote Link to comment Share on other sites More sharing options...
panacheweb Posted October 22, 2015 Share Posted October 22, 2015 I upgraded to php 5.6 to resolve several of my issues. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.