Please Help

RudeCGI™ Open Source C++ CGI Library

Version 5.1.0

Forum/F.A.Q

There is currently no discussion forum for this library.

Please send all questions / suggestions / bugreports / testimonies here

Q: I am trying to compile RudeCGI on OSX, but I get the following error:src/POSTExtractor.cpp:108: error: invalid lvalue in assignment
A: Jonathan Hendler got rudecgi to compile on OSX with this hack to POSTExtractor.cpp:

//int stdin_fd = fileno(stdin);
//fclose(stdin);
   FILE * ttemp = fopen("stdin","rb");
   dup2(ttemp->_file,STDIN_FILENO);
   fclose(ttemp);
//stdin = fdopen(stdin_fd, "rb");
   if(stdin)

Q: My application runs fine from the command line, but when I run it as a CGI application, Apache cannot find the shared library. Why not?
A: If you are not having problems from the command line, then the problem you encounter running it as CGI is most likely permissions. Make sure that apache has read and execute permissions on the entire directory path that contains the shared libraries. One way to test this is to copy your .so's to the /tmp/ folder and set your LD_LIBRARY_PATH to /tmp/.

Q: How do I set LD_LIBRARY_PATH for apache?
A: To do this, you will need to add a SetEnv directive in your httpd.conf file like the folowing example:

SetEnv LD_LIBRARY_PATH /tmp/

NOTE that the path ends with a "/".