Indexhibit
Index + Exhibit

Login:

Created by
Daniel Eatock
Jeffery Vaska
And You

Indexhibit was updated to version 2.1.4 on April 10, 2017.

deprecated constructor in index.php

 

Indexhibit version: 2.0
Thread is not resolved.

katinka
UNITED KINGDOM
11 month(s) ago
Permalink Post

Hi Vaska,

I've just upgraded to v2.1.4 and everything is running smoothly as far as I can see - thank you a thousand times for all your hard work on this!!

However, when I open my website now I get this at the top of the website (and subsequently on every subpage of the menu)

my site is

anne-schwarz.com">anne-schwarz.com

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; Index has a deprecated constructor in /home2/anneschw/public_html/ndxzsite/plugin/plugin.index.php on line 12

Warning: Cannot modify header information - headers already sent by (output started at /home2/anneschw/public_html/ndxzsite/plugin/plugin.index.php:12) in /home2/anneschw/public_html/index.php on line 166

when I refresh the page this message disappears. And comes back when I empty the cache.

It's pretty clear that this is a PHP related problem and it doesn't impact the functionality of my site but is there anything I can change/add in the index.php to resolve this?

Vaska A
UNITED STATES
11 month(s) ago
Permalink Post

Those aren't critical, but they are annoying.

I have Indexhibit setup to suppress error messages like this but I think your host has something overriding in the php_ini. You *might* be able to handle this via the .htaccess file but I'm not sure. Ask your host what your options are...

The notice (which is not an error) is telling you that code needs to be updated in the future - but I can't change this because right now it has backwards capability.

Vaska A
UNITED STATES
11 month(s) ago
Permalink Post

You might be able to put this in your index.php file on line 5 after error_reporting...

ini_set('display_errors', 'Off');

Let me know if it works.

katinka
UNITED KINGDOM
11 month(s) ago
Permalink Post

Thanks Vaska, issue resolved.
I just realised that there was still an old htaccess file floating around in the public_html after my host had upgraded me to PHP7. Got rid of it and now it's all working perfectly.

katinka
UNITED KINGDOM
11 month(s) ago
Permalink Post

Update: it wasn't the htaccess file.

However, putting that line of code in the index.php did the trick, by the looks of it.

Vaska A
UNITED STATES
11 month(s) ago
Permalink Post

Ok. Thanks for doing that...now I'll add that to our code. ;)

 

Only purchasers of Indexhibit are able to post in the forum.