My website prompts the user for their phone number as their login, allows them to select their team name, then their game. Once we try to load pictures I just get nothing loading and have to restart apache to try again.
But even without restarting if I do this from within my network I never have any problems. I've opened up port 9999 to port 80 through the firewall.
If I put the server on the DMZ. I'm able to get further. Meaning the next page loads and I get the same error listed below for every image that was supposed to load. So, not sure if it's a port triggering thing.
The only error that shows up in the apache log is:
[Mon Sep 15 13:43:58 2014] [error] [client 64.138.248.65] PHP Warning: getimagesize(http://example.com:9999/Events/01/439/009/Preview/1156nr_140807_439_009_0014.jpg): failed to open stream: Connection timed out in /www/gf/customer/favorites.php on line 48, referer: http://example.com:9999/customer/teams
So it seems like has something to do with the firewall. But not sure what else to do.
Your method call for getimagesize is using a HTTP URL as input. That means you are attempting to traverse the internet to load the image, instead of your local file system.
Once you put the correct path in your source code, which points to the image on your local file system instead of over the internet, it will resolve your problem.
The cause is indeed networking. It is probably unable to traverse the internet to itself in order to load the image you have coded as a HTTP url.