Page 1 of 1

$_FILES submit hanging

Posted: Sun Jun 11, 2006 6:38 pm
by ChocolateLover
I'm using
OSX Tiger
Safari
Apache 2
PHP 5.1.2

My code is

Code: Select all

<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" enctype="multipart/form-data" name="photo_upload">
<input name="photo_button" type="file" />

<input type="submit" name="Submit" value="Submit" />

</form>
There's nothing in the php file apart from this code.

If I click on submit the page refreshes. If I select a file (doesn't seem to matter what kind of file) and then submit the page hangs, with no error messages, the page just doesn't refresh. Error_reporting is set to 2039.

This is quite a new installation of Apache/php and this bit has probably never worked.

Any help would be appreciated.

Posted: Sun Jun 11, 2006 6:54 pm
by derchris
What about the rest of the Script ?

Posted: Sun Jun 11, 2006 7:10 pm
by John Cartwright
How large is the file?

Posted: Sun Jun 11, 2006 7:58 pm
by ChocolateLover
That's the whole script.

I'm not event trying to actually upload or do anything with the file yet. The files I'm choosing vary in size and are all less than the max_file_upload size.

I open the page and a browse and submit button show.

If I click submit, the page just refreshes.

If I select a file and then submit (without doing anything with the selected file) the page tries to refresh but just hangs.

This is my phpinfo

HTTP Server: Apache/2.2.0 (Unix) mod_ssl/2.2.0 OpenSSL/0.9.8a DAV/2 PHP/5.1.2
PHP Version: 5.1.2 (Zend: 2.1.0)

System Darwin computer.local 8.6.1 Darwin Kernel Version 8.6.1: Tue Mar 7 16:55:45 PST 2006; root:xnu-792.9.22.obj~1/RELEASE_I386 i386
Build Date May 2 2006 13:33:51
Configure Command './configure' '--prefix=/opt/local' '--mandir=/opt/local/share/man' '--infodir=/opt/local/share/info' '--with-config-file-path=/opt/local/etc' '--enable-calendar' '--with-iconv=/opt/local' '--enable-exif' '--enable-ftp' '--enable-wddx' '--with-zlib=/opt/local' '--with-libxml-dir=/opt/local' '--with-gettext=/opt/local' '--with-libxml-dir=/opt/local' '--with-xml' '--with-expat-dir=/opt/local' '--with-xmlrpc' '--enable-filepro' '--enable-bcmath' '--enable-trans-sid' '--enable-mbstring' '--enable-dbx' '--with-openssl=/opt/local' '--with-mhash=/opt/local' '--with-mcrypt=/opt/local' '--with-tidy=/opt/local' '--with-xsl=/opt/local' '--with-imap=/opt/local' '--with-imap-ssl=/opt/local' '--with-curl=/opt/local' '--with-gd' '--with-jpeg-dir=/opt/local' '--with-png-dir=/opt/local' '--enable-gd-native-ttf' '--with-freetype-dir=/opt/local' '--enable-sqlite-utf8' '--with-kerberos=/usr' '--with-iodbc=/usr' '--with-apxs2=/opt/local/apache2/bin/apxs' '--with-mysql=/opt/local'
Server API Apache 2.0 Handler
Virtual Directory Support disabled
Configuration File (php.ini) Path /opt/local/etc/php.ini
PHP API 20041225
PHP Extension 20050922
Zend Extension 220051025
Debug Build no
Thread Safety disabled
Zend Memory Manager enabled
IPv6 Support enabled
Registered PHP Streams php, file, http, ftp, compress.zlib, https, ftps
Registered Stream Socket Transports tcp, udp, unix, udg, ssl, sslv3, sslv2, tls
Registered Stream Filters string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, convert.iconv.*, zlib.*

This program makes use of the Zend Scripting Language Engine:
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies

PHP Core

Directive Local Value Master Value
allow_call_time_pass_reference On On
allow_url_fopen On On
always_populate_raw_post_data Off Off
arg_separator.input & &
arg_separator.output & &
asp_tags Off Off
auto_append_file no value no value
auto_globals_jit On On
auto_prepend_file no value no value
browscap no value no value
default_charset no value no value
default_mimetype text/html text/html
define_syslog_variables Off Off
disable_classes no value no value
disable_functions no value no value
display_errors On On
display_startup_errors On On
doc_root no value no value
docref_ext no value no value
docref_root no value no value
enable_dl On On
error_append_string no value no value
error_log no value no value
error_prepend_string no value no value
error_reporting 2039 4095
expose_php On On
extension_dir ./ ./
file_uploads On On
highlight.bg #FFFFFF #FFFFFF
highlight.comment #FF8000 #FF8000
highlight.default #0000BB #0000BB
highlight.html #000000 #000000
highlight.keyword #007700 #007700
highlight.string #DD0000 #DD0000
html_errors On On
ignore_repeated_errors Off Off
ignore_repeated_source Off Off
ignore_user_abort Off Off
implicit_flush Off Off
include_path .:/opt/local/lib/php .:/opt/local/lib/php
log_errors Off Off
log_errors_max_len 1024 1024
magic_quotes_gpc On On
magic_quotes_runtime Off Off
magic_quotes_sybase Off Off
mail.force_extra_parameters no value no value
max_execution_time 30 30
max_input_time 60 60
open_basedir no value no value
output_buffering no value no value
output_handler no value no value
post_max_size 8M 8M
precision 12 12
realpath_cache_size 16K 16K
realpath_cache_ttl 120 120
register_argc_argv On On
register_globals Off Off
register_long_arrays On On
report_memleaks On On
report_zend_debug On On
safe_mode Off Off
safe_mode_exec_dir no value no value
safe_mode_gid Off Off
safe_mode_include_dir no value no value
sendmail_from no value no value
sendmail_path /usr/sbin/sendmail -t -i /usr/sbin/sendmail -t -i
serialize_precision 100 100
short_open_tag On On
SMTP localhost localhost
smtp_port 25 25
sql.safe_mode Off Off
track_errors Off Off
unserialize_callback_func no value no value
upload_max_filesize 2M 2M
upload_tmp_dir /temp/ /temp/
user_dir no value no value
variables_order EGPCS EGPCS
xmlrpc_error_number 0 0
xmlrpc_errors Off Off
y2k_compliance On On
zend.ze1_compatibility_mode Off Off

Posted: Mon Jun 12, 2006 3:42 am
by derchris
But there is no Script.

How should the form know what to do with the file if there is no script which can process the POST data ?