Form won't submit

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Martin Herrman

    Form won't submit

    Dear scripters,

    I wrote a PHP script that produces a form. If the form is submitted, the
    entered information is checked. If an error in the input is found, a
    message appears. Using the browser's 'back' button, the user can change
    his/her input. If no errors are found, the input is used to generate some
    graphics (using the gdlib.so module).

    When running this script on my own Linux/Apache/PHP/gdlib.so server, it
    works perfectly. But when I upload it to a public webserver, it does not
    work. When valid input is entered, the error messages appear. But when the
    invalid input is entered, the following happens:

    1. Netscape/Mozilla/Galeon: nothing seems to happen
    2. Konqueror: connection was closed
    3. MSIE: 404 error

    I can't find out what's going wrong; do you have any idea what could cause
    this problem?

    much thank in advance!

    Martin

  • Erwin Moller

    #2
    Re: Form won't submit

    Hi Martin

    Nobody can help you with the information you provided.
    You claim the form is not submitted.
    Are you sure about that?
    Maybe the PHPscript is not working?

    Please be more informative (with code eg).

    Regards,
    Erwin Moller

    Comment

    • Martin Herrman

      #3
      Re: Form won't submit

      On Tue, 09 Mar 2004 12:14:08 +0100, Erwin Moller wrote:

      Hi Erwin,

      thanks for your reply. The script does work (at least, on my private
      Linux/Apache/PHP server). When I upload the script to my provider,
      catching invalid input does work, but when valid input is send, nothing
      happens (using Netscape) or a 'connection closed by server' message
      appears (using Konqueror), or a 404 error appears (using MSIE).

      I have put the script online for download:



      If you want to see it running on my own server:



      I can't show it on my providers website, because that part is protected by
      ..htaccess/.htpasswd files.

      Note: db.txt is of the form:

      Name#!#number#! #number#!#..#!# number\n
      ....
      Name#!#number#! #number#!#..#!# number\n

      week.txt is of the form:

      2004,10\n
      2004,11\n

      I hope this is enough information and one can help me out :-)

      best regards,

      Martin
      [color=blue]
      > Hi Martin
      >
      > Nobody can help you with the information you provided.
      > You claim the form is not submitted.
      > Are you sure about that?
      > Maybe the PHPscript is not working?
      >
      > Please be more informative (with code eg).
      >
      > Regards,
      > Erwin Moller[/color]

      Comment

      • Erwin Moller

        #4
        Re: Form won't submit

        Hi Martin,

        Okay, so we can conclude that your FORM is working. :-)
        It does submit, otherwise your validation shouldn't work.

        (I don't have the time on my hands at the moment to look into your code now,
        sorry! Maybe someone else can.)

        But I have a general suggestion/guess:
        My guess would be that your imagecreating routines are NOT working on your
        providers computer.

        Try to check this by giving responses just before you start using the lib.
        If you are returning only an image, you'll get into trouble with
        contenttype, so use a file to write your comments to on the server.

        If you have access to the errorlog on the provider's comp, look into that
        too. I bet you'll find some problems with the graphicslibs, maybe they are
        not installed.

        <Sorry dutch>
        Volgens mij kan ik ook gewoon nederlands praten met je. :-)
        </Sorry dutch>

        Good luck,
        Erwin Moller

        Comment

        • Martin Herrman

          #5
          Re: Form won't submit

          On Wed, 10 Mar 2004 09:07:26 +0100, Erwin Moller wrote:
          [color=blue]
          > Hi Martin,[/color]

          Hi Erwin,
          [color=blue]
          > Okay, so we can conclude that your FORM is working. :-)
          > It does submit, otherwise your validation shouldn't work.[/color]

          Yep :-)
          [color=blue]
          > (I don't have the time on my hands at the moment to look into your code now,
          > sorry! Maybe someone else can.)
          >
          > But I have a general suggestion/guess:
          > My guess would be that your imagecreating routines are NOT working on your
          > providers computer.[/color]

          Well, the server supports it:



          I am also checking it with an 'if function_exists (gdlib_info) { .. }'.
          [color=blue]
          > Try to check this by giving responses just before you start using the lib.
          > If you are returning only an image, you'll get into trouble with
          > contenttype, so use a file to write your comments to on the server.[/color]

          I will try to debug it that way, thanks for the idea!
          [color=blue]
          > If you have access to the errorlog on the provider's comp, look into that
          > too. I bet you'll find some problems with the graphicslibs, maybe they are
          > not installed.[/color]

          I do have root access, but Apache's error and info log did not give any
          information :-(
          [color=blue]
          > <Sorry dutch>
          > Volgens mij kan ik ook gewoon nederlands praten met je. :-) </Sorry
          > dutch>[/color]

          Dat kan, maar mag hier niet :-)

          best regards,

          Martin
          [color=blue]
          > Good luck,
          > Erwin Moller[/color]

          Comment

          • Martin Herrman

            #6
            Solved! (was: Form won't submit)

            Hi Erwin,

            I was using imagecreatetrue color(), which (*shame* didn't read the docs
            100%) requires PHP version > X and GDlib version > Y. My provider did not
            upgrade to one of them, so the function was not available (and I was too
            lazy to write an "or die (..)" statement ). Changed it into imagecreate()
            and it works perfectly now :-)

            thanks!

            Martin

            Comment

            • Erwin Moller

              #7
              Re: Solved! (was: Form won't submit)

              Martin Herrman wrote:
              [color=blue]
              > Hi Erwin,
              >
              > I was using imagecreatetrue color(), which (*shame* didn't read the docs
              > 100%) requires PHP version > X and GDlib version > Y. My provider did not
              > upgrade to one of them, so the function was not available (and I was too
              > lazy to write an "or die (..)" statement ). Changed it into imagecreate()
              > and it works perfectly now :-)
              >
              > thanks!
              >
              > Martin[/color]

              Good!

              Comment

              Working...