Re: [PHP] php-gd problems on Ubuntu 8.04

2008-08-18 Thread Luke
Which gd package did you install? Php5-gd worked for me. Could be  
something like it trying to install a php4 module onto php5


Luke Slater
Lead Developer
NuVoo

On 18 Aug 2008, at 15:47, Chantal Rosmuller [EMAIL PROTECTED] wrote:


I did, but it doens't help

On Thursday 14 August 2008 18:58:57 Micah Gersten wrote:

Make sure  that your php.ini file for the cli is loading gd.

Thank you,
Micah Gersten
onShore Networks
Internal Developer
http://www.onshore.com

Chantal Rosmuller wrote:

Hi list,

I have a PHP problem on Ubuntu 8.04, the php-gd package for ubuntu
doesn't use the gd bundles library for security reasons if I  
understood

this correctly. I solved it by downloading a php-gd fedora rpm and
converting it to .deb with alien. it works for the apache websites  
but

not for the commandline. I get the follwoing error:


php /path/to/process.php variable1 variable2

Warning: Wrong parameter count for strpos() in /path/to/config.php  
on

line 30
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)ro

does anyone know how to fix this?

regards Chantal




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] php-gd problems on Ubuntu 8.04

2008-08-18 Thread Chantal Rosmuller
I did, but it doens't help

On Thursday 14 August 2008 18:58:57 Micah Gersten wrote:
 Make sure  that your php.ini file for the cli is loading gd.

 Thank you,
 Micah Gersten
 onShore Networks
 Internal Developer
 http://www.onshore.com

 Chantal Rosmuller wrote:
  Hi list,
 
  I have a PHP problem on Ubuntu 8.04, the php-gd package for ubuntu
  doesn't use the gd bundles library for security reasons if I understood
  this correctly. I solved it by downloading a php-gd fedora rpm and
  converting it to .deb with alien. it works for the apache websites but
  not for the commandline. I get the follwoing error:
 
 
   php /path/to/process.php variable1 variable2
 
  Warning: Wrong parameter count for strpos() in /path/to/config.php on
  line 30
  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)ro
 
  does anyone know how to fix this?
 
  regards Chantal



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] php-gd problems on Ubuntu 8.04

2008-08-14 Thread Chantal Rosmuller


Hi list, 

I have a PHP problem on Ubuntu 8.04, the php-gd package for ubuntu
doesn't use the gd bundles library for security reasons if I understood
this correctly. I solved it by downloading a php-gd fedora rpm and
converting it to .deb with alien. it works for the apache websites but
not for the commandline. I get the follwoing error:


 php /path/to/process.php variable1 variable2

Warning: Wrong parameter count for strpos() in /path/to/config.php on
line 30
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)ro

does anyone know how to fix this?

regards Chantal


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] php-gd problems on Ubuntu 8.04

2008-08-14 Thread Micah Gersten
Make sure  that your php.ini file for the cli is loading gd.

Thank you,
Micah Gersten
onShore Networks
Internal Developer
http://www.onshore.com



Chantal Rosmuller wrote:
 Hi list, 

 I have a PHP problem on Ubuntu 8.04, the php-gd package for ubuntu
 doesn't use the gd bundles library for security reasons if I understood
 this correctly. I solved it by downloading a php-gd fedora rpm and
 converting it to .deb with alien. it works for the apache websites but
 not for the commandline. I get the follwoing error:


  php /path/to/process.php variable1 variable2

 Warning: Wrong parameter count for strpos() in /path/to/config.php on
 line 30
 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)ro

 does anyone know how to fix this?

 regards Chantal


   

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] GD problems

2006-06-23 Thread Beauford
Since I know nothing of how this works, does this actually create a physical
image, and if it does I'm assuming it would be in the originating directory
from where the script was run  - if this is the case, I got nothing.

This is a moot point now as I have done what I need without using gd, but it
would be nice to find out what the problem is.

Thanks.

 Anyone know of a way I can test this further. A small script perhaps.

?php
  $image = imagecreatetruecolor(50, 50);
  imagefilledrectangle($image, 0, 0, 50, 50, 0xff);
  imagejpeg($image);
?

--
Like Music?
http://l-i-e.com/artists.htm

--
PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:
http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] GD problems

2006-06-23 Thread Chris

Beauford wrote:

Since I know nothing of how this works, does this actually create a physical
image, and if it does I'm assuming it would be in the originating directory
from where the script was run  - if this is the case, I got nothing.

This is a moot point now as I have done what I need without using gd, but it
would be nice to find out what the problem is.

Thanks.


Anyone know of a way I can test this further. A small script perhaps.


?php
  $image = imagecreatetruecolor(50, 50);
  imagefilledrectangle($image, 0, 0, 50, 50, 0xff);
  imagejpeg($image);
?


It creates it in memory and it's a 50 x 50 white square.

Change the 0xff to 0xFF6600 and it should be a red square.

--
Postgresql  php tutorials
http://www.designmagick.com/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] GD problems

2006-06-23 Thread Beauford
 
Here's something else I just noticed. When I run the script below in Windows
it works fine, in Linux I get this error:

Fatal error: Call to undefined function bcmod() in
/usr/local/apache/htdocs/home/cap.php on line 62

This is line 62: $pos_x = bcmod($code,$size_x-60) +3;

Linux is running PHP 5.0, Windows 4.4.

Thanks

---

?

//Select size of image
$size_x = 75;
$size_y = 25;

//generate random string
$code = mt_rand(10,99);

//store captcha code in session vars
session_start(  );
$_SESSION['captcha_code'] = $code;

//create image to play with
$image = imageCreate($size_x,$size_y);


//add content to image
//--


//make background white - first colour allocated is background
$background = imageColorAllocate($image,255,255,255);



//select grey content number
$text_number1 = mt_rand(0,150);
$text_number2 = mt_rand(0,150);
$text_number3 = mt_rand(0,150);

//allocate colours
$white = imageColorAllocate($image,255,255,255);
$black = imageColorAllocate($image,0,0,0);
$text  =
imageColorAllocate($image,$text_number1,$text_number2,$text_number3);



//get number of dots to draw
$total_dots = ($size_x * $size_y)/15;

//draw many many dots that are the same colour as the text
for($counter = 0; $counter  $total_dots; $counter++) {
  //get positions for dot
  $pos_x = mt_rand(0,$size_x);
  $pos_y = mt_rand(0,$size_y);

  //draw dot
  imageSetPixel($image,$pos_x,$pos_y,$text);
};



//draw border
imageRectangle($image,0,0,$size_x-1,$size_y-1,$black);



//get coordinates of position for string
//on the font 5 size, each char is 15 pixels high by 9 pixels wide
//with 6 digits at a width of 9, the code is 54 pixels wide
$pos_x = bcmod($code,$size_x-60) +3;
$pos_y = bcmod($code,$size_y-15);

//draw random number
imageString($image,  5,  $pos_x,  $pos_y,  $code,  $text);


//--
//end add content to image


//send browser headers
header(Content-Type: image/png);


//send image to browser
echo imagePNG($image);


//destroy image
imageDestroy($image);



?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] GD problems

2006-06-23 Thread Beauford
OK, so that works. So is gd (or one of the required programs) wonky then - I
mean 4 out of 5 scripts I downloaded didn't work. I can't see all of these
people being bad programmers.., but the funny thing is they all work on
Windows. So that can't be it - is there still something I'm missing in Linux
that is required by these scripts? This is what I've been fighting with the
last two weeks.

Thanks for all the help.

-Original Message-
From: Chris [mailto:[EMAIL PROTECTED] 
Sent: June 23, 2006 2:20 AM
To: Beauford
Cc: php-general@lists.php.net
Subject: Re: [PHP] GD problems

Beauford wrote:
 Since I know nothing of how this works, does this actually create a 
 physical image, and if it does I'm assuming it would be in the 
 originating directory from where the script was run  - if this is the
case, I got nothing.
 
 This is a moot point now as I have done what I need without using gd, 
 but it would be nice to find out what the problem is.
 
 Thanks.
 
 Anyone know of a way I can test this further. A small script perhaps.
 
 ?php
   $image = imagecreatetruecolor(50, 50);
   imagefilledrectangle($image, 0, 0, 50, 50, 0xff);
   imagejpeg($image);
 ?

It creates it in memory and it's a 50 x 50 white square.

Change the 0xff to 0xFF6600 and it should be a red square.

--
Postgresql  php tutorials
http://www.designmagick.com/

--
PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:
http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] GD problems

2006-06-23 Thread chris smith

On 6/24/06, Beauford [EMAIL PROTECTED] wrote:


Here's something else I just noticed. When I run the script below in Windows
it works fine, in Linux I get this error:

Fatal error: Call to undefined function bcmod() in
/usr/local/apache/htdocs/home/cap.php on line 62


David told you about this 3-4 replies ago.

http://marc.theaimsgroup.com/?l=php-generalm=115095875203362w=2

bcmod is a bcmath function, if you don't have bcmath installed you
can't use that function.

http://www.php.net/manual/en/ref.bc.php

--
Postgresql  php tutorials
http://www.designmagick.com/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] GD problems

2006-06-23 Thread Beauford
Honestly, I've never seen anything so ridiculous. How is one to know that in
order to get one program to work you have to install 28 others. I'm not
trying to be a smart ass here, but seriously - No where in any documentation
I've read does it say I need to install all these other packages. Would it
just not be simpler to add them to the original package, and then check
whether or not it's installed - if not, install it. Or at the very least
include all the packages needed and the user can install them if need be. By
the way, I never saw Marks post - it might have saved me some time if I had
though.

Thanks to everyone.

B

-Original Message-
From: chris smith [mailto:[EMAIL PROTECTED]
Sent: June 23, 2006 6:11 PM
To: Beauford
Cc: php-general@lists.php.net
Subject: Re: [PHP] GD problems

On 6/24/06, Beauford [EMAIL PROTECTED] wrote:

 Here's something else I just noticed. When I run the script below in 
 Windows it works fine, in Linux I get this error:

 Fatal error: Call to undefined function bcmod() in 
 /usr/local/apache/htdocs/home/cap.php on line 62

David told you about this 3-4 replies ago.

http://marc.theaimsgroup.com/?l=php-generalm=115095875203362w=2

bcmod is a bcmath function, if you don't have bcmath installed you can't use
that function.

http://www.php.net/manual/en/ref.bc.php

--
Postgresql  php tutorials
http://www.designmagick.com/

--
PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:
http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] GD problems

