Firebird SQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesFirebird SQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old April 10th, 2006, 05:05 PM
chrisjokinen chrisjokinen is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2006
Location: Houston, Tx
Posts: 28 chrisjokinen User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 6 h 53 m 51 sec
Reputation Power: 0
Using php to connect to sevice manager

Hello All,

I need to know if anyone has used the php function ibase_service_attach ( string host, string dba_username, string dba_password )

This is used to access the service manager needed in another function called ibase_add_user(). The manual does not have any information about its use. I have figured out that the function has an implied tcp connect so I have been tried setting the host parameter to 'localhost:service_mgr', this gives me the message:
Quote:
Warning: ibase_service_attach() [function.ibase-service-attach]: Cannot attach to services manager service service_mgr:service_mgr is not defined in C:\Program Files\Abyss Web Server\htdocs\dbAccess.php on line 18


ideas?


Thank You in advance

Reply With Quote
  #2  
Old April 11th, 2006, 02:45 AM
pabloj's Avatar
pabloj pabloj is offline
Modding: Oracle MsSQL Firebird
Dev Shed God 6th Plane (7500 - 7999 posts)
 
Join Date: Jun 2001
Location: Outside US
Posts: 7,907 pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level) 
Time spent in forums: 2 Months 3 Weeks 3 Days 9 h 21 m 6 sec
Reputation Power: 279
Seems to work for me
php Code:
Original - php Code
  1. <?php
  2. $ibservhandler = ibase_service_attach ( 'localhost', 'sysdba', 'masterkey' ) or die (ibase_errmsg());
  3. ?>

Reply With Quote
  #3  
Old April 11th, 2006, 05:56 AM
pabloj's Avatar
pabloj pabloj is offline
Modding: Oracle MsSQL Firebird
Dev Shed God 6th Plane (7500 - 7999 posts)
 
Join Date: Jun 2001
Location: Outside US
Posts: 7,907 pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level) 
Time spent in forums: 2 Months 3 Weeks 3 Days 9 h 21 m 6 sec
Reputation Power: 279
A better example, taken from ibWebAdmin source code:
php Code:
Original - php Code
  1. <?php
  2.     // get server version and implementation strings
  3.     if (($service = ibase_service_attach('localhost', 'sysdba', 'masterkey')) != FALSE) {
  4.         $server_info  = ibase_server_info($service, IBASE_SVC_SERVER_VERSION)
  5.                       . ' / '
  6.                       . ibase_server_info($service, IBASE_SVC_IMPLEMENTATION);
  7.         ibase_service_detach($service);
  8.     }
  9.     else {
  10.         $ib_error = ibase_errmsg();
  11.     }
  12. echo $server_info;   
  13. ?>

Which in my case echoes
Quote:
WI-T2.0.0.12484 Firebird 2.0 Release Candidate 1 / Firebird/x86/Windows NT

Reply With Quote
  #4  
Old April 11th, 2006, 11:55 AM
chrisjokinen chrisjokinen is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2006
Location: Houston, Tx
Posts: 28 chrisjokinen User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 6 h 53 m 51 sec
Reputation Power: 0
Well that did work well. I think I'll add a note to the online php docs so another user does not have the same issues and lose a day and a half hunting for an answer.

Thanks Alot
Comments on this post
pabloj agrees!

Reply With Quote
  #5  
Old April 11th, 2006, 12:01 PM
pabloj's Avatar
pabloj pabloj is offline
Modding: Oracle MsSQL Firebird
Dev Shed God 6th Plane (7500 - 7999 posts)
 
Join Date: Jun 2001
Location: Outside US
Posts: 7,907 pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level) 
Time spent in forums: 2 Months 3 Weeks 3 Days 9 h 21 m 6 sec
Reputation Power: 279
Quote:
Originally Posted by chrisjokinen
Well that did work well. I think I'll add a note to the online php docs so another user does not have the same issues and lose a day and a half hunting for an answer.

Thanks Alot
Please do it.
Thanks

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesFirebird SQL Development > Using php to connect to sevice manager


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
Stay green...Green IT