Error

Error: Could not instantiate mail function error in Joomla Sites

Error Comments Off on Error: Could not instantiate mail function error in Joomla Sites

Error: Could not instantiate mail function error.

When: Hello, are you having sites,which are running on Joomla or other CMS and you are using Mail function most of the times,like in CONTACT US Section, SEND ENQUIRY section or REQUEST A QUOTE section or any other form submitted and you will get below error.
‘ Could not instantiate mail function ‘

Why: Below are possible reason for this error

Solution:

  • If you are running Joomla,then goto Admin panel > Global Configuration > Server > Mail Settings > Mailer  and select SENDMAIL there, instead of PHP MAIL FUNCTION.
  • Upgrade php version if its older.
  • Still not solved ask your webhost to check smtp configuration

By following above steps your “Could not instantiate mail function error” will be resolved.

Assigning the return value of new by reference is deprecated

Error Comments Off on Assigning the return value of new by reference is deprecated

Error Description: Deprecated: Assigning the return value of new by reference is deprecated in C:\wamp\www\joomla\libraries\pattemplate\patTemplate.php on line 1424

You will get such error in joomla in window server if you using wamp or xamp.

Why Error Comes: PHP 4 introduced basic OOP to PHP, however it had a few key issues which were fixed in PHP 5.3.

Bear in mind that OOP is a concept which has feature which should be consistent between the many different programming languages which implement it.

In most programming languages, an object can be passed to functions or other objects by reference, not by value. In other words, rather than passing a new object with the same values, the actual object is passed, meaning changes are kept.Because of this, you had to manually pass the object by reference rather than by value:

Solution: You need to use php’s older version 5.2 or need to remove call by reference.
1)– You can install this add-on for wamp download wamp with php 5.2 from here

– After installing the addon, you need to select the php version from wamp-icon on right side of taskbar, just click on icon, go to php and then version, and then choose the new lower version, to make it work

2) : Just left click WAMP icon in systray, select PHP -> PHP settings  uncheck “display errors”. This is also remove error but not prefect solution

3) Rremove the & and it’ll work as before

Deprecated: Assigning the return value of new by reference is deprecated in C:\wamp\www\natega2010\prep1\term1\phpfn50.php on line 1139 is solved

So either you need call by reference or