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.
Related
I'm quite new to Linux and still trying to adapt my self. I've setup my working environment all good, installed XAMPP, node, sublime, etc. But when I tried running a laravel app, the first thing that caught me was I couldn't run php.
I was confused because i had already installed XAMPP (which i thought would've done it all for me), but then I simply created a symlink in my /usr/bin to the /opt/lampp/bin/php and it all worked well (I'm not sure if that was all correct, but it worked).
Then when I tried opening the app in my browser, it couldn't find the sql driver, so I asked my self, what exactly am I doing wrong? XAMPP should have taken care of all those things (as its name suggests), but it didn't setup php and mysql as i thought it would.
Am I missing something here? Should I install MySQL driver and PHP apart from XAMPP? Because that makes no sense at all for me. I really need some basic guidance here about this whole thing, what makes it so different from Windows where I simply install XAMPP and start programming?
I need to understand that so I can have a better understanding of the system it self and fix these kind of problems my self in the future.
PS: I'm using Ubuntu 16.04 and instaled XAMPP with PHP 7.0, downloaded from official website.
Thanks everyone!
I never used xampp on linux myself so i dont know how does it work here but I can tell you what really got me good start at understanding of linux was installing whole LAMP stack myself. So i would recommend googling 'How To Install LAMP' and try to figure it out from countless tutorials.
Basically you install apache, then mysql and php, restart server and check if 'It works'.
try two things
In the folder /etc/php/php.ini
uncheck the line extension=pdo_mysql.so
or in the folder of lampp (/opt/lampp/etc/php.ini)
And to start Laravel you need start with ~/php artisan serve
in the browser localhost:8000
I'm not a programming expert but I am trying to get more into Dynamic Website design using PHP. There's a hashing library on the new PHP version 5.5 that I want to use on a project but right now I'm running PHP 5.4. I use MAMP PRO V 2.1.4 and after looking online and on their site I couldn't find anything with step-by-step instructions on how to update the current PHP version I'm using. I was able to download a v5.5 folder from their site that they say is compatible with the version of MAMP I own. Here's what I've tried so far...
Ok so I looked at the php info page.
It looks like I need to add the new php version folder to my MAMP/bin/php folder and I did that. But it still doesn't show up as a selection on MAMP Pro.
So I read somewhere that MAMP Pro V 2.x only gives you two options for PHP and that I should rename the other folders in the PHP file.
I feel like I'm missing a important step. Any advice would be great! If you have any questions please ask. Hopefully I can figure this out and this post will help future non-program savvy web designers too.
Probably the esasiest way is to copy your PHP files somewhere else and then use Appdelete or similar, and delete the MAMP folder in your applications folder and re-install. I had to do this after a Yosemite install broke the older version of MAMP. Why keep the older versions?
I agree reinstall is very safe. u dont need to take a copy of old MAMP. the new install does it on its own. just feel free to downlod new MAMP and click install.
only care u need to take is this
Edit httpd.conf and open up line to include vhosts.conf and copy old vhosts.conf from old MAMP folder.
I am pretty new at this Mac OS thingy and I tried installing PHP54 on it. I know, there is a ton of tutorials out there and trust me, I have spend hours online reading. The problem is I am a newbie and I became impatient and just started installing from Brew, Port and compiling my own.
I really just want to start over, but I would like not to reinstall the OS and I really want to understand how to install into different folder, if I for example want different versions of PHP. (I saw that someone had that in a video tutorial, but he did not tell how to do it)
So the following is my questions to you experts:
How to remove all files from a HomeBrew-install (I think I removed some manually, so that the auto-remover don't work anymore)
How to remove all files from a MacPort-install (same as above)
How to remove the default PHP installation (I've managed to update it, but I don't think it was made correctly)
How to install a new version of PHP 5.3 along with 5.4 and 5.5
Installing MySQL and PhpMyAdmin so that it works with my PHP (I could not connect to the MySQL server the last time I installed it)
I don't think I have made any changes to the Apache-server (hopefully not)
I chose to do a reinstall of my OSX
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
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.