Doctrine Command Line Tool Error : warning unexpected character in input ‘\’ ascii 92

January 16, 2011 § Leave a comment

warning unexpected character in input ‘\’ ascii 92 will only appear if PHP version is under 5.3

So please do confirm you are under PHP 5.3 environment.

My XAMPP / MAMP is running PHP 5.3 still cannot get this error away

Answer: Because you are still using PHP 5.2, why? It is because Terminal may take its own PHP version instead of your PHP version.

1. Check your phpinfo by creating a testing script

2. In terminal, type ‘php test.php’, it should show PHP version from the top

3. If it is 5.2, then please type “export PATH=/Applications/XAMPP/xamppfiles/bin/php:$PATH”
“export PATH=/Applications/XAMPP/xamppfiles/bin:$PATH”
(using XAMPP as example)

After these steps should ensure you got the right environment to work on. Cheers~


Doctrine : Couldn’t locate driver named Mysql

November 2, 2010 § Leave a comment

From the beginning, I would think this is because of the coding of Doctrine is having some issues. Googled it, people said enable the PDO will solve the matter, which I did as it clearly stated on the phpinfo.

What else went wrong?
Then I dig the code of Doctrine, I found out if it didnt find the PDO module, it will find a class called MYSQL_Driver , something like that, but that class is never exist.


I created a PDO connection testing script, and tested it in browsers, worked!

But when I use Terminal to test it, it complained, so that mean the Terminal couldn’t find the extensions path.


It is the PATH variable need to be config in order to run the CLI method which documented by the Doctrine Official site.

In order to config the PATH variable, you may want to follow . Although it stated clearly for XAMPP, but the setting PATH Method is also work for any kind of localhost app (e.t.c MAMPP). The site provide method for both Windows and Mac.

Where Am I?

You are currently browsing entries tagged with doctrine at Nick Wan L.K..