Page 1 of 1

php-cli and mysql embedded

Posted: Thu Apr 01, 2010 4:10 pm
by jsherk
Anybody done any work with mysql standalone or libmysqld deeply embedded?

I am using the php-cli (5.3) on Windows XP Pro with no Apache/server running.

I have spent hours on Google and php.net and mysql.org but just can't seem to grasp what/how to do it!

Thanks

Re: php-cli and mysql embedded

Posted: Thu Apr 01, 2010 5:08 pm
by requinix
jsherk wrote:Anybody done any work with mysql standalone or libmysqld deeply embedded?
You'll have to explain what "deeply embedded" means.

Have you tried just... coding?

Re: php-cli and mysql embedded

Posted: Thu Apr 01, 2010 5:36 pm
by jsherk
Deeply embedded means that you do not need to run it as a service... it can be embeded within an application. For example, some of the Adobe products use MySQL embedded within them, so it does not need to be installed separately.

Maybe this sort of explains it:
http://karlssonondatabases.blogspot.com ... edded.html

Re: php-cli and mysql embedded

Posted: Thu Apr 01, 2010 8:08 pm
by requinix
PHP isn't meant to have stuff "embedded" in it.

If you want to couple a PHP and a MySQL installation together, great. Or consider something like SQLite which works by using files.

Re: php-cli and mysql embedded

Posted: Fri Apr 02, 2010 7:15 am
by Weirdan
There's an experimental support for embedded mysql server in mysqli extension: http://us2.php.net/manual/en/mysqli-dri ... -start.php

You'd need to recompile php though.

Re: php-cli and mysql embedded

Posted: Fri Apr 02, 2010 7:27 am
by jsherk
Ok, that is helpful... lol ... I am laughing because I posted this same question on several different forums and basically most of the responses are along the same lines, either "what are you talking about" or "why do you want to do that". This is the first truly helpful answer I have gotten!

When you say I need to recompile php, since I am using php-cli, can I just add the extension=mysqli.dll in the php.ini and the next time I use it it should be available, or is there something else that you mean by recompiling it?

Thanks

Re: php-cli and mysql embedded

Posted: Fri Apr 02, 2010 10:30 am
by Weirdan
jsherk wrote: When you say I need to recompile php, since I am using php-cli, can I just add the extension=mysqli.dll in the php.ini and the next time I use it it should be available, or is there something else that you mean by recompiling it?
I've no idea how this works on windows (this may not work at all). On linux you'd ./configure --enable-mysqli-embedded && make && make install and be done. Note that most experimental non-windows specific features don't work on windows.

Re: php-cli and mysql embedded

Posted: Fri Apr 02, 2010 11:05 am
by jsherk
Well, basically I'm in over my head and am probably going to have a hard trying to figure out to do what I want to do!

Thanks weirdan