Shows errors like below on your Joomla, Drupal or in any other php coded webpage.
Deprecated: Function ereg() is deprecated in …
Deprecated: Function split() is deprecated in …
Deprecated: Function set_magic_quotes_runtime() in …
…will add more…Please let me know if you find more.
Reason:
Those functions got replaced with alternate ones. (Sorry that I don’t know the reason behind that. May be the new ones might have some new features). Also I experienced this problem after upgrading PHP engine on my server.
Fix:
ereg() fix:
FTP the web server and open the file showing error, search for “ereg” and replace ereg(…) with mb_ereg(…). The syntax is same for both. (Try this and keep it if it works. It will work 90{88dc7f9385b2c8971f38421926506de3e3fc5e843c9520f0674d4b7de6ae62da} sure.)
split() fix:
FTP the web server and open the file showing error, search for “split” and replace split(…) with explode(…). (Same as above.)
set_magic_quotes_runtime() fix:
Replace the below line showing error
set_magic_quotes_runtime(0);
with below code
// Check if magic_quotes_runtime is active
if(get_magic_quotes_runtime())
{
// Deactivate
set_magic_quotes_runtime(false);
}
Note: More findings will be added to this post as and when I experience them. Please comment below if you had experienced and fixed any other deprecations.
Technology enthusiast Sherbaz is a Microsoft certified SQL Server Subject Matter Expert. He had fun automating day to day task to achieve management goals. He has extensive hands-on experience in high availability deployments and support with several years of industry experience performing SQL Server installations, configuration, maintenance, backups, performance tuning, Transactional & P2P replication, migration, high availability solutions (Always on, Failover Clustering, Logshipping and Mirroring) and Disaster recovery.
Sherbaz also has basic hands-on experience in other DBMSs like MongoDB, Oracle 9i, 10g, Sybase and MySQL. 1 year on Mongodb, Oracle 9i & 10g. Completed M102 & M202 courses in MongoDB.
Sherbaz spends his spare time with automation in electronics, embedded system circuits and IOT in his private lab at home.
Also, he supports his customers and users at www.SplitExpense.in for issues with app, website or telegram chat bot @SplitExpenseBot https://t.me/SplitExpenseBot. @TheSherBot https://t.me/TheSherBot is another telegram chat bot, partially artificial intelligent, programmed and maintained by him on python and backend Mongodb database.
Sherbaz always showed interest learning new technologies and to think out of the box bringing innovation in work. Some of his work is documented @ www.sherbaz.com.
He is now busy learning 3D modeling software on his roadmap towards building his next hobby build, A 3D PRINTER.
Subscribe to his youtube channel
https://www.youtube.com/c/SherbazMohamed/
View all posts by Sherbaz