Jump to content

fakarorg

Members
  • Posts

    4
  • Joined

  • Last visited

fakarorg's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Thanks Shinryuu. It worked. So when I first linked it "dynamically" against libmysqlclient it didn't work on your servers because I have MySQL Client Version 5.5.32 while you have MySQL Client Version 5.1.56? Is there any option to install additional shared libraries on my site if I want to?
  2. If you can't help me then please tell me how to access any logs that tell the reason behind HTTP 500 Errors. The Error Logs in cPanel don't give much information. And my FTP client is failing to connect to the logs FTP host.
  3. This has nothing to do with Java. It shows the configuration used when building GCC. I wrote it here so you know that the compiler target is x86_64-redhat-linux. The CGI application is a native executable file and not a JAR or Java Bytecode file.
  4. Hello, Everyone. I'm having problems with my CGI executable on my site. It gives HTTP 500 Internal Server Error while I have no access to any detailed logs to be able to troubleshoot the problem. It works well on my computer. The permissions of the file are set correctly (755). And another "Hello, World!" CGI program works perfectly on the server. It seems to me that this is a linking issue. Here are the details of the executable: The executable is linked with the following libraries: Source Code: #include <iostream> #include <mysql.h> using namespace std; const string CRLF = "\r\n"; int main() { cout << "Content-Type: text/plain" << CRLF << CRLF; cout << "Hello, World!" << CRLF; try { cout << "MySQL Client Version: " << mysql_get_client_info() << CRLF; } catch(exception& ex) { cout << "ERROR: " << ex.what() << CRLF; } return 0; } Compiled Using: gcc 4.7 with the following specifications: Makefile: #Variables: INCLUDE_DIR = -I/usr/local/mysql/include LIBS_DIR = -L/usr/local/lib64 STATIC_LIBS = -lmysqlclient DYNAMIC_LIBS = -ldl -lpthread -lrt STATIC_LINK_FLAG = -Wl,-Bstatic DYNAMIC_LINK_FLAG = -Wl,-Bdynamic LD_FLAGS = $(LIBS_DIR) $(STATIC_LINK_FLAG) $(STATIC_LIBS) $(DYNAMIC_LINK_FLAG) $(DYNAMIC_LIBS) #Rules: test.cgi: test.cpp g++ test.cpp $(INCLUDE_DIR) $(LD_FLAGS) -o test.cgi
×
×
  • Create New...