Support » Plugin: Mail Subscribe List » mysql_query warning on line 272 of sml.php

  • Resolved raqqun0101

    (@raqqun0101)


    Hello,

    I have encountered this php warning when i try to submit the subscriber form:

    Warning: mysql_query(): Access denied for user 'coucou'@'localhost' (using password: NO) in /var/www/blabla/wp-content/plugins/mail-subscribe-list/sml.php on line 272

    As it appears the use of mysql_query is deprecated since php5.5 and removed since 7.0
    see php doc http://php.net/manual/en/function.mysql-query.php

    mysql_query needs a link identifier created by mysql_connect with proper credentials or it tries to open one with the system user running php.

    In my case this user is coucou, but there isn’t any mysql user by that name.

    Your plugin must work, i suppose, in an automated hosting environment where the system user is most often the same as the mysql user, but that’s not the case every time.

    Please consider updating your code using wordpress database class
    see wordpress doc https://codex.wordpress.org/Class_Reference/wpdb

    regards,
    raqqun0101

    https://wordpress.org/plugins/mail-subscribe-list/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Are you planning an update, on PHP7 this plugin does no longer work, for the above mentioned reason (mysql_ functions removed) Inb fact I got a blank screen until I reset the PHP version used

    Plugin Author grimmdude

    (@grimmdude)

    Hi There,

    This has been fixed in version 2.1.3

    -Garrett

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘mysql_query warning on line 272 of sml.php’ is closed to new replies.