472,122 Members | 1,556 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,122 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 20585
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by sivignon | last post: by
3 posts views Thread by diyanat | last post: by
6 posts views Thread by damian birchler | last post: by
3 posts views Thread by I_have_nothing | last post: by
5 posts views Thread by Fra-it | last post: by
7 posts views Thread by pycraze | last post: by
3 posts views Thread by madunix | last post: by
8 posts views Thread by Andrea | last post: by
reply views Thread by leo001 | last post: by

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.