logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Third-party Modules View previous topic :: View next topic
Reply to topic   Topic: mod_fcgid and php makes wierd errors..
Author
Juel



Joined: 15 Feb 2010
Posts: 3

PostPosted: Mon 15 Feb '10 14:38    Post subject: mod_fcgid and php makes wierd errors.. Reply with quote

Hi All.

I really hope you guys can help me, im going nuts, and have spend hours and hours on this problem..

I have win server 2003 x64 with Apache 2.2.14 and the mod_fcgid from this: mod_fcgid-2.2b-w32.zip and at last i got PHP VC9 x86 Non Thread Safe installed. + Visual C++ 2008 Redistributable Package x86.

I can make php work (but with strange errors), and use this addons to my httpd.conf:

LoadModule fcgid_module modules/mod_fcgid.so
<Directory "C:\www">
AllowOverride None
Order allow,deny
AddHandler fcgid-script .php
Options FollowSymLinks ExecCGI
FCGIWrapper "c:/php/php-cgi.exe" .php
Allow from all
</Directory>

<IfModule mod_fcgid.c>
IPCCommTimeout 40
IPCConnectTimeout 10
MaxProcessCount 8
OutputBufferSize 64
ProcessLifeTime 240
MaxRequestsPerProcess 500
</IfModule>

Ok, let me explain the errors:
if i use:

echo gethostbyname('google.com');

it just replys google.com and not the ip!

If i try
$connection1=mysql_connect("localhost",'root','password');

it gives me this:
Warning: mysql_connect(): php_network_getaddresses: getaddrinfo failed: No such host is known. in C:\www\test.php on line 11 Warning: mysql_connect(): [2002] php_network_getaddresses: getaddrinfo failed: No such host is kn (trying to connect via tcp://localhost:3306) in C:\www\test.php on line 11 Warning: mysql_connect(): php_network_getaddresses: getaddrinfo failed: No such host is known. in C:\www\test.php on line 11

It cant seem to resolve anything, sp i cant connect to my mysql server.

If i use IIS 6 instead of apache, there is no problem, and a normal Ping can resolve adresses just fine.. So after many hours of testing, i narrowed it down to apache or the mod_fcgid.

Have anyone seen this error before, my head is about to have a meltdown (you guys know how that is..) Very Happy

So please help.. Google is not my friend Sad
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7288
Location: Germany, Next to Hamburg

PostPosted: Mon 15 Feb '10 22:32    Post subject: Reply with quote

Try to add:

DefaultInitEnv PATH "x:/xxxxx/php;C:/WINDOWS/system32;C:/WINDOWS;C:/WINDOWS/System32/Wbem;"
DefaultInitEnv SystemRoot "C:/Windows"
DefaultInitEnv SystemDrive "C:"
DefaultInitEnv TEMP "C:/WINDOWS/Temp"
DefaultInitEnv TMP "C:/WINDOWS/Temp"
DefaultInitEnv windir "C:/WINDOWS"

Where xxxx points to you php dir.
Back to top
Juel



Joined: 15 Feb 2010
Posts: 3

PostPosted: Tue 16 Feb '10 1:03    Post subject: Reply with quote

James Blond wrote:
Try to add:

DefaultInitEnv PATH "x:/xxxxx/php;C:/WINDOWS/system32;C:/WINDOWS;C:/WINDOWS/System32/Wbem;"
DefaultInitEnv SystemRoot "C:/Windows"
DefaultInitEnv SystemDrive "C:"
DefaultInitEnv TEMP "C:/WINDOWS/Temp"
DefaultInitEnv TMP "C:/WINDOWS/Temp"
DefaultInitEnv windir "C:/WINDOWS"

Where xxxx points to you php dir.


Thank you, Thank you, Thank you, Thank you, Thank you, Thank you, Thank you, Thank you, Thank you, Thank you, Thank you, Thank you, Thank you, Thank you, Thank you, Thank you, Thank you, Thank you, Thank you, Thank you, Thank you, Thank you, Thank you, Thank you, Thank you, Thank you, Thank you, Thank you, Thank you, Thank you, Thank you, Thank you, Thank you, Thank you, Thank you, Thank you..

Very Happy Soooo much.. IT WORKS !! after hours of cursing and *signing*

Thanks again, you made a danish guy really happy Smile

Kind regards
Morten
Back to top


Reply to topic   Topic: mod_fcgid and php makes wierd errors.. View previous topic :: View next topic
Post new topic   Forum Index -> Third-party Modules