Discussion:
service_mgr is not defined - calling from PHP
grip_2ls
2012-07-10 09:22:44 UTC
Permalink
Hi
I am trying to write a PHP script to create a new Firebird user but when
I run the code I get the following:
Service DB - Could not connect: Cannot attach to services manager
service var/lib/firebird/2.5/data/grip.fdb:service_mgr is not defined
I am running Firebird 2.5 on Ubuntu.
This is the PHP code:
// connect to the service database if (($service =
ibase_service_attach($host, $username, $password)) == FALSE) {
$smarty->assign('msg', 'Service DB - Could not connect: ' .
ibase_errmsg()); $smarty->display('feedback.tpl'); break; }
Can I do this on Firebird and if so how?
Thanks
Neil



[Non-text portions of this message have been removed]
grip_2ls
2012-07-10 09:25:16 UTC
Permalink
Seems that the rich text editor doesn't work and has stripped out all the formatting so here is the error message and code again:

*****************************
Service DB - Could not connect: Cannot attach to services manager service var/lib/firebird/2.5/data/grip.fdb:service_mgr is not defined
*****************************

// connect to the service database
if (($service = ibase_service_attach($host, $username, $password)) == FALSE) {
$smarty->assign('msg', 'Service DB - Could not connect: ' . ibase_errmsg());
$smarty->display('feedback.tpl');
break;
}

Thanks

Neil
Post by grip_2ls
Hi
I am trying to write a PHP script to create a new Firebird user but when
Service DB - Could not connect: Cannot attach to services manager
service var/lib/firebird/2.5/data/grip.fdb:service_mgr is not defined
I am running Firebird 2.5 on Ubuntu.
// connect to the service database if (($service =
ibase_service_attach($host, $username, $password)) == FALSE) {
$smarty->assign('msg', 'Service DB - Could not connect: ' .
ibase_errmsg()); $smarty->display('feedback.tpl'); break; }
Can I do this on Firebird and if so how?
Thanks
Neil
[Non-text portions of this message have been removed]
Thomas Steinmaurer
2012-07-10 09:31:52 UTC
Permalink
Post by grip_2ls
*****************************
Service DB - Could not connect: Cannot attach to services manager service var/lib/firebird/2.5/data/grip.fdb:service_mgr is not defined
*****************************
I've no idea about the PHP usage, but the string above looks a bit
weird. The first part shouldn't be the path to database, but the
server/port information. E.g. the following is valid:

localhost:service_mgr

or

localhost/3051:service_mgr

Perhaps you are mixing something related to a database connection path
vs. server name when using the ibase_service_attach call?
--
With regards,
Thomas Steinmaurer
http://www.upscene.com/
Post by grip_2ls
// connect to the service database
if (($service = ibase_service_attach($host, $username, $password)) == FALSE) {
$smarty->assign('msg', 'Service DB - Could not connect: ' . ibase_errmsg());
$smarty->display('feedback.tpl');
break;
}
Thanks
Neil
Post by grip_2ls
Hi
I am trying to write a PHP script to create a new Firebird user but when
Service DB - Could not connect: Cannot attach to services manager
service var/lib/firebird/2.5/data/grip.fdb:service_mgr is not defined
I am running Firebird 2.5 on Ubuntu.
// connect to the service database if (($service =
ibase_service_attach($host, $username, $password)) == FALSE) {
$smarty->assign('msg', 'Service DB - Could not connect: ' .
ibase_errmsg()); $smarty->display('feedback.tpl'); break; }
Can I do this on Firebird and if so how?
Thanks
Neil
[Non-text portions of this message have been removed]
------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Visit http://www.firebirdsql.org and click the Resources item
on the main (top) menu. Try Knowledgebase and FAQ links !
Also search the knowledgebases at http://www.ibphoenix.com
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Yahoo! Groups Links
grip_2ls
2012-07-10 09:47:04 UTC
Permalink
Thomas

That is the error message you are referring to, the call is:

