IMHO installing a second PHP installation on Mac OS El Captain and then changing the PATH variable to point at the new installation is complete BS. That is not the way OS should work and it's making me super annoyed that Apple expects us to do like that.
I want to do a proper installation of the latest PHP version and thus removing the old one.
Is this even possible? And if yes, how?
Thank you kindly for all help.
To clarify the question.
OS X comes by default with a PHP 5.5 installation (/usr/bin/php). Installing a newer version of PHP on OS X (e.g. Homebrew) will not replace this default 5.5 installation but will instead place a new PHP version in another location. It will link binaries in /usr/local/bin. To use the new PHP version you have to make sure /usr/local/bin comes before /usr/bin in your PATH variable.
The original poster does not want to update his PATH variable in this way and is asking for a way to update the original 5.5 installation from Apple instead of installing a new one next to it and perform some PATH variable magic.
Related
I have an old installation of TYPO3 (6.4) and I want to move it to another supplier. I can export everything but I cannot install a working server that can run the applications from the old website.
I am sure it has something to do with PHP and my solution I think would be to install PHP 5.4.4 on either Debian 7 or a newer Debian distribtion.
Can anyone help me out? Thank you :)
There never was a TYPO3 version 6.4. maybe 6.0.4 or 6.2.4 ?
you can try to install a virtual maschine with an old linux image with that old PHP version.
But that should be only local and only for viewing the old site.
In general you don't need a working server as all neccessary data is in the database (and filesystem).
Install a TYPO3 verion 7 (also outdated, but runs on PHP 7.2) as an intermediate step and insert a copy of the old database and the filesystem (fileadmin/*). Then run upgrade wizard (do an upgrade for all extensions as possible)
Repeat for TYPO3 versions 8, 9 until your database is converted to latest version and matching extensions.
Meanwhile you probably need to change the rendering as the old installation was probably based on CSC (css_styled_content) while there is FSC (fluid_styled_content) which resuls in other HTML markup and other CSS.
Or was it even a 4.6?
Then you need a prior step with TYPO3 6.2 to convert all file references to FAL. therefore you need an old PHP 5.6 to execute the upgrade wizards. (stay with a local virtual machine)
I have the latest version of MAMP installed but i want it to run PHP version 5.4.
That version is included in the MAMP file dir. It is located…
-> bin/php/php5.4.42
but in the preferences pane there are only 2 PHP version options: 5.6.10 and 7
I want to do this a part of troubleshooting. i have a Drupal install and am getting the dreaded ‘White Screen of Death’. I’m trying anything and everything to get it working!
MAMP lets you choose from the last two versions of PHP installed in bin/php. If you want to use 5.4.42, just leave this folder and another one of your choice inside this directory (move the others somewhere else so you have a copy, just in case). When you restart MAMP you'll be able to choose your preferred PHP version in the Preferences.
You can download more versions at https://www.mamp.info/en/downloads/
The easier way is to use other localwebserver called Ampps, and after installing it you can choose the version you want by the simple interface it provide.
You click on PHP ==> Change PHP version, and it will show you versions from 5.3 to 7.0.
Here is the link: http://www.ampps.com/
Thanks a lot.
Today I have tried to install imagick in my xampp a hundred times. And I did it. If you have troubles, please try following these steps:
Since xampp is x86, check if your Image Magick (the program) is x86. If not, download the latest version here: imagemagick.org/script/binary-releases.php#windows
Please remember that u MUST download the Win32 dynamic at 16 bits-per-pixel.
Install Image Magick at C:\imagemagick.
Download the latest stable version of imagick here: . You MUST download the 5.x Thread Safe (TS) x86. The x in 5.x is the version of your PHP.
Put the php_imagick.dll in php/ext folder of your xampp installation.
Add this in your php.ini: extension=php_imagick.dll
Here is when I have a lot of trouble. If you try to start the server (or writing php in the console (start->cmd)), you will get an error. If that error says something like this: Unable to find the entry point for the procedure FlattenImages in the DLL CORE_RL_magick.dll it means that you're well underway.
Now, you must go into the installation folder of Image Magick and overwrite the DLL you downloaded with the php_imagick.dll. All of them start with the prefix CORE_RL_.
Once you overwrote all of them, you can try writing php in the windows console. I don't say something means that the imagick is functional (you can check in localhost/xampp/ > phpinfo() link. Personally, I had to install a new DLL: vcomp110.dll.
If someone has the same error as me (the system can't found the vcomp11.dd) download it here
Now, if you try executing php on console, or just initializing the apache module of xampp, you should not have errors.
Goodbye and hope I can help someone.
EDIT: when tried to convert some-img.bmp some-result.jpg in the console, I had this error:
convert.exe: unable to open module file 'C:\Users\my-acc\.magick\IM_MOD_RL_BMP_.dll': No such file or directory # ...
This happened when there is no folder .magick in my-acc. The thing you need to do is this:
Create a folder named .magick in the my-acc folder. Since the name starts with a stop, you need to create it through the console. Here are the commands:
1.1. c:
1.2. cd Users\my-acc
1.3. mkdir .magick
Go to C:\imagemagick\modules\coders and copy the entire files into the latest folder created.
Now, you will be able to use Image Magick through the commands or the PHP Classes.
On background, if you use Codeigniter, i have no idea how to use the image_lib with imagick. So, it's better with the own imagick classes. Here a simple example:
$image = new Imagick($upload_data['full_path']);
$image->thumbnailImage(250,0);
if($image->writeImage($upload_data['file_path'].$upload_data['raw_name'].'_thumb'.$upload_data['file_ext'])){
something here;
}
$image->clear();
This answer might be extremely naive, but, I've found that getting things done in Windows is generally too painful. Many people agree with that and have found solace in a tool known as "chocolatey".
First, install chocolatey on your Windows machine (super easy install instructions):
https://chocolatey.org/
Then, use chocolatey to install everything else that you need (imagemagick in this case):
https://chocolatey.org/packages/imagemagick
I suspect you might have to do some minor tweaking to configuration files after that, plus handle all of the "Windows permissions" needed to get things to work smoothly. Permissions are can be as simple (and not necessarily safe) as "full control" to some user, plus activating inheritance and overwriting all children's settings to use inheritance.
In short, install, configure, permissions, go.
PS. This answer might be incomplete/prototypical/experimental, since I don't run codeigniter, php, imagemagick on Windows.
This how-to of Winderfind is wonderful, but for me it was not yet complete to troubleshoot all problems. First of all, have a look at this tutorial:
http://hrt0kmt.hatenablog.com/entry/2015/05/27/170608
Secondly I discovered that not all versions of ImageMagick will work with all versions of php_imagick.dll. Check out my and others answers on this post for further troubleshooting:
ImageMagick supported formats no value
Great tutorial,
If you are running windows 11, and installing xampp with php 8.1, you need to install 64bit versions:
Win32 dynamic at 16 bits-per-pixel
Becomes
Win64 dynamic at 16 bits-per-pixel
And
5.x Thread Safe (TS) x86
Becomes
8.1 Thread Safe (TS) x64
If you've installed the 32bit versions (as I did), you can just download the 64bit versions and overwrite all the files. Then restart apache and it should start working.
I've installed PECL for PHP on MAMP. Unfortunately, it is using php 5.3.6 which is different form the most recent version of PHP(which is 5.4.10 today). When looking a phpinfo, I see that it is not loading the php.ini file I want (5.3.6), it is loading the latest one (which is normal)
How to tell MAMP which version of PHP to use ?
Thanks
Check your Prefences pane. Should you want specific versions, you will need to install them manually or take a look at this thread.
1 - Download the desired version of PHP here (listed on the right).
2 - Two cases:
Either you have Mamp pro and you can change it through the user interface or you have the free version of Mamp and can achieve that, renaming each folder with for example .DIS at the end at /Applications/MAMP/bin/php/ and just not renaming any version of php, plus the one that you are going to import and consequently copy-paste. This is because the free version of Mamp only allows you to see the two highest version of php through the user interface (for more information watch this video tutorial which will give you more details about the process to follow).
I'm running on OS X 10.5 (Leopard), and I want to update the current version of PHP 5.2.15 (cli) that I have to PHP 5.3 or even 5.4.
The matter is that I need to run some PHP snippets in my terminal, and the version that i have (PHP 5.2.15 (cli) (built: May 5 2011 18:56:00)) can't allow some functions. That's why I need to upgrade my current version.
I searched on the web, but didn't find anything. How can I do it ?
Thanks !
Step 1. install Homebrew
Step 2. install Homebrew-php
Step 3. install the php version you want
Step 4. happy php coding.
Alternatively, if you can't get this working (shouldn't be a problem but just in case), you can try using MAMP.
You shouldn't update the default PHP version but rather install it in, I believe its tmp in MacOSX. Download the source from PHP's website, then do the normal command line unzipping which is fairly easy to find online. The file itself knows where to put everything. And then just make sure that your path can point to that new PHP installation.
By typing `which php-filename' you can see if it already is in your path or not. Hope that gives you a bit of a better idea.
EDIT: Ok I correct my previous part on it being /tmp. From what I see its /var. Thats where OSX has defaulted new installations. This is what you should be doing as to not mess with the built in stuff. You never know when you might need it.