Title: Database connection error
Last modified: August 21, 2016

---

# Database connection error

 *  [Jackson Dirua](https://wordpress.org/support/users/jackson-dirua/)
 * (@jackson-dirua)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/database-connection-error-32/)
 * Hi, i’m totally new to WordPress but totally impressed with this product. After
   trying out couple of plugins I came with this amazing WP Online Store plugin 
   but I could get the most of it as I am encountering this error;
 * “Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed
   in the future: use mysqli or PDO instead in C:\wamp\www\kinatoeapom\wp-content\
   plugins\wp-online-store\admin\includes\functions\database.php on line 19”
 * I get error messages also on pages that I insert the plugin’s shortcode. I google
   this but most of the explanation is quite technical. As far as I understand from
   those explanations is its something relating to a version of PHP (5.5) that is
   not accounted in WP versions. This is my server info, im on WAMP;
 * Server Host: localhost (127.0.0.1) Database Host: localhost (127.0.0.1)
    Server
   OS: WINNT Database: MySQL 5.6.17 Server Date: 2014-06-09 08:51:23 +0000 UTC Database
   Date: 2014-06-09 18:51:23 Server Up Time:
 * HTTP Server:
    PHP Version: 5.5.12 (Zend: 2.5.0)
 * IS THERE ANY WORKAROUND FOR THIS CAN SOMEONE PLEASE ENLIGHTEN ME?
 * [https://wordpress.org/plugins/wp-online-store/](https://wordpress.org/plugins/wp-online-store/)

Viewing 1 replies (of 1 total)

 *  [baldguy67](https://wordpress.org/support/users/baldguy67/)
 * (@baldguy67)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/database-connection-error-32/#post-4991868)
 * I believe this error: ‘Deprecated: Function ereg() is deprecated’ is caused by
   a newer version of PHP.
 * One possible work around is to use preg_match instead of eregi on the lines where
   the error occurs. This also involves modifying the code slightly which comes 
   after it.
 * For example, search the text for the line specifying the error, such as:
 * ereg(‘<Days>(.*)</Days>’, $transresp[$service], $tregs);
 * and change it so it becomes:
 * preg_match(‘/<Days>(.*)<\/Days>/’, $transresp[$service], $tregs);
 * note the additional / (slash)
 * You may also have to modify split to preg_split:
 * $table_cost = split(“[:,]” , MODULE_SHIPPING_TABLE_COST);
 * becomes
 * $table_cost = preg_split(“/[:,]/” , MODULE_SHIPPING_TABLE_COST);
 * I found this information at: [http://takien.com/513/how-to-fix-function-eregi-is-deprecated-in-php-5-3-0.php](http://takien.com/513/how-to-fix-function-eregi-is-deprecated-in-php-5-3-0.php)

Viewing 1 replies (of 1 total)

The topic ‘Database connection error’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-online-store_606600.svg)
 * [WP Online Store](https://wordpress.org/plugins/wp-online-store/)
 * [Support Threads](https://wordpress.org/support/plugin/wp-online-store/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-online-store/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-online-store/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-online-store/reviews/)

## Tags

 * [deprecated](https://wordpress.org/support/topic-tag/deprecated/)
 * [MySQL](https://wordpress.org/support/topic-tag/mysql/)
 * [mysql_connect](https://wordpress.org/support/topic-tag/mysql_connect/)
 * [PDO](https://wordpress.org/support/topic-tag/pdo/)

 * 1 reply
 * 2 participants
 * Last reply from: [baldguy67](https://wordpress.org/support/users/baldguy67/)
 * Last activity: [11 years, 11 months ago](https://wordpress.org/support/topic/database-connection-error-32/#post-4991868)
 * Status: not resolved