A common error to deploy Pro * C on Apache
Deploy Pro * c on Apache, the server 500 error often occurs. Recently tested Oracle IAS on Linux, there is a lot of problems, here to solve the process of 500 errors and everyone, I hope to help everyone.
Operating system: Redhat AdvanceServer 2.1 Database: Oracle 8.1.7.4apache: 1.3.12
1: Suppose we request the connection as follows: http: //192.168.0.116: 7777 / cgi-bin / test
The error message obtained by the browser is as follows:
Internal Server ErrorThe server encountered an internal error or misconfiguration and was unable to complete your request.Please contact the server administrator, Fenng@ITPub.net and inform them of the time the error occurred, and anything you might have done that may have caused the Error.
More information about this error. Be be available in the server error log.
In general, administrators will check the error.log files under Apache's logs directory. Check this file, prompt information as follows:
TEST: Error While Loading Shared Libraries: LibClntsh.so.8.0: Cannot Open Shared Object File: No Such File or Directory
Don't worry so much, if there is a Metalink account, let's go, check a few posts, prompting that Apache's environment variable is incorrect. Some words are unknown.
Since the prompt information is not found to find libclntsh.so.8.0 file, first look at the system is not this library file:
[Oracle @ Linux LIB] $ PWD / U / App / Oracle / Product / 8.1.7 / Lib [Oracle @ Linux LIB] $ LS -L Libcln * Lrwxrwrwx 1 Oracle Root 16 Oct 23 13:56 LibClntsh.so -> LibClntsh . SO.8.0-RWSRWXR-X 1 Oracle root 6285134 Oct 23 13:56 libclntsh.so.8.0-rwsrwxr-x 1 Oracle root 8689756 Oct 23 13:57 libclntst8.a Oh, this file exists.
Next, check the environment variable:
[Oracle @ Linux lib] $ set | grep libld_library_path = / u / app / oracle / Product / IAS / LIB: / LIB: / USR / LIB: / USR / OpenWIN / LIB
OK. Problem positioning: The user's environment variable is incorrect.
Explanation: It has also been installed in the original system. The administrator is negligent, and the environment variable is not adjusted.
After modification, it is resolved.
(Wow, you are too simple, no strength) OK, look at the next situation.
Situation 2:
System environment: Add Oracle 9ias, the other is. Apache is the default installation with IAS.
There is also a 500 error.
With the last experience, look for one by one .....
Actually ... no matter
User environment variables are correct, perform TEST programs under the shell, can be executed, and output the correct result!
Internet, find Google, MetAlink, the information obtained is as follows: Apache's environment variable is incorrect
It is recommended to join in httpd.conf.
SetENV ORACLE_HOME 'YOUR PATH'SETENV ORACLE_SID' YOUR SID'SETENV LD_LIBRARY_PATH 'Your LIB PATH'
After trying, there is no role.
It seems that the solution is not right.
From the head analysis: Log in to Oracle users, at this time, the environment variable is correct, then start / stop Apache, use the apachectl start / stop command. This apachectl will have a problem??
$ more apachectl
Found this passage: if [-z "$ LD_LIBRARY_PATH"] then LD_LIBRARY_PATH = / u / app / oracle / product / ias / lib; export LD_LIBRARY_PATHelse LD_LIBRARY_PATH = / u / app / oracle / product / ias / lib: $ {LD_LIBRARY_PATH }; export ld_library_pathfi
It is also a disaster that IAS! After modification. Problem solved.
The proposal for the old talk: When the operation is modified, it is a good habit of making a backup in advance. Otherwise, it is very headache that is not a headache to recover.
Attached, some configuration information of the system is approximately as follows:
[Oracle @ Linux Bin] $ uname -alinux linux 2.4.9-E.3 # 1 fri may 3 17:02:43 Edt 2002 i686 unknownsql> select * from v $ version; banner --------- -------------------------------------------------- ---- Oracle8i Enterprise Edition Release 8.1.7.4.0 - ProductionPL / SQL Release 8.1.7.4.0 - ProductionCore 8.1.7.0.0 ProductionTns for Linux: Version 8.1.7.4.0 - Productionnlsrtl Version 3.4.1.0.0 - PRODUCTION