Tried absolutely everything. Can't get to work.

jsm174 - February 18, 2008 - 03:53
Project:File Upload Progress Monitor
Version:5.x-1.x-dev
Component:Miscellaneous
Category:support request
Priority:normal
Assigned:Unassigned
Status:active
Description

As a last resort, I am submitting this support request. I have tried absolutely everything to get this module to work.

I'm using the FileField CCK module so I'm pretty sure that is an AJAX upload.

I tried both the APC and uploadprogress extensions under Apache 2.02 and 2.2 with PHP 5.2.5 running on XP. I've tried it on two different machines as well.

I also tried the YUI demo with no success that is referenced at:

http://www.whenpenguinsattack.com/2006/12/12/how-to-create-a-php-upload-...

I've added the APC rfc entry into the PHP.ini file. I even tried adding extra APC entries found elsewhere on the net.

Both extensions definitely write temp files that seem valid.

With the upload progress extension I usually get,

{"status":1,"percentage":-1,"message":"00:00 left (at \/sec) "}

With APC the error is similar, but I don't think it has the 00:00 left..

And I even tried adding the javascript patch mentioned as well.

Is there anything else you could possibly recommend me to look at?

Thanks,
-- Jason

#1

panis - February 22, 2008 - 11:49

Are you saying that you can get the demos to work but not the drupal module? i.e. the demos do return valid progress information but drupal module only shows the the 0% message?

#2

jsm174 - February 22, 2008 - 12:43

Hello. Thanks for responding. I'm sorry for being unclear.

I've tried the demo that uses YUI and I couldn't get that to work either. So there isn't an issue with the module.

Since I've tried "absolutely" everything, I was just hoping someone could point me in the right direction. Maybe I'm just overlooking something.

Anyway, the only thing that was unclear:

Once APC is installed and configured, the following needs to be added to your php.ini:

apc.rfc1867 = on

Does "configured" mean enabled in the php.ini? or enabled with apc settings in the php.ini.

If there needs to be additional apc settings, what should they be?

Thanks,
-- Jason

#3

panis - February 22, 2008 - 15:16

What version of PHP do you have? This feature is only available if compiled into PHP 5.2.5 and above. You may have an earlier version of PHP or one without this feature complied into it.

configured means enabled.. if you can see your phpinfo output you should see these flags set. Important ones are. you need the first two.. if the name is not APC_UPLOAD_PROGRESS then you may need to change that in the php.ini file or change the sample code to use the other name.

apc.rfc1867 = on
apc.rfc1867_name = APC_UPLOAD_PROGRESS
apc.rfc1867_prefix = upload_
apc.rfc1867_freq = 0

#4

jsm174 - February 22, 2008 - 15:53

I am using PHP 5.2.5 / Apache 2.2 / XP.

All those settings are there. I added them just incase. Still no go.

Here is the phpinfo:

apc.cache_by_default         On
apc.enable_cli               Off
apc.enabled                  On
apc.file_update_protection   2
apc.filters                  no value
apc.gc_ttl                   3600
apc.include_once_override    Off
apc.localcache               Off
apc.localcache.size          512
apc.max_file_size            1M
apc.num_files_hint           1000
apc.report_autofilter        Off
apc.rfc1867                  On
apc.rfc1867_freq             0
apc.rfc1867_name             APC_UPLOAD_PROGRESS
apc.rfc1867_prefix           upload_
apc.shm_segments             1
apc.shm_size                 30
apc.slam_defense             0
apc.stat                     On
apc.stat_ctime               Off
apc.ttl                      0
apc.user_entries_hint        4096
apc.user_ttl                 0
apc.write_lock               On

Using Firebug, I'm getting the XHR requests:

Request: http://localhost:5150/upload/progress/120369445937072808
Response
Headers
Date Fri, 22 Feb 2008 15:35:50 GMT
Server Apache/2.2.6 (Win32) PHP/5.2.5
X-Powered-By PHP/5.2.5
Expires Sun, 19 Nov 1978 05:00:00 GMT
Last-Modified Fri, 22 Feb 2008 15:35:50 GMT
Cache-Control store, no-cache, must-revalidate, post-check=0, pre-check=0
Content-Length 50
Keep-Alive timeout=5, max=97
Connection Keep-Alive
Content-Type text/html; charset=utf-8

Request Headers
Host localhost:5150
User-Agent Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.12) Gecko/20080201 Firefox/2.0.0.12
Accept application/json, text/javascript, */*
Accept-Language en-us,en;q=0.5
Accept-Encoding gzip,deflate
Accept-Charset ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive 300
Connection keep-alive
X-Requested-With XMLHttpRequest
Referer http://localhost:5150/node/add/fcs
Cookie
SESS997abc425f2dada2fc34fd4a3049822a=6i5ds064mgvtm1p7aqbocber86

Response:
{"status":1,"percentage":-1,"message":"Uploading"}

I am so baffled!

But again, I appreciate you trying to help me out!

-- Jason

#5

panis - February 22, 2008 - 16:13

You will get that message if the module does not get any information back from APC
{"status":1,"percentage":-1,"message":"Uploading"}

The YUI test should also generated a similar message - what do you get in that case?

#6

jsm174 - February 22, 2008 - 16:44

I've run the YUI test as well, and it always comes back as {"done":1}

I only get one XHR request and by that time {"done":1} comes up so I can't get back to it in firebug.

-- Jason

#7

panis - February 22, 2008 - 17:13

is this on a local machine - i.e. your server and your browser both running on the same machine? I have had similar problems when I had both running on my local machine.

#8

jsm174 - February 22, 2008 - 18:24

I've tried on both local and remote machines.

The only thing different is that the remote machine is running Apache 2.0.2 instead of 2.2.

I have a bunch of virtual server settings and awstats, so I haven't got around upgrading to 2.2.

I wonder if it's an Apache setting?

-- Jason

#9

panis - February 27, 2008 - 17:02

this doesn't happen to be in FastCGI or CGI mode is it?

#10

jsm174 - February 27, 2008 - 17:57

I'm sorry, but I'm not 100% sure I know the answer to that. If pointed in
the right direction...

I'm pretty sure it's not set up as FastCGI or CGI. PHP is integrated
into Apache as a module:

PHPIniDir "C:/Program Files/PHP/"
LoadModule php5_module "C:/Program Files/PHP/php5apache2_2.dll"

It's pretty much a stock setup.

It does look like my Apache does have a CGI module installed:

LoadModule cgi_module modules/mod_cgi.so

But again, everything is pretty much stock. I did set up the mod_rewrite.

-- Jason

#11

panis - February 29, 2008 - 11:50

can you try using the PHP uploadprogress extension from PECL instead?
I have been finding that to be more reliable on the several projects I am using this module on.

#12

realworksmedia - March 4, 2008 - 15:49

Is this module compatible with php 5.0 if using the uploadprogress extension from PECL?

The status alert on my Drupal site says 'PHP 5.2.1 with APC enabled or the PECL uploadprogress extension'

Thanks,

Paul

#13

panis - March 4, 2008 - 19:02

uploadprogress extension in PECL is supposed to work with PHP 5.2 and above. If you have PHP 5.0 that is patched to support the file upload status it should work.

#14

trogie - July 29, 2008 - 10:16

I also had major problems getting this module to work. APC was working perfectly but php also needs 'json' support for this module to work! And my php didn't have this!

 
 

Drupal is a registered trademark of Dries Buytaert.