Jump to content

PHP Errors...

Recommended Posts

Any ideas on these?...



WHMCS Application] ERROR: exception 'InvalidArgumentException' with message 'Query string must not include a URI fragment' in /home/username/public_html/whmcs/vendor/zendframework/zend-diactoros/src/Uri.php:386 Stack trace: #0 /home/username/public_html/whmcs/vendor/zendframework/zend-diactoros/src/ServerRequestFactory.php(280): Zend\Diactoros\Uri->withQuery('a=add&domai...') #1 /home/username/public_html/whmcs/vendor/zendframework/zend-diactoros/src/ServerRequestFactory.php(66): Zend\Diactoros\ServerRequestFactory::marshalUriFromServer(Array, Array) #2 /home/username/public_html/whmcs/vendor/whmcs/whmcs-foundation/lib/Http/Message/ServerRequest.php(0): Zend\Diactoros\ServerRequestFactory::fromGlobals() #3 /home/username/public_html/whmcs/vendor/whmcs/whmcs-foundation/lib/Domain/Checker.php(0): WHMCS\Http\Message\ServerRequest::fromGlobals() #4 /home/username/public_html/whmcs/cart.php(0): WHMCS\Domain\Checker->__construct() #5 {main} {"exception":"[object] (InvalidArgumentException(code: 0): Query string must not include a URI fragment at /home/username/public_html/whmcs/vendor/zendframework/zend-diactoros/src/Uri.php:386)"} []


 [WHMCS Application] ERROR: exception 'InvalidArgumentException' with message 'Invalid path provided; must not contain a URI fragment' in /home/username/public_html/whmcs/vendor/zendframework/zend-diactoros/src/Uri.php:356 Stack trace: #0 /home/username/public_html/whmcs/vendor/whmcs/whmcs-foundation/lib/Route/Middleware/RoutableRequestQueryUri.php(0): Zend\Diactoros\Uri->withPath() #1 /home/username/public_html/whmcs/vendor/whmcs/whmcs-foundation/lib/Route/Middleware/RoutableRequestQueryUri.php(0): WHMCS\Route\Middleware\RoutableRequestQueryUri->updateUriFromRequestQuery() #2 /home/username/public_html/whmcs/vendor/whmcs/whmcs-foundation/lib/Route/Middleware/Strategy/AssumingMiddlewareTrait.php(0): WHMCS\Route\Middleware\RoutableRequestQueryUri->_process() #3 /home/username/public_html/whmcs/vendor/middlewares/utils/src/Dispatcher.php(76): WHMCS\Route\Middleware\RoutableRequestQueryUri->process(Object(WHMCS\Http\Message\ServerRequest), Object(Middlewares\Utils\Delegate)) #4 [internal function]: Middlewares\Utils\Dispatcher->Middlewares\Utils\{closure}(Object(WHMCS\Http\Message\ServerRequest)) #5 /home/username/public_html/whmcs/vendor/middlewares/utils/src/Delegate.php(31): call_user_func(Object(Closure), Object(WHMCS\Http\Message\ServerRequest)) #6 /home/username/public_html/whmcs/vendor/middlewares/utils/src/Dispatcher.php(56): Middlewares\Utils\Delegate->process(Object(WHMCS\Http\Message\ServerRequest)) #7 /home/username/public_html/whmcs/index.php(0): Middlewares\Utils\Dispatcher->dispatch() #8 {main} {"exception":"[object] (InvalidArgumentException(code: 0): Invalid path provided; must not contain a URI fragment at /home/username/public_html/whmcs/vendor/zendframework/zend-diactoros/src/Uri.php:356)"} [][14-Jun-2018 08:40:46 Europe/London] Stripe Notice: Undefined property of Stripe\Customer instance: source


I'm having a problem with the daily cron job seemingly getting stuck and sending server load soaring. I think the crons are overlapping. One has been running for over 20 minutes and server load is now in double figures. I notice six instances of cron.php are now running.

This has only started happening since the upgrade to 7.5.

Edited by Chris74
Link to comment
Share on other sites

  • 3 weeks later...

