1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Errors after upgrade PHP version from 5.3 to 5.5

Discussion in 'PHP' started by Divvy, May 29, 2016.

  1. #1
    Hello guys,

    Can someone please give me a little help here please?

    After I upgrade my php version from 5.3 to 5.5 many errors has appeared in my sites.

    For example:
    Line 769 code:
    <h3>          <a href="http://domain.com/page"><span>Name List</span></a>          </h3>               <ul>                  <?php                              global $wpdb;                       $postTab = $wpdb->prefix."posts";                   $postMeta = $wpdb->prefix."postmeta";                   global $post;        ?>                          <?php  query_posts( 'post_type=model&portfolio_cat&Featured&orderby=title&order=ASC&paged=' . $paged);               while ( have_posts() ) : the_post();                   $mrpostParent =$post->ID;                                       $ttFGQue =mysql_query("select * from $postTab as a,$postMeta as b where a.ID=b.post_id and a.post_type='freegallery' and a.post_status='publish' and             ( b.meta_key='mr_freeGalleryModel' or b.meta_key='mr_freeGalleryModel_2') and b.meta_value='$mrpostParent'");                                                            if($ttFGQue && mysql_num_rows($ttFGQue)>0)        {                                                        $totalFg = mysql_num_rows($ttFGQue);        }                                                     else{                                                       $totalFg="0";                                                        }                                     ?>                                                     <li>                                                   <a href="<?php the_permalink(); ?>"><?php the_title() ?> (<?php echo $totalFg; ?>)</a>                      </li>                       <?php  endwhile;         ?>              </ul>
    PHP:
    Line 97 code:
    $ttFVQue =mysql_query("select * from $postTab where post_type='freevideo' and post_status='publish' and post_parent='$mrpostParent'");    
    PHP:
    Line 95 code:
    $ttFVQue =mysql_query("select * from $postTab as a,$postMeta as b where a.ID=b.post_id and a.post_type='freevideo' and a.post_status='publish' and
    ( b.meta_key='mr_freeV_model' or b.meta_key='mr_freeV_model2') and b.meta_value='$mrpostParent'");
    PHP:
    I really appreciate it if someone can help me :)

    Thank you!!
     
    Divvy, May 29, 2016 IP
  2. PoPSiCLe

    PoPSiCLe Illustrious Member

    Messages:
    4,623
    Likes Received:
    725
    Best Answers:
    152
    Trophy Points:
    470
    #2
    Check your mysql_connect settings. Currently you're trying to connect to the database without a username
     
    PoPSiCLe, May 30, 2016 IP
  3. jestep

    jestep Prominent Member

    Messages:
    3,659
    Likes Received:
    215
    Best Answers:
    19
    Trophy Points:
    330
    #3
    Also to add, the original mysql functions are deprecated. If you have the ability to, switching to another database method like mysqli or PDO is a good idea, and likely safer.
     
    jestep, Jun 2, 2016 IP
  4. HostWinds_Jesse

    HostWinds_Jesse Member

    Messages:
    82
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    45
    #4
    Do you have root access to your server? Or are you using shared hosting?
     
    HostWinds_Jesse, Jun 2, 2016 IP