Jump to content
xisto Community
Sign in to follow this  
r3d1405241470

Basic Tutorial: PHP GD basic tuts

Recommended Posts

How to call the image into other PHP page?

Basic Tutorial: PHP GD

 

Ok, I've done create a chart using GD.. And then I want to call that chart into my php page let say data.Php.. Then how to do that? I've tried using include function and even < img > tag but it just not work..

 

-question by ableze_joepardy

Share this post


Link to post
Share on other sites

What is actually the path for GD graphics library? I need it for my coppermine galery.
I would like to upload it manually because I'm using my own database...but I don't know the path for the GD. I have a backup of the mysql database I already used on a different server. It works fine, but just the thumbnails are not displayed.

Maybe somebody knows how to install/use GD for a coppermine picture galery? Thanks in advance for your help.


GD library isn't related to any of the user-libraries and scripts, like coppermine gallery etc., but strictly to PHP. You have to install or upgrade your PHP at the server so it contains GD.

Try doing this, for an example. Download PHP source from PHP.NET (try getting the version you already have installed) and, if you're on Linux, do the following:
1. Unpack the PHP package you got
2. Change directory into the created PHP directory.
3. Type:
./configure --with-gd
4. If configuration successfull, type:
make (not "make install", and not necessarily as root)

Once compilation process is over, look into the "modules" directory. A library with .so extension should be there so just copy it into your local "modules" directory for PHP (usually /usr/lib/php/modules or similar). Restart your web server.

Cheers

Share this post


Link to post
Share on other sites
Thanks.Basic Tutorial: PHP GD

This was very helpful for me in getting started with GD. I was wondering how to display a jpeg without having to save it as a jpeg file and this showed me. Also very simple examples of using the shape functions and how they relate to the "canvas". I can build on this in my applications. Thanks for taking the time to post this tutorial.

-reply by Steve

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.