PHP Error: Call to undefined function exif_imagetype() on FreeBSD Call to undefined function exif_imagetype() on FreeBSD webserver is because your php is not compiled with Exif.
In order to fix this, do not recompile the whole php, just go to /usr/ports/graphics/php5-exif and make install:
$ cd /usr/ports/graphics/php5-exif $ make install clean ===> Extracting for php5-exif-5.2.5 => MD5 Checksum OK for php-5.2.5.tar.bz2. => SHA256 Checksum OK for php-5.2.5.tar.bz2. ===> Patching for php5-exif-5.2.5 ===> php5-exif-5.2.5 depends on executable: phpize - found ===> php5-exif-5.2.5 depends on file: /usr/local/bin/autoconf-2.61 - found ===> PHPizing for php5-exif-5.2.5 (some output ommited) ---------------------------------------------------------------------- Libraries have been installed in: /usr/ports/graphics/php5-exif/work/php-5.2.5/ext/exif/modules
If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the `-LLIBDIR' flag during linking and do at least one of the following: - add LIBDIR to the `LD_LIBRARY_PATH' environment variable during execution - add LIBDIR to the `LD_RUN_PATH' environment variable during linking - use the `-Wl,--rpath -Wl,LIBDIR' linker flag
See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages. ----------------------------------------------------------------------
Build complete. Don't forget to run 'make test'.
===> Installing for php5-exif-5.2.5 ===> php5-exif-5.2.5 depends on file: /usr/local/include/php/main/php.h - found ===> Generating temporary packing list ===> Checking if graphics/php5-exif already installed ===> Warning: your umask is "0027". If this is not desired, set it to an appropriate value and install this port again by ``make reinstall''. ===> Registering installation for php5-exif-5.2.5 ******************************************************************** The following line has been added to your /usr/local/etc/php/extensions.ini configuration file to automatically load the installed extension:
extension=exif.so
******************************************************************** ===> Cleaning for php5-exif-5.2.5
And after that, php functions like exif_imagetype() will work.-------------------advertising-----------------
Designed and developed by Andrei Manescu. Optimized for Mozilla Firefox.
Copyright 2007 Andrei Manescu
All trademarks and copyrights on this page are owned by their respective owners. Comments are owned by those who posted them.