Re: Web-based client for Informix 5.x
Posted in 1999
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL, Security, Permissions & Auditing, Networking & sqlhosts Configuration
Jonathan Leffler <jleffler@earthlink.net> wrote: > If you can get the 7.2x stuff to work, you can do 90% of your > testing with the newer system. It will only cause you problems > if you try to revert to the older software and use features > which were not supported in the older version. OK, here's a report of my failed attempts... Things I have tried to do includes... 1) Cheating DBD about the version number... well, this venture failed flat in my face. The codes obviously did not compile due to mismatch of definitions in the header files. I dun even know why I try it... don't ask... 2) I copied the entire section from ix_opendatabase to ix_connect. This one compiles fine but esqltest still fails. The messages are as follows: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ESQLTEST Program Running: @(#)$Id: esqltest.ec,v 60.2 1998/06/16 16:45:28 jleffler Exp $ $DBI_DBNAME unset - defaulting to 'stores'. $DBD_INFORMIX_DATABASE set to 'mss'. $DBD_INFORMIX_DATABASE2 unset - defaulting to 'mss'. $DBD_INFORMIX_SERVER set to '15.0.0.5'. $DBD_INFORMIX_USERNAME is set to 'informix'. $DBD_INFORMIX_PASSWORD is set. Testing connection to mss@15.0.0.5 DATABASE mss@15.0.0.5 SQL: -25596: The INFORMIXSERVER value is not listed in the sqlhosts file or the Registry. Testing concurrent connection to mss DATABASE mss SQL: -25596: The INFORMIXSERVER value is not listed in the sqlhosts file or the Registry. *** Your Informix environment is not usable *** You must fix it before building or testing DBD::Informix ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ INFORMIXSERVER thingy is kind of alien to me... the "concept" seemed to be introduced as of esql6. Apparently, I did not even get to the stage where 'esqltest' talks with the Informix server as I got exactly the same message when trying it disconnected. Here are 3 questions I have from the above testing... - What information does INFORMIXSERVER hold? - What is the format of the $INFORMIXDIR/etc/sqlhosts file? What is expected in there before I can hope for a connection? I have peeped into the file but cannot make any sense out of it. - The DATABASE phrase establishes connection to the database on the informix server but informix depends on the system's user/password as authentication. DBD apparently only says "EXEC ..." without supplying the username/password... The job is probably done by esqlc's libraries but how then do we supply the username/password? Thanks again for any input. >> Here are several ventures I am looking into... >> - Does anyone have DBD::Informix compiled that will work with >> Informix5? Jonathan Leffler was of great help here when he >> gave me the assurance that it will work with the correct >> version of C-SDK. :). btw, is there such a version for Linux >> (intel)?? > On which platform? Probably not, but ... OK, I'm desperate... is there any DBD::Informix compiled for linux (glibc) out there that will work with Informix Online 5? Just me, Wire ... -- Tan Wee Yeh wytan@pobox.com http://www.pobox.com/~wytan For PGP public key : http://www.pobox.com/~wytan/pgp PGP fingerprint = CB 11 61 BE 4E EF FB 84 71 15 CF 22 46 FD 4C B3
Tan Wee Yeh wrote:
>
> Jonathan Leffler <jleffler@earthlink.net> wrote:
> > If you can get the 7.2x stuff to work, you can do 90% of your
> > testing with the newer system. It will only cause you problems
> > if you try to revert to the older software and use features
> > which were not supported in the older version.
>
> OK, here's a report of my failed attempts...
> Things I have tried to do includes...
> 1) Cheating DBD about the version number... well, this venture
> failed flat in my face. The codes obviously did not compile
> due to mismatch of definitions in the header files.
>
> I dun even know why I try it... don't ask...
>
> 2) I copied the entire section from ix_opendatabase to
> ix_connect. This one compiles fine but esqltest still fails.
> The messages are as follows:
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> ESQLTEST Program Running:
> @(#)$Id: esqltest.ec,v 60.2 1998/06/16 16:45:28 jleffler Exp $
> $DBI_DBNAME unset - defaulting to 'stores'.
> $DBD_INFORMIX_DATABASE set to 'mss'.
> $DBD_INFORMIX_DATABASE2 unset - defaulting to 'mss'.
> $DBD_INFORMIX_SERVER set to '15.0.0.5'.
> $DBD_INFORMIX_USERNAME is set to 'informix'.
> $DBD_INFORMIX_PASSWORD is set.
> Testing connection to mss@15.0.0.5
> DATABASE mss@15.0.0.5
> SQL: -25596: The INFORMIXSERVER value is not listed in the
> sqlhosts file or the Registry.
When you connect to a database, it has to be by a name that the
database knows about. The database server instance is probably
called something like ids or machname or ol_machine, and your
connection string must therefore be to dbase@ol_machine or whatever.
It isn't adequate to identify just a host. You might get away with
that on V5; you don't on anything more recent. You need to set up
an sqlhosts file on your test machine with a valid entry which matches
your database server.
dbserver olsoctcp dbhostname servicename
> Testing concurrent connection to mss
> DATABASE mss
> SQL: -25596: The INFORMIXSERVER value is not listed in the
> sqlhosts file or the Registry.
>
> *** Your Informix environment is not usable
> *** You must fix it before building or testing DBD::Informix
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> INFORMIXSERVER thingy is kind of alien to me... the "concept"
> seemed to be introduced as of esql6.
Yes.
> Apparently, I did not even
> get to the stage where 'esqltest' talks with the Informix server
> as I got exactly the same message when trying it disconnected.
It gets a bit tricky; it was probably trying to connect to the
default connection just so that it could disconnect from it again.
> Here are 3 questions I have from the above testing...
> - What information does INFORMIXSERVER hold?
The name of a OnLine server instance.
> - What is the format of the $INFORMIXDIR/etc/sqlhosts file?
See above.
> What is expected in there before I can hope for a connection?
> I have peeped into the file but cannot make any sense out of
> it.
It is self-documenting when it is supplied, at least on Unix.
> - The DATABASE phrase establishes connection to the database on
> the informix server but informix depends on the system's
> user/password as authentication. DBD apparently only says
> "EXEC ..." without supplying the username/password... The job
> is probably done by esqlc's libraries but how then do we
> supply the username/password?
It depends on which version you're really using. With 6.00 or later,
the CONNECT statement takes a username and password - hence the
DBD_INFORMIX_USERNAME and DBD_INFORMIX_PASSWORD environment variables.
If you're really using 5.x, then you don't get any chance to specify
the user or password.
> Thanks again for any input.
>
> >> Here are several ventures I am looking into...
> >> - Does anyone have DBD::Informix compiled that will work with
> >> Informix5? Jonathan Leffler was of great help here when he
> >> gave me the assurance that it will work with the correct
> >> version of C-SDK. :). btw, is there such a version for Linux
> >> (intel)??
>
> > On which platform? Probably not, but ...
>
> OK, I'm desperate... is there any DBD::Informix compiled for
> linux (glibc) out there that will work with Informix Online 5?
>
> Just me,
> Wire ...
> --
> Tan Wee Yeh wytan@pobox.com http://www.pobox.com/~wytan
> For PGP public key : http://www.pobox.com/~wytan/pgp
> PGP fingerprint = CB 11 61 BE 4E EF FB 84 71 15 CF 22 46 FD 4C B3
--
Jonathan Leffler (jleffler@informix.com, jleffler@earthlink.net)
Guardian of DBD::Informix v0.60 -- see http://www.perl.com/CPAN
#include <disclaimer.h>