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)
Related
I updated my MacOS to Monterey (12.0.1) and my PHP stopped working.
MacOS 12 seem to have removed PHP support.
I'm currently trying to configure everything using homebrew.
After installation, when I try to start the httpd, I'm getting the following errors-
user#Laptop folder % /opt/homebrew/opt/httpd/bin/httpd -D FOREGROUND
dyld[15738]: Symbol not found: _apr_bucket_file_set_buf_size
Referenced from: /opt/homebrew/Cellar/httpd/2.4.51/bin/httpd
Expected in: /usr/lib/libaprutil-1.0.dylib
zsh: abort /opt/homebrew/opt/httpd/bin/httpd -D FOREGROUND
Am I missing any package for _apr_bucket_file_set_buf_size?
Yeah, what a nightmare! PHP is no longer supported natively in MacOS 12. I switched to Homebrew's Apache (httpd) package.
But switching from native Apache to Homebrew's Apache wasn't easy.
There are lots of guides out there on how to install Homebrew's Apache. I won't go into them here.
But after installing, configuring, and starting, I was receiving a similar error to your "apr_bucket" error. I ran brew reinstall apr-util and that did the trick.
Found it here: https://stackoverflow.com/a/41871228/1623341
After that, I removed Homebrew's Apache brew remove httpd, then reinstalled brew install httpd, then updated the httpd.conf file, then started brew services start httpd. That seemed to do the trick for me.
I had to sign the homebrew PHP module using MacOS codesign.
Finally, Apache and PHP are working in my MacOS Monterey.
Kudos to the original author for the detailed solution
https://www.simplified.guide/macos/apache-php-homebrew-codesign
I tried to install PHP 5.6 with LiteSpeed SAPI for my OpenLiteSpeed Webserver on Ubuntu 18.04 from an official repository using this guide: https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:php:apt
But after adding the LiteSpeed Debian Repository command sudo apt search lsphp56 gave me no result (the earliest version I can find is lsphp 7.0). Am I did something wrong or OLS stop to support lsphp56? Is there another way to install lsphp 5.6 on OLS?
I installed Xampp on Ubuntu 16 to work with Laravel.
I ran my Laravel code and got this error : Mcrypt PHP extension required.
After that I tried to install Mcrypt on PHP.
I have done these :
sudo apt-get install mcrypt
sudo phpenmod mcrypt
I have also done this : Link
I also restart the all services from Xampp after every change but I still get error on Laravel.
Any idea ?
My PHP version is 7.0.22 and Ubuntu version is 16.04.1 .
Thank you .
Edit 1
I did this and I still see the error.
After trying to many things. I just got rid of this shit by installing both version on my computer.
First I installed php 7.1.19 version.
Secondly I installed php 7.2.15 version
Now I am working perfectly with my project.
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?
i am installing Moodle 2.1 with postgre database. the problem i am facing is that it gives me error
PHP has not been properly configured with the PGSQL extension so that
it can communicate with PostgreSQL. Please check your php.ini file or
recompile PHP.
i have adjusted all the required extension for pgsql. but still i get the same error. i have even created a database in postgre (an empty database) but still i didnt work.
please help me
thanks
Have you tried (command line):
apt-get install php5-pgsql
apache2ctl restart
Or:
sudo apt-get install php5-pgsql
sudo apache2ctl restart
I had a lot of trouble, because the version of Moodle I have (3.3) wants a newer version of php than I have on my Ubuntu 14.04. I had 5.5.9 and Moodle insisted on 5.6. So I upgraded php5 to php5.6 with a special ppa. But what happened was it put the new php5.6 next to the old one. So I kept having trouble with Apache, until I set soft links to libphp5.so from my new libphp5.6.so, and set the conf and load files in mods-available to the new php5.6 versions.
Then I had a problem with the postgresql php driver. I tried installing php5-pgsql and it was always linking back to the old php 5.5.9 on Ubuntu! This did not make moodle happy. Then I discovered that there is a php5.6-pgsql. I uninstalled my php5-pgsql and installed php5.6-pgsql. Uff. And added these two lines to php.ini (inside the /etc/php5/apache2 directory):
extension=/usr/lib/php/20131226/pdo_pgsql.so
extension=/usr/lib/php/20131226/pgsql.so
Now moodle can move on to the next error (the php xml extension)!
sudo apt-get install php5-pgsql fixed it for me despite the fact that my vhost on Plesk runs PHP7.0. Now I can use the CLI in Moodle with PostgreSQL.