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.

PHP Conflict? [RESOLVED]

lstvlstv New
edited May 2018 in Vanilla 2.0 - 2.8

I upgraded to Vanilla Forums to 2.5.1 and saw the prompt in the admin section to upgrade to php 7.

However after upgrading to 7.1 i find that certain admin pages result in 503 errors, for eg: /dashboard/import
This error occurs with php 7.0, 7.1 and the forum is completely non functional when using php version 7.2.

I had originally installed with Installatron some time ago and read that package managers can unintentionally break things so i manually downloaded vanilla 2.5.1 and overwrote my existing forum files, but the problem continues.

I read elsewhere in your support forums that these issues are due to changes in php 7:
https://open.vanillaforums.com/discussion/32836/import-page-not-loading

How do i fix this issue and also why am i prompted by my vanilla forums installation to upgrade to a version of php which breaks some of its functionality?

Comments

  • R_JR_J Admin

    @lstv said:
    However after upgrading to 7.1 i find that certain admin pages result in 503 errors, for eg: /dashboard/import

    That is a server error. It would have been helpful if you had taken a look at the reason for that error by looking at your servers error logs. I guess it would have helped you to solve the problem by yourself.

    @lstv said:
    I had originally installed with Installatron some time ago and read that package managers can unintentionally break things so i manually downloaded vanilla 2.5.1 and overwrote my existing forum files

    Wise decision.

    @lstv said:
    This error occurs with php 7.0, 7.1 and the forum is completely non functional when using php version 7.2.
    How do i fix this issue

    Look at your servers error logs. I bet they will tell you about missing PHP extensions. You need the mbstring and the curl extension.


    @lstv said:
    why am i prompted by my vanilla forums installation to upgrade to a version of php which breaks some of its functionality?

    Seriously? Are you asking for help or do you want someone to blame?

  • @R_J said:

    @lstv said:
    However after upgrading to 7.1 i find that certain admin pages result in 503 errors, for eg: /dashboard/import

    That is a server error. It would have been helpful if you had taken a look at the reason for that error by looking at your servers error logs. I guess it would have helped you to solve the problem by yourself.

    There's nothing much in the error log in Cpanel other than a notification about not having a custom 503 error page for the forum in question at the time the error occurred.

    @lstv said:
    This error occurs with php 7.0, 7.1 and the forum is completely non functional when using php version 7.2.
    How do i fix this issue

    Look at your servers error logs. I bet they will tell you about missing PHP extensions. You need the mbstring and the curl extension.

    The servers error log wasn't helpful but the Vanilla one was:
    [26-Mar-2018 05:36:42 UTC] PHP Fatal error: Uncaught Error: Class 'PDO' not found in /home/username/forum-domain-name/library/database/class.database.php:100
    There are several errors presumably subsequently resulting from above.

    Seems my host needs to enable/install PDO and possibly mbstring and curl yes?

    @lstv said:
    why am i prompted by my vanilla forums installation to upgrade to a version of php which breaks some of its functionality?

    Seriously? Are you asking for help or do you want someone to blame?

    There are a few users with similar issues around the net and it would have been helpful if the prompt to upgrade to php 7 also advised users what to check and look for as apparently some php 7.x setups may not work by default. My hosts installation of php 5.6 works fine with Vanilla by default, but apparently not their 7.x setup.

    Thank you for your reply it is much appreciated and i apologize if i came across poorly in my initial post.

  • I contacted my host and who advised mbstring, PDO and Curl are installed and already enabled.

    I compared the list of plugins available/enabled in php 5.6 to 7.1 and found the following differences:
    gnupg
    imagick
    memcache - not present in 7.1, just memcached
    mysql - not present in 7.1, just mysqli
    opcache
    sourceguardian

    In the 2016 forum post i referenced elsewhere on your forums (https://open.vanillaforums.com/discussion/32836/import-page-not-loading) someone assisting stated "cmysql_connect has been removed in PHP 7 and should be updated to mysqli_connect".

    The OP replaced all mysql_* for mysqli_* references in the class.importmodel.php file in order to get it to work with PHP7 and concluded that it is a bug and should be fixed for those using PHP7.

    Are the above steps correct and still necessary? If so are there any other files i might need to manually correct?

    Any thoughts and feedback would be much appreciated as it seems unlikely something like this would be an unpatched bug or these forums would be full of users experiencing the same issue.

  • R_JR_J Admin

    I'd say it looks good concerning the https://github.com/vanilla/vanilla#self-hosting-requirements.

    The mysqli_/mysql_ problems are only of any importance if you are planning to import another forum. Vanilla only needs the PDO extension installed.

    Please try if running a clean installation works in your configuration. Do this by downloading the zip from this page and unzipping it to a new folder. Use a new database.

    If that clean installation is not working, search this forum for an alternative .htaccess file. The current one doesn't work for all installations.

    If you managed to set up a clean forum, copy over the third party plugins/theme from your old installation to the new installation, copy the /uploads folder to the new installation and change the database setting in the new /conf/config.php to the settings you find in your current /conf/config.php

  • Is 'mysql_' used anywhere else in any other pages, scripts or css etc?

    I don't use or need the Import function but when i clicked on the option just to take a look i got stuck there as the forum remembers the last viewed page for Admins and returns them straight back to it. The issue is not just about the Import function not working but also a loop.

    Is this problem specific to me / my host or will others upgrading to php 7.x also experience the same issue? If so, this bug should be reported and fixed yes?

  • I set up a completely new forum and the problem still exists. I did use Installatron initially as i haven't set up a forum manually before but i downloaded the clean zip file installation and overwrote the Installatron version. The problem persists.

    The issue isn't just that the import function doesn't work it's that the forum returns you to that malfunctioning option every time you log in if you close your browser rather than clicking back

    Is 'mysql_' used anywhere else in any other pages, scripts or css etc?

  • R_JR_J Admin

    Please forget about that "mysql"-thing. It has nothing to do with your problems.

    What is the error if you install a complete new forum, without overwriting an old version or on older, but clean install?

  • I wasn't receiving email notifications of replies to my threads but have now changed those settings and will reply more promptly in future.

    I'm not sure what was going on but the issue appears to have been resolved. I can only assume my host had an issue somewhere which was since addressed.

    Thanks for all your help.

Sign In or Register to comment.