Re: Can't connect to MySQL when using fcgi

David Birnbaum <[email protected]>
Newsgroups gmane.comp.web.fastcgi.devel,gmane.spam.detected
Message-ID <[email protected]>
Also, remember that the command line environment and the FastCGI environment are 
different - if your command line version is working because of how you've set 
things in a .profile or similar file, you'll find that the FastCGI world fails 
for you.

David.

-----

On Wed, 15 Aug 2007, Étienne KASPERCZYK wrote:

> It works really fine, i'm using a C multithreaded application with as many
> connections as i want, and it's definitely working.
> What's the error you get with mysql_error ?
>
> Etienne.
>
> On 8/15/07, alexander johnson <[email protected]> wrote:
>>
>> Hi all,
>>
>> I'm having problems connecting to a mysql DB from my fcgi program.  My
>> fcgi program was written in Dev C++  and is running on Apache 2.2.  Im
>> using libmySQL library to connect to the db. I wrote a small exe test
>> program and it connects to the db fine.  When i put the same code in
>> my fcgi program it will not work.  It get the error 'Error 2004: Can't
>> create TCP/IP socket ".  Is it actually possible to connect to a mysql
>> db from an fcgi program? If so how would I go about doing so?
>>
>> The line in my code that fails is:
>>
>> mysql_real_connect( mySQL, "localhost", "root", "password", NULL, 0, NULL,
>> 0 )
>>
>> As i mentioned this works fine in my test program, just not when i put
>> it in my fcgi program
>>
>>
>> Any help would be greatly appreciated
>>
>> Thanks
>> --
>> Alex
>> ___________________________________
>> fastcgi-developers mailing list
>> http://fastcgi.com/fastcgi-developers/
>>
>

___________________________________
fastcgi-developers mailing list
http://fastcgi.com/fastcgi-developers/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.