Update Symfoy 2 to newer version - php

I'm using Symfony 2.0.9 to build a new web site. Yesterday the newer version 2.0.10 went out and I need to update my local project (windows 7) to that version. I saw that using linux the process of update is easy because you just need to run a command and everything works out of the box but in windows there is no written solution. How should I update? Simply overwriting files?

As far as I know the same procedure that is valid for linux is valid for windows as well. The bin/vendors script (the one that updates vendor folders) is actually a PHP script, so you can run it under windows in the same way you run the app/console script.

Related

Update PHP version on Windows 10 not using XAMPP etc

I currently have PHP installed on Windows 10 via AMPPS which seems to have stopped being updated. The latest version of PHP available from the AMPPS GUI is 7.1.
I want the latest version of PHP, but it is very hard to find out how to get it. I have found this page: https://windows.php.net/download/ but there doesn't seem to an any installer or suchlike, and I have no idea which option to download or what to do once I've downloaded it.
Isn't there some simple way to do this? I have composer installed if that helps.
Maybe something like composer upadte-php from powershell or something equally simple and user-friendly? Or maybe php --update.
If not, could someone please explain the process in simple steps. I certainly need the new version in my system path too.

Multiple PHP / Apache Versions on MacOs

At the moment I'm using two machines for Web (Win10) & iOS development (MacOS) and looking to combine them into a one computer that I would use on a daily basis.
My current challenge is to ensure that I can develop and run two or more environments on the same machine (not necessary at the same time, a simple switch would do the job).
I've tried MAMP and AMPPS and they both do the job, with an exception to the PHP-CLI version.
Every time I run php from the console it opens up the latest version completely ignoring the one that is specified by the MAMP or AMPPS.
What is the best way to ensure that php-cli always points to a currently active version of the PHP as stipulated by MAMP or AMPPS?
On Windows I was using https://ospanel.io/ that had it's own internal terminal window that would automatically load the current version of php-cli.
I am fully aware of docker/vagrant but they would be an overkill in this case.
Thanks
Unfortunately there is no simple answer to my question. As a solution:
Get multiple version installed
Design a script that changes the PATH environment to the right version as required.
alternatively a script that rewrites a symlink to a required version of the PHP.
For MAMP user, you must edit the file /usr/local/etc/httpd/httpd.conf and set the PHP version you prefer to use in your stack. I only installed one version of Apache HTTPD with multiple PHP versions - you have to specify the version.
If you don't, the default is the Mac's pre-installed PHP version.

Magento 2.2 with PHP 5.4

I got this job, and they use Magento 2, and I noticed that it can only run with php 7 and up. What is weird is that it runs on the company's server, but when I try to run (in Magento's bin directory) this command:
php magento --version
I get the message that it cannot run on PHP 5.4, and everything tells me the server is running PHP 5.4. I downloaded the Magento 2 website, and there is no alteration. It won't run in my localhost unless I switch to PHP 7.
But how is it running online? The directory is /var/www/vhosts, and /var/www/html is empty. What did the previous programmer do to make it run?
The answer is simple: the previous programmer installed the Magento website using Plesk. The latter allows you to choose which version of PHP you want to run.
In order to run something like (magento-root)/bin/php magento --version, for example, I had to replace php with the Plesk version, which was here:
/opt/plesk/php/7.0/bin/php
The default version of PHP on this server is 5.4, but Plesk is using its own version.

How to downgrade PHP version from 5.3 to 5.2 in Ubuntu 12.04?

I have freshly installed Ubuntu 12.04 and I have installed PHP as well. By default, it is installed with version 5.3.10 but my PHP project doesn't support PHP v5.3.10.
I want to downgrade PHP version to 5.2. How can I do it?
You would have to uninstall PHP and then reinstall an older version. However if your working on a project that your going to sell, or give to clients, or whatever the case my suggestion would be take out any functionality thats actually breaking between 5.2x and 5.3x and replace it with its new counter parts, as most people will not want to revert to older versions of PHP for any needs, and generally speaking php versions only goin in one direction, if you block yourself into 5.2 and your making software in one shape or another for people, what are you going to do next year when all the servers come stock with PHP 6? Not to mention a lot of hosted solutions try to provide the latest and greatest on there new machines, and will not revert for a single client especially on a shared hosting environment.
Anyway yea, back to your question again in your terminal under Ubuntu, you can try the following. sudo apt-get purge php5 which will then prompt you for a password, then proceed with removing PHP assuming you have the PHP package standalone and not bundled in with some preconfigured LAMP stack, but then again it should still work generally speaking so long as the version is right.
As for reinstalling it, remove purge from the command and use install. However you will need to look up the means of getting an archived version installed of PHP as apt-get will get you the latest

Trouble in MySQL After Downgrading PHP 5.3.8 to 5.2.17 on XAMPP

I was trying the answer given here > Using XAMPP, how do i swap out PHP 5.3 for PHP 5.2? Was gonna comment there, but apparently the commentbox is closed.
So I open a new question. I was succesful to the part of running http://localhost. But when I open phpmyadmin or my web applcation, it shows as if my mySQL is not running.
While in fact, it is currently running. I can't run a new mysql bat too.
So what is the problem? Was going to coonsider WampServer but it would be a bit of mess to transfer the database again..
I found something elsewhere on the web indicating the need to put libmysql.dll (from the php install dir) into the bin directory of my apache install (in my case, c:\xampp\apache\bin). This sorted it out for me.
This may have been because I downgraded php using a zipped version of 5.2.17, and an installer would have worked in some other case (though not this one due to differences between the xampp installer and the php MSI installer).
Solved this by running stop_mysql.bat twice, then run the new start_mysql.bat. I'm not sure why but this solves the problem.

Categories