2006-06-23 Thread chris smith

On 6/24/06, Beauford [EMAIL PROTECTED] wrote:

Honestly, I've never seen anything so ridiculous. How is one to know that in
order to get one program to work you have to install 28 others. I'm not
trying to be a smart ass here, but seriously - No where in any documentation
I've read does it say I need to install all these other packages. Would it
just not be simpler to add them to the original package, and then check
whether or not it's installed - if not, install it. Or at the very least
include all the packages needed and the user can install them if need be. By
the way, I never saw Marks post - it might have saved me some time if I had
though.


Complain to the author(s) of the scripts. GD doesn't need bcmath, that
script does.
--
Postgresql  php tutorials
http://www.designmagick.com/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] GD problems

2006-06-22 Thread David Robley
Beauford wrote:

  
 There is something wonky with gd. I completely reinstalled Slackware
 today, including PHP, gd, and all the other stuff - and still nothing.
 
 I downloaded 5 separate captcha scripts and only got one to work. The code
 in all of them is very similar in that it creates a graphic with random
 letters and numbers.
 
 Here is the entire code from one that doesn't work.
 
 ?
 
 //---
 //This program is free software; you can redistribute it and/or
 //modify it under the terms of the GNU General Public License
 //as published by the Free Software Foundation; either version 2
 //of the License, or (at your option) any later version.
 //
 //This program is distributed in the hope that it will be useful,
 //but WITHOUT ANY WARRANTY; without even the implied warranty of
 //MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 //GNU General Public License for more details.
 //
 //Meezerk's CAPTCHA - A Computer Assisted Program for Telling
 //Computers and Humans Apart
 //Copyright (C) 2004  Daniel Foster  [EMAIL PROTECTED]
 //---
 
 //Select size of image
 $size_x = 75;
 $size_y = 25;
 
 //generate random string
 $code = mt_rand(10,99);
 
 //store captcha code in session vars
 session_start(  );
 $_SESSION['captcha_code'] = $code;
 
 //create image to play with
 $image = imageCreate($size_x,$size_y);
 
 
 //add content to image
 //--
 
 
 //make background white - first colour allocated is background
 $background = imageColorAllocate($image,255,255,255);
 
 
 
 //select grey content number
 $text_number1 = mt_rand(0,150);
 $text_number2 = mt_rand(0,150);
 $text_number3 = mt_rand(0,150);
 
 //allocate colours
 $white = imageColorAllocate($image,255,255,255);
 $black = imageColorAllocate($image,0,0,0);
 $text  =
 imageColorAllocate($image,$text_number1,$text_number2,$text_number3);
 
 
 
 //get number of dots to draw
 $total_dots = ($size_x * $size_y)/15;
 
 //draw many many dots that are the same colour as the text
 for($counter = 0; $counter  $total_dots; $counter++) {
   //get positions for dot
   $pos_x = mt_rand(0,$size_x);
   $pos_y = mt_rand(0,$size_y);
 
   //draw dot
   imageSetPixel($image,$pos_x,$pos_y,$text);
 };
 
 
 
 //draw border
 imageRectangle($image,0,0,$size_x-1,$size_y-1,$black);
 
 
 
 //get coordinates of position for string
 //on the font 5 size, each char is 15 pixels high by 9 pixels wide
 //with 6 digits at a width of 9, the code is 54 pixels wide
 $pos_x = bcmod($code,$size_x-60) +3;
 $pos_y = bcmod($code,$size_y-15);
 
 //draw random number
 imageString($image,  5,  $pos_x,  $pos_y,  $code,  $text);
 
 
 //--
 //end add content to image
 
 
 //send browser headers
 header(Content-Type: image/jpeg);
 
 
 //send image to browser
 echo imagejpeg($image);
 
 
 //destroy image
 imageDestroy($image);
 
 
 ?

Well, you may not have the BCmath enabled, and this script will break if
bcmod isn't there, probably without you seeing an error message.

A tip for debugging image scripts - comment out the line like 

header(Content-Type: image/jpeg);

and run the script again; if there is an error it will be displayed (error
settings permitting) whereas with the header in place, all you will get is
the broken image icon, most likely.

Cheers
-- 
David Robley

A life lived in fear is half a life lived.
Today is Pungenday, the 27th day of Confusion in the YOLD 3172. 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] GD problems

2006-06-22 Thread Richard Lynch
On Wed, June 21, 2006 1:06 pm, Beauford wrote:
 This is the output from ?php var_dump(gd_info()); ?. As far as I can
 tell,
 jpeg support is enabled. It also says it is if I run phpinfo(). Yet is
 still
 doesn't work.

 Anyone know of a way I can test this further. A small script perhaps.

?php
  $image = imagecreatetruecolor(50, 50);
  imagefilledrectangle($image, 0, 0, 50, 50, 0xff);
  imagejpeg($image);
?

-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] GD problems

2006-06-21 Thread Beauford
This is the output from ?php var_dump(gd_info()); ?. As far as I can tell,
jpeg support is enabled. It also says it is if I run phpinfo(). Yet is still
doesn't work. 

Anyone know of a way I can test this further. A small script perhaps.

Thanks

