Unix Technical Forum

Informix error with ifx_pconnect()

This is a discussion on Informix error with ifx_pconnect() within the Informix forums, part of the Database Server Software category; --> I have RTFM and the FM does not say how to handle this situation. Yes I already have done ...


Go Back   Unix Technical Forum > Database Server Software > Informix

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #11 (permalink)  
Old 04-19-2008, 10:30 PM
D. Sandmann
 
Posts: n/a
Default Re: Informix error with ifx_pconnect()

I have RTFM and the FM does not say how to handle this situation. Yes I
already have done phpinfo(). I am trying other things just to see wtf is
happening. If you read all of my posts you would understand what I have
done.

You would understand that I have had the Informix drivers loaded in older
version of the Informix-Client. I have not had luck with the latest version
of the client.

But when I load the older client, I get other problems. Now I am going to
try other options, like get an older version of PHP and/or Informix.

I am just getting frustrated, and I do not need stupid comments from people
like yourself. Who do not know how to RTFPP (Read the F* Previous Posts)

"Data Goob" <datagoob@hotmail.com> wrote in message
news:ziGsc.32614$cA1.5866@fe13.usenetserver.com...
> Interesting concept: RTFM.
>
> ;-)
>
> Sorry I couldn't resist. Seriously you should read the PHP
> docs that tell you what to do with dll's. You will need to
> make the dll available to PHP for your windows environment.
> Until you either copy the dll to a place where PHP and your
> web server can find it, your dll will not be used at runtime.
> Windows is such an abomination when it comes to the environment
> so you will probably have to stop/start apache or other web
> server several times to test to make sure the dll loads. Until
> Apache or other web server is restarted the dll's won't load
> at runtime like you would hope. This is pivotal, the dll loads
> at web server startup. You can check to see if you have the
> support you seek with a simple php program:
>
> <?php
> phpinfo();
> ?>
>
> Save it as 'phpinfo.php' or whatever, and put it in your
> htdocs directory. From your web browser, run the phpinfo.php
> program. If you don't see the dll in the report it didn't load
> and you won't be able to use it. phpMyAdmin calls this function
> as well from the front-page menu, so if you have phpMyAdmin
> installed you can run that instead of the above phpinfo.php .
> You also will probably have to screw around with your php.ini
> and also check your apache httpd.conf to make sure apache is
> aware of php--all are covered in the fine manuals. There are
> several critical apached settings in the httpd.conf, and a
> couple of IFMX settings in the php.ini. Get these straight
> and you will be set.
>
>
> "D. Sandmann" <dsandmann@emcosales.com> wrote in message

news:10b4j8adrsh4799@corp.supernews.com...
> > Have downloaded those versions, still no luck
> >
> > Thanks anyways,
> > David
> >
> > "Neil Truby" <neil.truby@ardenta.com> wrote in message
> > news:2heueoFccnsjU1@uni-berlin.de...
> > > "D. Sandmann" <dsandmann@emcosales.com> wrote in message
> > > news:10b4g5kittjl2af@corp.supernews.com...
> > > > Just tried CSDK 9.52 2.80.TC1 and got the same message as below.

Anyone
> > > know
> > > > where I can get other versions of the client to try?
> > >
> > > You can get newer versions from IBM's snappily-named URL
> > >

> >

http://www14.software.ibm.com/webapp...FM5S&s=c&type=
> > >
> > >

> >
> >

>
>
>



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #12 (permalink)  
Old 04-19-2008, 10:30 PM
D. Sandmann
 
Posts: n/a
Default Re: Informix error with ifx_pconnect()


"D. Sandmann" <dsandmann@emcosales.com> wrote in message
news:10b6h6nhg89qk1a@corp.supernews.com...
> I have RTFM and the FM does not say how to handle this situation. Yes I
> already have done phpinfo(). I am trying other things just to see wtf is
> happening. If you read all of my posts you would understand what I have
> done.
>
> You would understand that I have had the Informix drivers loaded in older
> version of the Informix-Client. I have not had luck with the latest

version
> of the client.
>
> But when I load the older client, I get other problems. Now I am going to
> try other options, like get an older version of PHP and/or Informix.


Meant Apache, not Informix


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #13 (permalink)  
Old 04-19-2008, 10:30 PM
D. Sandmann
 
Posts: n/a
Default Re: Informix error with ifx_pconnect()

Paul,

Thanks for the tip. I ran the following script from the command line without
any errors:
<?php

$db="dbname";
$db_user="username";
$db_passwd="password";

$db_conn = ifx_pconnect ("$db", "$db_user", "$db_passwd");
?>

Looking at Apache in the httpd.conf file I have:

LoadModule php4_module c:\PHP\sapi\php4apache2.dll
AddType application/x-httpd-php .php

Which is all I believe I should need to have Apache load PHP.

Then in php.ini I have:
extension_dir = "c:\PHP\extensions"

Which is the directory that contains my php_ifx.dll file.

I am going to try another version of Apache (previous) and see what happens
there.

David


