rafetsucu Posted October 20, 2019 Share Posted October 20, 2019 (edited) I am trying to revive an old store setup based on prestashop 1.6. I checked all settings avd verified everything is fine. The store frontpage is up and running. Howevere admin page gives me the below error: Fatal error: Call to undefined function mysql_connect() in /home/.../classes/db/MySQL.php on line 37 I cannot connect to admin screens due to this error. It seems admin page is trying to use depreceated mysql_connect while front end is using mysqli. Only admin page is giving the error. mySQL, php works fine. I even changed store name and other text from database directly and they appear on frontpage correctly. So database connection works fine. I couldn't figure out why it does not only on admin page. Please help. Edited October 22, 2019 by rafetsucu (see edit history) Link to comment Share on other sites More sharing options...
rafetsucu Posted October 22, 2019 Author Share Posted October 22, 2019 I didn't quite get it. How does it help? I can see error log. Admin page is trying to use depreceated mysql function while frontpage works fine. Link to comment Share on other sites More sharing options...
musicmaster Posted October 23, 2019 Share Posted October 23, 2019 Looks like a very old version. PHP stopped supporting mysql_connect() long ago. It is now mysqli_connect() with a slightly different syntax. Link to comment Share on other sites More sharing options...
rafetsucu Posted October 23, 2019 Author Share Posted October 23, 2019 Nope. It is not. presta code has msyqli in it and front store works fine. It's only admin page giving the error. Why is everybody is jumping to an easy conclusion without getting this difference I repeatedly mention. Why the frontstore pages use mysqli but admin link insistes on old mysql? I cannot even see anything but direct error. Link to comment Share on other sites More sharing options...
musicmaster Posted October 24, 2019 Share Posted October 24, 2019 Please stop complaining and learn the basics about reporting an error: - you don't mention either your Prestashop version or your PHP version. Absolutely basic! - neither do you mention anything about the shop. Quite likely it is old, has some special theme and many special modules. We don't know. - there are thousands of ways to find what causes the error: enabling debug (development) mode, looking in the error log of the server, doing what GeorgT advised (you don't even bother to look inside the csv file) or just doing a text search in the Prestashop code for "mysql_". - often errors are caused by either code customizations or third party modules. The only way to know that is to know were the error came from (see previous point). Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now