php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #1091 Segmentation Faults
Submitted: 1999-01-24 16:44 UTC Modified: 1999-02-21 11:49 UTC
From: spertus at mills dot edu Assigned:
Status: Closed Package: PostgreSQL related
PHP Version: 3.0.5 OS: Red Hat Linux 5.2
Private report: No CVE-ID: None
 [1999-01-24 16:44 UTC] spertus at mills dot edu
When I try loading the page with the following code, it sometimes work, but I sometimes get segmentation violations in my apache log file:

<?
$connection = pg_connect("localhost", "5432", "", "ellen");
echo $connection;
$result = pg_exec($connection, "select username from person");
pg_close($connection);
?>

(I've removed the lines to display the returned information.  It still crashes.)

We compiled PHP with the apache and postgres options.

Our php3.ini file is pretty vanilla, but I can send it if you decide you want it.  We are using Apache 1.3.3.

Here is the back trace:

(gdb) run -X
Starting program: /www/bin/httpd -X
(no debugging symbols found)...
Program received signal SIGSEGV, Segmentation fault.
0x80a52cc in phpparse ()
(gdb) bt
#0  0x80a52cc in phpparse ()
#1  0x807e83a in _php3_build_argv ()
#2  0x807ead8 in apache_php3_module_main ()
#3  0x807c060 in send_php3 ()
#4  0x807c0c6 in send_parsed_php3 ()
#5  0x80c0a57 in ap_invoke_handler ()
#6  0x80d3251 in ap_some_auth_required ()
#7  0x80d32b0 in ap_process_request ()
#8  0x80cb19d in ap_child_terminate ()
#9  0x80cb328 in ap_child_terminate ()
#10 0x80cb483 in ap_child_terminate ()
#11 0x80cba60 in ap_child_terminate ()
#12 0x80cc293 in main ()

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-02-21 11:49 UTC] eschmid
Did you solve this segfault?  Any chance of a backtrace with full debugging symbols?  Just compile
PHP with --enable-debug

pg_connect() takes 5 arguments. The last is the database name.

-Egon
 
PHP Copyright © 2001-2018 The PHP Group
All rights reserved.
Last updated: Thu Dec 13 20:01:26 2018 UTC