简体   繁体   English

流浪的phpmyadmin php显示为纯文本问题

[英]Vagrant phpmyadmin php show as plain text issue

I'm having some issues with phpmyadmin that i installed on a virtual machine using vagrant. 我在使用流浪汉的虚拟机上安装的phpmyadmin遇到了一些问题。 I downloaded the vagrant file from puphpet it's a Centos with php, mysql, nodejs, and apache. 我从puphpet下载了无业游民的文件,它是一个带有php,mysql,nodejs和apache的Centos。

Default installation works fine, already edited my vhost file on my local machine to access centos /var/www folder and php it's working there, but phpmyadmin folder it's showing plain text rather than executing the php code of the index.php, the weird thing is that only phpmyadmin is not executing php code. 默认安装工作正常,已经在本地计算机上编辑了我的vhost文件以访问centos / var / www文件夹,并且php在那儿工作,但是phpmyadmin文件夹显示的是纯文本,而不是执行index.php的php代码,这很奇怪是只有phpmyadmin没有执行php代码。

My local setup is Mac OS X el capitan, my vhost cents.dev point to /var/www folder. 我的本地设置是Mac OS X el capitan,我的虚拟主机cents.dev指向/ var / www文件夹。

Couldn't find any solution online. 找不到在线解决方案。 I installed phpmyadmin using yum command, then made a link in my /var/www folder, that didn't work, the moved the phpmyadmin folder to /var/www and still doesn't work 我使用yum命令安装了phpmyadmin,然后在我的/ var / www文件夹中建立了一个链接,该链接不起作用,将phpmyadmin文件夹移至/ var / www,但仍然不起作用

phpinfo is: phpinfo是:

Linux local.puphpet 2.6.32-504.8.1.el6.x86_64
Server API  FPM/FastCGI
PHP 5.6.15 (cli)

PhpMyAdmin uses shorttags for php ( <? instead of <?php ). PhpMyAdmin使用php的短标签( <?代替<?php )。

Edit your php.ini to support that. 编辑您的php.ini以支持它。

short_open_tag = On

And then restart your webserver 然后重新启动您的网络服务器

sudo service apache2 restart

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

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