Two Mysqli problems and their easy fixes
Having problems with Mysqli? Try doing these (which may or may not help you). If you’re on a shared host, you may have to talk to your hosting provider, or you may want to get a web host that offers VPS or dedicated server hosting.
- Set zend.ze1_compatibility_mode = Off. You’ll need access to your php.ini file to do this. If you’re receiving a cloning error (“Trying to clone an uncloneable object of class mysqli”) when trying to create an instance of mysqli, try this.
- Check your MySQL configuration file (mysql.cnf, my.cnf, or the like) and use the socket specified there. By default, mysqli will attempt to connect through /tmp/mysql.sock. If your socket path is not /tmp/mysql.sock, the connection will fail.
Comments are closed.















