php does segmentation fault

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Bush is a Fascist

    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(l ocalhost,"myuse r","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

    ?>

  • Jerry Stuckle

    #2
    Re: php does segmentation fault

    Bush is a Fascist wrote:[color=blue]
    > 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(l ocalhost,"myuse r","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
    >
    > ?>
    >[/color]

    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.
    jstucklex@attgl obal.net
    =============== ===

    Comment

    • J.O. Aho

      #3
      Re: php does segmentation fault

      Bush is a Fascist wrote:[color=blue]
      > 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.[/color]

      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

      Comment

      • Bush is a Fascist

        #4
        Re: php does segmentation fault

        J.O. Aho wrote:
        [color=blue]
        > 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.[/color]

        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.

        Comment

        • Bush is a Fascist

          #5
          Re: php does segmentation fault

          Jerry Stuckle wrote:
          [color=blue]
          > Did you look on php.net?[/color]

          It's not in the bug list.

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

          Comment

          • J.O. Aho

            #6
            Re: php does segmentation fault

            Bush is a Fascist wrote:[color=blue]
            > J.O. Aho wrote:
            >
            >[color=green]
            >>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.[/color]
            >
            >
            > 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.
            >[/color]

            Run it within a debugger as I asked.

            //Aho

            Comment

            • Jerry Stuckle

              #7
              Re: php does segmentation fault

              Bush is a Fascist wrote:[color=blue]
              > Jerry Stuckle wrote:
              >
              >[color=green]
              >>Did you look on php.net?[/color]
              >
              >
              > It's not in the bug list.
              >
              > I find it strange that people even use software that is this
              > buggy.
              >[/color]

              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","myu ser","mypass") ;
              ^ ^

              Note the quotes around the string localhost.

              --
              =============== ===
              Remove the "x" from my email address
              Jerry Stuckle
              JDS Computer Training Corp.
              jstucklex@attgl obal.net
              =============== ===

              Comment

              • Andy Hassall

                #8
                Re: php does segmentation fault

                On 23 Jul 2005 18:13:00 -0700, "Bush is a Fascist" <z333r@yahoo.co m> wrote:
                [color=blue]
                >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?[/color]




                --
                Andy Hassall / <andy@andyh.co. uk> / <http://www.andyh.co.uk >
                <http://www.andyhsoftwa re.co.uk/space> Space: disk usage analysis tool

                Comment

                • el_roachmeister@yahoo.com

                  #9
                  Re: php does segmentation fault

                  Bush is a Fascist wrote:[color=blue]
                  > I find it strange that people even use software that is this
                  > buggy.[/color]

                  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.

                  Comment

                  • Tim Van Wassenhove

                    #10
                    Re: php does segmentation fault

                    On 2005-07-26, el_roachmeister @yahoo.com <el_roachmeiste r@yahoo.com> wrote:[color=blue]
                    > Bush is a Fascist wrote:[color=green]
                    >> I find it strange that people even use software that is this
                    >> buggy.[/color]
                    >
                    > 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.[/color]

                    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 >

                    Comment

                    Working...