Godlike Productions

Godlike ProductionsGodlike Productions
  • Dark Heaven Studio
    • Dark Heaven Studio
    • Music
      • The Bands
      • Times of The Sines
        • Singles
        • Man v Machine
        • The First Sign
      • LD 120
        • Albums
        • Wise Words
        • Consume
        • Slowdive
        • The Citadel of Fear (Live)
        • EP's
        • Trancefer
        • Singles
        • The Mall
        • Bitted
        • Atlas My Mark
        • Featured On
        • Semikazi Compilation 2
        • So Who Likes Fashion Anyhow
        • Remixes
        • Lyrics
          • Cliques
          • Atlas My Mark
          • Shadow of Death
      • The X Lander
        • Albums
        • Waiting In The Wings
        • Featured On
        • Unholy Kings On A Black Horizon
      • LOST
        • Albums
        • In Translation
        • Singles
        • Lifeforms
        • Shattered
        • Lyrics
          • Shattered
      • Schlerb
      • Sensory Overload
      • The Studio
      • Dark Heaven Studio
      • Podcast
      • Podcast Help
      • Soundcloud
      • Weekly Beats
    • Software
      • PC3 Envelope Controller
      • Jupiter 8 Morph
      • Requiem Roller
      • PC3 Bank Decoder
    • Synth Support
      • Kurzweil
      • Yamaha
      • mLAN
        • mLAN Resources
        • mLAN Chipsets
      • Studio Connections
      • 8PortSE
      • Max 4 Live
    • Sounds and Patches
      • Bravo
      • LiquidT
      • KSP8
    • News
      • Times of The Sines - The First Sign Released
      • Times of The Sines - Golden Door released through Lightarmour Editions
      • Kurzweil RSP8 Studio Connections Module Released
      • Times of the Sines Joins Lightarmour Editions
      • LD 120 - Melt Through The Mobius of Time Video
      • Times of the Sines Man v Machine Released
      • The X Lander - Waiting In The Wings
      • Times of the Sines - Pulsecodes Video
      • LOST Performs at Noisemachine Virtual Gig
      • LOST releases Shattered
      • Times of the Sines - Live at Psychedelicious
      • Times of the Sines - Live at Good Shepherd
      • Times of the Sines - Live at The Artifactory
      • Mikro Tutorials
        • Mikro Tutorial #10 Released
        • Mikro Tutorial #9 Released
        • Mikro Tutorial #8 Released
        • Mikro Tutorial #7 Released
        • Mikro Tutorial #6 Released
        • Mikro Tutorial #5 Released
        • Mikro Tutorial #4 Released
        • Mikro Tutorial #3 Released
        • Mikro Tutorial #2 Released
        • Mikro Tutorial #1 Released
      • Programming With The Puppeteer
        • PWP1 - Virtual Analog
        • PWP2 - Pads
        • PWP3 - PWM
      • Video Tutorial
        • Tutorial 1 - PC3 101
        • Tutorial 2 - Effects
        • Tutorial 3 - Envelopes
        • Tutorial 4 - Controllers
        • Tutorial 5 - MIDI Sync
        • Tutorial 6 - FUNS
        • Tutorial 7 - Riffs
        • Tutorial 8 - Arps
        • Tutorial 9 - MIDI Sync 2
        • Tutorial 10 - Wrap
        • Tutorial 11 - Live Mode
        • Tutorial 13 - Forte and Deluge
    • Forums
  • Forums
  • Picture Framing
    • Glass Cutting
  • Tech Tools
    • Wonderware Historian Current Date
    • SMF Downloads Pro php 7 Fix
    • Just News Template
    • Missing Lightbox Buttons
    • Image Spacing
    • nbo_podcast for External Servers
    • tt_news Formatting
    • Typo3 Page Statistics
    • Direct Mail Categories
    • Pond Volumes
Tech Tools » SMF Downloads Pro php 7 Fix
    • Dark Heaven Studio
    • Forums
    • Picture Framing
    • Tech Tools
      • Wonderware Historian Current Date
      • SMF Downloads Pro php 7 Fix
      • Just News Template
      • Missing Lightbox Buttons
      • Image Spacing
      • nbo_podcast for External Servers
      • tt_news Formatting
      • Typo3 Page Statistics
      • Direct Mail Categories
      • Pond Volumes

SMF Downloads Pro php 7 Fix


If you run SMF 2.0 and are running the Downloads Pro plugin (around v4.1.8) from SMF Hacks, the plugin will start throwing errors if you upgrade to php 7 if you have the download rate limiter installed (ie the number of minutes a user needs to wait before they can download).

On the Mastering VAST forum, we have this enabled for the free membership group, as a way of controlling bandwidth, associated with the downloads.

The errors we were seeing were:

 

Call to undefined function mysql_num_rows()

 

The reason for this error is the deprecation of mysql_ functions in php 7.

Fortunately the fix is really easy.

Change line 9686 of Downloads2.php from:

 

$totalRow['total'] = mysql_num_rows($dbresult);

 

to

 

$totalRow['total'] = mysqli_num_rows($dbresult);

 

That's it.  Save the file and refresh the  cache, and your users

SMF Hacks has confirmed that they have fixed this in later versions of their plugin.


  • © 1997 -2021 Godlike Productions. All Rights Reserved
  • |
  • About Us
  • |
  • Contact
  • |
  • Privacy Policy
  • |
  • Site Map
Godlike Productions is on Facebook Godlike Productions is on Twitter Godlike Productions is on Soundcloud Godlike Productions is on Youtube Godlike Productions is on Bandcamp