Get Ready for PHP7

The release date for PHP7 is November 12. Some of our users will continue to use PHP5 for a while, but will upgrade to v7 when it becomes available. We wanted to make sure ActiveCollab was working on v7 so we started testing it earlier. You can find it here: installation is as easy as running a couple of commands:git clone
cd php7dev && vagrant up
vagrant ssh
Once you are in VM, type:makephp 7.
php -v
The last command will tell you that you’re running PHP 7 (currently the exact version number is PHP 7.1.0-dev).We then downloaded ActiveCollab 5.0.91 and unpacked it to `/var/www/activecollab`. We needed to set up vhost for testing. VM has nginx and PHP-FPM, so we added `/etc/nginx/conf.d/activecollab.conf` with the following settings:server { listen 80; server_name php7talk; root /var/www/activecollab/public; index router.php; access_log /var/log/nginx/activecollab-access.log; error_log /var/log/nginx/activecollab-error.log debug; if (!-e $request_filename) { rewrite ^//assets/(. *)$ //assets/$1 last; rewrite ^/avatars/(. *)$ /avatars/$1 last; rewrite ^/wallpapers/(. *)$ /wallpapers/$1 last; rewrite ^/verify-existence$ /verify.php last; rewrite ^/proxy.php$ /proxy.php last; rewrite ^/api/v([0-9]*)/(. *)$ /api.php?path_info=$2&api_version=$1 last; rewrite ^$ /router.php last; rewrite ^(. *) /router.php?path_info=$1 last; } include php.conf;} Finally, we added php7dev to `/etc/hosts` on the machine that was running the VM – and we were ready to go.When we first ran the ActiveCollab installer, it reported a couple of errors.The first one happened because version_compare()function said PHP 7.0.0-dev is lower than 7.0.0 (being a dev release). We quickly fixed the problem and discovered that Phar extension was not installed by default. After adding it to the file php.ini and restarting PHP7, the installer allowed us to proceed to the next step. The database connection step went without problems so we added the test credentials and were immediately greeted by a 500 Internal Server error. This was caused by code errors in the module definition. These errors didn’t cause any problems with PHP5 but did in PHP7. These were easily fixed, but then we ran into the next problem: PHP7 introduced Error classin global namespace. ActiveCollab had a class with the exact same name since forever so we had to move it under Angie. After the refactoring was completed, ActiveCollab was successfully installed by the installer. This is the key difference between PHP5 and PHP7. In some cases, it can even exceed 100% according to the PHP team. It was put to the test by creating a script that made 830 requests on a sample data set. We then measured how fast it ran with PHP5.6 and PHP7 (same machine, 5 consecutive runs). Here are the results. The new release will include some interesting new features, stability enhancements, and experimental PHP7 support for those who are eager to play with it.

Related Posts

What to Expect from Entry-Level Data Science Jobs

You might be curious about what an entry-level job in data science will look like if you are thinking of a career as a data scientist. The…

What to Expect from a Entry-Level Cybersecurity Engineer

Are you looking for a job with a good salary that doesn’t require a college education? It might sound impossible or impractical, but it’s not. Many jobs,…

Gain a 1:1 session with an Industry Genius to improve your business skills

It would be great to have a genius answer your questions about your team’s sales compensation plans. Or how to determine where your marketing campaign went wrong….

Future Tech Predictions 2022: Blockchain (Cryptocurrency, NFTs) to IoT (XR or UX).

Businesses will continue to be interested in IoT and blockchain this year. We asked members from CompTIA’s Blockchain Advisory Council as well as the IoT Advisory Council…

Emerging Tech Applications in the COVID New Normal

In just weeks, the threat posed by a growing pandemic as well as a looming recession turned “business as usual” upside-down. These conditions encouraged the rapid adoption…

Part 1: How to land your first tech job without a Tech degree

Share this post Anyone who has tried to find a job, regardless of the field, knows that it is easier to get a job with decent pay…