macsat.com OpenWrt and ASUS WL Forum
January 08, 2009, 10:45:41 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?
Login with username, password and session length
News: Back to macsat.com
 
   Home   Help Search Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: PHP-GD  (Read 2575 times)
0 Members and 1 Guest are viewing this topic.
paul
Newbie
*
Offline Offline

Posts: 3


View Profile
« on: May 29, 2006, 09:29:29 AM »

I configured thttpd-php following the Mascat tutorial, but now I want to add GD support (so I can run a Thumbnail creator script).

I already installed the PHP-GD ipkg, but it still seems that I don't have GD running correctly but PHPinfo() outputs that /opt/etc/php.d/gd.ini is parsed.

Could somebody help me out?

Or will GD support cost to much performance for the WL500G ?
Logged
macsat
Administrator
Sr. Member
*****
Online Online

Posts: 1,104



View Profile
« Reply #1 on: June 02, 2006, 08:36:13 AM »


So you can see that GD is loaded from phpinfo();  ?

Did you try to create a very small sample script that uses GD ?

You could try googling for PHP GD Samples.

Logged
paul
Newbie
*
Offline Offline

Posts: 3


View Profile
« Reply #2 on: June 02, 2006, 09:35:46 AM »

 PhpInfo() shows it is parsing the GD.so extension, but I don't see a GD section appear.

I tried to run a GD php example, but it complians it can't find the GD function imagecreatefromjpeg.

does this means that the GD option could only be added when php is build for the WL500 or is this a configuration problem?
Logged
macsat
Administrator
Sr. Member
*****
Online Online

Posts: 1,104



View Profile
« Reply #3 on: June 02, 2006, 10:01:02 AM »


It might be due to no jpeg support.

Try this example, that should give you a PNG image:

Code:
<?php
//random_number.php

$img_number imagecreate(100,50);
$white imagecolorallocate($img_number,255,255,255);
$black imagecolorallocate($img_number,0,0,0);
$grey_shade imagecolorallocate($img_number,204,204,204);
imagefill($img_number,0,0,$grey_shade);
ImageRectangle($img_number,5,5,94,44,$black);
ImageRectangle($img_number,0,0,99,49,$black);

$number get_random();
Imagestring($img_number,9,30,15,$number,$black);
header("Content-type: image/png");
imagepng($img_number);

function 
get_random()
{
srand(time());
$max getrandmax();
return 
rand(1,$max) + rand(1,$max) ;
}

?>

Logged
paul
Newbie
*
Offline Offline

Posts: 3


View Profile
« Reply #4 on: June 03, 2006, 10:21:57 AM »

no this php example doesn't output anything.

maybe there some ipkg missing or incorrect, could you check this for me ?

Package: bzip2
Version: 1.0.2-4
Status: install ok installed
Architecture: mipsel

Package: cron
Version: 4.1-4
Status: install user installed
Architecture: mipsel

Package: expat
Version: 1.95.8-3
Status: install ok installed
Architecture: mipsel
Installed-Time: 1148754779

Package: fontconfig
Version: 2.3.2-1
Depends: expat, freetype, gconv-modules
Status: install ok installed
Architecture: mipsel
Installed-Time: 1148754776

Package: freetype
Version: 2.1.10-1
Depends: zlib
Status: install ok installed
Architecture: mipsel
Installed-Time: 1148754769

Package: gconv-modules
Version: 2.2.5-5
Status: install ok installed
Architecture: mipsel
Installed-Time: 1148754781

Package: gdbm
Version: 1.8.3-2
Status: install ok installed
Architecture: mipsel

Package: ipkg
Version: 0.99.149-2
Status: install ok installed
Essential: yes
Architecture: mipsel

Package: libdb
Version: 4.2.52-3
Status: install ok installed
Architecture: mipsel

Package: libgd
Version: 2.0.33-2
Depends: libpng, libjpeg, freetype, fontconfig
Status: install ok installed
Architecture: mipsel
Installed-Time: 1148754733

Package: libjpeg
Version: 6b-2
Status: install ok installed
Architecture: mipsel
Installed-Time: 1148754751

Package: libpng
Version: 1.2.8-5
Depends: zlib
Status: install ok installed
Architecture: mipsel
Installed-Time: 1148754745

Package: libxml2
Version: 2.6.23-1
Depends: zlib
Status: install ok installed
Architecture: mipsel

Package: libxslt
Version: 1.1.15-5
Depends: libxml2
Status: install ok installed
Architecture: mipsel

Package: nano
Version: 1.2.4-2
Depends: ncurses
Status: install user installed
Architecture: mipsel

Package: ncurses
Version: 5.5-1
Status: install ok installed
Architecture: mipsel

Package: openssl
Version: 0.9.7d-4
Status: install ok installed
Architecture: mipsel

Package: php
Version: 5.0.4-2
Depends: bzip2, openssl, zlib, libxml2, libxslt, gdbm, libdb
Status: install ok installed
Architecture: mipsel

Package: php-gd
Version: 5.1.4-1
Depends: php, libgd
Status: install user installed
Architecture: mipsel
Installed-Time: 1148754781

Package: php-thttpd
Version: 2.25b-5.0.4-1
Depends: php (>= 5.0.3-8), libxml2
Conflicts: thttpd
Status: install user installed
Architecture: mipsel

Package: zlib
Version: 1.2.2-2
Status: install ok installed
Architecture: mipsel
Logged
green
Newbie
*
Offline Offline

Posts: 29


View Profile
« Reply #5 on: August 02, 2006, 18:22:35 PM »

Hi,
I have the same problem Sad
know anybody about it how to fix it?
thx
Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  

English Steel 1.6 © Saxon North Technologies
Powered by MySQL Powered by PHP Powered by SMF 1.1.7 | SMF © 2006-2008, Simple Machines LLC
Joomla Bridge by JoomlaHacks.com
Valid XHTML 1.0! Valid CSS!
Page created in 0.083 seconds with 23 queries.