"Paul Watson" <paul@oninit.com> wrote in message
news:40B27542.B39B2EF2@oninit.com...
> I note you can connect via the ILogin demo, so IMHO it's probably
> not the SDK, more likely to be the php build (unlikely as the
> phpinfo seems OK) or the apache built or starting environment. If this
> was a proper OS then I'd assume it was a path issue as the error is
> a missing library. Is the php_ifx.dll actually on the server?
>
> Can you run a command php connection string, if that works the problem
> is apache and/or apache environment
>
> Cheers
> Paul
>
> "D. Sandmann" wrote:
> >
> > I am using ifx_pconnect passing the database connection string, login

and
> > password.
> >
> > I am currently using the Informix-Client SDK 9.53 2.81.TC3 which is now
> > giving me the following error:
> >
> > Unknown(): Unable to load dynamic library 'extensions\php_ifx.dll' -

the
> > specified module could not be found.
> >
> > This is happening when I restart Apache. Going to try a previous version

of
> > the Client see what happens with that.
> >
> > David
> >
> > P.S. Previous Client version I was trying was: 9.21 2.30.TC1 which was
> > working on another computer/version of apache & php.
> >
> > "Paul Watson" <paul@oninit.com> wrote in message
> > news:40B20E2D.85C3FAC4@oninit.com...
> > > What is your connect string, if you are running in safe_mode, and
> > > you should be, then php.ini values will be ignored for uid, passwd etc
> > >

>
> --
> Paul Watson #
> Oninit Ltd # Growing old is mandatory
> Tel: +44 1436 672201 # Growing up is optional
> Fax: +44 1436 678693 #
> Mob: +44 7818 003457 #
> www.oninit.com #



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #14 (permalink)  
Old 04-19-2008, 10:30 PM
Data Goob
 
Posts: n/a
Default Re: Informix error with ifx_pconnect()

I'm sorry.

:-)

"D. Sandmann" <dsandmann@emcosales.com> wrote in message news:10b6h6nhg89qk1a@corp.supernews.com...
> I have RTFM and the FM does not say how to handle this situation. Yes I
> already have done phpinfo(). I am trying other things just to see wtf is
> happening. If you read all of my posts you would understand what I have
> done.
>
> You would understand that I have had the Informix drivers loaded in older
> version of the Informix-Client. I have not had luck with the latest version
> of the client.
>
> But when I load the older client, I get other problems. Now I am going to
> try other options, like get an older version of PHP and/or Informix.
>
> I am just getting frustrated, and I do not need stupid comments from people
> like yourself. Who do not know how to RTFPP (Read the F* Previous Posts)
>




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #15 (permalink)  
Old 04-19-2008, 10:30 PM
D. Sandmann
 
Posts: n/a
Default Re: Informix error with ifx_pconnect()

I have found something else out in addition to my previous post.

In my php.ini file I commented out the extension for php_ifx.dll. I then
uncommented a dll, php_exif.dll, that does not rely on other dll's. Both
dll's reside in the same extensions directory under the PHP directory.

I restarted the Apache server and that dll loaded just fine. I then
commented out the php_exif.dll and uncommented another extension that
required other dll's to work. Just like the Informix dll that one did not
load either.

So the problem has to reside with an Informix or system variable that is not
set properly to include the informix dll's when Apache starts up.

PHP still loads with Apache but the informix extensions is not loaded with
it.

Like I said in my previous posts, here are the variables I have set up in
the httpd.conf file for Apache:

######
# Start - Informix Stuff
######
SetEnv INFORMIXDIR "C:\Program Files\Informix\Client-SDK\"
SetEnv INFORMIXSERVER "emco10_net"
######
# End - Informix Stuff
######

LoadModule php4_module c:\PHP\sapi\php4apache2.dll
#AddModule mod_php4.c
AddType application/x-httpd-php .php

Any ideas of possibly other environment variables I should check and make
sure they are set?

Thanks,
David


"D. Sandmann" <dsandmann@emcosales.com> wrote in message
news:10b6jgn36af5tb3@corp.supernews.com...
> Paul,
>
> Thanks for the tip. I ran the following script from the command line

without
> any errors:
> <?php
>
> $db="dbname";
> $db_user="username";
> $db_passwd="password";
>
> $db_conn = ifx_pconnect ("$db", "$db_user", "$db_passwd");
> ?>
>
> Looking at Apache in the httpd.conf file I have:
>
> LoadModule php4_module c:\PHP\sapi\php4apache2.dll
> AddType application/x-httpd-php .php
>
> Which is all I believe I should need to have Apache load PHP.
>
> Then in php.ini I have:
> extension_dir = "c:\PHP\extensions"
>
> Which is the directory that contains my php_ifx.dll file.
>
> I am going to try another version of Apache (previous) and see what

happens
> there.
>
> David
>
>
> "Paul Watson" <paul@oninit.com> wrote in message
> news:40B27542.B39B2EF2@oninit.com...
> > I note you can connect via the ILogin demo, so IMHO it's probably
> > not the SDK, more likely to be the php build (unlikely as the
> > phpinfo seems OK) or the apache built or starting environment. If this
> > was a proper OS then I'd assume it was a path issue as the error is
> > a missing library. Is the php_ifx.dll actually on the server?
> >
> > Can you run a command php connection string, if that works the problem
> > is apache and/or apache environment
> >
> > Cheers
> > Paul
> >
> > "D. Sandmann" wrote:
> > >
> > > I am using ifx_pconnect passing the database connection string, login

