Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Vanilla Porter and PHP 7.1

Running Vanilla version 2.3.1 and version 2.3 of the porter application.

I get this error when trying to run Vanilla Porter:

mysql_connect is an undefined function. Verify MySQL extension is installed and enabled.

MySQL is set up on the box and works fine elsewhere so is there something I've missed here?

The forum itself runs fine under PHP 7.1 with no reported issues

Comments

  • R_JR_J Ex-Fanboy Munich Admin

    The MySQL extension and MySQL are different things. mysql_connect is a deprecated feature of PHP <= 5.x. By now the porter cannot be used with PHP7

    But Vanilla porter is only useful if you want to transfer a forum from another forum script:not-Vanilla => Vanilla. Are you sure you need it?

  • I use the porter to create a backup of the forum so in the event of a failure I could rebuild it. I also use that backup to seed my "test" forum as well where I'm running Vanilla 2.4.

    Is there a "better" way of taking a backup then that I've missed somewhere?

  • By doing the simple thing (i.e. search the forum!) I think I've answered my own question of course! I "inherited" control of the fourm a while back along with instructions on how to back it up and never thought to "question" it really.

    So now I should be able to come up with my backup regime that runs nicely under CRON

  • R_JR_J Ex-Fanboy Munich Admin

    Just for the sake of completeness it would be nice if you mention what your cron job (good choice!) is doing now ;-)

    You backup a dump of the database and the /uploads and the /conf folder.
    Sometimes people have a customized .htaccess file which should then also be included in the backup. These are the only "moving parts" in a normal Vanilla installation.

    If you have custom plugins or custom themes that you wouldn't be able to download form here (or elsewhere) it might be a good idea to also include them in the backup.

  • I'm using PHPBB for now and want to switch with vanilla forums, My webserver has PHP Version 7.0.18 and with MySqli enabled. When I started use of porter I got this => "mysql_connect is an undefined function. Verify MySQL extension is installed and enabled"

    How do resolve this Error ?

  • R_JR_J Ex-Fanboy Munich Admin

    @Linc can you share insights?

    I've seen that there are mysqli alias functions for the old MySQL extension. Would a quick and dirty replace of "mysql_" by "mysqli_" be promising?

  • @R_J I tried to do that replace and it generated a few "interesting" errors in the actual PHP. All the documention I saw suggested that a straight replace should work but I found that , in practice there was still additional changes required.

    I had started to make my through those (a programmer of some 45 years now but still very new to PHP etc.) when I thought there might be a better way of doing it hence the development of the script which I will happily share once I'm happy with it :)

  • R_JR_J Ex-Fanboy Munich Admin

    I don't want to stop you in your enthusiasm, but I guess that the Vanilla team is looking for a more sophisticated solution:https://github.com/vanilla/porter/issues/97

    But until they are able to provide a solution, your work might help a few new Vanilla users!

  • x00x00 MVP
    edited August 2017

    You don't have run the porter in the same environment, it is a standalone that generates a file used to import. You could even set up a virtual environments. Or there are ways or running muliple version of php on your development box.

    You would only need to transfer the input database (via dump), to the environment that you wish to run, then generate the file, then transfer the file (usually to the uploads folder). Use to import, then delete the file from your server.

    grep is your friend.

  • LincLinc Detroit Admin

    Yes, I strongly suggest just setting up a separate place to dump the file as @x00 suggests.

    Maintaining 5.x support while allowing for 7.0+ support on a product as sensitive to database differences as Porter is is a bit of a challenge, as the issue @R_J posted illuminates. If there was a simple fix, it would be done already.

  • Any solution for this. I am still having the issue with my porter and the same error ?

  • @InfigoSoftware

    You don't have to use the porter in the same environment so you could either use a virtualbox or you can run different version on the same box

    https://pehapkari.cz/blog/2017/03/27/multiple-php-versions-the-easy-way/

    don't do this on your actual server. You only need a copy of the database.

    grep is your friend.

Sign In or Register to comment.