Find the answer to your Linux question:
Results 1 to 5 of 5
I am using php 5 and I installed GD 2. I tried doing manipulation with images using php image function, I was unable to use the function imagefilter(). Can any ...
  1. #1
    Just Joined! Ganeshwari's Avatar
    Join Date
    Oct 2009
    Location
    Chennai
    Posts
    5

    Exclamation Call to undefined function imagefilter()

    I am using php 5 and I installed GD 2. I tried doing manipulation with images using php image function, I was unable to use the function imagefilter().

    Can any one help me on this to find the actual issue pls ?

  2. #2
    Linux User
    Join Date
    Jan 2006
    Posts
    414
    From php function reference:
    Note: This function is only available if PHP is compiled with the bundled version of the GD library.
    As you installed GD seperately, rather than compiling PHP with the bundled GD, this function is not available.

    If you look at imagefilter function for PHP user without bundled GD | Mgccl's Ivory Tower you'll find a function that will implement this for you without using the bundled GD.

  3. #3
    Just Joined! Ganeshwari's Avatar
    Join Date
    Oct 2009
    Location
    Chennai
    Posts
    5
    Thank you very much for your reply.

  4. #4
    Just Joined! Ganeshwari's Avatar
    Join Date
    Oct 2009
    Location
    Chennai
    Posts
    5
    I have downloaded php5 source and compiled with GD and installed that deb package. I did the following steps,
    #apt-get install build-essential fakeroot dpkg-dev devscripts
    #apt-get source php5
    #apt-get build-dep php5
    #dpkg-source -x php5_5.2.10.dfsg.1-2ubuntu6.3.dsc
    #dpkg-buildpackage -rfakeroot
    #dpkg -i php5-gd_5.2.10.dfsg.1-2ubuntu6.3_i386.deb
    #/etc/init.d/apache2 restart
    After doing all the above also, I am unable to use imagefilter() function in php.

    Pls, help me to fix this issue.

  5. #5
    Just Joined! Ganeshwari's Avatar
    Join Date
    Oct 2009
    Location
    Chennai
    Posts
    5
    Now it is working for me.
    I missed to do one more step from the above,
    before doing the build package, need to change the debian/rules file.
    Rules for configuring the compile process can be found in debian/rules. In this file there is a line that reads --with-gd=shared,/usr --enable-gd-native-ttf \. This links to the Ubuntu distributed version of LibGD as a shared library. It is part of the autoconf script that customises the compilation of PHP. I replaced this line with --with-gd=shared --enable-gd-native-ttf \. This causes the compilation process to use the bundled version of GD and make a shared library.
    After doing the above, I got the correct php-gd package and installed now the imagefilter() function is working for me.

    Thank you very much.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...