XF 2.0 Get a free development environment for XenForo up and running in minutes

Liam W

Well-known member
#61
Vagrant need to get a better server... 1700k/s is not a good speed on a University connection.

Also k/s? What kind of funky unit is that...
 

Tiki Tiki

Active member
#62
Here's an interesting twist for you. I've got Scotch Box + Vagrant running just fine... and I can successfully install and run Xenforo and Wordpress from a couple of sub-directories... but I absolutely cannot get Invision Power Board 3.4.8 (the last version I was running before I converted to XF) to work. I just get a blank page. Trying to install from scratch, too, results in the same thing. I go to http://192.168.33.10/ipb/admin/install/ and... NUTTIN... blank page! Anyone have any ideas on what I should try? I wouldn't care... but I've still got some old posts that I need to find and merge into my existing XF forum.
 

Kier

XenForo Developer
Staff member
#63
Here's an interesting twist for you. I've got Scotch Box + Vagrant running just fine... and I can successfully install and run Xenforo and Wordpress from a couple of sub-directories... but I absolutely cannot get Invision Power Board 3.4.8 (the last version I was running before I converted to XF) to work. I just get a blank page. Trying to install from scratch, too, results in the same thing. I go to http://192.168.33.10/ipb/admin/install/ and... NUTTIN... blank page! Anyone have any ideas on what I should try? I wouldn't care... but I've still got some old posts that I need to find and merge into my existing XF forum.
I’ll be doing the same thing in the next few days, so I’ll let you know what I come up with.
 

Tiki Tiki

Active member
#64
I’ll be doing the same thing in the next few days, so I’ll let you know what I come up with.
Cool! At least you actually know what you're doing! :)

Still no go on 3.4.8... blank page... but I tried installing 4.1.5 Beta, which was the most recent version I had downloaded while my license was still active, and I actually do get to a setup screen waiting for me to enter my license key.
 

Tiki Tiki

Active member
#65
Kier, fyi, I asked Invision Power why I was getting a blank screen and I got a courtesy reply (my license is no longer active) saying that it's probably because 3.4.x will only run on php 5.6.

Is there a way to have two instances of Vagrant where one is running php 5.6 and the other 7.1? Do I need MyServer1 and MyServer2 folders?
 

Kier

XenForo Developer
Staff member
#66
@Tiki Tiki , yes you can run as many boxes as you like, and have them all share the same /var/www mounted folder - it’s actually what I do myself.

For my PHP 5.6 needs, I use Scotch Box 2.5 - which doesn’t actually need any of the custom config that’s necessary for Scotch Box 3.0.

Let me see how to run the command to git clone version 2.5 and I’ll get back to you, unless you find it first!
 

Tiki Tiki

Active member
#68
@Tiki Tiki , yes you can run as many boxes as you like, and have them all share the same /var/www mounted folder - it’s actually what I do myself.
Right now I've got everything in MyServer/public. Wouldn't everything end up using the same Vagrantfile settings?

Oh here we go - add this to the standard Vagrantfile, rather than my custom version.

https://app.vagrantup.com/scotch/boxes/box/versions/2.5
Cool. But confused as to how I should run both. I only know enough to be dangerous. LOL!
 

Kier

XenForo Developer
Staff member
#69
It would probably be useful to post some details of my setup, which allows me to run PHP 7 and PHP 5 sharing the same www folder.

Here's how I have it organised:

/Users/kier/Sites/public is the folder in which all my PHP files live, I have directories like xf20x, xfsite, xf21x etc.

My main development environment is Scotch Box Pro, running PHP 7.something. It lives at /Users/kier/Sites, so its Vagrantfile sits there. Wherever I mention Scotch Box Pro, you can substitute Scotch Box 3.0, with my custom Vagrantfile.

I also have Scotch Box 2.5 (PHP 5.6) running in a separate box, which lives at /Users/kier/Sites/scotch25, so its Vagrantfile lives in that directory.

Both boxes have their Vagrantfile set to point /var/www to /Users/kier/Sites. The Scotch Box Pro Vagrantfile is configured to run 192.168.33.10, while the Scotch Box 2.5 Vagrantfile is edited to run the VM at 192.168.33.11.

