Jump to content


Photo

PHP Problems


  • Please log in to reply
4 replies to this topic

#1 dawh8473

dawh8473
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 04 May 2006 - 01:41 PM

Yesterday i downloaded PHP for the first time, usually I have used ASP but awnted to give PHP a try for university.

I installed apache and then PHP and the test page worked.

Today i need to download graphical packages than enabled me to create graphs. I want to be able to pass information from a database and create
a pie chart line chart, whatever

So when I cam accross JpGraph i was happy as it seems to do what I need. So, I downloaded the jpgraph-2.1.1.tar file. I am running a windows machine.

I then placed this into the htdocs folder on the apache folder. Then i tried to run one of the examples (http://localhost/jpg.../bargradex1.php)

This is when I recieve the error:

JpGraph Error This PHP installation is not configured with the GD library. Please recompile PHP with GD support to run JpGraph. (Neither function imagetypes() nor imagecreatefromstring() does exist)

What exactly do I have to download / install to where to be able to use this graphical package.

I have read the FAQ but am very confused

Any help would be much appreciated for this PHP rookie!

Thanks

Dan

#2 ober

ober
  • Staff Alumni
  • Advanced Member
  • 5,337 posts
  • LocationEast Coast, USA

Posted 04 May 2006 - 01:49 PM

Have a look at this and let us know if you have any issues getting that working:

[a href=\"http://us3.php.net/manual/en/ref.image.php\" target=\"_blank\"]http://us3.php.net/manual/en/ref.image.php[/a]

Also, may I suggest another graphing package that I've found to be quite spectacular?

[a href=\"http://www.advsofteng.com/\" target=\"_blank\"]http://www.advsofteng.com/[/a]

If you don't register it, it just adds a small yellow line under all your graphs with a link to their site. But it is truly powerful.

Info: PHP Manual


#3 dawh8473

dawh8473
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 04 May 2006 - 01:56 PM

[!--quoteo(post=371253:date=May 4 2006, 08:49 AM:name=ober)--][div class=\'quotetop\']QUOTE(ober @ May 4 2006, 08:49 AM) View Post[/div][div class=\'quotemain\'][!--quotec--]
Have a look at this and let us know if you have any issues getting that working:

[a href=\"http://us3.php.net/manual/en/ref.image.php\" target=\"_blank\"]http://us3.php.net/manual/en/ref.image.php[/a]

Also, may I suggest another graphing package that I've found to be quite spectacular?

[a href=\"http://www.advsofteng.com/\" target=\"_blank\"]http://www.advsofteng.com/[/a]

If you don't register it, it just adds a small yellow line under all your graphs with a link to their site. But it is truly powerful.
[/quote]


I had actually seen page and downloaded GD. Extracted it to a file C:/GD on my windows box, then it asks to extract a batch file which i didnt get.

Not sure what to do now??, thanks for the second link will check it out when i have the first bit working. I guess that is essential?

#4 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 04 May 2006 - 02:07 PM

GD is complied on windows by defualt. To get GD working you need to enable the gd extension, You can do this by opening up the php.ini file and finf the line that says extension_dir = "./"Now change where it says ./ to the full path where your PHP extension folder is located to. For instance if you install PHP in C:\php then the path will C:\php\ext

NOTE: PHP5.x extension folder is called ext. However PHP4.x extension folder is called extensions

Now once you have setup the extension_dir line you need to scroll a little further to find the line that says ;extension=php_gd2.dll. Remove the semi-colon (;) from the start of that line.

Now save your php.ini and restart Apache. GD should now be available and thus your graphics package should now be able to use the imagetypes function.

#5 dawh8473

dawh8473
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 04 May 2006 - 02:25 PM

Great Instruction but..

is there anyway of testing the GD library is installed

I made the changes you suggested restarted apache and got the error

JpGraph Error This PHP installation is not configured with the GD library. Please recompile PHP with GD support to run JpGraph. (Neither function imagetypes() nor imagecreatefromstring() does exist)

when running


[a href=\"http://localhost/jpgraph-2.1.1/src/Examples/accbarex1.php\" target=\"_blank\"]http://localhost/jpgraph-2.1.1/src/Examples/accbarex1.php[/a]

(I made the changes to the php.ini file within c:\windows)

Thanks

Dan





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users