Help with PHP and Apache for sig script wanted

Commissario
Joined
16 Oct 2002
Posts
2,646
Location
In the radio shack
Now that I've got my ADSL installed I'm running a Windows 2000 box with Apache on it.

I'd like to get php scripting working so that I can host my own signature and not have to bother others if I want to change anything.

What do I need, where do I get it from and how do I configure it all?

I'm asking here because there are obviously people who are already doing this for their (and others) scripts so there must be a wealth of knowledge.

Mr. taliesyn currently hosts mine so I guess that if nothing else, I'll need a copy of the script you're using, good sah.

K.
 
Man of Honour
Joined
4 Nov 2002
Posts
15,508
Location
West Berkshire
You'll find a guide in the Sticky (Imagine suggesting a Don should read the sticky :eek: ) - created by TrUz.

You'll need PHP (downloadable here). I'm not sure if there is anything else you will need (I run the Linux version).

I don't know if that version includes the GD and FreeType extensions, but the first Windows download does say it includes "many extensions", so you might be lucky.

I think Biffa has some experience with setting this up, but had performance issues (server was very slow), so installed the Linux version (until someone else needed the PC it was installed on).

:)
 
Commissario
OP
Joined
16 Oct 2002
Posts
2,646
Location
In the radio shack
I've been going through the sticky and I've got as far as getting a basic installation of PHP on which can be seen by clicking here

Doesn't seem to have the GD stuff though so I'm looking further now.

K.
 
Man of Honour
Joined
30 Oct 2002
Posts
15,807
Location
Surrey
Yass but I wasn't running Apache on win32 I was running PHP as an ISAPI filter in IIS :D On an old PPro200 boxen.

I'm thinking of doing what you are doing Feek, I't shouldn't take me long to setup and I can pass on anything.

Main thing once you have apache and php installed and runnig is to create a test.php page to show your php capabilities and see you have everything installed that you need.

e.g.
PHP:
<HTML>
<HEAD>
<TITLE>Test PHP Script</TITLE>
</HEAD>
<BODY>
<?PHP
phpinfo();
?>
</BODY>
</HTML>

Then you need to modify the script to use windows paths instead of *nix ones.

Then a bit of trial and error and you should be away.
 
Man of Honour
Joined
30 Oct 2002
Posts
15,807
Location
Surrey
IN the php.ini in yer winnt directory you have to uncomment the line that says

;extension=php_gd.dll

Remove the ; then save, then stop and start apache
 
Commissario
OP
Joined
16 Oct 2002
Posts
2,646
Location
In the radio shack
Heh - I think you've noticed that I've done that already.

It was actually php_gd2.dll but the effect seems to have been the same.

Now - Having never used php scripts before I'm a bit stuck.

K.
 
Soldato
Joined
19 Oct 2002
Posts
2,707
Location
UK
What do you mean by you're a bit stuck, on which bit? :D

Have you tried the test.php thing like Biffa said and does it work? if you've got that far just put kaiowas' script into htdocs and edit it as appropirate then open it up via the url of your webserver box, has to be http://computername/filename.php not \\computername\filename.php If you've not got that far where have you got to? :D
 
Commissario
OP
Joined
16 Oct 2002
Posts
2,646
Location
In the radio shack
Ahah, Mr. Phil. If you re-read my post here you'll see a linkie to my test.php file which is working all fine and his dandy.

What I really want is the script that Mr. taliesyn is already using for my sig - It works and it works well so I can tweak that as required.

K.
 
Soldato
Joined
18 Oct 2002
Posts
4,139
Location
North Wales
Originally posted by Feek
Ahah, Mr. Phil. If you re-read my post here you'll see a linkie to my test.php file which is working all fine and his dandy.

What I really want is the script that Mr. taliesyn is already using for my sig - It works and it works well so I can tweak that as required.

K.

You should have received an e-mail with the requisite script and images by now :D

(and your PHP installation is looking good :))
 
Man of Honour
Joined
4 Nov 2002
Posts
15,508
Location
West Berkshire
Originally posted by taliesyn
(and your PHP installation is looking good :))
Everything checks out there.

Just remembered, we're running Apache+PHP on Windows 2000 at work, and it doesn't have the IIS performance problems (no surprise there). We did run across some problems with our server last week, but I'm not sure what caused those.
 
