myapi

Website Tip: MyAPI Plugin Error, Warning: Call-time Pass-by-reference Has Been Deprecated

I tried posting this on the MyApi Forum page, but could not login. The page that was seeking an answer to the problem is linked to below. After I installed the new version of MyApi that connects this site to Facebook, I experienced the same error and was able to fix it. The error said,  “Warning: Call-time pass-by-reference has been deprecated in” and gave specific references to code in several php files.

http://www.myapi.co.uk/index.php?option=com_kunena&func=view&id=1174&catid=16&Itemid=56

What I discovered was that it was a problem in the php.ini file. The following was turned off when it needs to be on for the files to run correctly:

allow_call_time_pass_reference = Off

As this site is hosted by godaddy.com, the php5.ini file is outside the root directory, so all I had to do was open notepad and paste the following:

; Whether to enable the ability to force arguments to be passed by reference
; at function call time.  This method is deprecated and is likely to be
; unsupported in future versions of PHP/Zend.  The encouraged method of
; specifying which arguments should be passed by reference is in the function
; declaration.  You’re encouraged to try and turn this option Off and make
; sure your scripts work properly with it in order to ensure they will work
; with future versions of the language (you will receive a warning each time
; you use this feature, and the argument will be passed by value instead of by
; reference).
allow_call_time_pass_reference = On

Then save the file as php5.ini and upload it to the site root directory.

The issue was solved. I tried for about 15 minutes to login to the myapi site and could not register or logon, so hopefully someone finds this post in my blog.