Upgrading from 1.1.5 to 1.5.7 problems

Hi,

My company's live website currently sits on zenphoto 1.1.5. Since Flash has been disabled our videos do not play anymore. I want to upgrade to the latest version of Zenphoto. So I decided to do a local environment test. I'm using MAMP to set up the 1.1.5 version and I get an error that says:
MySQL Error: The PHP MySQL extensions have not been installed. Please ask your administrator to add MySQL support to your PHP installation.
Backtrace: in db_connect (functions-db.php [69])
in query (functions-db.php [116])
in query_full_array (functions.php [78])
in getOption (functions.php [36])
in require_once (functions-db.php [5])
in require_once (auth_zp.php [3])
in require_once (classes.php [6])
in require_once (template-functions.php [10])
in require_once (index.php [8])

Not sure how to proceed from this error for 1.1.5 version. Installing 1.5.7 works flawlessly but I do not want to break my company's website if I cannot get a local upgrade from 1.1.5 to 1.5.7 working. Where should I troubleshoot from?

Comments

  • acrylian Administrator, Developer

    Wise choice to first use a local environment before updating an important company live site. But not to update for 12 years is not that wise ;-)

    1.1.5 is so old that it is not compatible with modern PHP versions like 7+ anymore that MAMP already primarily features (unless you have the Pro version to easy switch to older ones). You need a Zenphoto version of 1.4.13+ for full PHP 7+ compatibility. For PHP 7.4+ you even need newer ones (Note: PHP 8 is not yet supported).

    The PHP MySQL extension does not exist in PHP 7+ anymore which is why you get this message probably. You have to use MySQLi or PDO instead. I really haven't used 1.1.5 since, well, 1.1.5 and don't remember if Zenphoto 1.1.5 already supported these. If you can set that on the config file. Anyway, Zenphoto is compatible

    Besides, I don't recommend to do a direct update from 1.1.5 to 1.5.7 but steps on bigger versions. Info about that on our installation and upgrade info page.

  • Hi Acrylian,

    Yeah, I feel the no upgrade for 12 years. :(
    The config file would be found in zp-core/zpconfig.php?
    Would it be to add the line $conf['db_software'] = "MySQLi";?
    $conf['mysql_user'] = "";
    $conf['mysql_pass'] = "";
    $conf['mysql_host'] = "localhost"; // Won't need to change this 90% of the time.
    $conf['mysql_database'] = "";

  • acrylian Administrator, Developer
    edited January 2021

    Would it be to add the line $conf['db_software'] = "MySQLi";?

    Yes, if that is indeed already in 1.1.5, that should work. But on PHP 7.4+ there will be other issues I fear (I do remember that old version totally fail under that). If you can try lower PHP versions like 5.6 on these old versions.

  • It does not work. I will try to change the PHP version to 5.6.0 in MAMP.

  • So no luck. Version 1.1.5 seems to be running off flv player. How would I forcefully update to make it run off html5 player. Most of our videos run off .mp4 and some .mov

  • acrylian Administrator, Developer

    That of course has no relation on the upgrade itself.

    Current Zenphoto would use the native html5 <video> by default but you have to enable the class-video plugin for html5 video and audio support (1.1.5 does not have that I think).

    The jplayer plugin theoretically still could play flash movies. But since Flash is history since this month basically you really should convert those as mobile systems could never play them. Quicktime/mov movies are also not supported anymore so you need to convert them as well.

  • I found a piece of script that enables Video.js? I believe its an old version but the video wont play.
    elseif ($ext == ".mp4" || $ext == ".m4v" || $ext == ".mov" || $ext == ".264") {
    echo '




    .vjs-spinner { opacity: 0;}


    VideoJS.setupAllWhenReady({
    controlsBelow: false,
    controlsHiding: true,
    defaultVolume: 0.85,
    flashVersion: 9,
    linksHiding: true
    });



    document.writeln("

    ");
    document.writeln("");
    document.writeln("

    ");
    document.writeln("");
    document.writeln("");
    document.writeln("");
    document.writeln("");
    document.writeln("");
    document.writeln("");
    document.writeln("");
    document.writeln("");
    document.writeln("");
        if(navigator.userAgent.match(/iPhone/) || navigator.userAgent.match(/iPod/) )
        {
                    document.addEventListener("DOMContentLoaded", function() {$("*").each(function(){$(this).css("background","white")})}, false);
        }
        </script>
        </div>
        ';
        }
    
  • acrylian Administrator, Developer
    edited January 2021

    I cannot see the code since you didn't escape it properly. videos.js is just a JS layer like others. For mp4 videos you don't need any extra JS in all more or less modern browsers as they will support that natively.

    Trying to suppot Flash is a useless task as modern browser already disable it, it never worked on mobile devices and will soon stop working on desktop as well as it will be blocked from the vendor Adobe from end of January on:

    Since Adobe is no longer supporting Flash Player after the EOL Date, Adobe will block Flash content from running in Flash Player beginning January 12, 2021 to help secure users’ systems. Flash Player may remain on the user’s system unless the user uninstalls it.

    Source: https://www.adobe.com/products/flashplayer/end-of-life.html

    You will need to convert them anyway if anyone should be able to see them.

    Similar with Quicktime which never was a web standard for video (not even Apple uses these on its website anymore) and will work on Macs naturally but require external script support which we dropped a while ago.

  • tplowe56 Member
    edited January 2021

    For displaying video in ZP I would consider uploading to Youtube, (create playlists if you need them). And then access via the class-textobject plugin. I have a system that works perfectly, but you need to dissect the youtube URLS, before coding the final product.

    If you are interested I can send you documentation. But you would need to be familiar with YouTube Studio to execute my system.

  • acrylian Administrator, Developer
    edited January 2021

    Yes, Youtube or another similar service has quite some benefits like serving video in the right resolution for the visitor device and connection speed.

    We use tthat on our site on the screenshots section with the textobject plugin as well. It's pretty simple as you can directly use the embed code Youtube provides. However we open the actual video in a overlay because of GDPR/privacy concerns. That's however a custom solution.

Sign In or Register to comment.