Support

Admin Tools

#36700 0 in_array(): Argument #2 ($haystack) must be of type array, string given

Posted in ‘Admin Tools for Joomla! 4 & 5’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Environment Information

Joomla! version
n/a
PHP version
n/a
Admin Tools version
n/a

Latest post by on Saturday, 02 April 2022 20:17 CDT

Richard_Wylde

Nicholas

 

I hope I am not being stupid etc (TRFM etc).... you have been very kind with advice abour Wordpress inthe past (don't)

Moving a Joomla 4 development site to a simple hosting at Fasthost, I got the site across with your Backup software and it work for a while. 

I now have problem sith EasyBlog - not appearing on the main site  - perhaps with a failed Eastbolf update (>20MB)

 

Contrast

http://1115345410.test.prositehosting.co.uk/

with the live site

www.terahertz.co.uk

 

but - more importantly

 

can't  get into the back end (see jpg)

 

An error has occurred.  
0 in_array(): Argument #2 ($haystack) must be of type array, string given

 

which I can reference back here

 

https://www.akeeba.com/support/admin-tools/Ticket/35921:an-error-has-occurred-0-in-array-argument-2-haystack-must-be-of-type-array-string-given.html

 

What am I doing wrong? 

 

Inpassing, where is main.php now?

 

Richard

 

Dr Ricyard Wylde

 

Richard_Wylde

Partial Mea Culpa

 

Go back into the site .... with setting provider-disabled etc

 

But the basic problem remains....Any ideas?

 

Richard

nicholas
Akeeba Staff
Manager

This message doesn't say much more than "something on your site broke because PHP 8 is being anal retentive about variable types". It doesn't tell us what broken.

So, as a minimum, if you can downgrade your site to PHP 7.4 it would let you access it. If you're happy with that solution stop here.

If you want to find out what broke you need to edit your configuration.php file and set

public $debug = true;

in the corresponding line of that file. You will now get a more detailed message which will tell you which file and line threw that error as well as the call stack (how we got here). If you can't figure it out, copy and paste that information to your next reply.

As for main.php *cough cough* you found it out yourself :D For those who didn't, it's here: https://www.akeeba.com/documentation/admin-tools-joomla/atwafissues.html You now rename the file services/provider.php file.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

Richard_Wylde

Thanks, Nicholas.

I hope Fixing EasyBlog will fix this .... am pestering them

Any ideas how to increase the upload limit.... on a host which I don't think gives access to php.ini

Richard

 

 

nicholas
Akeeba Staff
Manager

You need to ask your host.

On hosts using mod_php (the Apache module, very archaic way of doing things) you can use .htaccess code to set some PHP limits, including the post_max_size and upload_max_filesize. You can also create php.ini files in the site's web root and the administrator folder, unless it's been explicitly disabled by the host.

On hosts using CGI, FastCGI or PHP-FPM you can typically create a .user.ini file in your site's web root. Just note that your changes there apply after ~5 minutes (it's cached by PHP) and only if it's not disabled by the host.

That said, most hosts have a subset of the PHP configuration available for editing through the hosting interface. cPanel-based hosts typically have cPanel's EasyPHP which does offer a modicum of configuration options, definitely the two aforementioned options.

I have yet to see a commercial host which does not allow any change whatsoever. That's the kind of things we'd do on a server we are explicitly locking down. This is diametrically opposite to commercial hosting :)

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

Richard_Wylde

Nicholas

Sorry to return to this issue..... I have, I think, got FASTHOST to give mofe debugging info..... as attached

This is, as you might guess, a bit beyond me........  and aperas  when  provider.php is active, but not when it is disabled

Ideas? what am I doing wrong?

Richard

 

 

 

nicholas
Akeeba Staff
Manager

Go to the backend of your site, Components, Admin Tools, Web Application Firewall, Configure WAF, click on Save & Close.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

System Task
system
This ticket has been automatically closed. All tickets which have been inactive for a long time are automatically closed. If you believe that this ticket was closed in error, please contact us.

Support Information

Working hours: We are open Monday to Friday, 9am to 7pm Cyprus timezone (EET / EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets outside of our working hours, but we cannot respond to them until we're back at the office.

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. Thank you for your understanding and for helping us help you!