Commissario
OP
Joined
16 Oct 2002
Posts
2,646
Location
In the radio shack
seti.php


That's taking my sig from my own pages using the self same script that it's currently being hosted with but as you can see, it's not doing the right thing with the font size.

I've tried changing the fontsize in the switches when it's called and that makes no difference and I've tried adjusting the default font size in the php.

Hmmmmm.

K.
 
Man of Honour
Joined
4 Nov 2002
Posts
15,508
Location
West Berkshire
I assume you've told it where to pick up the font from (probably $FontFile in the script). :)

Edit: The script here might be worth a look - it's fairly similar to the one I used in my sig.
 
Last edited:
Commissario
OP
Joined
16 Oct 2002
Posts
2,646
Location
In the radio shack
No, there's nothing in the script that refers to the specific font that I can see at all. The only references to font are for the size.

Had a look at all the scripts in that thread, but the one I'm using from taliesyn is totally different allowing positioning of text, size, colours etc etc.

K.
 
Soldato
Joined
18 Oct 2002
Posts
4,139
Location
North Wales
Yep, it's not the one I'm using for everyone else, which is also not the same as the one in that post which was initially written by Kaiowas (although I did make a slight contribution to that script to avoid problems occuring if Berkeley's down as you will see in the last post).

The script I use for the siggys I host is one I wrote myself.

The script Feek's using uses Imagestring to render the font onto the graphic and was originally written by Pho. I just host it for him on my server.

If the value is 1-5 then ImageString supposedly uses an internal font, otherwise presumably it uses an external font somewhere. That variable, even though it's called $fontsize in the script, shouldn't have any bearing on the actual size of the font, which appears to be standard.
 
Last edited:
Man of Honour
Joined
4 Nov 2002
Posts
15,508
Location
West Berkshire
OK - you'll have to ask taliesyn about his specific script. My point was that if you only want a sig for yourself, then you should be able to use the script I referred to (all the same settings for e-mail, font, size, colour, position etc are in there, but they are actually in the script, rather than being something you specify in the URL.
 
Soldato
Joined
18 Oct 2002
Posts
4,139
Location
North Wales
Originally posted by Berserker
OK - you'll have to ask taliesyn about his specific script. My point was that if you only want a sig for yourself, then you should be able to use the script I referred to (all the same settings for e-mail, font, size, colour, position etc are in there, but they are actually in the script, rather than being something you specify in the URL.

Not my script s'ah. I merely host it for Mr. Feek.

If you douse the script in the thread above, make sure that you use the last version of the script in that thread, otherwise when Berkley's down, your WU total will get overwritten with blanks :)
 
Man of Honour
Joined
4 Nov 2002
Posts
15,508
Location
West Berkshire
Originally posted by taliesyn
If the value is 1-5 then ImageString supposedly uses an internal font, otherwise presumably it uses an external font somewhere.
ImageString can use external fonts, but they appear to be in an odd format. I don't know if they bear any relation to the fonts used on Linux systems, but the documented format doesn't ring any bells. The fonts built into PHP are severely limited, and I'd recommend avoiding them unless you have no other choice.

The other script written by kaiowas and motified by taliesyn and myself can use just about any OpenType or TrueType font (i.e. the same fonts Windows supports). Personally, I'd recommend using this script instead of the others, but then I'm biased. :)
 
Soldato
Joined
18 Oct 2002
Posts
4,139
Location
North Wales
Originally posted by Berserker
ImageString can use external fonts, but they appear to be in an odd format. I don't know if they bear any relation to the fonts used on Linux systems, but the documented format doesn't ring any bells. The fonts built into PHP are severely limited, and I'd recommend avoiding them unless you have no other choice.

The other script written by kaiowas and motified by taliesyn and myself can use just about any OpenType or TrueType font (i.e. the same fonts Windows supports). Personally, I'd recommend using this script instead of the others, but then I'm biased. :)

I would tend to agree (especially now you've got Freetype installed), and it can be easily modified to take URL parameters. It's certainly more reliable when Berkeley's server is down. It should display a WU Count even if there is no response.

PHP's internal fonts do seem to be a law unto themselves, and they are bitmap ones and so not easily scaleable.
 
Last edited:
Back
Top Bottom