PHP (fatal error : cannot redeclare) when installing ZenCart Module?
I am installing a payment module in zencart… but keep getting an error with the php code… the error says:
Fatal error: Cannot redeclare class pj in /…/includes/modules/payment/pj.php on line 433
# function keys() {
# return array(‘MODULE_PAYMENT_PJ_STATUS’, ‘MODULE_PAYMENT_PJ_COLLECT_CVV’, ‘MODULE_PAYMENT_PJ_EMAIL’, ‘MODULE_PAYMENT_PJ_ZONE’, ‘MODULE_PAYMENT_PJ_ORDER_STATUS_ID’, ‘MODULE_PAYMENT_PJ_SORT_ORDER’);
# }
# }
# ?>
Can anyone help?
Related posts:
- I am trying to install zencart on awardspace and I get the following error when index.php trys to run?
- What Zencart Integration Does for You
- ZenCart – Adding Attributes
- I have a ZENCart Database SQL Question?
- Anyone used osCommerce, zencart or cubecart?

It means that somewhere in zencart they have defined a class called “pj”. This module you are trying to install has also created a “pj” declaration (or trying to reinclude it) and the two are conflicting.
It would be like you creating a class called “Car” and defining what makes up a car. Then later you include a file that also defines a “Car” class with different functionality. How is PHP suppose to know which Car class to use when it sees two different versions?
So look for a place where pj.php might be included more than once. I am not sure what you are showing there was line 433 or not but that appears to have nothing to do with the error.
Hope you find the problem given this new information.