0

SOLVED

I want to create a progress bar for uploading a file in my site.
I read about session.upload_progress.enabled and I tried to use this
This is my php.ini:

session.upload_progress.enabled = On  
session.upload_progress.cleanup = On  
session.upload_progress.prefix = "upload_progress_"  
session.upload_progress.name = "video"  
session.upload_progress.freq =  "1%"  
session.upload_progress.min_freq = "1"

Then, I put this in my form:

<input type="hidden" name="video" value="video" />

And I did an ajax request to the php file to get the information , since it didn't work I tried to debug and I put in the php file:

session_start();
print_r($_SESSION);

And all I get from this page is:

 Array
 (
 )

So, I searched for this problem and I got to this Answer: PhP Upload progress in PhP 5.4 is not working. Session variables not set

1) I have php version:5.6.8
2) The SESSION is initialized as you can see in my code
3) I don't run fastCGI I run php with xampp on windows

What is the problem and how can I fix it ?

Community
  • 1
  • 1
sdfds dffdsf
  • 61
  • 1
  • 2
  • 7

1 Answers1

0

Do not put name="video" in your input file. I searched the php manual (http://php.net/manual/en/session.upload-progress.php)

It says put name="<?php echo ini_get("session.upload_progress.name"); ?>" <input type="file" name="file1" /> <input type="file" name="file2" /> and then put <input type="submit" />

and it should be put in the exact same order as above.