- Posts: 206
- Thank you received: 7
Error on update to 6.5
4 months 6 days ago #372308
by c-line
Error on update to 6.5 was created by c-line
-- HikaShop version -- : 6.5
-- Joomla version -- : 6.1.1
-- PHP version -- : 8.3
-- Error-message(debug-mod must be tuned on) -- : Error: Cannot redeclare com_install() (previously declared in /home/heleyupu/public_html/tmp/hika/install.hikashop.php:27)
Symfony\Component\ErrorHandler\Error\
FatalError
Show exception properties
in /home/heleyupu/public_html/administrator/components/com_payzen/script.install.php (line 40)
}}// Joomla 1.5.if (function_exists('com_install')) { function com_install() { $installClass = new com_payzenInstallerScript(); $installClass->install(); }}
hello i have a problem on update to 6.5
i have this error
thanks for any help
-- Joomla version -- : 6.1.1
-- PHP version -- : 8.3
-- Error-message(debug-mod must be tuned on) -- : Error: Cannot redeclare com_install() (previously declared in /home/heleyupu/public_html/tmp/hika/install.hikashop.php:27)
Symfony\Component\ErrorHandler\Error\
FatalError
Show exception properties
in /home/heleyupu/public_html/administrator/components/com_payzen/script.install.php (line 40)
}}// Joomla 1.5.if (function_exists('com_install')) { function com_install() { $installClass = new com_payzenInstallerScript(); $installClass->install(); }}
hello i have a problem on update to 6.5
i have this error
This message contains confidential information
thanks for any help
Please Log in or Create an account to join the conversation.
4 months 6 days ago #372311
by nicolas
Replied by nicolas on topic Error on update to 6.5
Hi,
This is a bug in the PayZen component (com_payzen), not in HikaShop. The HikaShop update is only what brings it to the surface.
The fatal error comes from this file on your site:
administrator/components/com_payzen/script.install.php
Around line 38 it has the old Joomla 1.5 installer function with a reversed test:
This declares com_install() only when a function of that name already exists, which is exactly the case where it must not declare it again. HikaShop's installer defines its own com_install() (correctly guarded with !function_exists), so during the update both files are loaded in the same request, PayZen's reversed test passes, and PHP stops with "Cannot redeclare com_install()".
The fix is to add the missing ! so the function is declared only when it does not already exist:
Edit that single line, then run the HikaShop update again and it will complete normally. It is also worth reporting this to the PayZen / Lyra team so they correct it in their component, or updating com_payzen if a newer version is available.
I'll send them a message about it. I would recommend you do the same.
We'll also look at changing the code of HikaShop on our end for the next version so that this cannot happen even with this faulty code in place.
This is a bug in the PayZen component (com_payzen), not in HikaShop. The HikaShop update is only what brings it to the surface.
The fatal error comes from this file on your site:
administrator/components/com_payzen/script.install.php
Around line 38 it has the old Joomla 1.5 installer function with a reversed test:
Code:
if (function_exists('com_install')) {
function com_install() {
...
}
}
This declares com_install() only when a function of that name already exists, which is exactly the case where it must not declare it again. HikaShop's installer defines its own com_install() (correctly guarded with !function_exists), so during the update both files are loaded in the same request, PayZen's reversed test passes, and PHP stops with "Cannot redeclare com_install()".
The fix is to add the missing ! so the function is declared only when it does not already exist:
Code:
if (!function_exists('com_install')) {
function com_install() {
...
}
}
Edit that single line, then run the HikaShop update again and it will complete normally. It is also worth reporting this to the PayZen / Lyra team so they correct it in their component, or updating com_payzen if a newer version is available.
I'll send them a message about it. I would recommend you do the same.
We'll also look at changing the code of HikaShop on our end for the next version so that this cannot happen even with this faulty code in place.
Please Log in or Create an account to join the conversation.
4 months 6 days ago #372312
by c-line
Replied by c-line on topic Error on update to 6.5
thanks for your prompt support ! that works
Please Log in or Create an account to join the conversation.
Less
More
- Posts: 2
- Thank you received: 1
2 months 3 weeks ago #372924
by pole.cms.lyra
Replied by pole.cms.lyra on topic Error on update to 6.5
Hi,
A new version of PayZen component has been released, it fixes the problem reported on this thread, and other compatibility issues with Joomla 6.x.
The new version can be downloaded on the following link: github.com/lyra/plugin-hikashop/releases...p_2.x-6.x_v2.2.0.zip .
Best regards.
A new version of PayZen component has been released, it fixes the problem reported on this thread, and other compatibility issues with Joomla 6.x.
The new version can be downloaded on the following link: github.com/lyra/plugin-hikashop/releases...p_2.x-6.x_v2.2.0.zip .
Best regards.
The following user(s) said Thank You: nicolas
Please Log in or Create an account to join the conversation.
Time to create page: 0.213 seconds