Armadillo Slim Application Error with PHP7.4

I just got the Slim Application Error when attempting to edit Armadillo(v 2.9.8) content. (see Below) It occurs with all of my sites, and I have not made any recent changes. Same result with different browsers on both Mac and Windows. Greg at Chillidog hosting suggested trying an earlier version of PHP, so I went from 7.4 to 5.6. Cpanel-> MultiPHP Manager → select sites to change-> select PHP Version from drop down-> Apply
Presto! I can now edit Armadillo content!!!
My knowledge of PHP is minimal, and I have no idea why this has worked. Perhaps others are having the same issue and can use this. Maybe some experts can suggest a more elegant solution that can continue to use the most current version of PHP.

Chuck

Slim Application Error

The application could not run because of the following error:

Details

Code: 8192

Message: Function get_magic_quotes_gpc() is deprecated

File: /home/waterfr1/public_html/rw_common/plugins/stacks/armadillo/Slim/Http/Util.php

Line: 56

Trace

#0 /home/waterfr1/public_html/rw_common/plugins/stacks/armadillo/Slim/Http/Util.php(56): Slim::handleErrors(8192, ‘Function get_ma…’, ‘/home/waterfr1/…’, 56, Array) #1 /home/waterfr1/public_html/rw_common/plugins/stacks/armadillo/Slim/Http/Request.php(225): Slim_Http_Util::stripSlashesIfMagicQuotes(Array) #2 /home/waterfr1/public_html/rw_common/plugins/stacks/armadillo/Slim/Middleware/MethodOverride.php(85): Slim_Http_Request->post(’_METHOD’) #3 /home/waterfr1/public_html/rw_common/plugins/stacks/armadillo/Slim/Middleware/PrettyExceptions.php(65): Slim_Middleware_MethodOverride->call() #4 /home/waterfr1/public_html/rw_common/plugins/stacks/armadillo/Slim/Slim.php(1097): Slim_Middleware_PrettyExceptions->call() #5 /home/waterfr1/public_html/rw_common/plugins/stacks/armadillo/index.php(1076): Slim->run() #6 {main}

This issue has been posted about quite a few times. Maybe one of these threads will be helpful for you:

https://forums.realmacsoftware.com/search?q=Slim%20Application%20Error

1 Like

Thanks. I did read through all the posts, but the actual cause and best solution were not very clear. I use Chillidog Hosting, as do many RW users. It seems that the Developer of Armadillo and Greg at Chillidog might be able to identify, or explain, what the ongoing issue is and what the best practice is in dealing with it. Rolling back the PHP version seems to work, but…

  1. Are there any unintended consequences of doing this?
  2. Is the version of PHP irrelevant to RW sites?
  3. What version should we roll back to?

Hopefully this topic can be be put to rest.

Chuck

1 Like

Something changed. If Armadillo worked before and you didn’t make any changes, then the hosting company did. Changing php versions counts as a change.

As David(@thang) points out, we have covered before this. I’ve had no problem running Armadillo with PHP 7.4 (DREAMHOST) and other are running it as well.

Perhaps @nimblehost could tell us what might cause this.

Yes, Going all the way back to 5.6 isn’t good. 5.6 hasn’t been supported for some time now. It hasn’t even had a security update in years. 7.3 just went out of Security fixes only, there won’t be anymore security patches.

I haven’t had any problems with Armadillo on 7.4 (Full support ended 28 Nov 2021, it’s getting security updates until 28 Nov 2022). Have tried without issue php8.0 and it worked for me in a limited test.

I know Jonathan(@nimblehost) has been working on a new Armadillo release.

My guess is there is something else going on in the php.ini files from one version of php to others. Chilidog (@barchard) and @nimblehost might shed some light here.

1 Like

To my understanding, this should cause just a warning in 7.4, not an error.

So, as it works for @teefers, I guess it’s a special setting in your PHP configuration that’s somehow turning this into an error instead just a warning.

1 Like

Every version of PHP will move functions from deprecated to removed. PHP 7.4 deprecated the function get_magic_quotes_gpc. More info here:

https://www.php.net/manual/en/function.get-magic-quotes-gpc.php

Developers have to handle this by either:

  1. adding @ to the function call to suppress errors
  2. adding try/catch or PHP version check
  3. overriding the error reporting

I’m glad PHP5.6 worked for you. As this was deprecated in 7.4, you can probably use up to 7.3 without issue. I recommend starting from a known, good working point and changing it one by one. Therefore, I’d next test PHP7.1, then 7.2 and finally 7.3.

-Greg

1 Like

Which should just generate a warning in the PHP log. If not, it wouldn’t work for @teefers
So I guess there is a setting in the PHP ini changing this default behavior.

Not necessarily. Nearly anything can be modified at runtime and handled differently.

Anyways, use up to 7.3 should be fine.

1 Like

And this is why I use Chillidog Hosting! Topic put to rest. Perhaps the next next version of Armadillo, which I use on every site, is able to sidestep this issue entirely.