WAMP/MySQL errors not in correct language - php

I've re-installed WAMP multiple times, searched literally hundreds of pages, and its not fixed this issue:
I've looked inside the phpmyadmin config files, set:
$cfg['Lang'] = 'en-utf-8';
Uninstalled multiple times (as mentioned) and seemed to have no luck what so ever. Any help would be appreciated.

To change the language that MySQL uses when reporting you need to change the my.ini file as follows.
Find this line:
# Change your locale here !
lc-messages=fr_FR
And change it to your prefered language, for example:
lc-messages=en_GB
To change it to English US, you can do like this:
lc-messages=en_US
Save the file and then restart MySQL.
left click wampmanager icon -> MySQL -> Service -> Restart Service
Remember the guys that produce WampServer are French so I guess thats why this has been added to the my.ini file, and they just forgot to remove it on this release.
How to Find my.ini in WAMPServer
Use the wampmanager menus like so :-
left click wampmanager icon -> MySQL -> my.ini
This will load the my.ini file into your editor.
Here you can find a list of valid locales

Change the following settings in my.ini file
lc-messages=en_US
To permanently change the language preferences

$cfg['Lang'] = 'en-utf-8'; and friends change the language for phpmysql, not for the mysql server, so anything coming from the database server itself will be unaffected.
You need to start the server daemon with --lc_messages=en_US (or put that in the relevant config file), for a per-session setting just use SET lc_messages = 'en_US';

Related

How to bring back my database to wamp sever?

My server got crashed today morning, so before re-installing it I just copied the folder where my localhost was running so that my databases are not lost and trust me I preserved it safely. Now its re-installed and now my localhost is working but all I want is 'employee' database back to its place. How do I get it?
I copied the folder employee and saved back to where it was but its of no use. Am still stuck.
Reminding you, I didn't export it before re-installing. So can someone tell me how to face this situation?
Ok so assuming you did do a complete backup of the old wampserver folders you can try this.
First make sure you stop all service via wampmanager
wampmanager -> Stop all Services
Now make a backup of this folder on the newly installed WAMPServer, so you can return to a vanilla, just installed state if this does not work.
move \wamp\bin\mysql\mysql5.6.17\data \wamp\bin\mysql\mysql5.6.17\data_vanilla
Now copy your backed up MySQL folder from the Previous installations files to the new install
copy \old_wamp\bin\mysql\mysql5.6.17\data \wamp\bin\mysql\mysql5.6.17\data
Now lets clear the mysql log file, so you dont get confused between old and new message in the log.
move \wamp\logs\mysql.log \wamp\logs\old.mysql.log
You should now be able to restart the MYSQL service and see if it starts up cleanly.
wampmanager -> MySQL -> Service -> Start/Resume Service
Now if the wampmanager icon goes Orange, MySQL should have started. Check the mysql error log, to see if all is well.
wampmanager -> MySQL -> MySQL log
If all is well, you can now start Apache as well.
wampmanager -> Apache -> Service -> Start/Resume Service
The wampmanager icon should go green.
You need to import it back using phpmyadmin.
open localhost/phpmyadmin
select database then click import
locate the database and click go
You probably can find the data that you back up earlier in here, \wamp\bin\mysql\mysqlXX\data
when planning to recover, you should save the entire data directory . not just the folder with the database name .
refer the thread on superuser.
go to data directory of mysql (C:\wamp\bin\mysql\mysql5.5.24\data )
Find a file called "mysql-bin.index"
Rename that file to "mysql-bin.index-corrupt"
Restart the server and it will work fine, all your database will be where you left them.
or this thread on stackoverflow .
INNODB databases will have been stored in the
\wamp\bin\mysql\mysql5.6.17\ibdata1 file.
There will also be info in a
\wamp\bin\mysql\mysql5.6.17\data\DATA_BASE_NAME\ folder, one .frm file
for each table that was in the database, but this is basically just
schema information and not actual data.
If you do not have that file from the old install then your data is lost. check this super user thread for further details .

Wamp, WordPress LDAP

