Fatal error: Uncaught exception ‘Exception’ with message ‘DateTime::__construct

While editing user details in “User Manager” in Joomla back-end, you may get the following error message.

Fatal error: Uncaught exception \\\’Exception\\\’ with message \\\’DateTime::__construct() [<a href=\\\’datetime.–construct\\\’>datetime.–construct</a>]: Failed to parse time string (24/05/1995) at position 0 (2): Unexpected character\\\’ in /home/cpaneluser/public_html/libraries/joomla/utilities/date.php:149 Stack trace: #0 /home/cpaneluser/public_html/libraries/joomla/utilities/date.php(149): DateTime->__construct(\\\’24/05/1995\\\’, Object(DateTimeZone)) #1 /home/cpaneluser/public_html/libraries/joomla/factory.php(452): JDate->__construct(\\\’24/05/1995\\\’, \\\’UTC\\\’) #2 /home/cpaneluser/public_html/libraries/joomla/html/html.php(573): JFactory::getDate(\\\’24/05/1995\\\’, \\\’UTC\\\’) #3 [internal function]: JHtml::date(\\\’24/05/1995\\\’) #4 /home/cpaneluser/public_html/libraries/joomla/html/html.php(187): call_user_func_array(Array, Array) #5 /home/cpaneluser/public_html/libraries/joomla/html/html.php(87): JHtml::call(Array, Array) #6 /home/cpaneluser/public_html/libraries/joomla/html/html.php(718): JHtml::_(\\\’date\\\’, \\\’24/05/1995\\\’) #7 [internal function]: JHtml::calendar(\\\’24/05/1995 in /home/cpaneluser/public_html/libraries/joomla/utilities/date.php on line 149

This is the error due to wrong date format used while adding/registering a new user.

To correct the issue, check related database name in “configuration.php” >> access PHPmyadmin in WHM >> Select proper database >> Search “24/05/1995” by selecting all the tables and edit related table accordingly and change the value “24/05/1995” to “24-05-1995”.

In most of the cases, the table will be “jos_user_profiles” so you need to edit “profile.dob” for respective user ID for which you are getting the error.

suPHP must be enabled to install Owncloud

While installing Owncloud through softaculous, you may get the following error.

suPHP must be enabled to install Owncloud

This is because of the suphp configuration in softaculous admin panel.

To resolve the issue, login to the WHM >> Plugins >> softaculous – Instant Installs >> Settings >> Under General Settings Change the values;

CHMOD Files to 644
CHMOD Directories to 755
CHMOD Config files to 644

save the changes and try to install the script. It should be installed without any error.

Softaculous_suphp

alarm level changed

Sometimes, you may get flooded with the email alerts like

alarm level changed.

This is an alert sent by plesk as a result of low values set for the Health Monitor.

To resolve the issue, you can download the Health Monitor configuration file in .xml format on your local PC and edit the values as below.

<service name=”Web” monitor=”true”>

<alarm level=”red” threshold=”25″ type=”percent”/>

<alarm level=”yellow” threshold=”20″ type=”percent”/>

</service>

 

and change it as per the limits you want to set.

 

<service name=”Web” monitor=”true”>

<alarm level=”red” threshold=”60″ type=”percent”/>

<alarm level=”yellow” threshold=”50″ type=”percent”/>

</service>

Save it and re-upload it to the server.

Or from command line, you will have to edit the following file.

# /usr/local/psa/var/custom-health-config.xml

Edit the values, save it and check the Health Monitor in plesk, it should be fine now.

Web server software (WebServerX) is not supported, sorry.

After installing moodle by using Fantastico or softaculous, its showing the following error.

Web server software (WebServerX) is not supported, sorry.

This is because the mod_security installed on the server and it can be resolved by editing the mod_security configuration file.

# vi /usr/local/apache/conf/modsec2.conf

search for

SecServerSignature "WebServerX"

and comment it, save the file and restart the apache service.

Moodle should be working fine now.

domain.com exceeded the max records and failures per > hour (5/5 (%)) allowed. Message discarded.

In cPanel 11.32, a new feature is added to limit the ability of exploited or hacked sites to send out spam emails. A few customers who send out mass mailings have been triggering this feature, due to the number of bad/undeliverable email addresses on their lists.