As a result, with both boxes running, I can point my browser to http://192.168.33.10/something.php and see the PHP7-rendered version, while http://192.168.33.11/something.php shows me what PHP 5.6 makes of it.

Hope this was helpful.
 

Tiki Tiki

Active member
#72
Bear in mind that those Vagrantfile(s) need to be in place before you run vagrant up for the first time for each box.
And to set up 2.5 w/php 5.6, I need ONLY this in the Vagrant file, or does it get tacked on to something?

Code:
Vagrant.configure("2") do |config|
config.vm.box = "scotch/box"
config.vm.box_version = "2.5"
end
 

Kier

XenForo Developer
Staff member
#73
Maybe step by step instructions are in order - this is based on my own setup:

PHP 7
  1. cd /Users/kier/
  2. git clone https://github.com/scotch-io/scotch-box Sites
  3. cd Sites
  4. (overwrite the Vagrantfile in this location with the custom Vagrantfile from the XF docs)
  5. vagrant up
Now you have a PHP 7 machine running at http://192.168.33.10

PHP 5
  1. cd /Users/kier/Sites
  2. git clone https://github.com/scotch-io/scotch-box scotch25
  3. cd scotch25
  4. Edit the Vagrantfile that has been placed here with the following contents:
  5. Ruby:
    # -*- mode: ruby -*-
    # vi: set ft=ruby :
    
    Vagrant.configure("2") do |config|
      
        config.vm.box = "scotch/box"
        config.vm.box_version = "2.5"
        config.vm.network "private_network", ip: "192.168.33.11"
        config.vm.hostname = "scotchbox"
        config.vm.synced_folder "/Users/kier/Sites", "/var/www", :mount_options => ["dmode=777", "fmode=666"]
    
    end
  6. vagrant up
... and now also you have a PHP 5.6 machine running at http://192.168.33.11

Both machines serve their web files from /Users/kier/Sites/public

Ta da! :)
 

Kier

XenForo Developer
Staff member
#75
FWIW, it would probably be better to run the boxes from Sites/scotchpro and Sites/scotch25 in my case, rather than having on effectively in a subdirectory of the other, but meh
 

Tiki Tiki

Active member
#76
... and now also you have a PHP 5.6 machine running at http://192.168.33.11

Both machines serve their web files from /Users/kier/Sites/public
Hmmm. I can now bring up the default Scotch Box pages at 192.168.33.10 and 192.168.33.11 ... but ... should they both be displaying the same Server Stuff / PHP Stuff? Both are showing PHP 7.0 as working.

The good news... I'm no longer getting a blank page for IPB 3.4.x... now it's tossing up a Driver Error saying there appears to be something wrong with the database. It basically doesn't exist anymore. Remembering your instructions for Sequel Pro, do I need to set up a new IPB database where I change the SSH Host to 192.168.33.11?

Getting super close! There is light at the end of this tunnel! :)
 

Kier

XenForo Developer
Staff member
#77
I think what you're seeing is the standard welcome index.php created by Scotch Box 3.0.

Create a file called info.php and insert the following text into it:
PHP:
<?php phpinfo();
then view it through both IP addresses, and you should get correct info.
 

Tiki Tiki

Active member
#78
I think what you're seeing is the standard welcome index.php created by Scotch Box 3.0.

Create a file called info.php and insert the following text into it:
PHP:
<?php phpinfo();
then view it through both IP addresses, and you should get correct info.
That was it! Good to go! (y) Thanks so much for walking me through all of this! :)
 

Tiki Tiki

Active member
#79
LOL! I'm still plugging away at getting IPB 3.4.x to run... I've got the full suite with commerce add-on... so I'm getting an error that says I need ionCube PHP Loader ioncube_loader_lin_5.6.so to be installed. :(

Kier, is there a magical terminal command or two that installs ionCube in my Scotch25 box?
 

Kier

XenForo Developer
Staff member
#80
LOL! I'm still plugging away at getting IPB 3.4.x to run... I've got the full suite with commerce add-on... so I'm getting an error that says I need ionCube PHP Loader ioncube_loader_lin_5.6.so to be installed. :(

Kier, is there a magical terminal command or two that installs ionCube in my Scotch25 box?
There's no specific command, no - you'll just need to follow the installation instructions provided by ionCube themselves for Linux 64 bit.
 
Top