Hi I am trying to use active directory for my WordPress site (intranet). I have tried a few plugins and none of them have worked so far. I want to stick with Active Directory Integration V1.1.5 as it is one of the most feature rich for my needs.
The issue I am having is that I have My WAMP server installed (Windows User). When I check my
Apache modules says ldap_module is enabled
PhP extensions says php_ldap is enabled
But it does not work. The plugin I am using has a testing tool and the result returned is as follows.
AD Integration Logon Test - openLDAP not installed
Looking at my settings it all seems to be installed correctly. Some other things I have tried:
Went to \\manmd01\c$\wamp\bin\apache\apache2.4.9\modules and made sure that mod_ldap.so exists.
I've gone into \\manmd01\c$\wamp\bin\apache\apache2.4.9\conf\httpd.conf and made sure that this line is not commented out: LoadModule ldap_module modules/mod_ldap.so
I've gone into \\manmd01\c$\wamp\bin\php\php5.5.12\php.ini and made sure this line is not commented out: extension=php_ldap.dll
I have looked at other posts (on stack overflow) and tried to replicate the fixes but so far nothing appears to have worked for me this is why i am asking the question again.
The ini file that is used by Apache is not the \wamp\bin\php\php5.5.12\php.ini.
If you use the wampmanager menus ( they are there for a reason )
wampmanager -> PHP -> php.ini
It will edit the correct file, which for reference is \wamp\bin\php\php5.5.12\phpForApache.ini.
If you uncomment the ldap extension in there you will have more luck.
Alternatively, you can use the wampmanager menus ( they are there for a reason ) to turn on the ldap extension.
wampmanager -> PHP -> Extensions -> php_ldap
If this menu item does not have a tick beside it, then click it, it will automaticalyy amend the CORRECT ini file and then restart Apache so that the change is activated.
NOTE: The php.ini file in \wamp\bin\php\php5.5.12\php.ini is only used by the PHP CLI (Command Line Interpreter)
Also the php_ldap extension requires 3 other dll's to be available in order to run. These are :-
libsasl.dll
libeay32.dll
ssleay32.dll
The old way, WAMPServer 2.4 and before was to copy these to the \wamp\bin\apache\apache{version}\bin but there is a better way as of 2.5.
On WAMPServer 2.5 these are located in the \wamp\bin\php{version}\php` folder. There should be SYMLINKS created inside the \wamp\bin\apache\apache{version}\bin folder by the install. If these SYMLINKS do not exist, then to recreate all the required SYMLNKS the easiest way is to use the wampmanager menus to recreate them. You do this by :-
wampmanager -> Apache -> Version -> 2.4.9 (i.e. click on the version number)
Go to Control Panel and open the System icon (Start → Control Panel)
Go to the Advanced tab
Click on the 'Environment Variables' button
Look into the 'System Variables' pane
Find the Path entry (you may need to scroll to find it)
Double click on the Path entry
Enter your PHP directory at the end, including ';' before (e.g. ;C:\wamp\bin\php\php5.5.12)
Press OK
Restrart Wamp

MySQL and PHP not working together

I am actually ridicously stumped by this. I have downloaded php, MySQL and apache. Apache and php are working together, and it is wonderful. However whatever I do I cannot get php to work with MySQL. I'm using Windows 7 and PHP version 5.2.17 and Apache 2.2
I have gone into php.ini and uncommented out the lines extension=php_mysql.dll, extension=php_mysqli.dll and set the extention in Windows to this extension=msql.dll. I even changed the session path in php.ini to see if it would change anything. Spoiler Alert it didn't. I keep checking phpinfo() but the only information about MySQL and SQL that shows up is sql.safe_mode: off.
I cannot find any answers anywhere, well I have but all it tells me to do is uninstall and reinstall everything. Which I am trying to avoid at all costs. But if that is my only option, can you give suggestions about using WAMP and whether its easier than installing everything individually? Because I did not use WAMP and it took me forever to get this far.
Annabelle,
Are you editing the php.ini file directly or using the wampmanager menus to edit php.ini.
There are actually 2 php.ini files:
the one in c:\wamp\bin\php\php5.2.17 which is used for the PHP CLI environment ( Command Line Interface )
and the one in c:\wamp\bin\apache\apache2.2.x\bin\php.ini ( the one used by apache )
The reason for having 2 is a little complicated but if you ALWAYS use the wampmanager menu links to edit php.ini it will ensure ou always edit the one used by apache.
left click wampmanager icon in the system tray -> PHP -> php.ini
To check that the mysql and mysqli module are loaded go to localhost and from the wamp home page click on the phpinfo link. If the modules are loaded you should see them mentioned in the list of loaded modules in the CONFIGURATION section.

CakePHP 'Cake is NOT able to connect to the database'

I've looked at this post about a similar issue:
CakePHP: Can't access MySQL database
and I've tried everything they mentioned in there including:
Changing my database.php so that the 'port' attribute for both $default and $test are the location of my mysqld.sock file
Changing the 'port' attribute to the actual integer that represents the port in my my.cnf mysql config
Changing the mysql socket locations in php.ini to the location of my mysqld.sock file
I'm using ubuntu 11.04, apache 2.2.17, mysql 5.1.54, and CakePHP 1.3.10. My install of mysql and apache don't seem to match any conventions, as in, all the config files are there, they are all just in really weird places--I'm not sure why that is, but I've tried reinstalling both programs multiple times with the same results...
At any rate, I can log into mysql from the terminal and use it normally, and apache is working because I can see the CakePHP default homepage. I just can't get it to change the message 'Cake is NOT able to connect to the database'.
SOLVED: Figured it out, had to change php.ini so that extension_dir pointed to the correct directory and had to add a line extension=mysql.so.
I just got my cake php to work. OMG it sucked. I'm going to make a video tutorial on my blog when I get a chance to make it easy to install and show all the errors and how to fix them.
go into apache and turn this on in the apache modules: rewrite_module. For me in wamp, I just go to apache -> apache modules -> rewrite_module.
Then restart. I had to do this 3 times before it worked.
Then go into the php.ini and turn this on: extension=php_pdo_mysql.dll, by getting rid of the semicolon in the front of it. Then restart again.

Configure PHP to work with MySQL and phpMyAdmin

My purpose is to setup a forum in php just locally on my Windows 7 machine to test how it works.
I have installed Apache HTTP Server and PHP v5 successfully. Then I downloaded and extracted the phpbb-forum software and put it in my root folder. Then I realized that I needed some kind of database so I downloaded and installed MySQL. To configure my database I also downloaded and extracted phpMyAdmin but I can't get it to work. When I open my browser and navigate to my phpMyAdmin-folder I simply get this:
Screenshot: http://img836.imageshack.us/img836/5139/captureqb.png
I use my Apache server to preview my website where I'm using some php include functions so I know that I've a "working" PHP installation. The MySQL service is also running on my computer.
However, do you need to configure PHP and/or Apache in order to get phpMyAdmin to work properly? I'm a complete noob on this so I suppose it may be multiple shortcomings.
Thank you.. //Realiserad
The simpler way is to install WAMP server : it bundle Apache, PHP, MySQL and PHPMyAdmin preconficurated for work together.
You need to enable the MySQL extension to use MySQL from PHP.
The MySQL extension may or may not be bundled with your PHP distribution. (look for php_mysql.dll in the ext folder)
Assuming it's installed you can enable it by adding or uncommenting this line in your php.ini:
extension=php_mysql.dll
As other people have said it may be simpler to install WAMP Server
Have a look at: http://www.ricocheting.com/how-to-install-on-windows/mysql - Specifically, the 3rd step. It involves downloading the mySQL PHP Extention (which is a dll), and un-commenting a line of php.ini so that PHP Load's the extension.
While is may be simpler to install XAMPP or WAMP, I think that it's good to know how to fix your own problems - Scientia potentia est :D
not very familiar with windows, but it seems like you miss the php-mysql extension, which you can download from here (i think):
http://mysql2.mirrors-r-us.net/downloads/connector/php/index.html
would be alot easier for you to use a preconfigured wamp install like this one (available for win/mac/etc). google "xampp", i'm not allowed to post more than one link due to stackoverflows spam protection.
Configure PHP to Access MySQL
Open the c:\php\php.ini file with your favorite text editor.
Uncomment the following lines by removing the semicolon:
extension=php_mysqli.dll
extension=php_mbstring.dll
extension=php_mcrypt.dll
save and exit editor
After extracting the archive into phpmyadmin folder, you will have to configure phpmyadmin before you can connect to sql server.
you should create a configuration file. This file can be created manually (simply use a text editor),
During your first session you will see an error message.
To solve this problem you should create folder (C:\project\wwwroot\phpmyadmin\config). After that give full rights for IIS_IUSRS group and IUSR user.granting permission/image
Return to the config window. Visit localhost/phpmyadmin/setup/
To configure the connection settings click on the “New Server” button.
Enter the verbose name of the SQL server, and then the server hostname. If necessary, you can specify other settings.[setting up/image][2]
Save the settings and then the server will redirect us to the previous page. Choose:
the default language – English
the default server – 127.0.0.1
end of the line – Windows (\ r \ n)
Click Save, and then download. The received file (config.inc.php) you should save to the root directory (C:\project\wwwroot\phpmyadmin).
Open the authorization window (//localhost/phpmyadmin/) and login under root account. If you see a starting phpMyAdmin window, you can delete config folder.
For the correct work phpMyAdmin requires a database with the information. The script for creating database is already installed.

Categories