-------------------------------
if (($service = ibase_service_attach($host, $username, $password)) == FALSE) {
-------------------------------

the host is defined as:

-------------------------------
$host = '192.168.10.109:/var/lib/firebird/2.5/data/grip.fdb';
-------------------------------

So I think that it is correct.

Also if I query the database this works fine - only attaching to the service db is a problem.

Neil
Post by Thomas Steinmaurer
Post by grip_2ls
*****************************
Service DB - Could not connect: Cannot attach to services manager service var/lib/firebird/2.5/data/grip.fdb:service_mgr is not defined
*****************************
I've no idea about the PHP usage, but the string above looks a bit
weird. The first part shouldn't be the path to database, but the
localhost:service_mgr
or
localhost/3051:service_mgr
Perhaps you are mixing something related to a database connection path
vs. server name when using the ibase_service_attach call?
--
With regards,
Thomas Steinmaurer
http://www.upscene.com/
Post by grip_2ls
// connect to the service database
if (($service = ibase_service_attach($host, $username, $password)) == FALSE) {
$smarty->assign('msg', 'Service DB - Could not connect: ' . ibase_errmsg());
$smarty->display('feedback.tpl');
break;
}
Thanks
Neil
Post by grip_2ls
Hi
I am trying to write a PHP script to create a new Firebird user but when
Service DB - Could not connect: Cannot attach to services manager
service var/lib/firebird/2.5/data/grip.fdb:service_mgr is not defined
I am running Firebird 2.5 on Ubuntu.
// connect to the service database if (($service =
ibase_service_attach($host, $username, $password)) == FALSE) {
$smarty->assign('msg', 'Service DB - Could not connect: ' .
ibase_errmsg()); $smarty->display('feedback.tpl'); break; }
Can I do this on Firebird and if so how?
Thanks
Neil
[Non-text portions of this message have been removed]
------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Visit http://www.firebirdsql.org and click the Resources item
on the main (top) menu. Try Knowledgebase and FAQ links !
Also search the knowledgebases at http://www.ibphoenix.com
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Yahoo! Groups Links
Thomas Steinmaurer
2012-07-10 09:52:35 UTC
Permalink
Neil,
Post by grip_2ls
-------------------------------
if (($service = ibase_service_attach($host, $username, $password)) == FALSE) {
-------------------------------
-------------------------------
$host = '192.168.10.109:/var/lib/firebird/2.5/data/grip.fdb';
-------------------------------
So I think that it is correct.
No, sorry. When attaching to the services manager, you don't attach to a
particular database, but just to the server, thus you just have to
provide 192.168.10.109 for the host.
--
With regards,
Thomas Steinmaurer
http://www.upscene.com/
Post by grip_2ls
Also if I query the database this works fine - only attaching to the service db is a problem.
Neil
Post by Thomas Steinmaurer
Post by grip_2ls
*****************************
Service DB - Could not connect: Cannot attach to services manager service var/lib/firebird/2.5/data/grip.fdb:service_mgr is not defined
*****************************
I've no idea about the PHP usage, but the string above looks a bit
weird. The first part shouldn't be the path to database, but the
localhost:service_mgr
or
localhost/3051:service_mgr
Perhaps you are mixing something related to a database connection path
vs. server name when using the ibase_service_attach call?
--
With regards,
Thomas Steinmaurer
http://www.upscene.com/
Post by grip_2ls
// connect to the service database
if (($service = ibase_service_attach($host, $username, $password)) == FALSE) {
$smarty->assign('msg', 'Service DB - Could not connect: ' . ibase_errmsg());
$smarty->display('feedback.tpl');
break;
}
Thanks
Neil
Post by grip_2ls
Hi
I am trying to write a PHP script to create a new Firebird user but when
Service DB - Could not connect: Cannot attach to services manager
service var/lib/firebird/2.5/data/grip.fdb:service_mgr is not defined
I am running Firebird 2.5 on Ubuntu.
// connect to the service database if (($service =
ibase_service_attach($host, $username, $password)) == FALSE) {
$smarty->assign('msg', 'Service DB - Could not connect: ' .
ibase_errmsg()); $smarty->display('feedback.tpl'); break; }
Can I do this on Firebird and if so how?
Thanks
Neil
[Non-text portions of this message have been removed]
------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Visit http://www.firebirdsql.org and click the Resources item
on the main (top) menu. Try Knowledgebase and FAQ links !
Also search the knowledgebases at http://www.ibphoenix.com
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Yahoo! Groups Links
------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Visit http://www.firebirdsql.org and click the Resources item
on the main (top) menu. Try Knowledgebase and FAQ links !
Also search the knowledgebases at http://www.ibphoenix.com
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Yahoo! Groups Links
Lester Caine
2012-07-10 09:47:12 UTC
Permalink
Post by grip_2ls
*****************************
Service DB - Could not connect: Cannot attach to services manager service var/lib/firebird/2.5/data/grip.fdb:service_mgr is not defined
*****************************
// connect to the service database
if (($service = ibase_service_attach($host, $username, $password)) == FALSE) {
$smarty->assign('msg', 'Service DB - Could not connect: ' . ibase_errmsg());
$smarty->display('feedback.tpl');
break;
}
What are you putting in $host? It should just be the machine name ...
Services run on the server so do not need any reference to a particular database.
--
Lester Caine - G8HFL
-----------------------------
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php
grip_2ls
2012-07-10 09:59:01 UTC
Permalink
Lester/Thomas

Thanks for your help - you are right as soon as I took out the db name it worked!

Thanks again

Neil
Post by Lester Caine
Post by grip_2ls
*****************************
Service DB - Could not connect: Cannot attach to services manager service var/lib/firebird/2.5/data/grip.fdb:service_mgr is not defined
*****************************
// connect to the service database
if (($service = ibase_service_attach($host, $username, $password)) == FALSE) {
$smarty->assign('msg', 'Service DB - Could not connect: ' . ibase_errmsg());
$smarty->display('feedback.tpl');
break;
}
What are you putting in $host? It should just be the machine name ...
Services run on the server so do not need any reference to a particular database.
--
Lester Caine - G8HFL
-----------------------------
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php
Lester Caine
2012-07-10 10:04:28 UTC
Permalink
Post by grip_2ls
Thanks for your help - you are right as soon as I took out the db name it worked!
There is also a list for firebird/php support ...
http://groups.yahoo.com/group/firebird-php/
--
Lester Caine - G8HFL
-----------------------------
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php
Loading...