Quota write failed (id 514): Invalid argument

Sometimes, a whm does not show correct quota, it sometime shows 0 although you have assigned specific amount of disk space to particular customer. Kinda annoying but such issue can be easily fixed by running following script in cPanel server.

root@server[/]# /scripts/fixquotas
Installing Default Quota Databases......Done
Quota Mode: Linux
journaled quota support: not available with vzaquota (disabled)
checking out /backup
Quotas have been enabled, however they may not be up to date as quotacheck has been skipped.
Reading package Admin
Resetting quota for assembly to 1000 M
edquota: Quota write failed (id 503): Invalid argument
Resetting quota for ltcmc to 1000 M
edquota: Quota write failed (id 504): Invalid argument
Resetting quota for nwpc to 1000 M
edquota: Quota write failed (id 502): Invalid argument
Resetting quota for wwsdal to 1000 M
edquota: Quota write failed (id 500): Invalid argument

But, here you go it’s showing an error. That means your quota did not updated correctly. You can use below commands.

/sbin/quotacheck -vguma

Warning Make sure you know what you are doing as it could damage your whole disk.

How to increase session timeout in php?

Sometimes php session timeouts quickly before your script execute. You can increase this time by simply editing some directives in php.ini.

First locate php.ini

root@host[~]# php -i | grep php.ini
Configuration File (php.ini) Path => /usr/local/lib
Loaded Configuration File => /usr/local/lib/php.ini

Get current session time out time

root@host[~]# grep -i session.gc_maxlifetime /usr/local/lib/php.ini
session.gc_maxlifetime = 14400
; setting session.gc_maxlifetime to 1440 (1440 seconds = 24 minutes):

Edit php.ini

root@host [~]# vi /usr/local/lib/php.ini

Change value of session.gc_maxlifetime.

Restart httpd service!! its done

Failed to send test email. Error message: SMTP Error: Could not connect to SMTP host.

Sometimes, your domain points to external mail server such as google apps in this case you need to setup your smtp server to gmail or other third party. But sometimes, although values in your script are set correctly, while sending an email you get following error.

Failed to send test email. Error message: SMTP Error: Could not connect to SMTP host.

It might be caused because of wrong settings in the script or firewall.

Use SMTP when sending emails from this system Yes
SMTP hostname (eg: mail.yoursite.com) smtp.gmail.com
SMTP Security – TLS
Use SMTP authentication – Yes
SMTP Username – your user name
SMTP Password – your password.
SMTP port – 465

If your settings are correct, then you would need to make sure that you do not enable SMTP_BLOCK in csf.conf if you want to allow such connections.

Edit csf.conf file and set!

SMTP_BLOCK = “0”

1 158 159 160 161 162 166