PHP call-time pass-by-reference - php

It seems that the error I' posting about is quite common indeed, but as I know very little of php, I need to ask you shed further light on the following problem.
On my website, after a Wordpress update, the following error is displayed:
Fatal error: Call-time pass-by-reference has been removed in [...website...] on line 4.
Actually, the file the error refers t has the following code:
if (!empty($catid)) {
$Anno=0;
$Mese=0;
Pasw13_MeseAnnoCorrenti(&$Anno,&$Mese);
$ArchiviMesiAnno=Pasw13_ElencoAnniMesi("mesi",$catid,$Anno);
$ArchiviAnni=Pasw13_ElencoAnniMesi("anni",$catid,$Anno);
if (!empty($ArchiviMesiAnno) Or !empty($ArchiviAnni)){
As I've said, the error is on line 4, but I can't solve it out.
Thanks in advance for your help
Regards
kowalski215

This error happens because of &$in function call which is deprecated, remove & and your code should work.
Meaning that you should change:
Pasw13_MeseAnnoCorrenti(&$Anno,&$Mese);
to
Pasw13_MeseAnnoCorrenti($Anno,$Mese);
More information about error happening with wordpress can be found here - link

Related

blank page in wp-admin

I am getting the following error when I want to access the wp-admin sites of my wordpress installation:
Fatal error: Cannot redeclare send_confirmation_on_profile_email() (previously declared in /wp-includes/user.php:2624) in /wp-admin/includes/ms.php on line 423
I looked around but couldn't find any help yet. Maybe someone of you knows how to fix this error.
Thanks.
It seems send_confirmation_on_profile_email() function is used more than once. So what you need, is to find that function and rename it to its relevant name but make sure it does not match with the send_confirmation_on_profile_email

Fatal error: Call to undefined method Exception::getClass() in /home/tree21/public_html/system/engine/front.php on line 65

Fatal error: Call to undefined method Exception::getClass()
Simply! You are calling a function which is not available
I assume it's OpenCart error. It might be seen after new extension is added or after OC version update as they recently changed some file paths.
The URL probably looks like:
http://example.com/index.php?route=exampleA/exampleB/exampleC
You need to correct the route. Start adding extension in front. It works in some cases.
The updated URL would be:
http://example.com/index.php?route=extension/exampleA/exampleB/exampleC
If that works fine, you need to correct path in your extension source. If not keep searching in documentation.
If you work with cart.php it was moved from system/library/cart.php to system/library/cart/cart.php together with some other files. Good luck and try to give us more details in the future.

turning on the dom_xml functionality on php 5

I am trying to implement an store locator using php and mysql and google maps
I have gone through this article "https://developers.google.com/maps/articles/phpsqlajax_v3 "
it says "Check your configuration or try initializing a domxml_new_doc() to determine if your server's PHP has dom_xml functionality on."
But apparantly mine is not on because it is giving me this error :
"Fatal error: Call to undefined function domxml_new_doc() in C:\wamp\www\StoreLocator\phpsqlajax_genxml.php on line 5"
I am using php 5, and I am not sure how I can turn it on.
Please help me with your opinions.
This question might help answer your problems.
Are you sure you want to go down the XML route and not the JSON one?

Mage_Checkout_Model_Mysql4_Setup' not found on magento

Fatal error: Class 'Mage_Checkout_Model_Mysql4_Setup' not found in /home/xxxxx/public_html/xxxxxx/includes/src/Mage_Core_Model_Resource_Setup.php on line 132
This is my magento site error when i am open front end and also backend. how did i am slove this error plz tel me any one
thanksenter code here
It looks like you are running Magento in 'compiled modus', but something went wrong. Have a look at /home/xxxxx/public_html/xxxxxx/includes/config.php. There are two define() statements in there. Comment them out and try again.

PHP script stops without error message (Which error type?)

a PHP script stops without an error message, if I change the signature of a method of a class, which implements a intereface, e.g.:
interface A
{
public function somefunction();
}
class B implements A
{
public function somefunction(XY $xy);
{
...
}
}
This is an error of course, but there is no error message shown.
What is the name of this error type? (I already searched a lot, but with the wrong phrases obviously)
How can I log or output this error?
I'm using PHP 5.3.1 (with XAMPP for Windows 1.7.3)
(I used Zend Debugger with PHP < 5.3 earlier, where those erros were shown in the Eclipse console, but now I'm using XDebug.)
Thanks in advance for any hint!
put at the top of file and then try,
<?php
ini_set('display_errors',1);
error_reporting(E_ALL);
?>
If you still getting no output, please check your error_log.
RESOLVED
#ontrack Thanks, your hint directed me to the right direction:
I'm using an autoload function to load required classes (by using spl_autoload_register()). My implemention of my autoloader restrains all error messages... I did not know, that this causes such 'deeper' errors not to show up.
This was at least kind of stupid from my side, but I'm more happy, that I found the reason for this problem and I have learned something :-)
Many thanks to all your contributions! And sorry again, that I cannot edit my initial question anymore.
#outis Thanks, please read my comment
Put the following at the top of your script:
error_reporting(E_ALL);
It should report an error.
Something must be up with your configuration. When I try the sample code under PHP 5.3.2+XDebug 2.1.0, PHP complains:
Fatal error: Declaration of B::somefunction() must be compatible with that of A::somefunction()
The type of error is a substitution violation, since a B can't be substituted for an A in all situations.

Categories