Tuesday, 2011-06-28

*** stliu has joined #ingres00:05
*** cytrinox_ has joined #ingres00:42
*** cytrinox has quit IRC00:43
*** cytrinox_ is now known as cytrinox00:43
*** Alex| has joined #ingres01:34
*** ChanServ sets mode: +o Alex|01:34
*** Alex| has quit IRC02:06
*** Alex| has joined #ingres02:23
*** ChanServ sets mode: +o Alex|02:23
*** stliu has quit IRC06:11
*** Alex| has quit IRC11:04
*** Alex| has joined #ingres12:36
*** ChanServ sets mode: +o Alex|12:36
*** stliu has joined #ingres12:52
*** sehh has joined #ingres13:31
sehhhey people13:31
sehhis there a way to debug why i can't connect to ingres via PHP? I'm getting "Could not connect: Login failure: invalid username/password." even though I've setup my apache user/password correctly.13:32
Vroomfondlepaste the code you're using to connect somewhere (you may wish to anonymise the user/pass of course ;) )13:34
Vroomfondle(stick it in a pastebin, preferably)13:34
sehhok, I'm using Fedora Linux, running Apache and PHP13:35
sehhI've also installed the ingres PECL driver13:36
sehhso far everything seems ok13:36
sehhthen I try some simple php connection13:36
sehh$link = ingres_connect("db", "apache", "password")  or die("Could not connect: " . ingres_error($link));13:36
sehhI've only used MySQL in the past, so it seems weird that the connect function doesn't require me to specify a hostname address... ?? weird13:37
Vroomfondleis it a local database?13:37
sehhyes, local database on the machine running Apache and PHP13:38
sehhhow would I connect to a remote db then? if the connect function doesn't take a hostname in the argument?13:38
Vroomfondletry "myhostname::mydbname" instead of just "db". I'm not sure if it's required but it's what we do in our code, I think.13:38
sehhaha, got it13:38
sehhshould I try "localhost:db" then? or does "db" imply the localhost?13:39
Vroomfondlewell... if you host is called "myingresbox" and your database is called "mydatabase", try "myingresbox::mydatabase"13:39
Vroomfondlenotice the double colon, not single13:39
sehhok sounds easy so far and it seems my php is talking to the database13:40
Vroomfondle:)13:40
sehhbut I'm getting an invalid username/password as I posted above.. how would I go about debuging this?13:40
Vroomfondleokay, with most Ingres problems the first place to look (after the Apache log, of course) is the Ingres error log. That'll be at $ingresdir/files/errlog.log, where $ingresdir is the base directory for your Ingres installation13:42
VroomfondleI'm not sure what the default for that is on Fedora13:42
sehhI should also mention that I've followed all the steps written here: http://community.ingres.com/wiki/Ingres_with_Apache_on_Redhat_Enterprise_Linux13:42
sehhok when I run my script I get two errors: E_GC000B_RMT_LOGIN_FAIL and E_CLFE07_BS_READ_ERR13:43
VroomfondleI know this is a silly question, but you're really, really sure you've got the right password?13:43
sehhhmm13:44
sehhits an honest question13:44
sehhto tell you the truth, I think I got the password right, when I first setup the access rights, but its possible I may have done this wrong13:44
sehhmaybe the user I created doesn't have access to this particular database13:45
Vroomfondlethat's possible13:45
VroomfondleI think, though I'm not 100% sure without trying it, that if you follow the instructions on the wiki to the letter there will be no password13:45
Vroomfondlethat's legal in Ingres - you can use "" as the password13:46
sehhhmm13:47
sehhcan you please explain which is the correct way to set permissions? via SQL grant statements or via one of the command line tools?13:49
sehhI'm a bit confused, comming from MySQL, were everything is just a GRANT line...13:50
Vroomfondleyou'll need to use SQL to grant permissions, but you can use 'accessdb' (as the Ingres user account) to create users. To be honest I think most people stick to SQL.13:51
sehhah ok here must be the problem13:52
sehhsince I created the 'apache' user13:52
sehhand I added a password via the 'accessdb'13:53
sehhthen I also tried to make my databases "authorized" to the apache user13:53
sehhprobably all wrong :(13:53
Vroomfondleno, that sounds okay13:53
Vroomfondleyou can mix-and-match, it should be fine13:53
sehhhmm13:59
sehhE_US188A You cannot GRANT or REVOKE database or installation privileges13:59
sehhwhile in session with this database.13:59
sehhhmm13:59
Vroomfondleyou will need to be the ingres user for that13:59
sehhok run the GRANT query as the ingres under the 'isql' thingy..14:02
sehhit didn't report any errors14:02
sehhbut I still can't login14:02
sehhah wait14:02
sehhI can...14:02
sehh:P14:02
sehhI also removed the password, and its working fine now14:02
sehhVroomfondle, thank you for all your help, much appreciated!14:03
sehhnext step, is to convert a DB object for connection to MySQL databases, to work for Ingres and then I'll have made my application run over Ingres! Hopefuly my queries are simple enough and won't require too much tweaking (I'm not using any stored procedures)14:05
*** stliu has quit IRC14:27
*** bonro01 has joined #ingres14:28
sehhdamn, this vnode thing is confusing....16:13
sehham I supposed to create the vnode on the server or on the client?16:13
Vroomfondleso, say you want Ingres A to talk to Ingres B: you set up a vnode in Ingres A which points at Ingres B16:16
Vroomfondlein other words, in the client16:16
sehherm16:19
sehhI probably don't understand a few Ingres concepts16:19
sehhfor example, I'm using a web server (apache+php+ingres driver) to connect to a remote database16:20
sehhso I try my connect() function to "server1::db" and it fails because "server1" is not a proper vnode or something16:20
sehhas I understood earlier, that is the hostname of the database server16:20
sehhso why would the client (in this case the web server) need to have a whole Ingres installation setup?16:21
sehhto answer your statement, no I don't want to connect two Ingres databases, I want to connect my web server to a remote Ingres database16:23
Vroomfondleyou can't do one without the other16:24
Vroomfondleit's a bit odd. You need to tell a local Ingres instance to connect to a remote server (that's the vnode bit), then tell PHP to connect to the vnode via the local instance.16:25
sehhoh my god...16:26
Vroomfondleyeah, that's what I thought when I first started to work with it16:26
sehhwell..16:26
Vroomfondleyou can just do a "client install" locally if you like though16:26
sehhI've done that, otherwise the php driver wouldn't compile, so thats already there16:26
sehhnot started, but just installed under /opt16:27
Vroomfondleyeah. On the local Ingres, use 'netutil' to create a vnode (you may have to start Ingres first, I forget). Point the vnode at the remote host. You then tell PHP to connect to the vnode (which may or may not have the same name as the remote host - that's up to you)16:27
sehhok unterstood16:29
sehhthank man for the help, much appreciated16:29
Vroomfondleno problem16:29
sehhdamn, netutil can't run properly here16:37
sehhdoesn't like the terminal...16:38
*** Alex| has quit IRC16:39
sehhah the forums say the terminal utils are not UTF-8 compatible16:40
Vroomfondlethe terminal utils are... crusty16:47
VroomfondleI believe there's some work going on to produce a decent GUI/web-based solution16:48
Vroomfondleotherwise there's vdba on Windows, which works fine but... well, you need Windows.16:48
*** stliu has joined #ingres22:18
*** sehh has quit IRC23:01
*** sehh has joined #ingres23:05

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!