array(11) { [GD Version]= string(27) bundled (2.0.23 compatible)
[FreeType Support]= bool(false) [T1Lib Support]= bool(false) [GIF
Read Support]= bool(true) [GIF Create Support]= bool(false) [JPG
Support]= bool(true) [PNG Support]= bool(true) [WBMP Support]=
bool(true) [XPM Support]= bool(false) [XBM Support]= bool(true)
[JIS-mapped Japanese Font Support]= bool(false) }  

-Original Message-
From: Chris [mailto:[EMAIL PROTECTED] 
Sent: June 20, 2006 8:51 PM
To: Beauford
Cc: php-general@lists.php.net
Subject: Re: [PHP] GD problems

Beauford wrote:
 After my last email I searched around some more and found the following.
 
 /Q: gd keeps saying it can't find png or jpeg support. I did install 
 libpng and libjpeg. What am I missing?/
 /A: Be sure to do make install-headers for libpng and make 
 install-lib for libjpeg, in addition to make install./
 
 This is basically what you were saying, but as I said these header 
 files do not exist on their own (for Slackware anyways) and just by 
 chance I came across the above, but in any event it still doesn't 
 work.  It might be nice though if somewhere in the instructions it 
 says, hey, you might need to do this.
 
 Then I found this when searching on the jpeg errors I keep getting.
 
 /This error occures becuase the linker (ld) cannot find the jpeg 
 library./ /You can fix this problem by editing the config.nice file 
 inside the php4/ /directory and adding / /LDFLAGS='-L/path/to/lib' \ / 
 /above the ./configure \ /
 
 /For example is your libjpeg.so resides inside /usr/local/lib, you'd 
 add/ /-L/usr/local./
 
 /Once you've edited the file, remove config.cache and run 
 ./config.nice,/ /after that make; make install; should work./
 
 Since my/// libjpeg.so / is in /usr/lib I put/// LDFLAGS='-L/user' \/ 
 - I still get the same error. If I compile without the jpeg it works 
 like a charm - so I recompiled libjpeg thinking it may have gotten 
 screwed up, but same errors.
 
 So the question is, why can't it find these files?
 
 Any ideas on what else I can do. I'm assuming that other people have 
 this working on Slackware, if so, how did they do it? I posted to that 
 forum as well and didn't get one answer.

Please always CC the list - you'll get more (and faster) help.

As David suggested, try adding this:

--with-jpeg-dir=/usr --with-png-dir=/usr

to the php configure command.

If that doesn't work, where is the jpeglib.h file?

Mine is in the /usr/include folder, so I use /usr for the --with-jpeg-dir
parameter.

If that file doesn't exist anywhere on your system, you haven't got the
headers installed for libjpeg.

--
Postgresql  php tutorials
http://www.designmagick.com/

--
PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:
http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] GD problems

2006-06-21 Thread Chris

Beauford wrote:

This is the output from ?php var_dump(gd_info()); ?. As far as I can tell,
jpeg support is enabled. It also says it is if I run phpinfo(). Yet is still
doesn't work. 


Show us some code that doesn't work and you'll probably get some 
suggestions.


--
Postgresql  php tutorials
http://www.designmagick.com/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] GD problems

2006-06-21 Thread Beauford
 
There is something wonky with gd. I completely reinstalled Slackware today,
including PHP, gd, and all the other stuff - and still nothing.

I downloaded 5 separate captcha scripts and only got one to work. The code
in all of them is very similar in that it creates a graphic with random
letters and numbers.

Here is the entire code from one that doesn't work.

?

//---
//This program is free software; you can redistribute it and/or
//modify it under the terms of the GNU General Public License
//as published by the Free Software Foundation; either version 2
//of the License, or (at your option) any later version.
//
//This program is distributed in the hope that it will be useful,
//but WITHOUT ANY WARRANTY; without even the implied warranty of
//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//GNU General Public License for more details.
//
//Meezerk's CAPTCHA - A Computer Assisted Program for Telling 
//Computers and Humans Apart
//Copyright (C) 2004  Daniel Foster  [EMAIL PROTECTED]
//---

//Select size of image
$size_x = 75;
$size_y = 25;

//generate random string
$code = mt_rand(10,99);

//store captcha code in session vars
session_start(  );
$_SESSION['captcha_code'] = $code;

//create image to play with
$image = imageCreate($size_x,$size_y);


//add content to image
//--


//make background white - first colour allocated is background
$background = imageColorAllocate($image,255,255,255);



//select grey content number
$text_number1 = mt_rand(0,150);
$text_number2 = mt_rand(0,150);
$text_number3 = mt_rand(0,150);

//allocate colours
$white = imageColorAllocate($image,255,255,255);
$black = imageColorAllocate($image,0,0,0);
$text  =
imageColorAllocate($image,$text_number1,$text_number2,$text_number3);



//get number of dots to draw
$total_dots = ($size_x * $size_y)/15;

//draw many many dots that are the same colour as the text
for($counter = 0; $counter  $total_dots; $counter++) {
  //get positions for dot
  $pos_x = mt_rand(0,$size_x);
  $pos_y = mt_rand(0,$size_y);

  //draw dot
  imageSetPixel($image,$pos_x,$pos_y,$text);
};



