• 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/

Viewing 1 replies (of 1 total)
  • 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

Viewing 1 replies (of 1 total)
  • The topic ‘Database connection error’ is closed to new replies.