Footer is not loading

hello, why on page footer is not loading
http://agrocatalog.freecluster.eu/

but on page
http://agrocatalog.freecluster.eu/contacts
footer is load

Fatal error terminates rest of the code/file that’s why it fails to load the footer:

Warning: Trying to access array offset on value of type null in /home/vol10_2/epizy.com/epiz_32240059/htdocs/view/Theme/home.php on line 24

Fatal error: Uncaught mysqli_sql_exception: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1 in /home/vol10_2/epizy.com/epiz_32240059/htdocs/libs/db.php:21 Stack trace: #0 /home/vol10_2/epizy.com/epiz_32240059/htdocs/libs/db.php(21): mysqli->query('SELECT * FROM `...') #1 /home/vol10_2/epizy.com/epiz_32240059/htdocs/libs/functions.php(13): selectOne('SELECT * FROM `...') #2 /home/vol10_2/epizy.com/epiz_32240059/htdocs/view/Theme/home.php(24): getCategory(NULL) #3 /home/vol10_2/epizy.com/epiz_32240059/htdocs/controllers/view.php(7): include('/home/vol10_2/e...') #4 /home/vol10_2/epizy.com/epiz_32240059/htdocs/controllers/home.php(18): getContent('home', '\xD0\x9F\xD0\xBE\xD1\x81\xD0\xBB\xD0\xB5\xD0\xB4\xD0\xBD\xD0...', Array) #5 /home/vol10_2/epizy.com/epiz_32240059/htdocs/router.php(5): include('/home/vol10_2/e...') #6 /home/vol10_2/epizy.com/epiz_32240059/htdocs/index.php(10): include('/home/vol10_2/e...') #7 {main} thrown in /home/vol10_2/epizy.com/epiz_32240059/htdocs/libs/db.php on line 21
4 Likes

my code work on openserver
problem can be in PHP version
7 vs 8.2

You should set up your local dev environment to match the server software.

There is no way to change the PHP version unless you upgrade to premium hosting.

4 Likes

Hosting Outages (For PHP Upgrade)

We are now rolling out PHP upgrade on all hosting volumes, and you may experience some issues with loading your site and accessing your files during this upgrade.

Don’t worry! Our servers are getting upgraded to PHP 8.2 and unavailable websites and files will be available again soon!

Because it works there doesn’t mean it will work here as well, you need to modify the code a little bit based on the server configuration.

4 Likes

fixed. problem was not in my code. problem was that in database one record have cat_id = 0

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.