note 47464 modified in function.ocilogon by sixd

From: Date: Mon, 05 Oct 2009 01:39:51 +0000
Subject: note 47464 modified in function.ocilogon by sixd
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-161299@lists.php.net to get a copy of this message
In reply to william_poulsen at hotmail dot com: I was trying to connect to a Oracle database wich worked fine in a web browser but failed when i executed the script from command line. Thanks to william_poulsen at hotmail dot com i learned that the problem was that the command line can't find the TNSNAMES. His solution was to edit you DB to the TNSNAMES entry. Sadly enough this didn't do the trick. I got segmantation fault when the script was executed. So i started to set my Oracle variables prior to executing the script. ORACLE_SID, ORACLE_HOME, ORACLE_BASE and added $ORACLE_HOME/BIN to the path. After that PHP seems to use this variables and the connection can be made. Problem solved. I hope this can help somebody out there. --was-- In reply to william_poulsen at hotmail dot com: I was trying to connect to a Oracle database wich worked fine in a web browser but failed when i executed the script from command line. Thanks to william_poulsen at hotmail dot com i learned that the problem was that the command line can't find the TNSNAMES. His solution was to edit you DB to the TNSNAMES entry. Sadly enough this didn't do the trick. I got segmantation fault when the script was executed. So i started to set my Oracle variables prior to executing the script. ORACLE_SID, ORACLE_HOME, ORACLE_BASE and added $ORACLE_HOME/BIN to the path. After that PHP seems to use this variables and the connection can be made. Problem solved. I hope this can help somebody out there. http://php.net/manual/en/function.ocilogon.php

« previous php.notes (#161299) next »