Jump to content

how to fix Exception: Laminas\Diactoros\Exception\InvalidArgumentException


Recommended Posts

Hi all,

I'm seeing the record in WHMCS activity several times a day

Exception: Laminas\Diactoros\Exception\InvalidArgumentException: Query string must not include a URI fragment in /home/casheus/public_html/clients/vendor/laminas/laminas-diactoros/src/Uri.php:406 Stack trace: #0 /home/casheus/public_html/clients/vendor/laminas/laminas-diactoros/src/functions/marshal_uri_from_sapi.php(223): Laminas\Diactoros\Uri->withQuery('language=swedis...') #1 /home/casheus/public_html/clients/vendor/laminas/laminas-diactoros/src/ServerRequestFactory.php(74): Laminas\Diactoros\marshalUriFromSapi(Array, Array) #2 /home/casheus/public_html/clients/vendor/whmcs/whmcs-foundation/lib/Http/Message/ServerRequest.php(0): Laminas\Diactoros\ServerRequestFactory::fromGlobals(Array, NULL, NULL, Array, Array) #3 /home/casheus/public_html/clients/index.php(0): WHMCS\Http\Message\ServerRequest::fromGlobals() #4 {main}

I followed many articles before but didn't find a solution to fix it

Screen Shot 2021-05-31 at 6.55.22 PM.png

Link to comment
Share on other sites

  • 10 months later...
  • WHMCS Technical Analyst II

These errors would indicate that the "Log Errors" debug setting is enabled under Configuration > System Settings > General Settings > Other tab and something is accessing either your client area pages or custom pages with invalid URLs and query strings. This is not indicative of an issue with WHMCS itself and can be safely ignored. I would recommend disabling that setting as it is not intended to be enabled during production usage.

I hope this information helps.

Link to comment
Share on other sites

  • 1 year later...
On 4/13/2022 at 10:28 AM, WHMCS Lawrence said:

These errors would indicate that the "Log Errors" debug setting is enabled under Configuration > System Settings > General Settings > Other tab and something is accessing either your client area pages or custom pages with invalid URLs and query strings. This is not indicative of an issue with WHMCS itself and can be safely ignored. I would recommend disabling that setting as it is not intended to be enabled during production usage.

I hope this information helps.

Greetings,

I am seeing the same error every few days. I just looked and "Log Errors" is unchecked. Please advise.

Thank you!

Link to comment
Share on other sites

P.S. I might add the only reason I found this error is because the daily cron didn't complete today for the first time in a long time. The cron job died at approximately the same time the error was logged. Could it be a coincidence? It doesn't seem likely. I went back a week and although the error did occur, it never occurred during the daily cron job process.

Any advice would be appreciated. Thank you!

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.

Guest
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.

×
×
  • 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