php-cli and mysql embedded

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
jsherk
Forum Newbie
Posts: 9
Joined: Fri Jul 13, 2007 10:10 am

php-cli and mysql embedded

Post 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
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: php-cli and mysql embedded

Post 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?
jsherk
Forum Newbie
Posts: 9
Joined: Fri Jul 13, 2007 10:10 am

Re: php-cli and mysql embedded

Post 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
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: php-cli and mysql embedded

Post 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.
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Re: php-cli and mysql embedded

Post 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.
jsherk
Forum Newbie
Posts: 9
Joined: Fri Jul 13, 2007 10:10 am

Re: php-cli and mysql embedded

Post 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
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Re: php-cli and mysql embedded

Post 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.
jsherk
Forum Newbie
Posts: 9
Joined: Fri Jul 13, 2007 10:10 am

Re: php-cli and mysql embedded

Post 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
Post Reply