Home / Forums / DynamiX Support / Is functions.php using 2 deprecated commands?

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts

  • Scottlush
    Participant

    My site’s menus are messed up at southend.wpengine.com and I’m getting 3 php errors related to building those menus.

    I’m using a fresh install of Dynamix 5.0.2 on WordPress 4.3. — all current.

    Those php errors are from lines 218 and 220 in functions.php., both using functions deprecated in PHP 5.5.0 and discontinued in 7.0.0.

    Is this what’s causing my menus to be messed up? And how do I fix it, please?

    Functions.php lines 218 and 220 in Dynamix that create the errors are:

    $get_MenuDesc = mysql_query(“SELECT p.ID, p.post_title, p.guid, p.post_parent, pm.meta_value FROM ” . $wpdb->posts . ” AS p LEFT JOIN (SELECT post_id, meta_value FROM ” . $wpdb->postmeta . ” AS ipm WHERE meta_key = ‘pgopts’) AS pm ON p.ID = pm.post_id WHERE p.post_type = ‘page’ AND p.post_status = ‘publish’ ORDER BY p.menu_order ASC”);

    The errors:

    [Sun Aug 30 02:12:59.439008 2015] [:error] [pid 30540] [client 108.61.76.8:32416] PHP Warning: mysql_query(): A link to the server could not be established in /nas/wp/www/cluster-40402/southend/wp-content/themes/DynamiX/functions.php on line 218, referer: http://southend.wpengine.com/wp-admin/admin.php?page=vc-welcome

    [Sun Aug 30 02:12:59.439036 2015] [:error] [pid 30540] [client 108.61.76.8:32416] PHP Warning: mysql_fetch_assoc() expects parameter 1 to be resource, boolean given in /nas/wp/www/cluster-40402/southend/wp-content/themes/DynamiX/functions.php on line 220, referer: http://southend.wpengine.com/wp-admin/admin.php?page=vc-welcome

    [Sun Aug 30 02:13:11.806337 2015] [:error] [pid 12735] [client 108.61.76.8:32486] PHP Warning: mysql_query(): Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (13) in /nas/wp/www/cluster-40402/southend/wp-content/themes/DynamiX/functions.php on line 218, referer: http://southend.wpengine.com/wp-admin/customize.php?url=http%3A%2F%2Fsouthend.wpengine.com%2F

    while ($row = mysql_fetch_assoc($get_MenuDesc))

    • This topic was modified 2 years, 3 months ago by  Scottlush.
    Andy
    Andy
    Keymaster

    Hi,

    It’s not recommended to use PHP 7.0.0, this is only in development stage. 5.4 is the most common version to be using currently.

    I’ve replied to your other post, hopefully we’ll work out what is going on from there. It’s not usual behaviour, so it should be a simple solution.


    Scottlush
    Participant
    This reply has been marked as private.

    Scottlush
    Participant
    This reply has been marked as private.

    Scottlush
    Participant
    This reply has been marked as private.
    Andy
    Andy
    Keymaster

    Hi,

    For some reason the WP Custom Menu was disabled via Appearance > Theme Options > Header. I’ve re-enabled this and set your “Main” menu via the Appearance > Menus > Manage Locations tab. It looks to be working fine now.


    Scottlush
    Participant
    This reply has been marked as private.
    Andy
    Andy
    Keymaster

    You’re welcome Scott.

Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.