Re: Problems with PHP, Oracle and Apache
| From: | Thies C. Arntzen | Date: | Tue, 14 Sep 1999 06:55:49 +0000 |
| Subject: | Re: Problems with PHP, Oracle and Apache | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-10877@lists.php.net to get a copy of this message | ||
hi,
- what compiler are u using?
- which version of oracle?
tc
Dwayne McGarty wrote:
>
> I am having problems getting Oracle support to work with PHP3.0.12 and
> Apache 1.3.6. Any oracle function calls creates a segmentation
> violation
> in the apache error log. As per the PHP faq here is the gdb trace:
>
> wwsch040:/apps/fw/apache_1.3.6/sbin# gdb ./httpd
> GDB is free software and you are welcome to distribute copies of it
> under certain conditions; type "show copying" to see the conditions.
> There is absolutely no warranty for GDB; type "show warranty" for
> details.
> GDB 4.16 (hppa1.1-hp-hpux10.20), Copyright 1996 Free Software
> Foundation, Inc...
> (gdb) run -X -f /apps/fw/apache_1.3.6/etc/httpd.conf
> Starting program: /apps/fw/apache_1.3.6/sbin/./httpd -X -f
> /apps/fw/apache_1.3.6/etc/httpd.conf
> warning: Unable to find __d_pid symbol in object file.
> warning: Suggest linking with /usr/lib/end.o.
> warning: GDB will be unable to track shl_load/shl_unload calls
> ApacheJServ/1.0
>
> Program received signal SIGSEGV, Segmentation fault.
> 0x7ad3aa70 in sprintf ()
> (gdb) bt
> #0 0x7ad3aa70 in sprintf ()
> #1 0xc000b8ec in ?? ()
> (gdb) quit
> The program is running. Quit anyway (and kill it)? (y or n) y
>
> Here is the php script attempting to be accessed:
>
> <?
> putenv("ORACLE_HOME=/apps/oracle/home/oracle/dist/7.3.2");
> putenv("ORACLE_SID=graspcal");
>
> // connect to server
>
> error_log("Attempting connection to Oracle database", 0, "",
> "");
>
> $connection = ora_logon("scott","tiger");
>
> if ( $connection ) {
>
> error_log("Connection to Oracle Worked", 0, "",
> "");
> $query = "SELECT TO_DATE ('12/06/69' , 'MM/DD/YY')
> ";
> $query .= "FORMAT 2 FROM DUAL";
>
> if ( $cursor = ora_do($connection, $query) ) {
>
> ora_fetch($cursor);
> $item_name = ora_columnname($cursor, 0);
> print ("$item_name<BR>\n");
>
> // Close Oracle cursor
> Ora_Close($cursor);
>
> }
>
> // disconnect.
>
> Ora_Logoff($connection);
>
> }
>
> ?>
>
> The segmentation violation occurs on the line trying to create the
> connection.
>
> This machine is running HP/UX 10.20, PHP3.0.12 and Apache 1.3.6. Are
> there
> any suggestions on what might be wrong?
>
> --
> PHP Development Mailing List <http://www.php.net/>
> To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net
> For additional commands, e-mail: php-dev-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
--
Thies C. Arntzen "One Big-Mac, Small Fries and a Coke!"
Digital Collections Phone +49 40 235350 Fax +49 40 23535180
Hammerbrookstr. 93 20097 Hamburg / Germany