Im running PHP Version 5.3.13.
I installed xDebug Version 2.2.6
Im also using pear.
Im trying to install and use debugging in phpStorm 8, but when I try and start a debugging session I get the following message.
Process finished with exit code 1
Cannot find PHPUnit in include path (.;C:\wamp\bin\php\php5.3.13\pear)
The big issue here is the following PHPUnit 4.4 requires PHP 5.3.3;
Ive checked the versions of PHPUnit back to version 4.0 and all require PHP 5.3.3
My question is this. With my current version of PHP, I dont want to update to 5.3.3 and become a problem for our production environment, but I need to do debugging.
What can I do?
Will going from php 5.3.13 to 5.3.3 have significant effects?
Is there a lower version of PHPUnit available somewhere? (its not listed on their site or in Git)
Your case
Your version of PHP 5.3.13 is actually newer than version required (5.3.3, since 13 > 3) which means you can safely run PHPUnit 4 on your installation and enjoy it.
In general
There is no actively supported version of PHPUnit that is supported on a PHP version earlier than PHP 5.3.3.
Related
I use MAMP 5.5 (383) on my macOS Catalina (10.15.6) for general PHP related development. Some of my projects require LDAP connectivity for various reasons.
My process works well using MAMP, but recently I noticed that if I switch from whoever PHP version I have available in either app from PHP 7.2 to PHP 7.3 or above, all LDAP support stops; I get errors like this:
[30-Jul-2020 23:59:14 America/New_York] PHP Fatal error: Uncaught Error: Call to undefined function ldap_connect() in /Users/Jake/htdocs/ldap_test.php:3
Stack trace:
#0 {main}
And the only command in that file is simply a test ldap_connect() command.
In MAMP when I do a phpinfo() call, when it is running PHP 7.3.8 I see no LDAP references even in the configure command. But when I switch to PHP 7.2.21 I see --with-ldap in the configure command as well as this:
LDAP Support: enabled
RCS Version: $Id: 3839f871a91c293a52322c63329c68db23a0290a $
Total Links: 0/unlimited
API Version: 3001
Vendor Name: OpenLDAP
Vendor Version: 20428
Why is this?
I have tried to upgrade to MAMP 5.7 that has PHP 7.3 as well as PHP 7.4 but I get the same results; no LDAP support.
Has something happened in the way that OpenLDAP is supported in packages like this? I found this Homebrew related discussion which states the following and refers to this reported issue in an official PHP bug report:
“I can patch PHP 7.2 and older to use system LDAP again, but PHP 7.3 will require new symbols that only openldap exposes.”
Does this effectively mean that LDAP support in macOS is dead for PHP 7.3 and above unless there is a patch to PHP code or on the other side in the macOS implementation of OpenLDAP?
I use Ubuntu and CentOS as well and I can easily enable LDAP support via package installers there. But that’s little help when using MAMP for desktop development.
Looking for a solution that centers on the MAMP application and would like to avoid Homebrew or other setups where I am effectively building an M(acOS)AMP server from scratch on macOS.
Looks like this issue has been solved as of MAMP 6.3
LDAP support is back in the versions of PHP that come with MAMP 6.3 and higher.
Deciding to check a newer version of MAMP — since PHP 8 is looming and sticking with PHP 7.2 is no longer a real option — I downloaded MAMP 6.3 and it comes with PHP 7.4.12 and PHP 8.0.0 installed.
And without saying anything else… Both versions of PHP here have LDAP support baked in right out of the box! Confirmed by using a basic ldap_connect command as well as taking a few small apps I have developed around the block in these new versions of PHP and all works great!
So it seems like the PHP 7.3 cycles for MAMP had a weird “no-LDAP” blip. I recommend anyone wanting to move forward in their code, just download MAMP 6.3 and use PHP 7.4 at least and you should be solid.
The vendor version of LDAP contained in MAMP 6.3 is 20448 for anyone who needs to know that.
I need a bit of help. I have AWS EC2 server running on Ubuntu 16.04. My question is how do I install specific PHP version 7.3.12 ?
I have installed PHP and it ended in 7.3.14. Is this gonna be an issue if I have local environment with PHP 7.3.12 ? And how do we specifically install 7.3.12 on ubuntu server?
Many thanks for your help.
You will not have any issue between PHP 7.3.12 and 7.3.14.
A version is split in 3 parts, 7(for main version).3(for current minor version).12(for bugfixes).
Do not try to exec php code on two differents main version 5.0 / 7.0 because of many big changes.
Also there is no many changes in minor version but still, you can have some differents behavior.
And the last one for bugfixes, you should not worry about.
For a complete list of change you can find the changelog : https://www.php.net/ChangeLog-7.php#PHP_7_3
Bugfixes version are release all life of supported version, for exemple PHP 7.3 will have security fixes until 6 Dec 2021.
For actual list, see : https://www.php.net/supported-versions.php
For your other question, you can install another version of php with major an minor (like php 7.2 or php 7.3) in ubuntu and change the path of the php exec command.
But you can't choose (Not sure at 100%) between php 7.3.12 and 7.3.14 because it's bugfixes and it's just a update.
The company hosting my website (which was developed with Laravel 5.4 and PHP 5.6) mandate a change to PHP 7.3, this has been done but I got an error; and I have to switch back to PHP 5.6 to maintain the site up and running.
I want to know if scripts developed in Laravel 5.4 are compatible with PHP 7.3
You can check PHP 7.3 compatibility of Laravel here: https://github.com/laravel/framework/issues/27052
Your dependencies must be causing the problem, you need to downgrade them running the composer update command on a terminal that has PHP version 5.6 in it, you can check the version with: php -v. Once they are updated, you may upload your project again to the server that's running PHP 7.3
I have a WAMP installation and selected PHP 5.6.32 as the version to run.
When I run php artisan serve, the phpinfo() call returns PHP 7.1.5 Development Server
My host has PHP version 5.6.32 installed and I'd like to get Laravel working locally with something other than PHP 7.
What can I do here as the deployment to my host isn't working.
I'm running Laravel version 5.5.32
Yes you need to go down in Laravel Version 5.4 or lower,
https://laravel.com/docs/5.4
** Or you need to upgrade your WAMP PHP to 7 which is required for Laravel 5.5
If you read the docs it will tell you what is required in order to run version of Laravel. It is indicated in to very top of the page under requirements
Good luck with the development
I have to install ZF2 on Windows:
I've clone ZendSkeletonApplication (ZSA) repository from Git
Open cmd and get in ZSA folder
run php composer.phar self-update (everything is ok)
run php composer.phar install
And now I get this:
zendframework/zendframework 2.3.1 requires php >=5.3.23 -> no matching package found.
Okay, I've checked php version php -v:
PHP 5.3.6 (cli) (built: Mar 17 2011 10:37:07)
Any ideas?
ZF 2.3.0 and above requires PHP 5.3.23 or above. You have 5.3.6 (6 is less than 23!). You either need to upgrade PHP to a more recent version, or downgrade to ZF 2.2.x.
5.3.6 is less than 5.3.23. >= means "greather than or equal to".
Zend Framework 2 requires at least 5.3.23, while you have 5.3.6. That means your PHP version is not supported, you can't use the Zend Framework on that server.
What you can do:
Update PHP version to something newer (5.3 is getting pretty old)
If you are sure you already have a newer PHP version installed, check that the cmd is using the new PHP binary and not the old one.
I suggest you update your local Windows version of PHP to the version you are using in production. If that production version is not able to run Zend Framework 2.3.1, you'd not benefit from solving the dependency problem you are experiencing.
Composer does not allow you to change the internally used PHP version if your local PHP is simply used to put together all dependencies but to used to execute these. So matching the production version is a good thing.