I ran into a troublesome issue.
I'm using 1 and 1 virtual private server redhat linux. The server's default PHP version is PHP 5.3.
I do have installed PHP 5.5 on the server. I switch to PHP 5.5 using alias php='path to php'.
I run command php -v to see if the version has changed, indeed it has - the PHP version is now 5.5.
However I am still unable to install phalcon, when I run the command ./install -i I get this error message:
Php 5.3 is not supported.
Any ideas how to resolve this problem?
Alias will not work in your case because it changes php path only for your terminal, not globally.
I'm not a redhat user so can't give you exact steps but a kinda dirty solution is to find your php binary (on debian is in /usr/bin/, /bin/ or /usr/local/bin), rename it to for example php5.3 and in this place make a symbolic link to new php.
Remember that your php webserver (apache, nginx or whatever you use) should also have an updated php! What is more, to compile phalcon you'll need also an updated phpize and other dependencies. I'm not a linux expert so cannot tell you exactly which parts of php5-dev did changed between PHP 5.3 and 5.5 and which did not.
Alternatively you can just clone from github and install an old phalcon 2.x which is also great. The new 3.0 doesn't have that much breaking features. It's killing feature is PHP7 which it seems that you're not going to use. Phalcon 2.x requires PHP5.4+
I belive there are better ways how a php update should be performed but I don't know them.
Related
I'm trying to install PHP 5.3 and an Apache webserver on Ubuntu 20.04. I know that PHP 5.3 is very old, but i need it temporary while i'm upgrading the Website to a new PHP Version.
I have tried multiple ways.
Installed Apache via repo and PHP with binaries multiple times. (with different switches like --with-apxs2, --enable-so)
I also tried to install Apache from binaries as well.
But every time the PHP code was sent as comment to the client. The PHP module was activated.
I don't find anything on the web anymore. Is it even possible to install on a new system like ubuntu 20.04
Do you know where I can find a step by step Instruction for installing PHP 5.3 in 2021 ^^
Or am I missing out something obvious.
Thank you for your help
Thanks to Slava Rozhnev. I tried the installation with Ubuntu 14.04 and followed this guide : https://gist.github.com/arbabnazar/edf23236f33e1f5c052b6444ef6cebe0
And it worked ^^
I have an Ubuntu 18.04 server with Apache, PHP7.3, and MariaDB.
Now I need to install phpmyadmin and I tried to do that using the code below:
apt install phpmyadmin
But this command will install and replace the PHP7.4 with PHP7.3, whereas I need to keep using PHP7.3.
How can I do this?
How have you installed PHP 7.4, since Ubuntu Bionic (18.04) includes PHP 7.2 (https://packages.ubuntu.com/bionic/php)?
You seem to have gone outside of the standard packages (perhaps you're using the excellent effots provided by Ondřej Surý at https://deb.sury.org/). In this case, it's going to cause you some amount of grief to mix and match the newer PHP with the distribution's phpMyAdmin, because of these dependency problems.
You could force the matter. This is probably going to cause you problems, since Bionic packages phpMyAdmin 4.6.6, which is only supported up to PHP 7.1. https://serverfault.com/questions/250224/how-do-i-get-apt-get-to-ignore-some-dependencies has some instructions on ignoring the dependencies. I recommend avoiding this solution.
You could install your own phpMyAdmin. Download the source from phpmyadmin.net and uncompress it to your web root. You may need to add a short configuration file, config.inc.php, but mostly it just works with the default settings. https://docs.phpmyadmin.net/en/latest/setup.html has a quick start section.
You could downgrade your PHP, but you've already stated this isn't a good option for you, and I'm not sure how the Ubuntu package managers get phpMyAdmin working with this newer PHP version.
Clearly, I think the best solution for you to is to install your own phpMyAdmin.
I am new to web development and I tried to install Symfony to my Laptop.. I have already installed fallowing softwares.
Windows 8 ( 64x )
wamp Server 2.4 (includes php5.4.12 & mysql5.6.12)
MySql Server 5.6 (This is not useless but I have installed)
I added C:\wamp\bin to path in System Variable
When I was trying to install Symfony I had to download Composer first So I downloaded Composer-Setup.exe from here
Then I run the wamp Server and went to PHP Extensions then Enabled php_curl and php_openssl also.
I did run Composer-Setup.exe file and selected Do not install shell menus and continued.
set C:\wamp\bin\php\php5.4.12\php.exe as the path to php.exe file
Finally I got following Composer Download error message
Some settings on your machine make Composer unable to work properly.
Make sure that you fix the issues listed below and run this script again:
The openssl extension is missing, which means that secure HTTPS transfers are impossible.
If possible you should enable it or recompile php with --with-openssl
Have I done wrong steps ? How can I solve this issue. Please help me to solve this and install Symfony 2.6 with wamp server 2.4 in Windows 8.
Note: This method does not use the composer but is equally effective
First ensure that PHP is available to your Path environment/system variable, if not add it.
Once you have added php to your environment variable restart your computer and open cmd and cd to your web root directory (project directory)
In cmd run the following:
$php -r "readfile('https://symfony.com/installer');" > symfony
This will download a file named symfony into your project directory (i.e. directory from where cmd is run)
Install the latest version of symfony as follows:
$php symfony new my_project_name
OR
Install/use the most recent version in a specific branch say 2.8
$php symfony new my_project_name 2.8
OR
Install/use specific version version within a specific branch
$php symfony new my_project_name 2.8.3
Note: steps 4, 5, or 6 will take some time, depending on your Internet speed to download Symfony
Is there a specific reason you want to install a WAMP stack? In my experience it's much easier and flexible to use Vagrant to provision a virtual machine with the right specs
Portable: just run vagrant up on another machine, wait a few minutes, and you're done
Allows you to keep the configuration of your developer's machines and the target server the same
Fixing a broken package just requires you to run vagrant up --provision later
Many packages like composer are written more with *Unix-systems in mind and will be easier to maintain and install.
Simply put, configuring an entire server directly on your machine is tedious work and isn't longer necessary. The Vaprobash project is a good example of how to get started
Documenting my struggles to help others and hopefully get some feedback on how I could have done it better.
The command pecl install pthreads fails due to the php installed on my ubuntu 13.04 box not having zts configured.
Options:
1) The ubuntu respository does not have a php package with zts enabled. As of this post, ubuntu only has php 5.4.9 in it's repository (Released: 22 Nov 2012). It is possible to compile a php version from source - which I eventually did (see below), but..
2) I .. ALSO .. wanted to use phpfarm for the ability to run different versions of PHP on my local setup. On github, there is Christian Weiske's original contribution here (phpfarm) and a fork that he has contributed to, by François Poirotte - also called phpfarm. Francois' fork has a few more options to configure ('post-install customization') but I was not able to make that work with a PECL extension. I'm curious to know if misunderstood how to do that, because it looks to me that it just simply does not take PECL commands.
3). Prior to recompiling php from source, I loaded phpfarm (tried both versions), enabled php-fpm (FastCGI) and was able to get my apache2 server to use a phpfarm version (5.5.10) which showed up in a phpinfo() output. But the php-cli always showed the original php version (5.4.9) in the cli (run: php -v). Running (run: php -i | grep php.ini) showed /etc/php5/cli but I had previously removed php5 and aptitude show php5 returned a state of 'not installed.' I even renamed the /etc/php5 directory to see if I could force the system to use the phpfarm php version. Obviously, this is incorrect thinking and I went on to simply compile php 5.6 from source. But, is there something more to do to get a phpfarm php to be used in the cli? I read that the cli loads it's configuration file on a per command basis, unlike the apache2. If I could have run the 5.5.10 version (configured with zts) then I could have then done pecl install pthreads and then re-complied the phpfarm 5.5.10 version with pthreads enabled. Although it appears I will be able to run various versions of php in the apache server, will I ever be able to switch-phpfarm to another version and see it working in the php-cli? Also, I was uncertain on where I could have loaded a pthreads file for the phpfarm compile process to find and use it; could I have done it that way?
4) This stackoverflow post, essentially posted by Joe Watkins - the developer of pThreads is a perfect how-to on getting pThreads installed on a Ubuntu system that has had php configured with zts (Zend Thread Safety). (Thanks Joe!)
A nice tutorial on using phpfarm configured with fast-cgi and the apache server to help run websites under different php configurations.
So what gives with php, php-cli and the phpfarm?
I'm not sure about phpfarm, but do know of another solution ...
Multi
A tool for maintaining multiple installations of PHP in multiple configurations
https://github.com/datingvip/multi
This is a bit more user orientated, will allow you to build many configurations and versions of php, any tagged release of php, and any patched version from any fork of php-src.
In addition, because I wrote it, it will install pthreads for you.
git clone https://github.com/datingvip/multi
cd multi
VERSION=5.5.10 DBG=no-debug ZTS=zts ./php.multi
The above commands will yield an installation of PHP (in one suitable configuration, of one version) in /opt/php.
Look at php.defaults for configuration options and adjust before building
Should configuration fail on, for example, something related to a library like libxml2, it will usually be the case that
sudo apt-get install library-dev
Where library is replaced with the name of the library holding up the build, will fix the problem for you. If it does not, a quick google should get you going again.
Once the build is complete
source /path/to/multi/php.env 5.5.10
Note: multi will always install pthreads for any zts version automatically
I hope that gets you somewhere ...
I want to upgrade to PHP 5.4.0 in XAMPP. I'm using windows operating system. I searched on web, but there was no proper guide for this as it was released recently.
Can anyone give me some instructions on how to upgrade to PHP 5.4.0 in XAMPP (windows)?
Download the latest binary version of PHP (make sure to get the .zip package not the installer)
De-archive it to a directory
Copy the contents of the directory in the php subfolder of your XAMPP installation directory, overwriting the files which are already present
Overwrite the files which are already present in the apache\bin directory with the newer versions.
Now the trick: take the files which have a "_2" in their names (for example php5apache2_2.dll or php5apache2_2_filter.dll), copy them in the apache\bin subdirectory and remove the "_2" part, overwriting the existing files. This is necessary because by XAMPP uses Apache version 2.2 and the files with the 2 prefix are built for Apache 2.0, so you must take the files build for the newer version (which has a different plugin interface) and rename them in the filenames XAMPP expects.
Source
I found a working php_uploadprogress.dll extension for xampp windows with php 5.4 here:
http://www.fsbcomputers.com/php_uploadprogress
there are 32 and 64 bit versions as well as a preview for php 5.5.
By the way, the php build numbers, apache /xampp refers to are:
PHP 5.2: 20060613
PHP 5.3: 20090626
PHP 5.4: 20100525
I hope that you are still following this, I installed php 5.4 on the latest xampp stable with no problem.
Fortunately for you, there is a beta update of xampp which makes life easier. http://www.apachefriends.org/en/xampp-beta.html
Just make sure to make a complete backup of your old xampp directory, and export your old databases so you can import them into your new (updated) mysql installation. Alternatively you do not need to update mysql, I use this beta and I can say that it's pretty solid.
EDIT: The pop-up warning were a problem that I had too, I recommend using the latest beta. But, you can fix the errors and use php 5.4 on your old install (not recommended) by commenting out the following line in php.ini
extension=php_oci8.dll
Change to
;extension=php_oci8.dll
I have done the upgrade in ubuntu. Following are the steps to do the upgrade.
sudo add-apt-repository ppa:ondrej/php5
sudo apt-get update
sudo apt-get install php5
sudo /etc/init.d/apache2 restart