I have installed apache and mysql according to this tutorial, but I need to install php 5.5.12 this the $ sudo apt-get install php libapache2-mod-php php-mcrypt php-mysql
installs php 7.*
如何在安装灯堆时在ubuntu上安装php 5.5.12?
- 写回答
- 好问题 0 提建议
- 追加酬金
- 关注问题
- 邀请回答
-
1条回答 默认 最新
- duanmeng3573 2017-01-13 11:26关注
I think this will answer your question. https://askubuntu.com/a/756901/636504
extract:
Using PHP PPA to coinstall PHP 5.6 with PHP 7.0
There's an option to co-install PHP 5.6 packages using
ppa:ondrej/php
.For more information, please see that answer: https://askubuntu.com/a/762161/309221
Extracted from link above:
Assuming
libapache2-mod-php
is a suitable way to enable PHP in Apache for you, you can proceed in this way:sudo add-apt-repository ppa:ondrej/php sudo apt-get update sudo apt-get install php7.0 php5.6 php5.6-mysql php-gettext php5.6-mbstring php-xdebug libapache2-mod-php5.6 libapache2-mod-php7.0
Switch PHP version ( Apache ):
from php5.6 to php7.0:
sudo a2dismod php5.6 ; sudo a2enmod php7.0 ; sudo service apache2 restart
from php7.0 to php5.6:
sudo a2dismod php7.0 ; sudo a2enmod php5.6 ; sudo service apache2 restart
解决 无用评论 打赏 举报
悬赏问题
- ¥15 关于#matlab#的问题:在模糊控制器中选出线路信息,在simulink中根据线路信息生成速度时间目标曲线(初速度为20m/s,15秒后减为0的速度时间图像)我想问线路信息是什么
- ¥15 banner广告展示设置多少时间不怎么会消耗用户价值
- ¥16 mybatis的代理对象无法通过@Autowired装填
- ¥15 可见光定位matlab仿真
- ¥15 arduino 四自由度机械臂
- ¥15 wordpress 产品图片 GIF 没法显示
- ¥15 求三国群英传pl国战时间的修改方法
- ¥15 matlab代码代写,需写出详细代码,代价私
- ¥15 ROS系统搭建请教(跨境电商用途)
- ¥15 AIC3204的示例代码有吗,想用AIC3204测量血氧,找不到相关的代码。