LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 06-23-2005, 06:02 AM   #1
pranith
Member
 
Registered: Sep 2004
Location: Hyd,India
Posts: 83

Rep: Reputation: 15
getting gd support for php


hi,
I installed both php and gd but i dont get the support of gd to php
Could u plz tell me how to get the support
Actually there r some instuctions where u can build both php and gd then add support using ./configure --bla bla
but I want it from the packages itself
I mean i installed both .tgzs. what shud i do to gt the support
for information I installed first php the gd
thanks in anticipation
bye
pranith
 
Old 06-23-2005, 06:31 AM   #2
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
php slackware package has gd enabled,
why don't you just install the package ?

Also to try it :
image.php
PHP Code:
<?php
$im 
= @imagecreate(100,100)
   or die(
'Cannot Initialize new GD image stream');
$background_color imagecolorallocate($im2389999);

$white imagecolorallocate($im255255255);
imagestring($im2515'GD enabled',$white);
header('Content-type: image/png');
imagepng($im);
imagedestroy($im);
?>
 
Old 06-23-2005, 08:45 AM   #3
pranith
Member
 
Registered: Sep 2004
Location: Hyd,India
Posts: 83

Original Poster
Rep: Reputation: 15
hi,
I am using slackware 10.0
I installed php from http://linuxpackages.net
and when i run the script u have given it shows the following error
:::::::::
The image “http://localhost/php/line1.php” cannot be displayed, because it contains errors.
so wat do u think i shud do
bye
pranith
 
Old 06-23-2005, 09:04 AM   #4
killerbob
Member
 
Registered: Oct 2004
Location: Ottawa, ON
Distribution: Slackware
Posts: 662

Rep: Reputation: 31
Most likely you're not sending the right content-type header. Could you post the script in question so somebody can check it out? Or try it on a known-working server.

FWIW, a good 25% of the content on my webpage is dynamically generated graphical content by PHP. I compiled my own PHP, but I used the pre-compiled GD library for it. I'm using GD extensively, most obviously in the gallery which generates thumbnails on the fly and is able to resize pictures dynamically from the original source.
 
Old 06-23-2005, 09:15 AM   #5
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
Also to debug the script try to comment this line :
header('Content-type: image/png');

So any error message will be displayed or
use command : tail /var/log/apache/error_log
 
Old 06-23-2005, 10:55 AM   #6
patrickdepingui
Member
 
Registered: Mar 2003
Distribution: Slackware
Posts: 53

Rep: Reputation: 15
The first line of your file should be the <?php line.
Do not put any whitespace before it...

I tried the same, and I had an empty line before the supplied code. This makes php think it has to output html code... I got exactly the same error as you did. After removing the empty line it works.
 
Old 06-23-2005, 12:05 PM   #7
pranith
Member
 
Registered: Sep 2004
Location: Hyd,India
Posts: 83

Original Poster
Rep: Reputation: 15
thanks all of u
I put the space
Now i removed it.Its working
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
php with gd support ryedunn Linux - Software 5 05-21-2005 01:41 PM
php <-> MySql support boardtc Mandriva 8 04-06-2005 01:05 AM
Php support with apache c00l Linux - Software 4 03-02-2005 04:30 PM
PHP with LDAP-support senorsnor Slackware 1 08-07-2004 07:32 PM
reinstalled apache, php, still no php support SuSE 8.2 hindenbergbaby Linux - Software 1 10-14-2003 01:42 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 11:53 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration