php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #64089 Posting multipart/form-data forms results in Segmentation fault
Submitted: 2013-01-28 23:19 UTC Modified: 2013-02-01 00:20 UTC
From: bas at bushbaby dot nl Assigned:
Status: Not a bug Package: Reproducible crash
PHP Version: 5.4.11 OS: OSX 10.8.2
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: bas at bushbaby dot nl
New email:
PHP Version: OS:

 

 [2013-01-28 23:19 UTC] bas at bushbaby dot nl
Description:
------------
'./configure' '--prefix=/opt/local' '--mandir=/opt/local/share/man' '--
infodir=/opt/local/share/info' '--program-suffix=54' '--
includedir=/opt/local/include/php54' '--libdir=/opt/local/lib/php54' '--with-
config-file-path=/opt/local/etc/php54' '--with-config-file-scan-
dir=/opt/local/var/db/php54' '--disable-all' '--enable-bcmath' '--enable-ctype' '-
-enable-dom' '--enable-fileinfo' '--enable-filter' '--enable-hash' '--enable-json' 
'--enable-libxml' '--enable-pdo' '--enable-phar' '--enable-session' '--enable-
simplexml' '--enable-tokenizer' '--enable-xml' '--enable-xmlreader' '--enable-
xmlwriter' '--with-bz2=/opt/local' '--with-mhash=/opt/local' '--with-pcre-
regex=/opt/local' '--with-libxml-dir=/opt/local' '--with-zlib=/opt/local' '--
without-pear' '--disable-cgi' '--disable-cli' '--disable-fpm' '--with-
apxs2=/opt/local/apache2/bin/apxs'

Test script:
---------------
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <title></title>
</head>

<body>
  <p>this form crashes php</p>

  <form enctype="multipart/form-data" method="post" action="bug.php">
    <input type="submit" value="submit" />
  </form>
  <hr />

  <p>this form won't</p>

  <form method="post" action="bug.php">
    <input type="submit" value="submit" />
  </form>
</body>
</html>

Expected result:
----------------
see the form again

Actual result:
--------------
black screen, apache log shows segmentation fault

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-01-28 23:21 UTC] bas at bushbaby dot nl
oh, I check it is PHP that crashes, by changing the extention and action to html. 
Then it works.
 [2013-01-28 23:23 UTC] bas at bushbaby dot nl
Rattletrap:~ bas$ diff /opt/local/etc/php54/php.ini /opt/local/etc/php54/php.ini-development
405c405
< memory_limit = 256M
---
> memory_limit = 128M
672c672
< post_max_size = 50M
---
> post_max_size = 8M
705c705
< include_path = ".:/opt/local/lib/php54/share/pear"
---
> ;include_path = ".:/php/includes"
800c800
< upload_max_filesize = 50M
---
> upload_max_filesize = 2M
919c919
< date.timezone = Europe/Amsterdam
---
> ;date.timezone =
1582c1582
< session.upload_progress.enabled = On
---
> ;session.upload_progress.enabled = On
1613c1613
< session.upload_progress.freq =  "1%"
---
> ;session.upload_progress.freq =  "1%"
1620c1620
< session.upload_progress.min_freq = "1"
---
> ;session.upload_progress.min_freq = "1"
1862,1869d1861
 [2013-01-29 03:19 UTC] laruence@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.


 [2013-01-29 03:19 UTC] laruence@php.net
-Status: Open +Status: Feedback
 [2013-01-29 08:40 UTC] bas at bushbaby dot nl
Hmm, after I compiled with debug enabled, restarted apache and accessed this 
script, the crash did not occur. Once I enabled the non debug version (and 
restarted apache) it still did not occur (?). I don't know what is going on (I did 
not restart my computer overnight), but it seems for now I can submit multipart 
forms... I'll keep an eye on it and when it happens again I'll try to submit a 
backtrace.
 [2013-01-29 08:40 UTC] bas at bushbaby dot nl
-Status: Feedback +Status: Open
 [2013-02-01 00:20 UTC] felipe@php.net
Thanks for testing. :)
 [2013-02-01 00:20 UTC] felipe@php.net
-Status: Open +Status: Not a bug
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Jul 16 21:01:33 2025 UTC