Hello,
Phoca Download 4.0.5 works fine for me with PHP 7. But as Joomla recommends to upgrade to PHP 8 I tried it, but get errors with Phoca Download. In order to have a clean test environment for this issue, I installed xampp with PHP 8.1.12 and tried it there - same problem. In backend I can open Phoca Download Control Panel. But when I switch to Files I get:
An error has occurred.
0 hash(): Argument #2 ($data) must be of type string, array given
When I try to download a file in fronteend I get:
0 - hash(): Argument #2 ($data) must be of type string, array given
You may not be able to visit this page because of:
an out-of-date bookmark/favourite
a search engine that has an out-of-date listing for this site
a mistyped address
you have no access to this page
The requested resource was not found.
An error has occurred while processing your request.
Please try one of the following pages:
Home Page
If difficulties persist, please contact the website administrator and report the error below.
hash(): Argument #2 ($data) must be of type string, array given
What needs to be done to solve this problem?
Error in backend and frontend Phoca Download 4.0.5 PHP 8.1
-
- Phoca Newbie
- Posts: 9
- Joined: 11 Apr 2022, 12:30
- Jan
- Phoca Hero
- Posts: 48535
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Error in backend and frontend Phoca Download 4.0.5 PHP 8.1
Hi, can you enable debug mode and paste here the full messages (including file and line where the problem occurs)?
Do you get the same problems with latest Beta?
https://github.com/PhocaCz/PhocaDownloa ... 6Beta2.zip
Jan
Do you get the same problems with latest Beta?
https://github.com/PhocaCz/PhocaDownloa ... 6Beta2.zip
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Newbie
- Posts: 9
- Joined: 11 Apr 2022, 12:30
Re: Error in backend and frontend Phoca Download 4.0.5 PHP 8.1
Sorry for the late response.
I tried 6Beta2, same error. Here the message with Debug enabled:
0 - hash(): Argument #2 ($data) must be of type string, array given
You may not be able to visit this page because of:
an out-of-date bookmark/favourite
a search engine that has an out-of-date listing for this site
a mistyped address
you have no access to this page
The requested resource was not found.
An error has occurred while processing your request.
Please try one of the following pages:
Home Page
If difficulties persist, please contact the website administrator and report the error below.
hash(): Argument #2 ($data) must be of type string, array given
D:\xampp-qic-php81\htdocs\plugins\system\httpheader\httpheader.php:131
Call stack
# Function Location
1 () JROOT\plugins\system\httpheader\httpheader.php:131
2 hash() JROOT\plugins\system\httpheader\httpheader.php:131
3 PlgSystemHttpHeader->onAfterRender() JROOT\libraries\src\Plugin\CMSPlugin.php:279
4 Joomla\CMS\Plugin\CMSPlugin->Joomla\CMS\Plugin\{closure}() JROOT\libraries\vendor\joomla\event\src\Dispatcher.php:486
5 Joomla\Event\Dispatcher->dispatch() JROOT\libraries\src\Application\EventAware.php:107
6 Joomla\CMS\Application\WebApplication->triggerEvent() JROOT\libraries\src\Application\CMSApplication.php:1023
7 Joomla\CMS\Application\CMSApplication->render() JROOT\libraries\src\Application\SiteApplication.php:722
8 Joomla\CMS\Application\SiteApplication->render() JROOT\libraries\src\Application\CMSApplication.php:299
9 Joomla\CMS\Application\CMSApplication->execute() JROOT\includes\app.php:61
10 require_once() JROOT\index.php:32
I tried 6Beta2, same error. Here the message with Debug enabled:
0 - hash(): Argument #2 ($data) must be of type string, array given
You may not be able to visit this page because of:
an out-of-date bookmark/favourite
a search engine that has an out-of-date listing for this site
a mistyped address
you have no access to this page
The requested resource was not found.
An error has occurred while processing your request.
Please try one of the following pages:
Home Page
If difficulties persist, please contact the website administrator and report the error below.
hash(): Argument #2 ($data) must be of type string, array given
D:\xampp-qic-php81\htdocs\plugins\system\httpheader\httpheader.php:131
Call stack
# Function Location
1 () JROOT\plugins\system\httpheader\httpheader.php:131
2 hash() JROOT\plugins\system\httpheader\httpheader.php:131
3 PlgSystemHttpHeader->onAfterRender() JROOT\libraries\src\Plugin\CMSPlugin.php:279
4 Joomla\CMS\Plugin\CMSPlugin->Joomla\CMS\Plugin\{closure}() JROOT\libraries\vendor\joomla\event\src\Dispatcher.php:486
5 Joomla\Event\Dispatcher->dispatch() JROOT\libraries\src\Application\EventAware.php:107
6 Joomla\CMS\Application\WebApplication->triggerEvent() JROOT\libraries\src\Application\CMSApplication.php:1023
7 Joomla\CMS\Application\CMSApplication->render() JROOT\libraries\src\Application\SiteApplication.php:722
8 Joomla\CMS\Application\SiteApplication->render() JROOT\libraries\src\Application\CMSApplication.php:299
9 Joomla\CMS\Application\CMSApplication->execute() JROOT\includes\app.php:61
10 require_once() JROOT\index.php:32
- Jan
- Phoca Hero
- Posts: 48535
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Error in backend and frontend Phoca Download 4.0.5 PHP 8.1
Hi, I don't see any error in Phoca Download but in system plugin httpheader - on line 131 ![Idea :idea:](./images/smilies/icon_idea.gif)
Jan
![Idea :idea:](./images/smilies/icon_idea.gif)
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Newbie
- Posts: 9
- Joined: 11 Apr 2022, 12:30
Re: Error in backend and frontend Phoca Download 4.0.5 PHP 8.1
I solved it. Found a hint here: https://issues.joomla.org/tracker/joomla-cms/39862
But instead of disabling "System - HTTPHeader", I had to enable it and disable the other one.
But instead of disabling "System - HTTPHeader", I had to enable it and disable the other one.
-
- Phoca Newbie
- Posts: 1
- Joined: 25 Mar 2023, 22:58
Re: Error in backend and frontend Phoca Download 4.0.5 PHP 8.1
This site, soroebridgeklub.dk, running 3.10.11 and PHP 8.1, has the same kind of error, though I fail to find any references to any System - HTTPHeader. The error msg is also different. Here is what I see when trying to open Phoca Download -> Control Panel:
An error has occurred.
0 Cannot access offset of type string on string
/home/soroebridge/public_html/administrator/components/com_phocadownload/libraries/phocadownload/utils/utils.php:38
Call stack
# Function Location
1 () JROOT/administrator/components/com_phocadownload/libraries/phocadownload/utils/utils.php:38
2 PhocaDownloadUtils::getExtensionVersion() JROOT/administrator/components/com_phocadownload/views/phocadownloadcp/view.html.php:39
3 PhocaDownloadCpViewPhocaDownloadCp->display() JROOT/libraries/src/MVC/Controller/BaseController.php:664
4 Joomla\CMS\MVC\Controller\BaseController->display() JROOT/administrator/components/com_phocadownload/controller.php:53
5 PhocadownloadCpController->display() JROOT/libraries/src/MVC/Controller/BaseController.php:702
6 Joomla\CMS\MVC\Controller\BaseController->execute() JROOT/administrator/components/com_phocadownload/phocadownload.php:40
7 require_once() JROOT/libraries/src/Component/ComponentHelper.php:402
8 Joomla\CMS\Component\ComponentHelper::executeComponent() JROOT/libraries/src/Component/ComponentHelper.php:377
9 Joomla\CMS\Component\ComponentHelper::renderComponent() JROOT/libraries/src/Application/AdministratorApplication.php:101
10 Joomla\CMS\Application\AdministratorApplication->dispatch() JROOT/libraries/src/Application/AdministratorApplication.php:159
11 Joomla\CMS\Application\AdministratorApplication->doExecute() JROOT/libraries/src/Application/CMSApplication.php:225
12 Joomla\CMS\Application\CMSApplication->execute() JROOT/administrator/index.php:51
An error has occurred.
0 Cannot access offset of type string on string
/home/soroebridge/public_html/administrator/components/com_phocadownload/libraries/phocadownload/utils/utils.php:38
Call stack
# Function Location
1 () JROOT/administrator/components/com_phocadownload/libraries/phocadownload/utils/utils.php:38
2 PhocaDownloadUtils::getExtensionVersion() JROOT/administrator/components/com_phocadownload/views/phocadownloadcp/view.html.php:39
3 PhocaDownloadCpViewPhocaDownloadCp->display() JROOT/libraries/src/MVC/Controller/BaseController.php:664
4 Joomla\CMS\MVC\Controller\BaseController->display() JROOT/administrator/components/com_phocadownload/controller.php:53
5 PhocadownloadCpController->display() JROOT/libraries/src/MVC/Controller/BaseController.php:702
6 Joomla\CMS\MVC\Controller\BaseController->execute() JROOT/administrator/components/com_phocadownload/phocadownload.php:40
7 require_once() JROOT/libraries/src/Component/ComponentHelper.php:402
8 Joomla\CMS\Component\ComponentHelper::executeComponent() JROOT/libraries/src/Component/ComponentHelper.php:377
9 Joomla\CMS\Component\ComponentHelper::renderComponent() JROOT/libraries/src/Application/AdministratorApplication.php:101
10 Joomla\CMS\Application\AdministratorApplication->dispatch() JROOT/libraries/src/Application/AdministratorApplication.php:159
11 Joomla\CMS\Application\AdministratorApplication->doExecute() JROOT/libraries/src/Application/CMSApplication.php:225
12 Joomla\CMS\Application\CMSApplication->execute() JROOT/administrator/index.php:51
- Benno
- Phoca Hero
- Posts: 9606
- Joined: 04 Dec 2008, 11:58
- Location: Germany
- Contact:
Re: Error in backend and frontend Phoca Download 4.0.5 PHP 8.1
@ hamsel,
Update to current Joomla! 4 & Phoca Download 4.0.6
Benno
Current version of Phoca Download for Joomla! 3 is v3.2.3 and it's not ready for PHP 8.13.10.11 and PHP 8.1
Update to current Joomla! 4 & Phoca Download 4.0.6
Kind regards,Changelog:
Ready for Joomla 4.2
Ready for PHP 8.2
Benno