This has been going on for quite some time. I only got the installation right once, and after that, it either:
- PHP pages show the PHP codes (not the current error, but I've experienced this)
- PHP pages return "Internal Error in Server"
All I really want is to get PHP to connect to Oracle 11g XE via oci8. I had no idea it would be this difficult.
Additionally, looking into the error logs (I'm assuming this is PHP's error logs) located in
/var/log/httpd/error_log, reveals the following error:
PHP Fatal Error: Unknown: Failed opening required '/var/www/html/info.php' (include path = '.:/usr/share/pear:/usr/share/php').
I've never encountered this before.
- Fedora 19 x86_64
- Oracle 11g XE
- Apache 2.4.6
- PHP 5.5.4
info.php contains merely the following:
<?php phpinfo(); ?>
php -i works, although I'm not sure what to look for there.
What I tried:
Plenty. But since I've reformatted the PC, and started over, so here's a break down of what I did:
- Installed Oracle 11g XE
- Properly backed up my database into said Oracle
- Modify .bashrc by adding the following
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR
ORACLE_HOSTNAME=localhost.localdomain; export ORACLE_HOSTNAME ORACLE_UNQNAME=DB11G; export ORACLE_UNQNAME ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE ORACLE_HOME=$ORACLE_BASE/product/11.2.0/xe; export ORACLE_HOME ORACLE_SID=XE; export ORACLE_SID NLS_LANG=`$ORACLE_HOME/bin/nls_lang.sh`; export NLS_LANG ORACLE_TERM=xterm; export ORACLE_TERM PATH=/usr/sbin:$PATH; export PATH PATH=$ORACLE_HOME/bin:$PATH; export PATH LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib;
if [ $USER = "oracle" ]; then if [ $SHELL = "/bin/ksh" ]; then ulimit -p 16384 ulimit -n 65536 else ulimit -u 16384 -n 65536 fi fi
- yum groupinstall "Development Libraries"
- yum install httpd
- yum install php
I started apache, configured it to start at boot, was able to get to the Fedora test page, and put a test PHP page in
localhost works fine.
localhost/info.php returns "Internal Error in Server".
I have no idea what I'm doing wrong. I haven't even gotten PHP up and running yet, so I'm pretty worried about my ability to get it to connect to Oracle. Any ideas / suggestions? Thanks.