Due to this feature you may get the following bounce back.

“Domain has exceeded the max defers and failures per hour (5/5 (26%)) allowed. Message discarded.”

cPanel will regularly monitor the emails sent through all email accounts on your domain, and if, over the past hour, more than 25% of the attempted deliveries have failed, outbound email will temporarily be limited.

To solve the issue,remove following file.

/var/cpanel/email_send_limits/max_deferfail_domain.com

and restart the exim service or you may need to disable the option “Ratelimit incoming connections with only failed recipients” in tweak Settings in WHM. If you still have an issue with this, in Tweak settings, change the value for “Maximum percentage of failed or deferred messages a domain may send per hour”. The option is used for the maximum percentage of a domain’s outgoing mail that can consist of failed or deferred messages. Once the domain exceeds this percentage, it is temporarily blocked from sending mail.

If you’re not sure exactly what is causing this, you can probably figure it out by using the Email Trace icon in your hosting control panel. When you click the Email Trace icon, you’ll see a field where you can enter a recipient’s email address and then click a “Run Report” button to get information about email sent to that recipient. If you enter nothing for the recipient email address, you’ll get back data for all email traffic, and as you look through it you should see groups of bounced messages which can help you determine what sender caused the problem, and why.

ModSecurity: Request body (Content-Length) is larger than the configured limit

ModSecurity: Request body (Content-Length) is larger than the configured limit

While uploading large files, you may get the following error due to mod_security.

ModSecurity: Request body (Content-Length) is larger than the configured limit (134217728). Deny with status (413) [hostname “domain.com”] [uri “/folder/folder2/file.php”] [unique_id “T-VoPZ7-KsUAABnOIf8AAAAC”]

To resolve the issue,

Modify your modsec2.conf and change the limit set for SecRequestBodyInMemoryLimit

# vi /etc/httpd/conf/modsec2.conf

search for SecRequestBodyInMemoryLimit

SecRequestBodyInMemoryLimit 531072

increase the value, save the file and restart the apache service.

Unable to load object of type IPAddress with id=1: Table->select() failed: no such row in the table

While adding a new domain or add an IP address to a client you may get the following error.

ERROR: PleskFatalException

Favorites

Visited Pages

Unable to load object of type IPAddress with id=1: Table->select() failed: no such row in the table

0: common_func.php3:3159

objectMakerEx(string ‘IPAddress’, integer ‘1’)

1: IPPoolManager.php:968

IPPoolManager::toString(integer ‘1’)

2: indicator-ip.php:22

plesk__indicator_ip->renderHtml()

3: IndicatorUIPointer.php:13

IndicatorUIPointer->accessItem(string ‘INDICATOR’, NULL null)

4: UIPointer.php:596

UIPointer->access(string ‘INDICATOR’)

5: DashboardElement.php:1582

DashboardElement_indicator->renderHtml(object of type UserAdmin, NULL null)

6: DashboardElement.php:680

DashboardElement->renderHtml_indicators(array, object of type UserAdmin, NULL null)

7: DashboardElement.php:634

DashboardElement->renderHtml_common(array, object of type UserAdmin, NULL null)

8: DashboardElement.php:991

DashboardElement_top->renderHtml(object of type UserAdmin, NULL null)

This is because plesk tries to check the IP which is not in the IP Address Pool or which is not removed properly or unknown IP. To resolve the issue, you will have to find that IP and remove it from the server.

# mysql -uadmin -p'cat /etc/psa/.psa.shadow' -Dpsa

You will see the list of id numbers in the first column followed by the addresses in the second column.

Perform the modification of the component_id table as,

mysql> select id,ip_address from IP_Addresses;
 +----+----------------+
 | id | ip_address |
 +----+----------------+
 | 6 | 192.168.0.2 |
 | 7 | 192.168.0.3 |
 | 8 | 192.168.0.4 |

In above output the IDs are 6,7 and 8. Its supposed to be 1,2 and 3. To change the IDs

