This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use the new forum.
Home » support » Installation and setup » [SOLVED] day3 mysql, netbeans, doctrine
[SOLVED] day3 mysql, netbeans, doctrine [message #98013] Sun, 25 April 2010 19:36 Go to next message
katwer  is currently offline katwer
Messages: 8
Registered: April 2010
Location: Poland
Junior Member
Hello!

I've database in mysql and new project in symfony. I'm working in NetBeans 6.8, Win7.

When I try use doctrine:build-schema, I see:

>> doctrine generating yaml schema from database
Couldn't locate driver named mysql

Could you help my?

I tried add to environment variable path to mysql.exe, but it wasn't good idea Wink

PS. Sorry for my English Smile

[Updated on: Sat, 01 May 2010 11:16]

Re: day3 mysql, netbeans, doctrine [message #98014 is a reply to message #98013 ] Sun, 25 April 2010 19:54 Go to previous messageGo to next message
PurpleFrog  is currently offline PurpleFrog
Messages: 20
Registered: March 2008
Location: Paris
Junior Member
Hello,

Insert a file with <?php phpinfo(); ?> in your web directory and search for pdo in the resulting page.
If you find nothing you have to add pdo and pdo-mysql driver to php.
If you find those, you may have to change the location of the socket of mysql in the pdo section of php.ini.
hope that help.


---PurpleFrog
Lost everywhere
Re: day3 mysql, netbeans, doctrine [message #98018 is a reply to message #98014 ] Sun, 25 April 2010 23:29 Go to previous messageGo to next message
katwer  is currently offline katwer
Messages: 8
Registered: April 2010
Location: Poland
Junior Member
Hi,

thanks for your advice.

In php.ini I have:
extension=php_pdo.dll
extension=php_pdo_mysql.dll


And I pasted: mysql.default_socket = "C:\WebServ\mysql\bin" or "C:\WebServ\mysql\bin\mysql.exe"
and it still doesn't work Sad
Re: day3 mysql, netbeans, doctrine [message #98023 is a reply to message #98018 ] Mon, 26 April 2010 01:30 Go to previous messageGo to next message
PurpleFrog  is currently offline PurpleFrog
Messages: 20
Registered: March 2008
Location: Paris
Junior Member
The socket is not the directory of the executable files of the application.
Search for mysqld.sock in your computer and replace the two lines with it location :
pdo_mysql.default_socket=[...]/mysqld.sock
mysql.default_socket =[...]/mysqld.sock

*edit* Embarassed There is no socket connection in windows, only tcp/ip

[Updated on: Wed, 28 April 2010 01:01]


---PurpleFrog
Lost everywhere
Re: day3 mysql, netbeans, doctrine [message #98036 is a reply to message #98013 ] Mon, 26 April 2010 09:14 Go to previous messageGo to next message
katwer  is currently offline katwer
Messages: 8
Registered: April 2010
Location: Poland
Junior Member
What shoud I change, if on my disk doesn't exits mysqld.sock?

In my.ini something?
Re: day3 mysql, netbeans, doctrine [message #98083 is a reply to message #98013 ] Mon, 26 April 2010 22:58 Go to previous messageGo to next message
PurpleFrog  is currently offline PurpleFrog
Messages: 20
Registered: March 2008
Location: Paris
Junior Member
I don't have mysql installed on a windows so it's hard to tell.
Maybe try with mysql.sock.
If you don't obtain anything make sure mysql is running.


---PurpleFrog
Lost everywhere
Re: day3 mysql, netbeans, doctrine [message #98094 is a reply to message #98013 ] Tue, 27 April 2010 10:19 Go to previous messageGo to next message
halfer  is currently offline halfer
Messages: 9535
Registered: January 2006
Location: West Midlands, UK
Faithful Member
@katwer - did you confirm that you have MySQL loaded with phpinfo, as per PurpleFrog's advice? That will confirm it is loaded into the web server.

Also please do "php -m" at the command line, to make sure PDO and PDO_MYSQL are available for the cli too.


Remember Palestine
Re: day3 mysql, netbeans, doctrine [message #98169 is a reply to message #98013 ] Tue, 27 April 2010 20:37 Go to previous messageGo to next message
katwer  is currently offline katwer
Messages: 8
Registered: April 2010
Location: Poland
Junior Member
Hello!

In localhost php is runing (phpinfo() - is ok). cmd saw this - is OK, doesn't it?

C:\WebServ\php>php -m
[PHP Modules]
bcmath
bz2
calendar
com_dotnet
ctype
date
dom
filter
ftp
gd
gettext
hash
iconv
id3
imap
json
libxml
mbstring
ming
mysql
odbc
pcre
pdf
PDO
Reflection
session
SimpleXML
soap
sockets
SPL
SQLite
standard
tokenizer
wddx
xml
xmlreader
xmlrpc
xmlwriter
xsl
Zend Optimizer
zip
zlib

[Zend Modules]
Zend Optimizer

Error in my_thread_global_end(): 2 threads didn't exit
Re: day3 mysql, netbeans, doctrine [message #98172 is a reply to message #98169 ] Tue, 27 April 2010 22:04 Go to previous messageGo to next message
PurpleFrog  is currently offline PurpleFrog
Messages: 20
Registered: March 2008
Location: Paris
Junior Member
halfer ask you the good question.
pdo_mysql is missing.


---PurpleFrog
Lost everywhere
Re: day3 mysql, netbeans, doctrine [message #98173 is a reply to message #98013 ] Tue, 27 April 2010 22:50 Go to previous messageGo to next message
katwer  is currently offline katwer
Messages: 8
Registered: April 2010
Location: Poland
Junior Member
Sorry for stupid question.. How to fix it?

In php.ini is:
extension=php_pdo_mysql.dll


I have php_pdo_mysql.dll in ..\php\ext

phpinfo() : http://dl.dropbox.com/u/3162762/Przechwytywanie.PNG

[Updated on: Tue, 27 April 2010 23:06]

Re: day3 mysql, netbeans, doctrine [message #98180 is a reply to message #98173 ] Wed, 28 April 2010 00:52 Go to previous messageGo to next message
PurpleFrog  is currently offline PurpleFrog
Messages: 20
Registered: March 2008
Location: Paris
Junior Member
Very Happy It's not a stupid question
Do you have the same version of php in cli and in web server (php -v for cli, and phpinfo for webserver)?
Are the ini files loaded the same (php --ini in cli, and loaded configuration file + 2 next lines in phpinfo)


---PurpleFrog
Lost everywhere
Re: day3 mysql, netbeans, doctrine [message #98192 is a reply to message #98013 ] Wed, 28 April 2010 11:19 Go to previous messageGo to next message
halfer  is currently offline halfer
Messages: 9535
Registered: January 2006
Location: West Midlands, UK
Faithful Member
If you do "php -i" you'll discover the location that PHP is expecting for the CLI, and it may be different to the php.ini you have now. If you have nothing at this location, create an empty text file in its place, and start adding php directives there.


Remember Palestine
Re: day3 mysql, netbeans, doctrine [message #98197 is a reply to message #98013 ] Wed, 28 April 2010 11:58 Go to previous messageGo to next message
blessed  is currently offline blessed
Messages: 3
Registered: April 2010
Junior Member
I have same problem. From where can we get PDO_MYSQL ??
and secondly when i write php --ini in CLI, it gives me following:
Configuration File (php.ini) Path: C:\WINDOWS
Loaded Configuration File: (none)
Scan for additional .ini files in: (none)
Additional .ini files parsed: (none)
what to do?
Re: day3 mysql, netbeans, doctrine [message #98199 is a reply to message #98197 ] Wed, 28 April 2010 12:38 Go to previous messageGo to next message
blessed  is currently offline blessed
Messages: 3
Registered: April 2010
Junior Member
Arrite, my issue has been resolved. The problem was that there was no "php.ini" file present in the C:\wamp\bin\php\php5.3.0 folder. So now, I have added it and its working perfectly fine Smile
Re: day3 mysql, netbeans, doctrine [message #98200 is a reply to message #98013 ] Wed, 28 April 2010 12:38 Go to previous messageGo to next message
halfer  is currently offline halfer
Messages: 9535
Registered: January 2006
Location: West Midlands, UK
Faithful Member
@blessed, you've written the answer to your question! The path to your php.ini is "C:\WINDOWS", so your file should be in "C:\WINDOWS\php.ini" Smile

Your pdo_mysql extension will be in your PHP installation, if you're using Windows. Have a look in the "ext" folder, it will be in the there.

These questions are all answered on the internet by the way. If you were to google "Location of CLI php.ini on Windows" you'd have found the above information already. However you do have to be persistent when using search engines, and it takes a bit of practise to get the wording right. But it is a very useful skill to have!


Remember Palestine
Re: day3 mysql, netbeans, doctrine [message #98230 is a reply to message #98013 ] Wed, 28 April 2010 21:17 Go to previous messageGo to next message
katwer  is currently offline katwer
Messages: 8
Registered: April 2010
Location: Poland
Junior Member
@PurpleFrog
in fact I have two files php.ini
the first in c:\Windows
second in C:\Users\katwer\AppData\Local\VirtualStore\Windows

this second, when I correct
extension=php_pdo.dll


works!

Thanks a lot!
Re: [SOLVED] day3 mysql, netbeans, doctrine [message #103452 is a reply to message #98013 ] Tue, 03 August 2010 08:29 Go to previous message
1qaz  is currently offline 1qaz
Messages: 1
Registered: August 2010
Junior Member
Hi.

I'm using EasyPHP v5.3.2 and I had the same problem. The php.ini MUST be placed in the C:\WINDOWS dir with 1 modification:

- open php.ini and search for "extension_dir". If you find something like this:

extension_dir = "$(path)\php\ext\"

then you must replace <<$(path)>> with the full installation path to your EasyPHP folder. For example:

extension_dir = "C:\Program Files\EasyPHP-5.3.2i\php\ext\"

Otherwise you will get some errors / warnings when trying to execute any doctrine & mysql related commands, erros which will bug your head. Trust me Smile


--------------------------

by natural_vlad

--------------------------
Previous Topic:How to reach a already installed wiki
Goto Forum:
  

powered by FUDforum - copyright ©2001-2004 FUD Forum Bulletin Board Software