simple html dom - Hung up on download urls - simple-html-dom

I'm running simple_html_dom to index links from a few websites. Sometimes I will come across a link that is actually a download file. For example, this link: "example.com/survey.html" - is actually a 500MB zip file download. It causes simple_html_dom to get stuck on the URL for minutes at a time and maxes out the memory. I tried setting the MAX_FILE_SIZE limit by using:
define('MAX_FILE_SIZE', 2000000);
This doesn't work... How can I get around these download files?
Thanks

Related

WP Rocket cache file slow to load

I'm trying to optimize my site and using GTMetrix to see which requests that takes a lot of time. And I can see that the heaviest file is the cache file generated in wp-content/cache/min/1/78d81b6108cf10884c20ab592c9fbb46.js, is that as it should be or is it too large?
After finally working out how to type your domain name (ignorant british man that I am!) I get similar times for that script and https://xn--bstaelscootern-5hb.se/wp-content/cache/min/1/4fac67378f86d8e54c6af5529b17e3d5.css.
It is possible that the cache hadn't been fully created when you ran your test so it took longer as it was being generated 'on the fly' and some of the downloading time was actually waiting for the file to be generated.
If you install a cache plugin you still have to load the page sometimes for it to generate the cached files.
If this was the first run after enabling the plugin then it would be slow, same goes for if you made a change to the file and then ran first time as it needs to regenerate the cached version of the file.
On the runs I have done it loads in the same amount of time as similarly sized files.

What should I do when GTMetrix tells Compress https://cdn.segment.com/analytics.js/v1/platform/analytics.min.js?

I am analyzing our website with GTMetrix.com and they're telling me:
Compressing https://cdn.segment.com/analytics.js/v1/platform/analytics.min.js could save 85.5KiB (71% reduction).
I'm not even sure where that script is coming from or what's loading it. This is a WordPress website, so it could be a plugin... I just know that we lost 8 pagespeed points when that thing started showing up. How do I enable this gzip for this, or replace the file in WordPress? The website is https://stryvebiltongorders.com/
There's a "Segment Analytics Code" on your page. Some kind of metric js-script I think. You can't gzip it. Because it's not on your server (you have not got an access to it). But you can try to delete script from your website.
At this point nothing you can do unless the file is in your server! Either keep it as it is or you can remove the file to reduce 100%. Also you could serve the file from your server that way you can gzip it and add a cron job to fetch newly fresh version of the file everyday or something.

Iframes containing phps files are automatically downloaded

I really don't understand this, I created several tutorials that contain iframes with phps files(examples of code). On my localhost server they were displayed fine, now that I've uploaded it to my webhost it starts downloading the iframes sources when I open the tutorials.
What can be the cause of this??

loader.asp loading small files but not large files

Hi I have a problem with uploading files to my server through an admin system. I myself do not really work with ASP scripting much, so I don't understand the problem.
When uploading files like thumbnails there seems to be no problem with the script, but when trying to upload the bigger images it does not work and gives me an Internal server error 500 (There is a problem with the resource you are looking for, and it cannot be displayed.)
The loading script that is used is call LOADER.ASP and as said before using small files, the script uploads fine and all entries are made into the the database just fine.
If anyone could just give me a hint to why this might happen or what could be the cause for giving the error it woulds realy help
Thank you

IIS 7 & php big files upload problems

I've been trying to upload some avi files by using several methods.
First I've tried using ADOBE's ADDT "UPLOAD FILE" to upload *.avi files, everything was ok, until I've tried to upload a 131.5M video. When the size of the video is less than 40M, there's no problem, but when the video is bigger is where the problem starts. So tried different methods, jquery plugins, etc, with the same result.
The server in which the movies should upload is running under IIS7.
Making some search over the internet, I've found that the php.ini should be changed, so I have the following related values changed:
max_file_uploads:20
max_input_time:240
memory_limit:256M
post_max_size:256M
upload_max_filesize:256M
Also in the SNAPIN of IIS under "REQUEST FILTERING" I've changed the value to 300000000 (300M).
I think it has something to do with the time the upload is taking, because sometimes I can see in the temp folder a parcial upload of something between 25 and 47M
I don't think that the php upload scripts are the problem, but something on the server side.
I finally discoverd which was the problem. In php.ini was the "*max_file_uploads*". First, I double it's value, from 20 to 40, which gave me 40 minutes timeout for an upload. Then I put in 200 which gave all the time needed to complete a 131.5 MB avi upload.
After finding this (I was moving all the related parameters to see what would happen if...) I decided to check on php.net to see what was the official definition for "*max_file_uploads*" which is:
"The maximum number of files allowed to be uploaded simultaneously. Starting with PHP 5.3.4, upload fields left blank on submission do not count towards this limit.".
I'm completely confused why this worked, but my php.ini values are now this:
max_file_uploads:200
max_input_time:14400
memory_limit:1.01G
post_max_size:1G
upload_max_filesize:999M
Beside, moved in the IIS in Request Filtering in the IIS section of the server (using IIS 7 manager), the value for max allowed content length to 1GB.
Want to thank Alykhalid for the time and advices.
Did you increase the value of the max_input_time, what is the new value? Also try to increase the value of the CGI Time Out. Also look at this blog post for PHP time out issues.

Resources