mysql_insert_id is undefined function

Fatal error: Uncaught Error: Call to undefined function mysql_insert_id() in /usr/www/taskforce13tsw/501st/e107/e107_plugins/calendar_menu/event.php:163 Stack trace: #0 {main} thrown in /usr/www/taskforce13tsw/501st/e107/e107_plugins/calendar_menu/event.php on line 163


Went to add an new event, got this message instead - used to work, but I guess something changed.

e107 version e107 2.1.7

tgtje commented Nov 15, 2017

Yow 5 years file untouched... extension was deprecated in PHP 5.5.0, and it was removed in PHP 7.0.0 No solution, but hat might be it... (if you are up to it : 1 of these 2 : mysqli_insert_id() or PDO::lastInsertId() No clue iff it will work....

LaocheXe commented Nov 15, 2017

Odd cause a few months ago it was working, must be my host provider updated the PHP to 7.... I'm gonna try the PDO and see if that works.


Fatal error: Uncaught Error: Non-static method PDO::lastInsertId() cannot be called statically in /usr/www/taskforce13tsw/501st/e107/e107_plugins/calendar_menu/event.php:164 Stack trace: #0 {main} thrown in /usr/www/taskforce13tsw/501st/e107/e107_plugins/calendar_menu/event.php on line 164


mysqli_insert_id() seems to work - no Fatal Error - funny part is, even with the errors, the events still got added to the database.

Jimako commented Nov 16, 2017

rica-carv has working on new version, has updated this plugin
closed with the note: tgtje provided the anwser.

e107 Q&A is a Question and Answer platform where e107 users can ask questions themselves and answer each others questions. By doing so users can earn badges and points and become e107 experts.

This community platform is a valuable tool for sharing and gaining knowledge on e107. Go ahead and find out yourself!

Connect with us