简体   繁体   English

更新到iMac OS Mojave后,PHP和phpMyAdmin无法正常工作

[英]PHP and phpMyAdmin is not working after updating to iMac OS Mojave

You dont have enough permission to access /phpmyadmin/ on this server.

在此处输入图片说明

after updating to mac os Mojave when I browse to http://localhost/phpmyadmin/index.php I get the index.php file as text. 当我浏览到http://localhost/phpmyadmin/index.php时,更新到mac os Mojave ,我得到了index.php文件作为文本。 so php isn't working 所以PHP无法正常工作

在此处输入图片说明

but when I was running php on terminal php -v is working so there isn't a problem with php. 但是当我在终端php -v上运行php时,它工作正常,所以php没有问题。

在此处输入图片说明

I think the problem is apache isn't configured to working with php 我认为问题是apache未配置为使用php

I needed to tell apache to use php, so I uncommented following line in apache httpd conf 我需要告诉apache使用php,所以我在apache httpd conf注释以下行

open /etc/apache2/httpd.conf on any text editor 在任何文本编辑器上打开/etc/apache2/httpd.conf

uncomment following line (remove the pre # tag) 取消注释下一行(删除pre #标签)

LoadModule php7_module libexec/apache2/libphp7.so

save the file and exit 保存文件并退出

now apache is using php, restart apache to effect the changes 现在apache使用的是php,请重新启动apache以实现更改

sudo apachectl restart

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM