it has been checked by the ISP (internet service provider) the website is not blocked. error listed in Cpanel hosting
PHP Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /hoxx/smarxxx/public_html/adm/konek_db.php on line 8
2024-10-02 14:29:37.635497 [INFO] [1515404] [T0] [127.112.68.51:53645-H3:5D22CC-468#APVH_smart-xxxx.com:443] File not found [/home/smartaxxx/public_html/403.shtml], has been hit 117 times per second, shortcut to 404.
Is this an old site? You should not be using any code that uses mysql_connect() or its related family of functions. They have deprecated as of version 5 and removed altogether as of version 7. I suggest you have a programmer take a look at this code and help you migrate over to at least PHP 7 code. As the warning states, you should use mysqli or PDO as an alternative.
The other message is an info stating that visitors are trying to hit a 403.shtml page which doesn’t exist and was a shortcut to a 404 (page not found) error. Do you have some kind of code that points at a 403.shtml page? Again I suggest you find a programmer to take a look at this along with the other error. You are obviously running some pretty outdated pages that need attention.
but this happens only on the public ip of my office. if accessed not using the office internet the website can run normally. and also have done ping and tracert there are no problems but the website remains down.
I use Mikrotik as office internet routing there is no firewall that interferes. but if I plug the ISP’s LAN intenet directly into the notebook the absent website can be normal again and if I access it through Mikrotik it will be down again.
Is the site running on a server inside the LAN, or is it running in a hosting center somewhere else?
If it’s inside the lan, check that the site isnt configured to listen only on the external IP. (Internal IP’s would use the internal IP to connect, so the server would reject the connection because “I dont have a site for 192.168.1.2, I only have one for 10.999.999.999”)
If it’s not, your router’s bouncing the connection, either to a bad address or just swallowing it in a black hole.
Based on the error messages you’ve provided from your cPanel hosting, it seems there are a couple of issues with your website. Here’s how to address them:
1. PHP Deprecated Warning
The warning indicates that your website is using the deprecated mysql_connect() function. To fix this:
Update Your Code: Replace mysql_connect() with mysqli_connect() or use PDO (PHP Data Objects) for database connections. Here’s a quick example of how to update your connection code:
Old Code:
$connection = mysql_connect($host, $user, $password);
Updated Code Using MySQLi:
$connection = mysqli_connect($host, $user, $password, $database);
Make sure to update any other related database functions as well (like mysql_query to mysqli_query).
2. File Not Found Error
The error indicates that a file is missing (specifically 403.shtml). It’s likely that your website is attempting to display a custom error page that doesn’t exist.
Create a 403.shtml File: To resolve this, you can create a simple 403.shtml file to handle forbidden access errors. You can also create a 404.shtml file for not found errors.
It’s not just that, if that function is only deprecated, then the PHP version is obsolete too. In any currently supported PHP version that function won’t even be defined, because it was removed some time ago. But your AI never picked up on that.