caution209 Posted January 2, 2023 Posted January 2, 2023 Hi,  We recently updated our server from PHP7.4 to PHP8.1, and then updated our website to IPS 4.7.5 using the manual way (get files from Client Area, upload them, and then run the upgrader), the upgrade ran successfully, but our website is broken.  The default theme just shows a blank screen, and adding any new theme from the Marketplace only loads the text (so I guess the CSS isn't loading for new themes). The Admin CP works perfectly fine, so I've disabled all applications and plugins, used the "Please also try disabling any third party customizations." functionality to disable all modifications, cleared system cache multiple times, etc. But nothing seems to help.  I reinstalled a clean IPS version on the same server to test, and that clean installation does not have this problem, so I don't think it's a PHP issue. Our DEV environment (on a separate server) also functions perfectly, and we did the same steps there.  What could be the cause, and what's a possible fix? I've updated the Client Area with the connection details in case the support team wants to take a look.  Thanks in advance!
Jim M Posted January 2, 2023 Posted January 2, 2023 A blank white page with the body not loading like that is indicative of a suppressed PHP error. Please check your server error logs and let us know the error.
caution209 Posted January 2, 2023 Author Posted January 2, 2023 Found an error in the apache log (though this is the first time an error is being thrown by apache) AH01071: Got error 'PHP message: PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 41312952 bytes) in /var/www/public_invision/system/Theme/Theme.php(885) : eval()'d code on line 490', referer: https://mywebsite.com/admin/?app=core&module=support&controller=systemLogs&do=fileLogs And IPS's logs also has a theme related error: TypeError: usort(): Argument #1 ($array) must be of type array, IPS\Patterns\ActiveRecordIterator given (0) #0 /var/www/public_invision/applications/cms/sources/Theme/Theme.php(610) : eval()'d code(194): usort() #1 /var/www/public_invision/applications/cms/modules/front/database/index.php(142): IPS\Theme\class_cms_database_ServersPage->index() #2 /var/www/public_invision/applications/cms/modules/front/database/index.php(51): IPS\cms\modules\front\database\_index->view() #3 /var/www/public_invision/system/Dispatcher/Controller.php(118): IPS\cms\modules\front\database\_index->manage() #4 /var/www/public_invision/applications/cms/sources/Databases/Dispatcher.php(343): IPS\Dispatcher\_Controller->execute() #5 /var/www/public_invision/system/Theme/Theme.php(4628) : eval()'d code(9): IPS\cms\Databases\_Dispatcher->run() #6 /var/www/public_invision/applications/cms/sources/Pages/Page.php(1250): IPS\Theme\content_pages_14() #7 /var/www/public_invision/applications/cms/sources/Pages/Page.php(2276): IPS\cms\Pages\_Page->getHtmlContent() #8 /var/www/public_invision/applications/cms/modules/front/pages/page.php(116): IPS\cms\Pages\_Page->output() #9 /var/www/public_invision/applications/cms/modules/front/pages/page.php(43): IPS\cms\modules\front\pages\_page->view() #10 /var/www/public_invision/system/Dispatcher/Controller.php(118): IPS\cms\modules\front\pages\_page->manage() #11 /var/www/public_invision/applications/cms/modules/front/pages/page.php(33): IPS\Dispatcher\_Controller->execute() #12 /var/www/public_invision/system/Dispatcher/Dispatcher.php(153): IPS\cms\modules\front\pages\_page->execute() #13 /var/www/public_invision/index.php(13): IPS\_Dispatcher->run() #14 {main} Â
Jim M Posted January 2, 2023 Posted January 2, 2023 First one, you will want to increase your memory limit in PHP are you are attempting to use more than you’re allowing. If you use a custom theme with or third party addons this typically happens but also can happen if you have background tasks going that are resource intensive and running via traffic.Â
caution209 Posted January 2, 2023 Author Posted January 2, 2023 10 minutes ago, Jim M said: First one, you will want to increase your memory limit in PHP are you are attempting to use more than you’re allowing. If you use a custom theme with or third party addons this typically happens but also can happen if you have background tasks going that are resource intensive and running via traffic. It's currently set to 128M, so I increased it to 256M to test. I've restarted the server, no errors until now, but the theme issue is still present.
Jim M Posted January 2, 2023 Posted January 2, 2023 There are a few applications/plugins installed which are not PHP 8 compatible and may still be creating issues, please ensure these are upgraded to a compatible version or uninstalled.
caution209 Posted January 2, 2023 Author Posted January 2, 2023 (edited) 1 hour ago, Jim M said: There are a few applications/plugins installed which are not PHP 8 compatible and may still be creating issues, please ensure these are upgraded to a compatible version or uninstalled. I have deleted the applications and plugins that were incompatible with PHP 8, but sadly that did not fix the issue. After the deletion I also cleared the system cache. And no new errors have occurred for PHP since last time. Edited January 2, 2023 by William Barbour Clarification
caution209 Posted January 2, 2023 Author Posted January 2, 2023 I went ahead and deleted all applications and plugins one by one to test. They're all deleted, and the issue is still there.
Marc Posted January 3, 2023 Posted January 3, 2023 Have you ensured you are using only a default pages template? It looks like one of your pages templates causing you issues, based on the error caution209 1
caution209 Posted January 3, 2023 Author Posted January 3, 2023 6 hours ago, Marc Stridgen said: Have you ensured you are using only a default pages template? It looks like one of your pages templates causing you issues, based on the error We've undone all customizations we have on templates, but the issue of the white IPS Default theme persists.
Marc Posted January 3, 2023 Posted January 3, 2023 This does not appear to be true of your database templates (not your theme templates), which is where the error is coming from.
caution209 Posted January 3, 2023 Author Posted January 3, 2023 15 minutes ago, Marc Stridgen said: This does not appear to be true of your database templates (not your theme templates), which is where the error is coming from. I went ahead and deleted all custom templates, and also just went ahead and deleted all our pages, blocks, databases, etc. There is as far as I know no more custom content on the website anymore (other than the 2 themes), but the IPS Default theme still shows a white page.
Jim M Posted January 3, 2023 Posted January 3, 2023 Has there been a change in the server error being reported in your server's error logs?
caution209 Posted January 3, 2023 Author Posted January 3, 2023 1 minute ago, Jim M said: Has there been a change in the server error being reported in your server's error logs? No new errors in the system after removing everything, and Apache also has no errors.
Solution Jim M Posted January 3, 2023 Solution Posted January 3, 2023 Your Google Analytics script had an open double quote so anything on the page for some reason there was getting hidden. I have emailed you the script as it contains some sensitive info. Please ensure that you copy these directly from their providers as it can create issues if you do not. The particular Pages issue you mentioned in your quoted error has not been triggered since yesterday so that has been resolved with removing these customized Pages templates. caution209 and SeNioR- 1 1
caution209 Posted January 3, 2023 Author Posted January 3, 2023 6 minutes ago, Jim M said: Your Google Analytics script had an open double quote so anything on the page for some reason there was getting hidden. I have emailed you the script as it contains some sensitive info. Please ensure that you copy these directly from their providers as it can create issues if you do not. The website indeed works again! I have no clue how that src lost its ending quote, but I'm glad you found that! Thanks @Jim M and @Marc Stridgen for your time to get this resolved! Marc 1
Jim M Posted January 3, 2023 Posted January 3, 2023 You're very welcome. Glad we could be of assistance here 🙂 .
Recommended Posts