*** stliu has joined #ingres | 00:05 | |
*** cytrinox_ has joined #ingres | 00:42 | |
*** cytrinox has quit IRC | 00:43 | |
*** cytrinox_ is now known as cytrinox | 00:43 | |
*** Alex| has joined #ingres | 01:34 | |
*** ChanServ sets mode: +o Alex| | 01:34 | |
*** Alex| has quit IRC | 02:06 | |
*** Alex| has joined #ingres | 02:23 | |
*** ChanServ sets mode: +o Alex| | 02:23 | |
*** stliu has quit IRC | 06:11 | |
*** Alex| has quit IRC | 11:04 | |
*** Alex| has joined #ingres | 12:36 | |
*** ChanServ sets mode: +o Alex| | 12:36 | |
*** stliu has joined #ingres | 12:52 | |
*** sehh has joined #ingres | 13:31 | |
sehh | hey people | 13:31 |
---|---|---|
sehh | is 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 |
Vroomfondle | paste 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 |
sehh | ok, I'm using Fedora Linux, running Apache and PHP | 13:35 |
sehh | I've also installed the ingres PECL driver | 13:36 |
sehh | so far everything seems ok | 13:36 |
sehh | then I try some simple php connection | 13:36 |
sehh | $link = ingres_connect("db", "apache", "password") or die("Could not connect: " . ingres_error($link)); | 13:36 |
sehh | I've only used MySQL in the past, so it seems weird that the connect function doesn't require me to specify a hostname address... ?? weird | 13:37 |
Vroomfondle | is it a local database? | 13:37 |
sehh | yes, local database on the machine running Apache and PHP | 13:38 |
sehh | how would I connect to a remote db then? if the connect function doesn't take a hostname in the argument? | 13:38 |
Vroomfondle | try "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 |
sehh | aha, got it | 13:38 |
sehh | should I try "localhost:db" then? or does "db" imply the localhost? | 13:39 |
Vroomfondle | well... if you host is called "myingresbox" and your database is called "mydatabase", try "myingresbox::mydatabase" | 13:39 |
Vroomfondle | notice the double colon, not single | 13:39 |
sehh | ok sounds easy so far and it seems my php is talking to the database | 13:40 |
Vroomfondle | :) | 13:40 |
sehh | but I'm getting an invalid username/password as I posted above.. how would I go about debuging this? | 13:40 |
Vroomfondle | okay, 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 installation | 13:42 |
Vroomfondle | I'm not sure what the default for that is on Fedora | 13:42 |
sehh | I should also mention that I've followed all the steps written here: http://community.ingres.com/wiki/Ingres_with_Apache_on_Redhat_Enterprise_Linux | 13:42 |
sehh | ok when I run my script I get two errors: E_GC000B_RMT_LOGIN_FAIL and E_CLFE07_BS_READ_ERR | 13:43 |
Vroomfondle | I know this is a silly question, but you're really, really sure you've got the right password? | 13:43 |
sehh | hmm | 13:44 |
sehh | its an honest question | 13:44 |
sehh | to 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 wrong | 13:44 |
sehh | maybe the user I created doesn't have access to this particular database | 13:45 |
Vroomfondle | that's possible | 13:45 |
Vroomfondle | I 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 password | 13:45 |
Vroomfondle | that's legal in Ingres - you can use "" as the password | 13:46 |
sehh | hmm | 13:47 |
sehh | can 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 |
sehh | I'm a bit confused, comming from MySQL, were everything is just a GRANT line... | 13:50 |
Vroomfondle | you'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 |
sehh | ah ok here must be the problem | 13:52 |
sehh | since I created the 'apache' user | 13:52 |
sehh | and I added a password via the 'accessdb' | 13:53 |
sehh | then I also tried to make my databases "authorized" to the apache user | 13:53 |
sehh | probably all wrong :( | 13:53 |
Vroomfondle | no, that sounds okay | 13:53 |
Vroomfondle | you can mix-and-match, it should be fine | 13:53 |
sehh | hmm | 13:59 |
sehh | E_US188A You cannot GRANT or REVOKE database or installation privileges | 13:59 |
sehh | while in session with this database. | 13:59 |
sehh | hmm | 13:59 |
Vroomfondle | you will need to be the ingres user for that | 13:59 |
sehh | ok run the GRANT query as the ingres under the 'isql' thingy.. | 14:02 |
sehh | it didn't report any errors | 14:02 |
sehh | but I still can't login | 14:02 |
sehh | ah wait | 14:02 |
sehh | I can... | 14:02 |
sehh | :P | 14:02 |
sehh | I also removed the password, and its working fine now | 14:02 |
sehh | Vroomfondle, thank you for all your help, much appreciated! | 14:03 |
sehh | next 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 IRC | 14:27 | |
*** bonro01 has joined #ingres | 14:28 | |
sehh | damn, this vnode thing is confusing.... | 16:13 |
sehh | am I supposed to create the vnode on the server or on the client? | 16:13 |
Vroomfondle | so, say you want Ingres A to talk to Ingres B: you set up a vnode in Ingres A which points at Ingres B | 16:16 |
Vroomfondle | in other words, in the client | 16:16 |
sehh | erm | 16:19 |
sehh | I probably don't understand a few Ingres concepts | 16:19 |
sehh | for example, I'm using a web server (apache+php+ingres driver) to connect to a remote database | 16:20 |
sehh | so I try my connect() function to "server1::db" and it fails because "server1" is not a proper vnode or something | 16:20 |
sehh | as I understood earlier, that is the hostname of the database server | 16:20 |
sehh | so why would the client (in this case the web server) need to have a whole Ingres installation setup? | 16:21 |
sehh | to answer your statement, no I don't want to connect two Ingres databases, I want to connect my web server to a remote Ingres database | 16:23 |
Vroomfondle | you can't do one without the other | 16:24 |
Vroomfondle | it'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 |
sehh | oh my god... | 16:26 |
Vroomfondle | yeah, that's what I thought when I first started to work with it | 16:26 |
sehh | well.. | 16:26 |
Vroomfondle | you can just do a "client install" locally if you like though | 16:26 |
sehh | I've done that, otherwise the php driver wouldn't compile, so thats already there | 16:26 |
sehh | not started, but just installed under /opt | 16:27 |
Vroomfondle | yeah. 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 |
sehh | ok unterstood | 16:29 |
sehh | thank man for the help, much appreciated | 16:29 |
Vroomfondle | no problem | 16:29 |
sehh | damn, netutil can't run properly here | 16:37 |
sehh | doesn't like the terminal... | 16:38 |
*** Alex| has quit IRC | 16:39 | |
sehh | ah the forums say the terminal utils are not UTF-8 compatible | 16:40 |
Vroomfondle | the terminal utils are... crusty | 16:47 |
Vroomfondle | I believe there's some work going on to produce a decent GUI/web-based solution | 16:48 |
Vroomfondle | otherwise there's vdba on Windows, which works fine but... well, you need Windows. | 16:48 |
*** stliu has joined #ingres | 22:18 | |
*** sehh has quit IRC | 23:01 | |
*** sehh has joined #ingres | 23:05 |
Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!