1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.1 vb import users. Server error / Mysqli prepare error

Discussion in 'Installation, Upgrade, and Import Support' started by snoopy5, Oct 8, 2012.

  1. snoopy5

    snoopy5 Well-Known Member


    Importing a vb 3.8.0 forum into XF. In the step of importing users, I get the following error:

    Any idea what this can be/ how this can be fixed?
  2. snoopy5

    snoopy5 Well-Known Member

    I tried this with another xf fresh installation and another vb 3.8.0 forum. Exact same error during this step. MAybe there is something differet with vb 3.8.0 compared to other 3.8.x versions?

    Both vb forums have a Mysql4 database by the way...
  3. Adam Howard

    Adam Howard Well-Known Member

    XenForo System Requirements

    PHP: 5.2.4+
    MySQL: 5.0+
    PHP extensions: MySQLi, GD (with JPEG support), PCRE, SPL, SimpleXML, DOM, JSON, iconv, ctype
    PHP safe_mode off
    Jake Bunce likes this.
  4. snoopy5

    snoopy5 Well-Known Member

    yes, this is the requirement for the XF installation. And both xf installations have mysql5. But the old vb installations have mysql4.

    Is for the db which will be imported into the Xf also mysql5 required? That would be strange...
  5. Adam Howard

    Adam Howard Well-Known Member

    I misunderstood ....

    I thought your copy of vBulletin was still running on a MySQL 4 server. If it was... You'd need to import it or upgrade it into a MySQL 5 server.

    That would not be strange, that would be the accepted norm and standard. MySQL 4 was discontinued over 8 years ago and is very insecure (and unstable) compared to today's standards.
  6. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    This line number doesn't match up. Have you modified that file?

    The syntax error appears to be from this SQL:

    	protected function _getSelectUserSql($where)
    		return '
    			SELECT user.*, userfield.*, usertextfield.*,
    				IF(admin.userid IS NULL, 0, 1) AS is_admin,
    				admin.adminpermissions AS admin_permissions,
    				IF(userban.userid IS NULL, 0, 1) AS is_banned,
    				userban.bandate AS ban_date,
    				userban.liftdate AS ban_end_date,
    				userban.reason AS ban_reason,
    				userban.adminid AS ban_user_id,
    				IF(usergroup.adminpermissions & 1, 1, 0) AS is_super_moderator,
    				IF(customavatar.userid, 1, 0) AS has_custom_avatar
    			FROM ' . $this->_prefix . 'user AS user
    			STRAIGHT_JOIN ' . $this->_prefix . 'userfield AS userfield ON (user.userid = userfield.userid)
    			STRAIGHT_JOIN ' . $this->_prefix . 'usertextfield AS usertextfield ON (user.userid = usertextfield.userid)
    			LEFT JOIN ' . $this->_prefix . 'administrator AS admin ON (user.userid = admin.userid)
    			LEFT JOIN ' . $this->_prefix . 'userban AS userban ON (user.userid = userban.userid)
    			LEFT JOIN ' . $this->_prefix . 'usergroup AS usergroup ON (user.usergroupid = usergroup.usergroupid)
    			LEFT JOIN ' . $this->_prefix . 'customavatar AS customavatar ON (user.userid = customavatar.userid)
    			WHERE ' . $where . '
    			ORDER BY user.userid
    There is no user input in play there except for the source table prefix. Otherwise it could be your MySQL version as Adam said.
    Adam Howard likes this.

Share This Page