//draw border
imageRectangle($image,0,0,$size_x-1,$size_y-1,$black);



//get coordinates of position for string
//on the font 5 size, each char is 15 pixels high by 9 pixels wide
//with 6 digits at a width of 9, the code is 54 pixels wide
$pos_x = bcmod($code,$size_x-60) +3;
$pos_y = bcmod($code,$size_y-15);

//draw random number
imageString($image,  5,  $pos_x,  $pos_y,  $code,  $text);


//--
//end add content to image


//send browser headers
header(Content-Type: image/jpeg);


//send image to browser
echo imagejpeg($image);


//destroy image
imageDestroy($image);


?

-Original Message-
From: Chris [mailto:[EMAIL PROTECTED] 
Sent: June 21, 2006 8:41 PM
To: Beauford
Cc: php-general@lists.php.net
Subject: Re: [PHP] GD problems

Beauford wrote:
 This is the output from ?php var_dump(gd_info()); ?. As far as I can 
 tell, jpeg support is enabled. It also says it is if I run phpinfo(). 
 Yet is still doesn't work.

Show us some code that doesn't work and you'll probably get some
suggestions.

--
Postgresql  php tutorials
http://www.designmagick.com/

--
PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:
http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] GD problems

2006-06-20 Thread Chris

Beauford wrote:

After my last email I searched around some more and found the following.

/Q: gd keeps saying it can't find png or jpeg support. I did install 
libpng and libjpeg. What am I missing?/
/A: Be sure to do make install-headers for libpng and make 
install-lib for libjpeg, in addition to make install./


This is basically what you were saying, but as I said these header files 
do not exist on their own (for Slackware anyways) and just by chance I 
came across the above, but in any event it still doesn't work.  It might 
be nice though if somewhere in the instructions it says, hey, you might 
need to do this.


Then I found this when searching on the jpeg errors I keep getting.

/This error occures becuase the linker (ld) cannot find the jpeg library./
/You can fix this problem by editing the config.nice file inside the php4/
/directory and adding /
/LDFLAGS='-L/path/to/lib' \ /
/above the ./configure \ /

/For example is your libjpeg.so resides inside /usr/local/lib, you'd add/
/-L/usr/local./

/Once you've edited the file, remove config.cache and run ./config.nice,/
/after that make; make install; should work./

Since my/// libjpeg.so / is in /usr/lib I put/// LDFLAGS='-L/user' \/ - 
I still get the same error. If I compile without the jpeg it works like 
a charm - so I recompiled libjpeg thinking it may have gotten screwed 
up, but same errors.


So the question is, why can't it find these files?

Any ideas on what else I can do. I'm assuming that other people have 
this working on Slackware, if so, how did they do it? I posted to that 
forum as well and didn't get one answer.


Please always CC the list - you'll get more (and faster) help.

As David suggested, try adding this:

--with-jpeg-dir=/usr --with-png-dir=/usr

to the php configure command.

If that doesn't work, where is the jpeglib.h file?

Mine is in the /usr/include folder, so I use /usr for the 
--with-jpeg-dir parameter.


If that file doesn't exist anywhere on your system, you haven't got the 
headers installed for libjpeg.


--
Postgresql  php tutorials
http://www.designmagick.com/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] GD problems

2006-06-19 Thread Beauford
I finally broke down and reinstalled PHP using the info from the site below,
but GD is still not working. Phpinfo() shows it is enabled, as are the other
libraries. So I'm lost as to what I am missing?

http://tanksoftware.com/tutes/installingphp.html

Any help is appreciated.

B

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] GD problems

2006-06-19 Thread Richard Lynch
On Mon, June 19, 2006 5:43 pm, Beauford wrote:
 I finally broke down and reinstalled PHP using the info from the site
 below,
 but GD is still not working. Phpinfo() shows it is enabled, as are the
 other
 libraries. So I'm lost as to what I am missing?

 http://tanksoftware.com/tutes/installingphp.html

If phpinfo() shows GD and all the cool libraries, then you're
definitely on the right track.

Now you just have to tell us what makes you think it's not working
and what you mean by not working and what your code looks like
and...

-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] GD problems

2006-06-19 Thread Beauford
 in this function)