Assuming the -all flag will run the "daily" tasks, the output didn't provide much insight...

 0/24 [░░░░░░░░░░░░░░░░░░░░░░░░░░░░]   0% < 1 sec/< 1 sec 79.5 MiB
  2/24 [▓▓░░░░░░░░░░░░░░░░░░░░░░░░░░]   8% < 1 sec/< 1 sec 79.5 MiB
  4/24 [▓▓▓▓░░░░░░░░░░░░░░░░░░░░░░░░]  16% < 1 sec/< 1 sec 79.5 MiB
  6/24 [▓▓▓▓▓▓▓░░░░░░░░░░░░░░░░░░░░░]  25% 9 secs/36 secs 83.5 MiB
  8/24 [▓▓▓▓▓▓▓▓▓░░░░░░░░░░░░░░░░░░░]  33% 9 secs/27 secs 83.5 MiB
 10/24 [▓▓▓▓▓▓▓▓▓▓▓░░░░░░░░░░░░░░░░░]  41% 9 secs/22 secs 83.5 MiB
 12/24 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░░░░░░░░░░░]  50% 10 secs/20 secs 84.2 MiB
 14/24 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░░░░░░░░░]  58% 10 secs/17 secs 84.2 MiB
 16/24 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░░░░░░░]  66% 10 secs/15 secs 84.2 MiB
 18/24 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░░░░]  75% 31 secs/41 secs 84.8 MiB
 20/24 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░░]  83% 33 secs/40 secs 85.0 MiB
 22/24 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░]  91% 35 secs/38 secs 95.8 MiB
 24/24 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100% 43 secs/43 secs 94.5 MiB

0/4 [░░░░░░░░░░░░░░░░░░░░░░░░░░░░]   0% < 1 sec/< 1 sec 100.0 MiB
 1/4 [▓▓▓▓▓▓▓░░░░░░░░░░░░░░░░░░░░░]  25% < 1 sec/< 1 sec 100.0 MiB
 2/4 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░░░░░░░░░░░]  50% < 1 sec/< 1 sec 100.0 MiB
 3/4 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░░░░]  75% 2 secs/3 secs 100.0 MiB
 4/4 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100% 2 secs/2 secs 100.0 MiB


I output to a text file and it just contained this...

WHMCS Automation Task Utility: all

 Daily Cron Automation Mode

Queuing Tasks

 Force run any tasks: ignore "in progress" and "is due"
 Task queues ready

Executing Application Queue

 Currency Exchange Rates
 Product Pricing Updates
 Late Fees
 Credit Card Charges
 Invoice & Overdue Reminders
 Domain Renewal Notices
 Cancellation Requests
 Overdue Suspensions
 Overdue Terminations
 Fixed Term Terminations
 Inactive Tickets
 Delayed Affiliate Commissions
 Affiliate Reports
 Email Marketer Rules
 Credit Card Expiry Notices
 Server Usage Stats
 Overage Billing Charges
 Client Status Update
 Domain Expiry
 Ticket Escalation Rules
 Data Retention Pruning
 Run Jobs Queue
 WHMCS Updates


 Sending Daily Cron Digest email

Executing System Queue


 [OK] Completed                                                                                                         


It doesn't really help troubleshoot the issues I'm having. The main problem I'm experiencing is with cancellations not processing. I have hosting plans that are set to immediate cancel that are not being terminated and hosting plans that are set to end of term that have gone past the end of term and are not terminating.

The activity log shows no attempt to cancel these services. The services are suspending correctly and the suspension is being reported correctly  - but not the termination. This doesn't seem to happen to all of them. Everything has been fine until the 7.5 update.

I think I'm getting two different issues mixed up here. The original PHP errors seem to be related to Stripe, which is not impacting on the cancellations. The cron jobs getting stuck and there being multiple instances seems to have stopped happening, but the PHP errors are still there and the issue with services not terminating is still happening.

I think both issues are simply bugs introduced in 7.5

Edited by Chris74
Link to comment
Share on other sites

Thanks for your input Brian. All addons were 7.5 compatible (or advertised as working with version 6+). I've disabled and removed all addons that are non essential. Yesterday the cron job sending the server load soaring was happening every time it ran. Server load was in the 20's (high CPU) - and the cron was taking 17 minutes, so I removed all addons that were triggered during cron. There was one, "WHMCS cleaner" that I suspected was a problem - and so far, having removed that (and others) overnight it seems the regular crons are now running within about 30 seconds. The daily cron takes longer than five minutes, so I've adjusted the frequency to every ten mins.

I'm still randomly getting that PHP error. Last instance of it was at around 2am.

Having looked into the terminations issue - it seems any and all cancellation requests are being ignored by the cron since we updated to 7.5.1. Normal terminations are working fine - i.e those that are past the renewal date. I think this can only be a bug.

I'm looking at three separate issues here I think. So far I reckon issue 1 is resolved, after getting rid of the addons.





Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated