473,385 Members | 1,673 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

php does segmentation fault

Help! PHP is crashing when I go something very simple
and straightforward.

I downloaded PHP 5.0.4 and compiled it with MySQL support.
I checked that my database was up and running and that
the table I wanted to access was accessible from
the mysql prompt.

I then ran the following PHP file, first through my
webserver and then at the command line, with the
same result each time: PHP segfaulted.

The file:

<html><body>
<table><tr>
<?
mysql_connect(localhost,"myuser","mypass");
# other stuff here
?>
</table>
<hr>
HTML that never appears in the result.
</html>

PHP segfaults during the connect.

Can anyone tell me if this is a known bug?
Can anyone tell me which would be a more stable version
of PHP?

Thanks
333

?>

Jul 24 '05 #1
9 20631
Bush is a Fascist wrote:
Help! PHP is crashing when I go something very simple
and straightforward.

I downloaded PHP 5.0.4 and compiled it with MySQL support.
I checked that my database was up and running and that
the table I wanted to access was accessible from
the mysql prompt.

I then ran the following PHP file, first through my
webserver and then at the command line, with the
same result each time: PHP segfaulted.

The file:

<html><body>
<table><tr>
<?
mysql_connect(localhost,"myuser","mypass");
# other stuff here
?>
</table>
<hr>
HTML that never appears in the result.
</html>

PHP segfaults during the connect.

Can anyone tell me if this is a known bug?
Can anyone tell me which would be a more stable version
of PHP?

Thanks
333

?>


Did you look on php.net? Since they produce the modules, it's the first place I
go when I have this kind of problem...

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
Jul 24 '05 #2
Bush is a Fascist wrote:
Help! PHP is crashing when I go something very simple
and straightforward.

I downloaded PHP 5.0.4 and compiled it with MySQL support.
I checked that my database was up and running and that
the table I wanted to access was accessible from
the mysql prompt.

I then ran the following PHP file, first through my
webserver and then at the command line, with the
same result each time: PHP segfaulted.


Run the script manually with "PHP-cli" and use a debugger (gdb or any other
you may have) and see what you get out from there.
//Aho
Jul 24 '05 #3
J.O. Aho wrote:
Run the script manually with "PHP-cli" and use a debugger (gdb or any other
you may have) and see what you get out from there.


There is no such thing.

Do you mean the commandline version of php? I've already tried that,
as I pointed out in the original post.

Jul 24 '05 #4
Jerry Stuckle wrote:
Did you look on php.net?


It's not in the bug list.

I find it strange that people even use software that is this
buggy.

Jul 24 '05 #5
Bush is a Fascist wrote:
J.O. Aho wrote:

Run the script manually with "PHP-cli" and use a debugger (gdb or any other
you may have) and see what you get out from there.

There is no such thing.

Do you mean the commandline version of php? I've already tried that,
as I pointed out in the original post.


Run it within a debugger as I asked.

//Aho
Jul 24 '05 #6
Bush is a Fascist wrote:
Jerry Stuckle wrote:

Did you look on php.net?

It's not in the bug list.

I find it strange that people even use software that is this
buggy.


There's more than just the bugs list. Did you check the mail lists, for instance?

But I've never seen any program that's relatively complex which doesn't have
some bugs. Developers do their best to get all the bugs out - but there are
hundreds of thousands of lines of code in PHP, and there's no way to get every
one out. That's one of the reasons for updates. Heck - the last OS I know
about that was bug free was Dos 1.0 - and I'm not sure about that!

BTW, this includes your code. It should be

mysql_connect("localhost","myuser","mypass");
^ ^

Note the quotes around the string localhost.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
Jul 24 '05 #7
On 23 Jul 2005 18:13:00 -0700, "Bush is a Fascist" <z3***@yahoo.com> wrote:
Help! PHP is crashing when I go something very simple
and straightforward.

PHP segfaults during the connect.

Can anyone tell me if this is a known bug?
Can anyone tell me which would be a more stable version
of PHP?


http://bugs.php.net/how-to-report.php
http://bugs.php.net/bugs-generating-backtrace.php

--
Andy Hassall / <an**@andyh.co.uk> / <http://www.andyh.co.uk>
<http://www.andyhsoftware.co.uk/space> Space: disk usage analysis tool
Jul 24 '05 #8
Bush is a Fascist wrote:
I find it strange that people even use software that is this
buggy.


I find it strange that an inexperienced user thinks the bug is in the
software which has millions of man hours of testing behind it and not
in their inexperience which probably has not given the problem more
than a few hours of testing.

Jul 26 '05 #9
On 2005-07-26, el*************@yahoo.com <el*************@yahoo.com> wrote:
Bush is a Fascist wrote:
I find it strange that people even use software that is this
buggy.


I find it strange that an inexperienced user thinks the bug is in the
software which has millions of man hours of testing behind it and not
in their inexperience which probably has not given the problem more
than a few hours of testing.


No matter how bad the code is, i don't think it should be able to make
php segfault.. (For example, i've had scripts that would work perfectly
well with mod_php but segfaulted in the php-cli version...)

--
Met vriendelijke groeten,
Tim Van Wassenhove <http://timvw.madoka.be>
Jul 26 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: sivignon | last post by:
Hi, I'm writing a php script which deals with 3 ORACLE databases. This script is launch by a script shell on an linux machine like this : /../php/bin/php ./MySript.php (PHP 4.3.3) My script...
3
by: diyanat | last post by:
i am writing a cgi script in C using the CGIC library, the script fails to run, i am using apache on linux error report from apache : internal server error Premature end of script headers:...
6
by: damian birchler | last post by:
If I run the following I get a segmentation fault: #define NAMELEN 15 #define NPERS 10 typedef struct pers { char name; int money; } pers_t;
3
by: I_have_nothing | last post by:
Hi! I am new in C. I got a lots of "Segmentation Fault"s in my code. I guess One possibility is: if " int array_i; " is declard and the code trys to access "array_i", a Segmentation Fault will...
3
by: Zheng Da | last post by:
Program received signal SIGSEGV, Segmentation fault. 0x40093343 in _int_malloc () from /lib/tls/libc.so.6 (gdb) bt #0 0x40093343 in _int_malloc () from /lib/tls/libc.so.6 #1 0x40094c54 in malloc...
6
by: I_have_nothing | last post by:
Hi! I am new in C. I try to use dynamical allocation fuction malloc( ) and realloc( ). I found something strange. After several calling realloc( ), the malloc( ) will give me a Segmentation...
5
by: Fra-it | last post by:
Hi everybody, I'm trying to make the following code running properly, but I can't get rid of the "SEGMENTATION FAULT" error message when executing. Reading some messages posted earlier, I...
7
by: pycraze | last post by:
I would like to ask a question. How do one handle the exception due to Segmentation fault due to Python ? Our bit operations and arithmetic manipulations are written in C and to some of our...
3
by: madunix | last post by:
My Server is suffering bad lag (High Utlization) I am running on that server Oracle10g with apache_1.3.35/ php-4.4.2 Web visitors retrieve data from the web by php calls through oci cobnnection...
8
by: Andrea | last post by:
I wrote this code: void * xmalloc (size_t size){ register void *value = OPENSSL_malloc(size); if (value == 0) printf("virtual memory exhausted"); return value; } int _chooseTSK(char*...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.