[thelist] PHP/GD/TTF and a barrel of problems....

// kerin | airside.co.uk kerin at airside.co.uk
Wed Oct 10 09:55:10 CDT 2001


Hi everyone,

After months of quite happily using PHP, I've suddenly got a couple of 
problems today that are stopping me in my tracks.

I'm working on something just now which requires me to send form 
contents to two scripts at once, on PHP, one perl.

This is a form to sign up to a mailing list. Our server host has a very 
good off-the-shelf mailing list manager which we're using. To subscribe 
to that, the form tag is this :

<FORM METHOD="POST"
ACTION="http://premiertools.proteusweb.com/public_scripts/mailing.pl">


But, that just adds the email address to the mailing list. What I need 
to do is take the other form values and use PHP to pass them to mySQL.

I've tried this instead, and the browser just hangs - having the form 
submit to a PHP page which passes the data into mySQL, but also does 
this :

$url = 
"http://premiertools.proteusweb.com/public_scripts/mailing.pl?command=subscribe&
user=palokefo&list=oakenfold&thq_page=http://www.pauloakenfold.com/listthanks.
html&email=$email";
$fp = fopen($url,"r");

but, as I say, this just hangs.

So, is there an easy way to pass post variables to another page (in this 
case a perl script) without the browser actuall redirecting anywhere? Or 
is there a simpler way to do this?

And.........the other problem:

I've been doing some work on our local dev machine recently using PHP to 
produce PNGs of text using a TrueType font.

I didn't set up the dev. box (mac OS X), so I don't know exactly whats 
on there - although I do no for certain that its the most recent stable 
release of PHP and GD, as well as libPNG.

I'm using functions like :

ImageTTFBbox
ImageTTFText
ImagePNG

to do all this.

It works fine on the Mac box, but when I've uploaded it to our webserver 
(Solaris), the PNG generation breaks. The image doesnt load, and when 
I've taken the Header call out of the php page to see any errors, there 
are no errors reported.

So, I looked into what was on the local dev box that wasnt on the 
webserver. As far as I can see, it all matches. libPNG and GD are on 
both, and I can't find any trace of Freetype on the local dev machine.

Now, either I'm just not seeing Freetype on the local machine and it is 
there, or Freetype isnt required for the TTF functions, and the fault on 
the server lies elsewhere.

So, can anyone help me out? What is required exactly to produce PNGs 
with TTF text?



Sorry for the huge email, but I'm drawing a complete blank here......


Kerin Cosford
Codemonkey
Airside
0207 354 9912
-------------------------------
http://www.airside.co.uk
-------------------------------





More information about the thelist mailing list