Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
Thread: file_get_contents question
05-29-2011, 08:02 PM #1
- Join Date
- Feb 2009
- Thanked 0 Times in 0 Posts
I rely on file get contents like thisPHP Code:
The above is run 5 times per page, but since yesterday the page stopped downloading and just hangs, so I limited the pagination to show 1 file per page so will only call file get contents once per page this solved the problem so the webpage would load.
I'm sure it's the server on my external site that has somehow slowed down, and there for freezes the page trying to get the contents. On the other side of things I doubt it but the shared server file get contents runs on maybe they have reduced my php memory limit, but I googled a bit on this and from what I have found it doesn't use much memory?
I thought I would just ask the before I raise a support ticket
05-30-2011, 05:11 AM #2
- Join Date
- Jun 2008
- Redmond, WA
- Thanked 100 Times in 94 Posts
As code does not often change itself on its own, usually it's a good bet that something external has happened if you haven't modified your code in any way that would cause it to stop working.
When I see this, and also see you're on a shared host, I immediately think that the hosting company many have throttled you in some way. Most web hosts very much frown on file hosting websites, typically because it costs them more money to host.
Your easiest bet is to submit that ticket and see if your host has changed anything on their end. If that doesn't pan out, check to make sure any changes you've made didn't have unintended effects. This will be in any server settings, control panel settings, PHP.INI, or httpd.conf.
Unfortunately with ambiguous problems like this we can't really give you a "Go here and change this" fix. Best to retrace your steps and debug in that way.
Unless otherwise stated, any code posted is most likely untested and may contain syntax errors.
My posts, comments, code, and suggestions reflect only my personal views.
Web Portfolio and Code Snippets: http://shanechism.com