gd_jpeg.c: At top level:
gd_jpeg.c:768: error: parse error before cinfo
gd_jpeg.c: In function `skip_input_data':
gd_jpeg.c:770: error: `cinfo' undeclared (first use in this function)
gd_jpeg.c:775: error: `num_bytes' undeclared (first use in this function)
gd_jpeg.c: At top level:
gd_jpeg.c:810: error: parse error before cinfo
gd_jpeg.c:828: error: parse error before cinfo
gd_jpeg.c: In function `jpeg_gdIOCtx_src':
gd_jpeg.c:839: error: `cinfo' undeclared (first use in this function)
gd_jpeg.c:842: error: `j_common_ptr' undeclared (first use in this function)
gd_jpeg.c:842: error: parse error before cinfo
gd_jpeg.c:846: error: parse error before cinfo
gd_jpeg.c:855: error: `jpeg_resync_to_restart' undeclared (first use in this
function)
gd_jpeg.c:857: error: `infile' undeclared (first use in this function)
gd_jpeg.c: At top level:
gd_jpeg.c:866: error: field `pub' has incomplete type
gd_jpeg.c:882: error: parse error before cinfo
gd_jpeg.c: In function `init_destination':
gd_jpeg.c:884: error: `cinfo' undeclared (first use in this function)
gd_jpeg.c:888: error: `j_common_ptr' undeclared (first use in this function)
gd_jpeg.c:888: error: parse error before cinfo
gd_jpeg.c: At top level:
gd_jpeg.c:920: error: parse error before cinfo
gd_jpeg.c: In function `empty_output_buffer':
gd_jpeg.c:922: error: `cinfo' undeclared (first use in this function)
gd_jpeg.c:926: error: `JERR_FILE_WRITE' undeclared (first use in this
function)
gd_jpeg.c:931: error: `TRUE' undeclared (first use in this function)
gd_jpeg.c: At top level:
gd_jpeg.c:945: error: parse error before cinfo
gd_jpeg.c: In function `term_destination':
gd_jpeg.c:947: error: `cinfo' undeclared (first use in this function)
gd_jpeg.c:954: error: `JERR_FILE_WRITE' undeclared (first use in this
function)
gd_jpeg.c: At top level:
gd_jpeg.c:966: error: parse error before cinfo
gd_jpeg.c: In function `jpeg_gdIOCtx_dest':
gd_jpeg.c:976: error: `cinfo' undeclared (first use in this function)
gd_jpeg.c:979: error: `j_common_ptr' undeclared (first use in this function)
gd_jpeg.c:979: error: parse error before cinfo
gd_jpeg.c:987: error: `outfile' undeclared (first use in this function)
make[2]: *** [gd_jpeg.lo] Error 1
make[2]: Leaving directory `/home/beauford/gd-2.0.33'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/beauford/gd-2.0.33'
make: *** [all] Error 2

-Original Message-
From: Beauford [mailto:[EMAIL PROTECTED] 
Sent: June 19, 2006 6:43 PM
To: php-general@lists.php.net
Subject: [PHP] GD problems

I finally broke down and reinstalled PHP using the info from the site below,
but GD is still not working. Phpinfo() shows it is enabled, as are the other
libraries. So I'm lost as to what I am missing?

http://tanksoftware.com/tutes/installingphp.html

Any help is appreciated.

B

--
PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:
http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] GD problems

2006-06-19 Thread Chris

Beauford wrote:

Hi again,

I started again to see if I could get it to work. I first removed everything
(libpng, libjpeg, zlib, and PHP). Then as before I followed the info in the
link below. Now I get the following when I run make for PHP. Note also that
I can not compile gd on it's own, I had to find a Slackware package for it.
Could this be the problem? Again, I have no idea what else to do as I have
followed all the info I could find on how to get this to work. I have also
included some info on gd below.

Thanks

 /home/shared/php-5.0.0/ext/gd/libgd/gd_jpeg.c -o ext/gd/libgd/gd_jpeg.o  
echo  ext/gd/libgd/gd_jpeg.lo
/home/shared/php-5.0.0/ext/gd/libgd/gd_jpeg.c:38:21: jpeglib.h: No such file
or directory
/home/shared/php-5.0.0/ext/gd/libgd/gd_jpeg.c:39:20: jerror.h: No such file
or directory



You need the libjpeg-devel, libpng-devel and so on packages to compile 
support for these into php. I don't know slackware, so they might be 
called -dev or something, but you need the dev packages which contain 
the header files.


--
Postgresql  php tutorials
http://www.designmagick.com/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] GD problems

2006-06-19 Thread Beauford
Thanks for the reply, but what are these for then - libpng and libjpeg? No
where does it say I need anything else. I have searched and searched for
information on installing this and never have I seen anything about -devel
packages. Even in the link I gave it says nothing about this. I've just
spent the last hour searching for these packages and can't even come close
to finding anything - all I get is the ones I've already installed, which
I'm thinking are one and the same - and they say Windows is bad. It only
took me 5 minutes in Windows to get this working.  As you can see I'm way
pass frustrated.

Thanks again

-Original Message-
From: Chris [mailto:[EMAIL PROTECTED] 
Sent: June 19, 2006 9:10 PM
To: Beauford
Cc: php-general@lists.php.net
Subject: Re: [PHP] GD problems

Beauford wrote:
 Hi again,
 
 I started again to see if I could get it to work. I first removed 
 everything (libpng, libjpeg, zlib, and PHP). Then as before I followed 
 the info in the link below. Now I get the following when I run make 
 for PHP. Note also that I can not compile gd on it's own, I had to find a
Slackware package for it.
 Could this be the problem? Again, I have no idea what else to do as I 
 have followed all the info I could find on how to get this to work. I 
 have also included some info on gd below.
 
 Thanks
 
  /home/shared/php-5.0.0/ext/gd/libgd/gd_jpeg.c -o 
 ext/gd/libgd/gd_jpeg.o   echo  ext/gd/libgd/gd_jpeg.lo
 /home/shared/php-5.0.0/ext/gd/libgd/gd_jpeg.c:38:21: jpeglib.h: No 
 such file or directory
 /home/shared/php-5.0.0/ext/gd/libgd/gd_jpeg.c:39:20: jerror.h: No such 
 file or directory


You need the libjpeg-devel, libpng-devel and so on packages to compile
support for these into php. I don't know slackware, so they might be called
-dev or something, but you need the dev packages which contain the header
files.

--
Postgresql  php tutorials
http://www.designmagick.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] GD problems

2006-06-19 Thread Chris

Beauford wrote:

Thanks for the reply, but what are these for then - libpng and libjpeg? No
where does it say I need anything else. I have searched and searched for
information on installing this and never have I seen anything about -devel
packages. Even in the link I gave it says nothing about this. I've just
spent the last hour searching for these packages and can't even come close
to finding anything - all I get is the ones I've already installed, which
I'm thinking are one and the same - and they say Windows is bad. It only
took me 5 minutes in Windows to get this working.  As you can see I'm way
pass frustrated.


Some things you learn from experience or asking questions :)

