Too many files...cpanel closed??

Status
Not open for further replies.
Messages
65
Reaction score
0
Points
6
Hi,
Cpanel is closed because there are too many files. I have some files not used I can delete. I will upgrade the site eventually after I finish testing the site. It's working the way I want but I need to know how long this error will take? I need to get in cpanel to put up a server error page. How can I make a code so that it automatically presents this message to customers when the server is down so I don't have to go into cpanel when I have no access? I download all my files to my computer in case there was a problem with this hosting.

Thanks,

Nicole
 

dWhite

Member
Messages
38
Reaction score
7
Points
8
If you're on Level server, all should be working again. MySQL server was having issues and cPanel automatically rejects access to prevent from people messing with things.
 

essellar

Community Advocate
Community Support
Messages
3,295
Reaction score
227
Points
63
You can't, as I told you before. The system would have to be able to run the sort of code that will tell it whether it can run the code it's running. (In other words, any code that can test the system can only run when the system is running perfectly.) You can fail to an alternate page (or at least an alternate display) if the database can't be reached, but not if PHP isn't running. (You would have to modify your PHP scripts; there is no magical server setting that will do it automatically.) And if the server is actually down down, there's no way to display anything at all unless there's a server sitting in front of the server.

If you're wondering how the big sites do it, it is by having a front-end load distribution server between the user and the actual web servers. The closest you can get with shared hosting on a single server is to use a service like Cloudflare (which has a generic error page).
 
Messages
65
Reaction score
0
Points
6
If you're on Level server, all should be working again. MySQL server was having issues and cPanel automatically rejects access to prevent from people messing with things.
I found the problem. I had too many backups. I deleted the files and it's back to normal. I have a few more tests then I will upgrade.

Thanks
 
Messages
65
Reaction score
0
Points
6
If you're on Level server, all should be working again. MySQL server was having issues and cPanel automatically rejects access to prevent from people messing with things.
Server mounted again. It's an ecommerce/social network. I will have to upgrade. I need a lot of space. I can't log into my cpanel. The site is http://www.bagandabaguette.com
I was performing from tests and they worked. 37 people signed up to social network and on to the ecommerce. I need to access my cpanel. I need to put a message up when the server goes down to automactically go up if I can't access my cpanel. It says this:
Sorry for the inconvenience!
The filesystem mounted at / on this server is running out of disk space. cPanel operations have been temporarily suspended to prevent something bad from happening. Please ask your system admin to remove any files not in use on that partition.
 

Dead-i

x10Hosting Support Ninja
Community Support
Messages
6,084
Reaction score
368
Points
83
We are aware of the issues on MySQL and cPanel on Level. Please see our status website for updates and info.

I need to put a message up when the server goes down
Just a little recommendation for the future, with PHP and PDO you could detect whether MySQL has gone down or not. At the top of your script you could use something like:
PHP:
<?php
try {
$db = new PDO("mysql:host=127.0.0.1;port=3306;dbname=DBNAME", "USERNAME", "PASSWORD");
}catch(PDOException $e) {
echo '<strong>Sorry</strong>';
die();
}
?>

Thank you,
 
Messages
65
Reaction score
0
Points
6
We are aware of the issues on MySQL and cPanel on Level. Please see our status website for updates and info.


Just a little recommendation for the future, with PHP and PDO you could detect whether MySQL has gone down or not. At the top of your script you could use something like:
PHP:
<?php
try {
$db = new PDO("mysql:host=127.0.0.1;port=3306;dbname=DBNAME", "USERNAME", "PASSWORD");
}catch(PDOException $e) {
echo '<strong>Sorry</strong>';
die();
}
?>

Thank you,
What will this script do or say?
 

Dead-i

x10Hosting Support Ninja
Community Support
Messages
6,084
Reaction score
368
Points
83
The PDO part is the actual MySQL connection - you can subsitute in the DBNAME, USERNAME and PASSWORD.
However, this bit is surrounded in try/catch brackets, which catches a PDOException. This means that if the PDO connection fails, instead of throwing a PHP error and possibly revealing some SQL details, it will echo some HTML code (in the example above, Sorry in bold) and then die(), to prevent any more code from executing on that page.
 
Status
Not open for further replies.
Top