> and
> > > password.
> > >
> > > I am currently using the Informix-Client SDK 9.53 2.81.TC3 which is

now
> > > giving me the following error:
> > >
> > > Unknown(): Unable to load dynamic library

'extensions\php_ifx.dll' -
> the
> > > specified module could not be found.
> > >
> > > This is happening when I restart Apache. Going to try a previous

version
> of
> > > the Client see what happens with that.
> > >
> > > David
> > >
> > > P.S. Previous Client version I was trying was: 9.21 2.30.TC1 which was
> > > working on another computer/version of apache & php.
> > >
> > > "Paul Watson" <paul@oninit.com> wrote in message
> > > news:40B20E2D.85C3FAC4@oninit.com...
> > > > What is your connect string, if you are running in safe_mode, and
> > > > you should be, then php.ini values will be ignored for uid, passwd

etc
> > > >

> >
> > --
> > Paul Watson #
> > Oninit Ltd # Growing old is mandatory
> > Tel: +44 1436 672201 # Growing up is optional
> > Fax: +44 1436 678693 #
> > Mob: +44 7818 003457 #
> > www.oninit.com #

>
>



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #16 (permalink)  
Old 04-19-2008, 10:31 PM
Jonathan Leffler
 
Posts: n/a
Default Re: Informix error with ifx_pconnect()

D. Sandmann wrote:

> I have found something else out in addition to my previous post.
>
> In my php.ini file I commented out the extension for php_ifx.dll. I then
> uncommented a dll, php_exif.dll, that does not rely on other dll's. Both
> dll's reside in the same extensions directory under the PHP directory.
>
> I restarted the Apache server and that dll loaded just fine. I then
> commented out the php_exif.dll and uncommented another extension that
> required other dll's to work. Just like the Informix dll that one did not
> load either.
>
> So the problem has to reside with an Informix or system variable that is not
> set properly to include the informix dll's when Apache starts up.
>
> PHP still loads with Apache but the informix extensions is not loaded with
> it.
>
> Like I said in my previous posts, here are the variables I have set up in
> the httpd.conf file for Apache:
>
> ######
> # Start - Informix Stuff
> ######
> SetEnv INFORMIXDIR "C:\Program Files\Informix\Client-SDK\"
> SetEnv INFORMIXSERVER "emco10_net"
> ######
> # End - Informix Stuff
> ######
>
> LoadModule php4_module c:\PHP\sapi\php4apache2.dll
> #AddModule mod_php4.c
> AddType application/x-httpd-php .php
>
> Any ideas of possibly other environment variables I should check and make
> sure they are set?


Doesn't Windows look for DLL's in directories on PATH? And aren't the
Informix DLL's that the PHP module loads in %INFORMIXDIR%\bin? So do
you make sure that %INFORMIXDIR%\bin is on the PATH when you start
Apache? And isn't it on your PATH when you run it successfully from
the command line?

In the Unix world, the equivalent steps are to ensure the
LD_LIBRARY_PATH or its moral equivalent is set to point to where the
Informix shared libraries can be found -- or build the PHP shared
library for Informix with the absolute path names of the Informix
shared libraries hard-wired in place.

--
Jonathan Leffler #include <disclaimer.h>
Email: jleffler@earthlink.net, jleffler@us.ibm.com
Guardian of DBD::Informix v2003.04 -- http://dbi.perl.org/

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #17 (permalink)  
Old 04-19-2008, 10:31 PM
D. Sandmann
 
Posts: n/a
Default Re: Informix error with ifx_pconnect()

Thanks for everyones help. I really appreciated it.

Although the problem had nothing to do with the setup of my environment. It
boiled down to my registries where corrupt. Found many entries in my
registry that had the paths to various files starting with c?\"Some path and
file name".

A number of them where Informix related others where for other
applications\dll's. I downloaded Registrar Lite by Resplendance
(http://www.resplendence.com) and did a global search and replace of all
"C?\" to "C:\" rebooted my machine and everything came up fine.

Thanks again to everyone that tried to help. Even you too Data Goob .

David

>
> Doesn't Windows look for DLL's in directories on PATH? And aren't the
> Informix DLL's that the PHP module loads in %INFORMIXDIR%\bin? So do
> you make sure that %INFORMIXDIR%\bin is on the PATH when you start
> Apache? And isn't it on your PATH when you run it successfully from
> the command line?
>
> In the Unix world, the equivalent steps are to ensure the
> LD_LIBRARY_PATH or its moral equivalent is set to point to where the
> Informix shared libraries can be found -- or build the PHP shared
> library for Informix with the absolute path names of the Informix
> shared libraries hard-wired in place.
>
> --
> Jonathan Leffler #include <disclaimer.h>
> Email: jleffler@earthlink.net, jleffler@us.ibm.com
> Guardian of DBD::Informix v2003.04 -- http://dbi.perl.org/
>



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

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
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 09:26 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com