function 'getimagesize()' is unable to detect 'swf'. Installation is on Linux server.
May 14th, 2004 15:54
Anthony Boyd, Kenji Goon, Knud van Eeden,
The first thing to note is that newer versions of Shockwave Flash can
use revised formats that PHP doesn't understand. You can see that just
by searching Google:
As you can tell, as new SWF releases come out, PHP has to play catch-up
to be able to use the new format. So the first answer to your question
is: if you save the file as the previous version, PHP might suddenly be
able to handle the file.
The second answer is that SWF is a binary format. It should be
transferred to the server as binary. If you used FTP to put the file on
the server, be sure you sent the file as binary. Sending the file as
ASCII or text could throw things off. If that's the problem, simply
re-transfer the file as binary and things should be fixed.
The third answer is that if PHP can't even open the file at ALL, it may
be that you've set very restrictive permissions on the file. If the
file is named test.swf, you might use the shell (command line) to change
permissions like this:
chmod 644 test.swf
That should make test.swf readable by PHP. Now, this would be a very
odd problem to have. If PHP can't read it, it's almost certain that
people can't view the file on the Web, either. But perhaps that is
exactly the problem. If so, give chmod a shot.