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

Thanks @Kier I use a Macbook Pro and this is very useful.

So far I have an issue when running vagrant up:
Code:
/opt/vagrant/embedded/gems/gems/vagrant-2.0.1/lib/vagrant/util/platform.rb:37:in `downcase': input string invalid (ArgumentError)
from /opt/vagrant/embedded/gems/gems/vagrant-2.0.1/lib/vagrant/util/platform.rb:37:in `block in wsl?'
from /opt/vagrant/embedded/gems/gems/vagrant-2.0.1/lib/vagrant/util/silence_warnings.rb:8:in `silence!'
from /opt/vagrant/embedded/gems/gems/vagrant-2.0.1/lib/vagrant/util/platform.rb:35:in `wsl?'
from /opt/vagrant/embedded/gems/gems/vagrant-2.0.1/bin/vagrant:123:in `<main>'

That is all jibberish to me. I'm running Mac OS X 10.13.2
 
Last edited:
@Mythotical that's pretty much gibberish to me too :) I'd suggest reinstalling VirtualBox and Vagrant, then rebooting and trying again.
 
Ok so I learned that after enabling BootCamp then removing it caused issues. I upgraded my HDD to SSD and ran it all again, worked fine after I did a fresh install of my OS.
 
Hi! I followed the guide to install ScotchBox on my computer, which worked fine and was very quick. I setup the config.php file with localhost root:root and I get the following error when running "php cmd.php xf:install" from the src directory:

[XF\Db\Exception]
No such file or directory

Thanks in advance.
 
Welp, don't install MacOS Mojave Beta if you need to keep this thing running! :eek:
Code:
There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.

Command: ["hostonlyif", "create"]

Stderr: 0%...

Progress state: NS_ERROR_FAILURE
VBoxManage: error: Failed to create the host-only adapter
VBoxManage: error: VBoxNetAdpCtl: Error while adding new interface: failed to open /dev/vboxnetctl: No such file or directory
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component HostNetworkInterfaceWrap, interface IHostNetworkInterface
VBoxManage: error: Context: "RTEXITCODE handleCreate(HandlerArg *)" at line 94 of file VBoxManageHostonly.cpp

I ran out and grabbed the latest copies of Vagrant and VirtualBox...

VirtualBox Installer quits with the following:
Code:
The system extension “VBoxDrv.kext” is not compatible with this version of macOS and can’t be used.

Guess I sit and wait. :cry:

EDIT: Confirmed this is a known problem on the VirtualBox support forums:

https://forums.virtualbox.org/viewtopic.php?f=39&t=88231
 
Last edited:
Surprised there is not more discussion here. Thanks for the Scotchbox guide, XF team!

Can anyone kindly confirm if this is now compatible with macOS Mojave?
Yes, I am using it with the latest version of macOS Mojave.

However, the reason I came into this thread: it's slow (2-4 second page loads) for me running XenForo 2.1 with a copy of my production database. I'm using a 2017 MacBook Pro with 2.9 Ghz i7, 16GB of RAM, and SSD.

I am currently in the process of deleting millions of posts to see if that helps, but I would welcome any other suggestions.

EDIT: I've deleted about 4 million posts, but more importantly, I upped the VM's available memory to 4GB and added gave it access to 2 CPU cores (though I highly doubt that has any impact). It's running better now.
 
Last edited:
EDIT: I've deleted about 4 million posts, but more importantly, I upped the VM's available memory to 4GB and added gave it access to 2 CPU cores (though I highly doubt that has any impact). It's running better now.

I've been thinking about switching to scotch box because XAMPP is so dang slow for me. It's not un-usable but it's slow to the point where it gets annoying. I still haven't been able to figure out the best way to speed it up. I made a thread about it a couple weeks ago and thought I had it running faster only later to find out it was still fairly slow. I tried installing scotch box once but it didn't work so I gave up. Will probably go for it again before too long
 
@Brad Padgett I found that when I upgraded my HDD to an SSD, I had no issues installing ScotchBox. Follow the directions to the 'T' and you should have it installed within 20 minutes or less. Hit me up if you have any questions about it and I'll try to help you figure it out.
 
Apparently it's implemented in Pro according to https://github.com/scotch-io/scotch-box/issues/311 which would explain why you're not getting it.

I'm finding that unless I stick to locally installed MySQL I can't use this, my SQL client doesn't support SSH tunnelling unless I pay for it (SQLyog Community Edition). If I use local MySQL that takes away some of the portability, so that diminishes the value for me unfortunately :(

I'll report back whether the fixes in that thread works for me.


Fillip

Fillip, did you ever find a way to get this working with SQLyog Community Edition? If not what did you end up using for database management?
 
Having issues getting HediSQL to connect via ssh tunnel. EDIT: NVM. Got it working. I made ZERO net changes to get it to work. I tried fiddling with port settings, and when that didn't work I changed them back and all of a sudden it started working.

If anyone else is having problems trying to get this to work with HediSQL try changing the ports to something else then change them back to these settings (note: the passwords are the same as the usernames). If using scotchbox pro the ssh port should be 2222 instead of 22. Also, plink.exe (which is required to connect via ssh tunnel) throws up an error message during login but it is really an informational message, not an error message. This also added to a lot of my confusion when things weren't working initially.
 

Attachments

  • hedi1.webp
    hedi1.webp
    23.1 KB · Views: 8
  • hedi2.webp
    hedi2.webp
    22.1 KB · Views: 9
  • hedi3.webp
    hedi3.webp
    25.4 KB · Views: 7
Last edited:
Just wanted to share some important things I've learned about Scotchbox which will hopefully be useful to others:

TIP #1: USE NFS FOR THE SYNCED FOLDER

This is huge. I was struggling with 1-3 second page loads with my XenForo/Scotchbox install even on a fast host machine.

By enabling NFS in the Vagrantfile, page loads are very fast now and it offers a much more usable environment. Just comment out the default config.vm.synced_folder line and uncomment the one that mentions nfs, then run "vagrant reload":

Code:
# config.vm.synced_folder ".", "/var/www", :mount_options => ["dmode=777", "fmode=666"]

# Optional NFS. Make sure to remove other synced_folder line too
config.vm.synced_folder ".", "/var/www", :nfs => { :mount_options => ["dmode=777","fmode=666"] }

This is an official recommendation by Scotchbox; see the "Vagrant is slow!" section on this page for more information.

TIP #2: USE NGROK FOR MOBILE TESTING

The only downside to using NFS as mentioned above is that you can't use public networking to access your Scotchbox from other computers or mobile devices, and "vagrant share" has been deprecated (it's still in the docs, but don't waste your time with it).

Instead, just use ngrok. It generates a public URL which points to your Scotchbox install and offers some other handy debug tools. After installing ngrok, I run it by rewriting headers from my host machine to the Scotchbox. I have my Scotchbox configured to use the static IP of 172.28.128.3, so you'd just change this command to include your box's IP:

Code:
ngrok http -host-header=rewrite 172.28.128.3:80

See this answer on StackOverflow for more details.

That command returns an obscure, public URL to your Scotchbox install which you can then load on mobile devices for native testing. You can even share the URL with others for testing!
 
Looks like Scotch Box Pro has been free for a while now, although it's not been updated in about 2.5 years, so is still on PHP7.2

The Andrej repo doesn't have the latest PHP versions for Ubuntu 17, so can't be downloaded the usual way.

Has anyone created an updated build script for a more modern box or managed to package one up to put it on vagrant?

Or is there a better systems now than Scotchbox?
 
I use XAMPP.

 
Top Bottom