PHP:没有php.ini文件 [英] PHP: No php.ini file

查看:354
本文介绍了PHP:没有php.ini文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚开始学习PHP,为此,我在Windows 8.1上安装了wampserver.当我尝试启动时,它可以正常运行,但是有两个问题:

I just started to learn PHP and in order to do that I installed wampserver on my windows 8.1. When I try to launch, it works properly but I have two problems:

1)我的本地主机页面有错误:

1) I have an error in my localhost page:

***错误*** PHP配置加载的文件是:-应该是:C:/wamp64/bin/apache/apache2.4.17/bin/php.ini或c:/wamp64/bin/php/php5 .6.16/phpforapache.ini

*** ERROR *** The PHP configuration loaded file is: - should be: C:/wamp64/bin/apache/apache2.4.17/bin/php.ini or c:/wamp64/bin/php/php5.6.16/phpforapache.ini

我试图找到php.ini文件,但是它不存在.在我的phpinfo()中,它位于加载的配置文件前面(无).

I tried to find the php.ini file but it doesn't exist. In my phpinfo() it is (none) in front of Loaded Configuration file.

2)另一个问题是我无法访问phpmyadmin,并且出现此错误:

2) The other problem is I can't access phpmyadmin and I get this error :

缺少mbstring扩展名.请检查您的PHP配置."

"The mbstring extension is missing. Please check your PHP configuration."

由于我是php的新手,因此请保持简单的答案! :)

Since I'm really new in php, please keep the answers simple! :)

谢谢.

推荐答案

我只是解决了这个问题.

I just solve this problem.

  1. 以确保以以管理员身份"启动Wampserver:

  1. to be sure to start Wampserver "As an administrator," :

右键单击快捷方式,属性",选项卡"快捷方式:

right-click the shortcuts, Properties, tab Shortcut:

  • 选择以管理员身份运行"
  • 确定
  • 应用

离开Wampmanager,并使用win + x + a或其他方式打开cmd管理员命令窗口.(注意:应以管理员身份运行cmd)

Leave Wampmanager and ursing win+x+a or others ways to open a cmd administrator command window.( attention:it should run the cmd as an administrator)

在此窗口中,访问您的apache安装路径 例如,我的路径:D:\ wamp64 \ bin \ apache \ apache2.4.17 \ bin

In this window, access to your apache installed path for exemple, my path: D:\wamp64\bin\apache\apache2.4.17\bin

然后键入

D:\ wamp64 \ bin \ apache \ apache2.4.17 \ bin> mklink php.ini d:\ wamp \ bin \ php \ php5.6.15 \ phpForApache.ini

D:\wamp64\bin\apache\apache2.4.17\bin> mklink php.ini d:\wamp\bin\php\php5.6.15\phpForApache.ini

,您将看到类似"php.ini<< === >> d:\ wamp \ bin \ php \ php5.6.15 \ phpForApache.ini符号链接已创建"的消息.

and you will see a message likes"php.ini << === >> d:\wamp\bin\php\php5.6.15\phpForApache.ini symlink created"

关闭cmd并以管理员身份重新启动Wampmanager

close the cmd and restart Wampmanager as an administrator

我希望我的解决方案也对您有用.

I hope that my solution also works for you.

这篇关于PHP:没有php.ini文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