mysql> update IP_Addresses set id=1 where ip_address='192.168.0.2';
 Query OK, 1 row affected (0.01 sec)
 Rows matched: 1 Changed: 1 Warnings: 0
 mysql> update IP_Addresses set id=2 where ip_address='192.168.0.3';
 Query OK, 1 row affected (0.00 sec)
 Rows matched: 1 Changed: 1 Warnings: 0
 mysql> update IP_Addresses set id=3 where ip_address='192.168.0.4';
 Query OK, 1 row affected (0.01 sec)
 Rows matched: 1 Changed: 1 Warnings: 0
 Confirm the ID changes by
 mysql> select id,ip_address from IP_Addresses;
 +----+----------------+
 | id | ip_address |
 +----+----------------+
 | 1 | 192.168.0.2 |
 | 2 | 192.168.0.3 |
 | 3 | 192.168.0.4 |

now, check the plesk, it should be working fine. 🙂

Fatal error: Class ‘NOOP_Translations’ not found in l10n.php

Sometimes you may face the following error for a wordpress website.

Fatal error: Class ‘NOOP_Translations’ not found in wp-includes/l10n.php

This issue can be resolved by simply deleting/renaming current translations.php file in wp-includes/pomo folder and reupload it from current version of the wordpress.

# mv wp-includes/pomo/translations.php wp-includes/pomo/translations.php.bk

Download the wordpress installer on local PC, extract it and copy/upload the file from wp-includes/pomo to wp-includes/pomo folder on your server.

That’s it!

The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.

After upgrading Magento to Magento 1.6.0.0, you may get the following message on Front-end AND Back-end:

Service Temporarily Unavailable

The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.

In the release notes there’s a reference to this issue:

“If you see the Service Temporarily Unavailable page after refreshing the frontend, open the Magento installation directory on the server and remove the maintenance.flag file. Then go to Magento var directory and remove the cache directory”.

[email protected] [/home/xxxxxxx/public_html]# mv maintenance.flag maintenance.flag.bk

Or

[email protected] [/home/xxxxxxx/public_html]# rm -rf maintenance.flag

[email protected] [/home/xxxxxxx/public_html]# cd var/cache

[email protected] [/home/xxxxxxx/public_html/var/cache]# ll

total 72

drwxrwxrwx 12 xxxxxxx xxxxxxx 4096 Aug 7 20:55 ./

drwxr-xr-x 10 xxxxxxx xxxxxxx 4096 Aug 7 20:30 ../

drwxrwxrwx 2 xxxxxxx xxxxxxx 4096 Aug 7 20:55 mage–0/

drwxrwxrwx 2 xxxxxxx xxxxxxx 4096 Aug 7 20:55 mage–4/

drwxrwxrwx 2 xxxxxxx xxxxxxx 4096 Aug 7 20:55 mage–6/

drwxrwxrwx 2 xxxxxxx xxxxxxx 4096 Aug 7 20:55 mage–8/

drwxrwxrwx 2 xxxxxxx xxxxxxx 4096 Aug 7 20:55 mage–a/

drwxrwxrwx 2 xxxxxxx xxxxxxx 4096 Aug 7 20:55 mage–b/

drwxrwxrwx 2 xxxxxxx xxxxxxx 20480 Aug 7 20:55 mage–c/

drwxrwxrwx 2 xxxxxxx xxxxxxx 12288 Aug 7 20:55 mage–d/

drwxrwxrwx 2 xxxxxxx xxxxxxx 4096 Aug 7 20:55 mage–e/

drwxrwxrwx 2 xxxxxxx xxxxxxx 4096 Aug 7 20:55 mage–f/

[email protected] [/home/xxxxxxx/public_html/var/cache]#rm -rf mage*

Now, refresh the page and check the website. It should be working fine now.

SoftException in Application.cpp:422: Mismatch between target UID (99) and UID (502) of file

Sometimes on a suphp enabled server, you may get internal server error for a website and in error log it shows the folowing error;

Premature end of script headers: index.php

SoftException in Application.cpp:422: Mismatch between target UID (99) and UID (502) of file “/home/xxxxxxxx/public_html/index.php

To resolve the issue, check the ownweship and permissions of the files and folders. On a SuPHP enabled server, the file permissions should be 644 whereas the folders should have 755 and the ownership sould be cpaneluser:cpaneluser

If you still have an issue after correcting the permissions and ownership, check the httpd.conf and check the user set for the domain name. If its set to nobody, change it to cpaneluser.

You are done!