PHP Session/timeout Settings For Large Video Uploads
Mar 23, 2008
I'm currently a video sharing site and I'm aiming for large videos (around 500MB - 1GB), now I have to take into account an average user should only be able to do 30k-50k per sec.
So the session_timeout and upload_max need to be adjusted. Anybody with experience with large upload sites ?
I just moved to a new, dedicated server this week. My vbulletin forum users typically upload mp3 files under 10MB. At the moment, I can't seem to get anything above 6MB to work.
In vBulletin land, they recommend changing these in php.ini: upload_max_filesize - Largest size of a file to accept. post_max_size - Must be larger than upload_max_filesize. memory_limit - Should be larger than post_max_size. max_execution_time max_input_time
I've cranked all of those up and restarted Apache.
I'm still having the same problems. The little window with the form turns white after what appears maybe 5 minutes, but I haven't timed it.
They also mentioned changing the LimitRequestBody in Apache. I appear to be screwing that part up so I created a thread in the Apache forum specificallya about that. [url]
So I wanted to ask if there were any other possibilities that you guys could think of that would inhibit the file size up uploads via a form.
I'm running httpd-2.2.8 and php-5.2.6. It needs to be said that this forum is config is mostly right out of the box. $_SESSION wouldn't work in php until I changed the directory for it yesterday. So there may be a very basic config setting that I missed.
---------
I decided to check my error logs.
PHP Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 9852343 bytes)
I'm confused. I have an allowed memory of 30MB (give or take). So why does a 10MB file "exhaust" it?
I am assisting a client who is linking to an online calculator, he is putting a frame on top of the calculator page, so people will still see his information. However, for some reason he is getting a Session Timeout Error in IE.
I don't get this error in Firefox using this method, or ever going to the direct page in IE.
Let me give a better explanation:
If you visit: [url]
Just put in a fake name and email, it loads a frame at top, and then the online calculator, which is this page: [url]
Why I am getting a Session Timeout? Is there a better solution. I never get the same error if I go directly too: [url]
We want a frame or better solution because we still want the contact information to be in front of the consumer.
Does this maybe have to do with a cookie and frame?
We have a screen where users are filling out a form on our website, but if they don't click "submit" before the session-timeout limit, they are logged out and lose their work when they click the button.
So for instance with a timeout of 10 minutes, if it takes 15 minutes to construct their message, the connection will silently time out in the background with no warning.
Is there a way to make Apache respect a keypress/keydown/keyup as "activity", and maintain the session while the user is still typing?
Our server reports that it is using Apache Tomcat/7.0.39
I am developing a web application for a private investigative firm. They do surveillance work and therefore have surveillance videos. I would like the capabilities of uploading the videos online and allowing the client to login and view their surveillance video online.
Currently, we get the video from the PI, put it on a DVD and then mail it to the client.
This takes too long. We want the client to be able to view the video online.
Some of these videos can be up to 2 hours long.
First, is this even possible?
Second, - how much bandwidth would a website like this take? - Is there a host that can hold hundreds of GB of video?
I want to convert it to flash to save file size and also so I can stream it.
I'm currently building a large guitar lesson website that will launch around the end of the year or so. Basically there will be multiple instructors on the site who submit video files from 10mb to 20mb in size each. There will eventually be a couple thousand videos on the site, so around 30gb of disk space right there give or take. So I need plenty of disk space.
I'm on a shared hosting account right now with iPowerweb, and that of course won't do me much good once the site's up and running. Plus they have a 12mb upload limit, but the instructors need to upload videos larger than that. And I'm aware that with a VPS I'd be able to set my own upload file size limit.
Anyway, this server stuff gives me a headache and I feel totally clueless. I've always loved the basic shared account because I don't have to do anything to keep the server in tact. But from what I've read, a VPS or dedicated server would take a lot of work on my part. So for that reason, I'm guessing I would need a managed VPS or managed dedicated server. I don't totally know what "managed" means, but hopefully to where I wouldn't have to do any upkeep. I need to focus my time on a bazillion other things besides the server, so it'd be nice to find a plan where I wouldn't have to worry about server security updates, software updates, and any other server maintenance etc.
I need tons of bandwidth. It's going to be a membership site with hundreds and eventually thousands of members who all watch the lesson videos. So that's a ton of bandwidth. I'll be the only one on my server though, I'm not going to also host clients or anything.
I'll of course need super reliability. With eventually having thousands of members, my site needs to be totally professional with near flawless uptime.
So I'm thinking I'd want to start off with AT LEAST 40gb of disk space, but 60gb might be better. At least 1000gb transfer, but again, maybe more? And I guess a lot of ram, although I admit I hardly know what ram is haha, does that have to do with the speed of the site? And what's burstable ram? But yes, I'd need to have a server that can handle all the many files and users, with great uptime and great speed.
Budget-wise, I'd like to keep it under $70 or $80 a month if possible. If absolutely necessary, maybe a little more.
Anyway, if you guys were in my shoes, what would you do. Assuming you're clueless about VPS, and have the needs mentioned above. Any host recommendations or advice?
Price-wise and size-wise, Start Logic looks pretty good, but I think their VPSs are all unmanaged. Ive looked at a lot of other companies, but it's hard to find the right plan.
This is applies to both Horde and roundcube webmail client software;
Using Plesk 11.5.30 with Horde 5.1.5 or roundcube 0.9.5 on CentOS Linux release 6.5 (Final).
We have seen this behavior occur on multiple servers.
Clients experienced slow to no response after executing a search, which eventually results in a failed to communicate with the server-error in the webmail client.
The Apache server log shows script time-out errors when searching larger mailboxes (i.e. larger than 950 MB), this does not happen on smaller mailboxes.
We have seen errors like the following in the Apache server error log with Horde (personal data like IP-address and domain name are x'ed out):
[Thu Jun 19 14:55:06 2014] [warn] [client xx.xxx.xxx.xxx] mod_fcgid: read data timeout in 45 seconds, referer: http://webmail.xxxxxxx.com/imp/dynamic.php?page=mailbox [Thu Jun 19 14:55:06 2014] [error] [client xx.xxx.xxx.xxx] Premature end of script headers: ajax.php, referer: http://webmail.xxxxxxx.com/imp/dynamic.php?page=mailbox
And with Roundcube:
[Tue Jun 17 13:02:04 2014] [warn] [client xx.xxx.xxx.xxx] mod_fcgid: read data timeout in 45 seconds, referer: https://webmail.xxxxxxxxxxx.com/?_t...d=19445&_mbox=INBOX&_caps=pdf=0,flash=1,tif=0 [Tue Jun 17 13:02:04 2014] [error] [client xx.xxx.xxx.xxx] Premature end of script headers: index.php, referer: https://webmail.xxxxxxxxxxx.com/?_t...d=19445&_mbox=INBOX&_caps=pdf=0,flash=1,tif=0
Steps to reproduce:
- use a large mailbox (950 MB or higher) - login to the webmail (Horde or roundcube) - do a search in the search field on the top right - the time-out error should appear in the server Apache error log (after at least 45 seconds)
This seems like an inefficiency or bug in the search query that searches the user's mailbox. Is there any other way we can prevent this issue and the error messages?
i have moved my hosting to a new provider and i was wondering what is the quickest way to upload my 500MB files to the new server? Is there anyway i can speed this up like have a dedicated uplink port to my server, or via VPN or something, cos at the moment i have an upload speed of around 10KB/s,
My requirements are 500MB, 5GB bandwidth, rails and postgres, $5-6 per month. It looks like there are many providers out there that are offer that.
However the only uploading method shared hosters seem to offer - or at least the only method they advertise - is FTP. Coming from a university and sysadmin background, I thought that anything that sends passwords over the wire unencrypted had died long ago (except HTML forms and legacy systems).
Are there any shared hosting services that allow a more secure upload method (e.g. scp, rsync-over-ssh, even webdav-over-ssl)?
company for over a month or 2 contacting them (support tickets) is as useless as not!.. their reply is always simply: we checked and nothing at our side! (asking for a clarification simply gets u nothing!)
problem is simply ONLY with ftp uploads! my line upstream is 256Kbps (32 KB/sec) and down 1Mbps and i was always capable of pushing up to 2.2 GB/day ((i monitor my traffic all the time)) but just recently some weird things started appearing...
before uploads would never go under 27-26 KBs on my FTP client now it's so normal finding it dropping to 15,10,4,2, 0! ya a whole 0! and that's not just for a second or two it can stay like that for maybe aminute then go up back again! And upon watching my traffic statistics closely, i found myself pushing at the most 1.6 GB only a day! another funny thing is that files used to appear AND PARTIALLY in the root directory instead of the desired directory! so WHAT IS UP!
Ok i get 403 forbidden when i try to access /uploads/ on my server. I wish to make it public. Can i make a index.html file dispay all of the files in the directory?
I am about to purchase a reseller (Diamond) or maybe just a Hosting (Swamp) but I cant seem to find anywhere details on their MySQL policies.
I have a forum and the database if growing in size daily and im concerned about the database upload limit that may be applied. I have a dedicated server at the moment and im able to request that be changed via php.ini but where would I stand on this if I were to move to shared hosting?
We are going to host our own website. I built up a windows 2003 server. Installed IIS6. I am working on file upload to our website. I can get files to upload to c:Temp but not to c:Inetpubwwwrootourwebsiteupload.
I even set up the upload directory for full sharing with write permissions. Still no help.
I went into windows explorer and right clicked on the upload dir and shared it and set the permissions for read and write. That should take care of NTFS permissions. But no matter what I do when I click on the upload directory and go to properties is shows 'read only'. Can't seem to get that turned off. Until I do I don't believe I can upload a file to the upload directory.
I went into iis6 mgr and and set the upload directory for full access - read and write. That should take care of iis security.
I went to default website (there is only one) and allowed anon login. Even told it use the Administrator account for login with all read and write permissions.
We have a server that we just changed over to PHPSUEXEC. On this server, we have a large IPB (Invision Power Board) forum that we have not been able to get uploads in the forum back working again. Users are getting the message that they don't have permission, and to contact an administrator.
I have looked on IPB's forum for PHPSUEXEC related issues, but can't find a solution. Of couse, before phpsuexec the "upload" folder had 777 file permissions, but under phpsuexec this must be 755. It isn't working though.
Anyone had experience with this with IPB and know how to fix it?
I've been running pure-ftpd for around 4 months now without any problems, until around 24-48 hours ago file upload has been going a bit loopy.
When you upload a file the speed bounces considerably, and at times pauses on 0kbps until it then dies and fails the upload. 9/10 uploads I have tried have failed.
[R] Opening data connection IP: 74.86.20.181 PORT: 35283 [R] LIST -al [R] 150 Accepted data connection [R] 226-Options: -a -l [R] 226 6 matches total [R] List Complete: 374 bytes in 0.64 seconds (0.6 KB/s) Transfer queue completed 1 File failed to transfer [R] Connection lost: chacha We have restarted pure-ftpd a number of times, but have had no luck.
Please could you try and upload a file (at least 10mb and please nothing dodgey) to this FTP account:
First of all, I discoverd this forum during my quest to unravel the mysteries of how my site was hacked. I hope this is an appropriate forum to discuss the issues even though I am not a web hosting provider, but merely a customer of a web hosting company, hostrocket.com
I have an installation of WordPress 2.1 WordPress creates a couple world writable directories such as Uploads and Cache which are owned by nobody. Apparently (according to the tech support at hostrocket.com) someone was able to insert and exectue a php script in my world writable Uploads directory. Over 40MB of scripts, executables and files were uploaded. As best I can tell, my space was being used as some sort of link farm or perhaps acting as a server in my webspace. I do not have much knowledge about these things and consequently can't talk very inetlligently about them. But I am trying to grasp what little I am able to absorb about how this could have happened, what I can do to mitigate it from reocurring in the future.
Some of the stuff that was in the directory is as follows...
So the first thing my webhost had me do was to change ownership of the directories owned by nobody to me. Then I was able to change permissions from 777 to 755. However in so doing, I am no longer able to use the Dashboard of WordPress to upload images anymore, unless I temporarily change permissions back to 777.
The other thing the tech support guy did is to create an .htaccess file with, php_flag engine off I guess this basically renders php scripts impotent from running.
So without flaming me, can you help me understand how someone in a shared server environment is able to put a php script into one of my directories?
What amazed me was this particular script, "99.php" actually when viewed in a browser window titled phpshell was called "c99adult v. 1.0 pre-release build #16". It basically enabled whoever had access to the URL, to view my webspace, and do all sorts of nasty things. Talk about a wake-up call!
Obviously this enabled the hacker to view my config.php file and ascertain my database password and everything else. Whether he did, or whether there is a logfile of that info that could enable him to hack the database at some time in the future is unknown to me but it's really freaking me out.
I have a large survey (I use phpsurveyor) on my reseller webdomain running. It takes about 30 minutes to fill in the complete survey. After 24 minutes my respondents get a session error and their data is lost.
Code: Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/myhope/public_html/pro/index.php:1) in /home/myhope/public_html/pro/index.php on line 2
It could've gone into the php section as well...I think.
I got a dedicated server 2 days ago, but the "session.save_path" is not set. What I did was create a "php.ini" file, put the following code into it and uploaded it to my public directory.
When i try to login my linux server from GUI i put my username "root" and then put the password, i am not able to login and getting following error
"Your session only lasted less then 10 sec. If you have not logged out yourself this could mean that there is some installation problem of that you may be out of disk space. Try logging in with one of the failsafe sessions to see if you can fix this problem view details in ~/.xsession.error file "
when I install Joomla, it said session.save_path = /tmp is unwriteable. however, following phpinfo(), the session.save_path on server is /tmp, and all my php sites are working fine, I can see many sess_ files in /tmp. That means the sessions are still written into /tmp by user apache, is that correct?
so, why Joomla instalation saying it's unwriteable? i am on a linux server
I had done a program in early 2006 for a site in php-mysql. At the time of doing the code, The code written was not so standard and it contained uninitialized variables used for include file paths (eventhough values are assigned to it before using) and the "sess" folder was created within the website folder. Also the parameters for the SQL query were not escaped, but everything was working fine.
And now i was informed that the insecure code in my program caused the server crash and i have to pay the penalty for the same. Can anyone let me know whether the below code / keeping the session variables within a folder inside the /www/ will make the sites hosted on the server where this program runs to stop/crash for ever ?
------------------------------------------------------------------ function update_region($id,$regname,$regcom) { $query = "UPDATE taxregion_mast SET taxregion_name = '". $regname."', region_comments = '". $regcom."' WHERE region_id =" .$id; mysql_query($query);