It's reasonably standard if you want to compile something into another 
program, you need the headers (which are in the -devel package mostly). 
Databases are slightly different in that mysql and postgres (at least) 
give you a mysql_config and pg_config to tell you about different stuff.


This of course all depends on which system you are running. Most package 
based systems separate things out so the base package installs binaries 
only, and the -devel package installs headers and things you need to 
compile against it. Port systems (*bsd and gentoo for eg) of course are 
different again.


I thought php told you what you needed, I know some other programs will 
stop the configure script and say to compile support for X you need 
package Y installed. Obviously not..


--
Postgresql  php tutorials
http://www.designmagick.com/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] GD problems

2006-06-19 Thread David Robley
Beauford wrote:

 Thanks for the reply, but what are these for then - libpng and libjpeg? No
 where does it say I need anything else. I have searched and searched for
 information on installing this and never have I seen anything about -devel
 packages. Even in the link I gave it says nothing about this. I've just
 spent the last hour searching for these packages and can't even come close
 to finding anything - all I get is the ones I've already installed, which
 I'm thinking are one and the same - and they say Windows is bad. It only
 took me 5 minutes in Windows to get this working.  As you can see I'm way
 pass frustrated.
 
 Thanks again
 
 -Original Message-
 From: Chris [mailto:[EMAIL PROTECTED]
 Sent: June 19, 2006 9:10 PM
 To: Beauford
 Cc: php-general@lists.php.net
 Subject: Re: [PHP] GD problems
 
 Beauford wrote:
 Hi again,
 
 I started again to see if I could get it to work. I first removed
 everything (libpng, libjpeg, zlib, and PHP). Then as before I followed
 the info in the link below. Now I get the following when I run make
 for PHP. Note also that I can not compile gd on it's own, I had to find a
 Slackware package for it.
 Could this be the problem? Again, I have no idea what else to do as I
 have followed all the info I could find on how to get this to work. I
 have also included some info on gd below.
 
 Thanks
 
  /home/shared/php-5.0.0/ext/gd/libgd/gd_jpeg.c -o
 ext/gd/libgd/gd_jpeg.o   echo  ext/gd/libgd/gd_jpeg.lo
 /home/shared/php-5.0.0/ext/gd/libgd/gd_jpeg.c:38:21: jpeglib.h: No
 such file or directory
 /home/shared/php-5.0.0/ext/gd/libgd/gd_jpeg.c:39:20: jerror.h: No such
 file or directory
 
 
 You need the libjpeg-devel, libpng-devel and so on packages to compile
 support for these into php. I don't know slackware, so they might be
 called -dev or something, but you need the dev packages which contain
 the header files.
 
 --
 Postgresql  php tutorials
 http://www.designmagick.com/

Slackware installs these header files in /usr/include by default - you may
need to add to your configure the following:

--with-jpeg-dir=/usr --with-png-dir=/usr


/var/log/packages contains files for each package you have installed - those
files contain details of what was instaled where.

GD should compile just fine on Slack - it does for me so you may be missing
something iwhen you do configure for gd??

Cheers
-- 
David Robley

Funny, only sensible people agree with me.
Today is Sweetmorn, the 25th day of Confusion in the YOLD 3172. 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] GD problems

2006-06-19 Thread Beauford
What surprises me about this is that no one in the various forums,
newsgroups, email lists, etc. can offer a solution. I'm sure I'm not the
only one that's had this problem. I can't even get an answer from the gd
forums or faq's.

I guess I'll have to see if I can find a captcha program that doesn't use
gd, or (shudder) move my web server to Windows.

Thanks again

-Original Message-
From: Chris [mailto:[EMAIL PROTECTED] 
Sent: June 19, 2006 10:14 PM
To: Beauford
Cc: php-general@lists.php.net
Subject: Re: [PHP] GD problems

Beauford wrote:
 Thanks for the reply, but what are these for then - libpng and 
 libjpeg? No where does it say I need anything else. I have searched 
 and searched for information on installing this and never have I seen 
 anything about -devel packages. Even in the link I gave it says 
 nothing about this. I've just spent the last hour searching for these 
 packages and can't even come close to finding anything - all I get is 
 the ones I've already installed, which I'm thinking are one and the 
 same - and they say Windows is bad. It only took me 5 minutes in 
 Windows to get this working.  As you can see I'm way pass frustrated.

Some things you learn from experience or asking questions :)

It's reasonably standard if you want to compile something into another
program, you need the headers (which are in the -devel package mostly). 
Databases are slightly different in that mysql and postgres (at least) give
you a mysql_config and pg_config to tell you about different stuff.

