I have installed latest php 5.5.5 and I have no clues how to run it.
Currently I can see integrated php 5.4.17 or so from OS X Mavericks.
I was wondering what should I type in apache file, since none of those from screenshot do not work, except default integrated one by uncommenting first line.
So, can someone please tell me what is the path for newest php that I have installed ? If I type php -v in terminal it will show version 5.5.5 but not on localhost/~dvLden
All you need to type is
$> which php
This worked for me. Note I have a later version of PHP 5.5, which I installed via Homebrew.
LoadModule php5_module /usr/local/Cellar/php55/5.5.9/libexec/apache2/libphp5.so
Related
I have a fresh ubuntu server installed with virtualmin. It autoinstalls Php version 7.2, I need 7.4. So I install 7.4. When I check the version with -v it shows 7.4. However, webmin and wordpress both still see and use only 7.2. I've tried uninstalling 7.2 but the command fails and tells me that module doesn't exist when I can show it in the list of installed versions in ssh. Its just not showing up as an option in virtualmin when I go to change the php version. Only showing 7.2.
Any advice on where I should be looking to resolve this? I'm feeling stumped. Thanks!
You can try with below command :
sudo update-alternatives --set php /usr/bin/php7.4
For more details you can refer below link as well :
https://hackthestuff.com/article/how-to-change-php-version-from-command-line-in-ubuntu
The right way of changing PHP version for the given virtual server in Virtualmin is done using Server Configuration ⇾ PHP Options page.
Using update-alternatives command will change default PHP (CLI) version system-wide. It won't be applied to virtual-servers.
You may find our Virtualmin Community forum helpful.
I installed Visual Code Studio w/ESLint. It won't operate because it is reporting "Language server needs at least PHP 7 installed. Version found: 5.5.38". After researching, I discovered that it seems to be looking at the pre-installed MAC OSX php version. I downloaded and ran PHP 7.1 onto the Mac, changed the PATH variables in ~/.profile, as recommended. I made sure that the LoadModule php5_module ... line in /etc/apache2/httpd.conf was commented out, and restarted (reboot of machine). When I do: > php -v it yields the new version (7.1), but the error report from VSC is the same. What am I missing?
I'm not necessarily sure what you're missing, but I'd use Homebrew, then once installed type the following into terminal to install php 7.1
brew install homebrew/php/php71
You can use the following to switch between versions:
brew unlink php71
And then to link (and vice versa):
brew link php55
To get the version of the PHP that is currently in PATH, type
php --version
Trust me, I've been doing LAMP development for seven years and it's a pain to not use Homebrew if you're using a Mac. I've also used VS Code before I started using PHP Storm, and this method worked for me.
Recently I installed XAMPP for doing local development on my Windows 7 machine. I honestly didn't think PHP was installed at all before hand. I installed the latest version of XAMPP and configured for php 5.6.24. I created some virtual hosts and everything seemed to work.
I was having an issue and I needed to confirm which version of PHP I was using so I opened up my command line and typed php -v. For some reason it is reporting I'm using PHP 5.4.25. The exact line is PHP 5.4.25 (cli) (built: Feb 5 2014 21:19:58)
I don't recall using this version (I had Visual Studio Community installed recently, is that related?). I don't understand either why my CLI is reporting one version, when XAMPP supposedly installed another version. Am I missing something? I need to run some gpm commands for the latest version of Grav CMS but when I do it says it required at least 5.5.9.
It is possible to have multiple versions of php installed.
You will want to ensure that you are executing the php-cli that came with XAMPP.
It sounds like you have another version of php installed and is in your PATH so that when you run php that version is loaded.
You can use the where command to find out what file is being loaded.
From the terminal type: where php
I am not a windows guy but there is a which command on linux. Apparently this is the command for windows. Here is a SO post about it:
Is there an equivalent of 'which' on the Windows command line?
Anyways, you may want to remove that php file and possibly create a symbolic link in its place for the XAMPP version of php-cli
If you remove/rename the file and the new php-cli is not in your path, you will probably get an error as the system will not know what php is.
The solution to this is to uninstall all the xampp's that are installed and then fresh install xampp with php version > 7.
Everything should work fine then.
What happened to me was that I had installed xampp two times. One
xampp on my C:// (version 5.6) and one xampp on my D:// (version 7.2)
When I did the command on my D:// xampp
php --version
It took the xampp php version from the C:// instead of the D://.
I am trying to install the latest version of Piwik (2.8.3) on CentOS 6.5 with httpd. SELinux is set to Permissive mode. I am running PHP 5.3.3.
I have copied all the files required for Piwik, and I am able to load the installation page for Piwik, but on the installation requirements page, it says everything is good except for the line that says
"PHP version 5.3.3 PHP version > 5.3.3 : Error: PHP version > 5.3.3 required"
I know for a fact that I have PHP 5.3.3 installed because I can run the PHP function phpinfo(); and it says I am running PHP 5.3.3.
I thought it might have been an SELinux issue or some kind of permissions issue, but even when SELinux is set to permissive, this is a problem.
Any help would be greatly appreciated. Also please let me know if you need any other information.
I had the same issue when trying to install Piwik 2.8.3 and I also have PHP 5.3.3 installed. To get around it just modify the php check file so if the PHP version is above 5.3.2 it will install.
Here is a link to the Code you need to change
I am trying to get the Symphony framework installed on my laptop (running OS X 10.9 Mavericks), so far I can't even get it started because of error messages
The first thing not being an error but it seems that I have multiple versions of PHP running and I would like to remove everything except the latest version (5.5.12). Can someone please tell me how I can achieve this?
I compiled and built the newest version of PHP from source and installed it (which should replace the original version), however I am seeing 2 different versions when using phpinfo() from a webpage and php -v from the command line:
phpinfo(): PHP Version 5.4.24
php -v: PHP 5.5.12 (cli) (built: May 29 2014 11:21:46)
I compiled and built the newest version of PHP from source and
installed it (which should replace the original version), however I am
seeing 2 different versions when using phpinfo() from a webpage and
php -v from the command line:
PHP from the command line is 100% different from PHP as loaded via an Apache module. So wiping out the old version won’t solve this issue & might cause other issues. Don’t ever attempt that. Instead just install the version of PHP you want to run and edit your Apache config to load the proper libphp5.so PHP 5.5.12 module.
In my Mac OS X 10.9.3 install the default system Apache config is located here:
/private/etc/apache2/httpd.conf
And in there is a commented out line—might be uncommented in yours—that reads:
#LoadModule php5_module libexec/apache2/libphp5.so
So you need to just make sure you create a similar line to the libphp5.so PHP 5.5.12 module like so:
LoadModule php5_module /path/to/the/new/version/of/php/libphp5.so
Making sure to change that /path/to/the/new/version/of/php/ to match your actual libphp5.so PHP 5.5.12 module.
Then restart the Apache web service & all should be good.
Remember this: When it comes to Unix/Linux tools & configurations, you never have to forcefully uninstall components to solve issues like this. It’s all about getting the configuration straight.
All that said, you might make your live easier by running MAMP instead of compiling from source like this. MAMP is a self-contained LAMP stack for MAMP that has the latest versions of PHP installed. And since it runs as an application, none of the issues you are facing compiling from source will ever happen when you use MAMP.
Thanks for your help. I realized that I had installed so many things with MacPorts (programming my Arduino among other things) that I just decided to wipe my drive and reinstall OS X 10.9
Then I just followed this tutorial and finally got everything working properly
http://dab.io/posts/install-symfony-on-os-x-mavericks.html