Missing GD library and FLV files not loading (Windows 2003 server)
Just a quick note listing a few issues I've had playing around with a windows 2003 server trying to make PHP run on it. Basically I hade 5.2.3 PHP version installed and the GD library comes as default with the installation, and despite me enabling GD library within php.ini and it saying with--gdlib and in php.ini the GD lib was definately enabled with this: extension=php_gd2.dll and it still wasn't working and coming up with "undefined function imagecreatefromjpeg()" and I've been restarting IIS and everything to try and figure out this infuriating problem. Suddenly I had one of those defining moments where your brain suddenly looks outside of the box, and it made me think about the extension directory voila it was wrong! so if you are having the same problem then just make sure extensions_dir is set correctly in PHP.ini then your gd lib will work.
Additionally another problem I couldn't fathom was this problem with a flash game I had which would not load the .flv files. They definately existed, however, when I tried to view them directly in the browser I got a 404 error page and after a good Google session I cam across this Adobe error with windows 2003 servers and flv files:
"When Flash Player movie files that stream external FLV files (Flash videos) are placed on a Microsoft Windows 2003 server and then viewed in a browser, the SWF file plays correctly, but the FLV video does not stream. These files work correctly if tested on other operating systems. The issue affects all FLV files played via Windows 2003 server, including files made with the Flash Video Kit for Dreamweaver MX 2004."
There is a solution to this problem which did take me a fair while to find which is the following steps:
- On the Windows 2003 server, open the Internet Information Services Manager.
- Expand the Local Computer Server.
- Right-click the local computer server and select Properties.
- Select the MIME Types tab.
- Click New and enter the following information:
- Extension box: .flv
- MIME box:flv-application/octet-stream
- Click OK.
- Restart the World Wide Web Publishing service.
Hope this helps anyone who suffers the wrath of these problems as they took me a long time to solve manually without a resource like this to help me.