404 Error on Manager page

I added this as a snippet called “testSnip”, then added [[testSnip]] to the bottom of one of our web pages. When I refreshed the page, I got a 503 error.

Does anything get logged to the server error log this time?

Nothing appears to have been logged, but based on the date/time stamps on the error logs, is it possible that the error log files are only updated once a day by the host (godaddy)?

I’ve tested this by forcing the same 503 error again, and a few moments later downloading the error log to see if it had been changed, but it is the same as the copy I downloaded 10 minutes ago.

When you go the “System Info” page in the MODX manager (manager/?a=system/info) and click the “View” link in the line “phpinfo():”, is there a cURL section on the phpinfo page and is cURL support enabled?

Maybe you could also ask your host if they changed anything recently concerning cURL.

It shows cURL support enabled & cURL Information 7.84.0, but I will follow up with Godaddy to see what they have to say.

Thank you!

Hello,

It’s been a few weeks, but I finally had a chance to chat with GoDaddy for support on my issue.

They created a cURL test file, and it appeared to be working fine. They said there were no issues on the Godaddy server & also checked the system logs and the server is functioning fine.

After that, I tried again to use the code below, which generated a 500 error, but the error logs still did not show any issue. When I brought this up to GoDaddy, they said I may need to change things to access the proper error logs. I’ve listed their instructions below as well - please let me know if you have any other advice on where to go from here. Thanks!

$url = 'https://catfact.ninja/fact'; $curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_HEADER, false);
$data = curl_exec($curl);
curl_close($curl);
return $data;

Abid A at 8:04, Mar 21:
Let me check what’s best can be done on this.
You can review the error logs by going to Cpanel admin > File Manager > error_log file
You can also follow the below link article to set up PHP error log :
Setup PHP error logging | Linux Hosting (cPanel) - GoDaddy Help US

You at 8:07, Mar 21:
Thanks for the link and suggestion, but I do not see the “.user.ini” file in the location suggested

Abid A at 8:08, Mar 21:
you can just create a .user.ini file on File Manager :
What filename does my PHP initialization file need to use? | Linux Hosting (cPanel) - GoDaddy Help US

So what is the difference between the code in the “cURL test file” and the code in the snippet?


If you put this code in a PHP file on your server and call it, does that work?

<?php
ini_set("display_errors", 1);
ini_set("display_startup_errors", 1);
ini_set("log_errors", 1);
error_reporting(E_ALL);

$url = 'https://catfact.ninja/fact';
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_HEADER, false);
$data = curl_exec($curl);
curl_close($curl);
echo $data;
?>

We started to have this issue on multiple sites and figured out it started after turning on mod_evasive in WHM