11

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) I have an error in my localhost page:

*** 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

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) The other problem is I can't access phpmyadmin and I get this error :

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

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

Thanks in advance.

PHPLover
  • 1
  • 51
  • 158
  • 311
mahi_nick
  • 151
  • 1
  • 1
  • 7
  • 4
    This is not really a PHP problem as much as it is a WAMP configuration issue. I'm not sure this is the right place for this question. – durbnpoisn Feb 01 '16 at 16:42

4 Answers4

16

I just solve this problem.

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

    right-click the shortcuts, Properties, tab Shortcut:

    • Select "Run as administrator"
    • OK
    • Apply
  2. 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)

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

  4. then type

    D:\wamp64\bin\apache\apache2.4.17\bin> mklink 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"

  5. close the cmd and restart Wampmanager as an administrator

I hope that my solution also works for you.

Wai Ha Lee
  • 8,598
  • 83
  • 57
  • 92
xiao
  • 542
  • 1
  • 9
  • 16
  • 2
    This worked for me! Thanks xiao! I've never made a symlink via command prompt before.... To elaborate on this answer, open cmd as administrator, cd to the WAMP Apache bin folder, and type "mklink php.ini C:\wamp\bin\php\php5.6.15\phpForApache.ini" (without quotes). Walla! No more php.ini error! – WebMW Apr 08 '16 at 17:53
  • This solution fixed my PHP error in WAMP on Windows 10, too: `mklink php.ini c:\Server\wamp64\bin\php\php5.6.16\phpForApache.ini`! – Suriyaa May 26 '16 at 11:29
2

after installation of php you must rename file php-production.ini to php.ini. Those files in your root php directory installed.

For mbstring you must enable this extension. For that you must uncomment the line in your php.ini file (renamed just before) :

;extension = php_mbstring.dll

Check if you have this line in your php.ini :

[mbstring] 
mbstring.language = all 
mbstring.internal_encoding = UTF-8 
mbstring.http_input = auto 
mbstring.http_output = UTF-8 
mbstring.encoding_translation = On 
mbstring.detect_order = UTF-8 
mbstring.substitute_character = none; 
mbstring.func_overload = 0 
mbstring.strict_encoding = Off
miltone
  • 4,416
  • 11
  • 42
  • 76
1

in system tray (bottom right corner of windows) left click wamp icon, php, version, and click on the current version (the one marked with green tick)

GZveri
  • 41
  • 3
1

This was my issue: * ERROR * The PHP configuration loaded file is: c:/program files (x86)/php/php.ini - should be: c:/wamp64/bin/apache/apache2.4.27/bin/php.ini or c:/wamp64/bin/php/php5.6.31/phpforapache.ini You must perform: Right-click icon Wampmanager -> Refresh To resolve this issue, I just went into program files(x86) and added 1 to my PHP folder to make this invisible and retarted all Wampserver services it worked fine. Could have been a conflit with my This old PHP.

Achille
  • 11
  • 1