I'm running Apache 3.0, and have a c++ cgi-bin program working fine with Apache... except the cgi-bin program wont create or even read from files it uses as a database? Anybody know the answer to this one?

Thanks kindly,
jon

Recommended Answers

All 4 Replies

I'm running Apache 3.0, and have a c++ cgi-bin program working fine with Apache...

Then your program is NOT "running fine with Apache" :cheesy: Did you check the read/write permissions on the directory in which the program is attempting to write?

I checked the read/write/execute permissions on the directory, they are all set ok. All including user, group, and other.

http://www.faqs.org/docs/securing/chap29sec254.html
Are you entirely sure that apache is seeing the same directory structure that you're seeing?
Which real / effective user ID's is apache running with, and do these have appropriate permissions to access the files?

Create a simple C++ program which allows you to log all this information, and send it back out as a response.
Use API calls like perror() to tell you why a file could not be accessed - like could it be found, or is it permissions?

I checked directory information in c++, the program had no directory information at all, no current working directory, nothing.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.