fileinfo apc (solved)

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

User avatar
Eran
DevNet Master
Posts: 3549
Joined: Fri Jan 18, 2008 12:36 am
Location: Israel, ME

Re: file_finfo not valid resource, has anyone used this?

Post by Eran »

apc_fetch is a function to retrieve a value from the APC cache by a specific key. I was asking where are you setting that key, but I see it happens automatically via that APC_UPLOAD_PROGRESS field. You might find the following article useful, check how they calculate the completion percentage - http://www.phpriot.com/articles/php-ajax-file-uploads/3
scarface222
Forum Contributor
Posts: 354
Joined: Thu Mar 26, 2009 8:16 pm

Re: file_finfo not valid resource, has anyone used this?

Post by scarface222 »

That was a great tutorial but I still cannot figure out the problem. I am beginning to think it may be a server configuration problem, not with apc, but something interfering although I have no idea what. After much searching I found articles like this

http://pecl.php.net/bugs/bug.php?id=13583

which leans toward server configuration problem

and this

http://blog.perplexedlabs.com/2008/11/0 ... gress-bar/

which says that there is a missing flush or sleep function for javascript, but I do not know where to implement that if it was the problem, I am not that proficient in javascript as I am php. The script I am testing is a tried and tested script from here

http://progphp.com/progress.phps

and

http://progphp.com/progress.php

which makes me think there is some configuration problem rather than the script. This is the second script I tested and both just make the bar jump to 100 when file upload is done. Do you have an idea of something that may interfere? I was told zend framework is incompatible, but my admin already commented out what he said would interfere with apc.
scarface222
Forum Contributor
Posts: 354
Joined: Thu Mar 26, 2009 8:16 pm

Re: file_finfo not valid resource, has anyone used this?

Post by scarface222 »

Any whatsoever? My server people haven't gotten back to me yet. I won't bump this topic after this unless I find a solution. I just need all the ideas I can get because this has been a very annoying and unnecessarily time consuming problem for me. Thanks again guys.
scarface222
Forum Contributor
Posts: 354
Joined: Thu Mar 26, 2009 8:16 pm

apc fileinfo (solved)

Post by scarface222 »

f***k this. I cannot figure this out for the life of me. I read one article saying lighttpd server may make this problem occur but I do not think I am on that nor do I think there is a good substitute if I am. There isn't enough documentation to help me through this. It is likely some obscure server configuration causing the problem. I will just use a flash upload system http://code.google.com/p/swfupload/. I heard youtube uses that anyway. Enough people have flash. For anyone with a similar problem, do not waste your time, it is a lost cause. Thanks everyone for their input especially pytrin and abra.
User avatar
Eran
DevNet Master
Posts: 3549
Joined: Fri Jan 18, 2008 12:36 am
Location: Israel, ME

Re: fileinfo apc (solved)

Post by Eran »

We use swfupload in several projects. It is a good solution and works well
Post Reply