Install uWSGI PHP Plugin on Ubuntu 12.04 LTS - php

According to their documentation here in order to run PHP scripts with uWSGI the uwsgi php plugin should be installed. However their documentation point only how to do it on Ubuntu 10.04, not hints at all on how to install it on 12.04. There is a package for 13.10 which does not work in our case.
Did somebody else solved it somehow and brought this plugin up and running on a 12.04 system?

Related

PHP7.2 ZTS + PThreads on Ubuntu 16.04; Install additional packages

I have a test server running Ubuntu 16.04. I managed to compile PHP 7.2.2 with ZTS from source and installed PThreads on it.
Now, how do I proceed with further setting up PHP without damaging my installation? If I try to install, let's say PHP Curl or Apache's PHP 7.2 module, Ubuntu wants me to install php7.2-common, etc. which would overwrite my current installation.
Is there a safe way to install additional PHP modules and hook up PHP with Apache2?
Thank you in advance!

CakePHP 1.3 and Ubuntu 16.04

I recently switched to a new Ubuntu 16.04 web server (on GCE) from an Ubuntu 14.04 server. I moved across a few Ruby on Rails projects that run on nginx and postgres with few problems. I now have two legacy CakePHP 1.3 apps to move over to the new server, but I am running in to PHP and MYSQL problems.
The old server was Ubuntu 14.04 running PHP 5.5 and MySQL 5.5.
Ubuntu 16 runs PHP 7, but since I read that CakePHP 1.3 won't work on PHP7, I have downgraded to PHP 5.6.
But, I am still getting this error "PHP message: PHP Fatal error: Call to undefined function mysql_query()"
Is this because I am running mysql-5.7? Or is it still a problem with my PHP 5.6 installation?
I can get phpinfo to run. Here is a screenshot of the top of the result.
Somewhere along the way of downgrading PHP from PHP 7 to PHP 5.6 I missed a few php5.6 packages. I did the following:
sudo apt-get install php5.6-mbstring php5.6-mcrypt php5.6-mysql php5.6-xml
sudo service nginx restart
Now the old cakephp1.3 site is working fine on Ubuntu 16.
Also, note that since I am running CakePHP through nginx instead of the standard Apache setup, I needed to customize my nginx configuration specifically for CakePHP.

Cloud 9: PHP7 cURL not working

Not sure why this isn't working in c9... but
It's really strange because i have installed php5-curl, but i do have php7.0.9, is there a php7-curl?
I have tried apt-get php-curl, php7-curl, php7.0-curl.... and none of them work.
All I get is:
E: Unable to locate package php70-curl
for all of them.
I also updated apt-get.....
SO am i missing something?
PHP 5 extensions do not work with PHP 7. As far as I know, if you compile PHP 7 with --with-curl in the configure command, it will just compile it in.
Are you running Ubuntu? If you are, then are you running 16.04 or newer? In 16.04, there's a package called php7.0-curl in the Ubuntu repositories. http://packages.ubuntu.com/xenial/php7.0-curl
If you are on Ubuntu and on a release earlier than 16.04, I would suggest upgrading. If you are not on Ubuntu, then which distribution are you on?
EDIT: After creating an account on Cloud9, I found that the PHP template is running Ubuntu 14.04 with PHP 5.5. Did you change this?

Installing php7 on Ubuntu 14.04 (trusty) from official tar.gz file downloaded at php.net

I am new to the stackoverflow community and linux server administration.
I am running a Ubuntu 14.04 (trusty) LTS server edition.
I have Apache 2.4.7 installed and my current PHP version is PHP 5.5.9-1ubuntu4.14 (cli).
I want to upgrade my server to the latest version of PHP7 (currently 7.0.0).
Therefore I have downloaded the tar.gz file from the official php.net download site (http://de2.php.net/downloads.php).
Due to the fact that I am a bloody beginner, the problem starts right after this step. I have googled a lot to find a answer how to simply install newer version of php on a running system. Most of the answers were related to the ppa of Ondřej Surý (https://launchpad.net/~ondrej/+archive/ubuntu/php-7.0) but I've read about people complaing about useing unsigned ppa archives in live systems.
So my question is: Could anybody please explain me the manual installation process of php7? And how to configure apache2.x running php5.5.x and php7 parallel?
Thank you in advance!

Ubuntu 12.04 PHP 5.5 and apache2 2.4

I'm on Ubuntu 12.04 64 bit, I decided to upgrade to PHP 5.5 from 5.3 and apache2 2.2 to 2.4. I did something similar to Installing apache 2.4 and php 5.5 on ubuntu 12.04. Long story short something's broken and it's not working correctly so I want to go back to PHP 5.3 and apache2 2.2.
Is it just a case of uninstalling PHP and Apache, removing the sources I added, do a package update and then reinstalling PHP and Apache using apt? I just want to go back to a version of PHP and Apache that work correctly and are supported by 12.04.
Thanks.
Remove the files in /etc/apt/sources.list.d/ that matches the ppa names you added. You should find one like ondrej
Run then sudo apt-get update && sudo apt-get install php5 apache2 and you should have all back working
I've used ondrej ppa too (There are apache 2.4 and mysql 5.6 too from the same author which works really well for me, https://launchpad.net/~ondrej)

Categories