This of course all depends on which system you are running. Most package
based systems separate things out so the base package installs binaries
only, and the -devel package installs headers and things you need to compile
against it. Port systems (*bsd and gentoo for eg) of course are different
again.

I thought php told you what you needed, I know some other programs will stop
the configure script and say to compile support for X you need package Y
installed. Obviously not..

--
Postgresql  php tutorials
http://www.designmagick.com/

--
PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:
http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] GD problems

2006-06-19 Thread Chris

Beauford wrote:

What surprises me about this is that no one in the various forums,
newsgroups, email lists, etc. can offer a solution. I'm sure I'm not the
only one that's had this problem. I can't even get an answer from the gd
forums or faq's.


I offered the solution - install the header files and you'll be able to 
compile.


--
Postgresql  php tutorials
http://www.designmagick.com/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] GD problems with opacity on translucent background

2004-05-05 Thread Raymond den Ouden
Hi,
I have a little problem with a script I am trying to make.
The main problem is that when I draw something on a translucent png 
created with gd, it will still take the color which was set as 
transparent color.

For a demo look at
http://www.cranberries-fan.com/images/transparent/test.php
The backgroundcolor is set to black so in the black box it seems to be 
ok, but in the yellow box you can see that the transparentcolor is 
blended over black :-( while the empty spaces around the circle is 
actually translucent.

Am I doing something wrong? I read something on the net about the 
bundled gd having a bug compared to this issue, so I installed php 
4.3.6  this morning so that the GD lib would have version 2.0.22

GD Support  enabled
GD Version  bundled (2.0.22 compatible)
FreeType Supportenabled
FreeType Linkagewith freetype
T1Lib Support   enabled
GIF Read Supportenabled
JPG Support enabled
PNG Support enabled
WBMP Supportenabled
XBM Support enabled
look for the script at
http://www.cranberries-fan.com/images/transparent/genimage.phps
What am I doing wrong or what is the GD lib doing wrong?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] PHP / gd problems / compiling

2001-06-21 Thread Rasmus Lerdorf

 ./configure' '--with-mysql' '--with-apache=../apache_1.3.12'
 '--enable-track-vars' '--enable-ftp' '--with-jpeg-dir=/usr/local/bin'
 '--with-gd-dir=/usr/local/bin'

The configure option is --with-gd and it should definitely not point to
/usr/local/bin.  Quoting from the INSTALL file:

   There are a few things that can go wrong during this configure step.
   The most common is that you have asked for an option and that the
   configure script can not find the files required to enable this
   option in PHP.  Chances are you can provide the full path to the
   base directory under which the related files were installed.  For
   example, if you have installed the GD library in /opt/gd which means
   that /opt/gd/include has your GD header files and /opt/gd/lib contains
   your GD library files, you would use --with-gd=/opt/gd

And yes, I agree with Sebastian, use GD2.

If you simply grab the gd2 tarball and build it in your home directory
(/home/rasmus in my case) then you need something like this:

  --with-gd=/home/rasmus/gd-2.0.1 --with-freetype-dir=/usr
  --enable-gd-native-ttf --enable-gd-imgstrttf --with-jpeg-dir=/usr
  --with-png-dir=/usr --with-xpm-dir=/usr/X11R6

That assumes that those various things are installed under /usr and that
you built gd2 using (in the gd2 Makefile):

CFLAGS=-g -DHAVE_LIBPNG -DHAVE_LIBJPEG -DHAVE_LIBFREETYPE
LIBS=libgd.a -lpng -lz -ljpeg -lfreetype -lm

Follow these steps and you should have a kick-ass php-gd2 setup.

-Rasmus


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] PHP / gd problems / compiling

2001-06-20 Thread Sebastian Wenleder

my configure line:

./configure' '--with-mysql' '--with-apache=../apache_1.3.12'
'--enable-track-vars' '--enable-ftp' '--with-jpeg-dir=/usr/local/bin'
'--with-gd-dir=/usr/local/bin'

gd version 1.8.1 ..

Then whenever I try to create an image of any kind, be it gif, jpg, or png,
I get:

br
bWarning/b:  ImageTtfText: No TTF support in this PHP build in
b/data/www/apache/htdocs/airforce/quote/image.php/b on line b7/bbr
br
bWarning/b:  ImageGif: No GIF support in this PHP build in
b/data/www/apache/htdocs/airforce/quote/image.php/b on line b8/bbr



(It would give me the same warnings for JPG .. No JPG support, no PNG
support, etc.)


What did I do wrong?  I thought I built it in correctly, that configure line
appears when I do the phpinfo() stuff ..


Hi Chad!
You should compile PHP with TTF-Support, if you want to use 
TrueTypeFonts (ImageTTFText does this)

for this you would need the freetype package (http://freetype.sourceforge.net)
and add this to your configure line
for freetype 1.x:  --with-ttf='/path/to/ttf'
  -- or --
for freetype 2.x:  --with-freetype-dir='/path/to/freetype'

you should also make sure you built gd with freetype support, i'm not 
sure if gd 1.8.1 supports freetype 2.x and I would recommend that you 
upgrade your gd_lib to 2.0.1 it's a beta, but it's quite stable!


Best,

Sebastian

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]