using sig.php & av.php

A signature and avatar generator addon

Moderator: zanix

using sig.php & av.php

Postby gryghost » Fri Jul 27, 2007 10:18 am

I have recently changed from using the standalone version of Roster 1.7.3 to WoWRosterDF 1.7.3 using SigGen v0.2.6

Here is my issue: With the standalone version of Roster & SigGen, I was able to link to my sig/ava using http://<domain.com>/addons/siggen/av.php/<name>.png to display my image on a phpBB2 forum. With WoWRosterDF & SigGen, this method gives a '403 Forbidden' error. I have tried making the sig.php & av.php files executable to 'world' (chmod 755), but I am still receiving this error.

Is there anyway that I can get this functionality back with WoWRosterDF & SigGen? I really don't want to have to save the images on the server.
Last edited by gryghost on Fri Jul 27, 2007 10:22 am, edited 3 times in total.
User avatar
gryghost
WR.net Apprentice
WR.net Apprentice
 
Posts: 6
Joined: Fri Jul 27, 2007 9:09 am

using sig.php & av.php

Postby zanix » Fri Jul 27, 2007 12:07 pm

Only with mod_rewrite
DF restricts direct access to any php file other than index.php or admin.php
Read the Forum Rules, the WiKi, and Search before posting!
WoWRoster v2.1 - SigGen v0.3.3.523 - WoWRosterDF
User avatar
zanix
Admin
Admin
WoWRoster.net Dev Team
WoWRoster.net Dev Team
UA/UU Developer
UA/UU Developer
 
Posts: 5546
Joined: Mon Jul 03, 2006 8:29 am
Location: Idaho Falls, Idaho
Realm: Doomhammer (PvE) - US

Re: using sig.php & av.php

Postby tuigii » Sat Jul 28, 2007 1:11 am

"mod_rewrite" means :
Put this (or, edit yours - toy with it) in your .htaccess file in your root web server directory :
Code: Select all
SetEnv REGISTER_GLOBALS 0
SetEnv ZEND_OPTIMIZER 1
SetEnv MAGIC_QUOTES 1
SetEnv PHP_VER 5
Options +FollowSymlinks
RewriteEngine On
RewriteBase /
RewriteRule ^/?roster/addons/siggen/(sig|av)/(.*).png$ ./roster/addons/siggen/$1.php?name=$2&saveonly=0

Let go by it one by one:
SetEnv REGISTER_GLOBALS 0
SetEnv ZEND_OPTIMIZER 1
SetEnv MAGIC_QUOTES 1
SetEnv PHP_VER 5
Options +FollowSymlinks

These are the commands that:
Don't bother : I need these for my server - please understand that there are 3 trillion types of apache web servers on this planet - and every hoster use a "different one" - go figure. Maybay because otherwise things would be easy, and site admins would be without a job very soon.
[ok, SetEnv PHP_VER 5 means : use PHP version 5 - because default it will be version 4 for my hoster :wink: ]

RewriteEngine On
RewriteBase /
RewriteRule ^/?roster/addons/siggen/(sig|av)/(.*).png$ ./roster/addons/siggen/$1.php?name=$2&saveonly=0

Now where at it.
First line : this must be logic, if not : go Google.
Second line : I NEED this, you meaby not. If not, it will not bother you when you put it in there.
Third : now we are there at last :
Just copy this one !
Please note that MY roster directory is in a directory named .... /roster :!: (Smart thing, no ?)
Another might be exception : the line starts with "RewriteRule ^/?....
You might not be needing the "/?" part. I need it (I'm at www.ovh.fr...). I struggled for 1 week to find this 'small' issue, but found my answer on the hosters forum .... (hosters always have a forum/wiki/FAQ/hotline/manual/blogs/..... where members / renter of sites can yell and scream WHY things are different on their hoster , because it's 'different' on another hoster.
Please note that this is not an univeral .htaccess file : this one worked for me. Yours, of cours, will be (great chance) different ! Welcome to the club :D

Please note that toying with an .htaccess file can have very nice and very bad side effect for your site.
Seeing statement that you don't understand 'well' : My God, go Google !!!
Last edited by tuigii on Sat Jul 28, 2007 1:14 am, edited 1 time in total.
User avatar
tuigii
WR.net Master
WR.net Master
 
Posts: 891
Joined: Wed Dec 27, 2006 12:57 pm
Location: Somewhere in the South Ouest of France

using sig.php & av.php

Postby tuigii » Sat Jul 28, 2007 1:22 am

A small test ?

Code: Select all
http://www.papy-team.fr/roster/addons/siggen/sig/Nowwhat.png

Gives back:
Image
Please note that I have a .../www/roster/addons/siggen/sig directory -but I deleted the Nowwhat.png file just 5 minutes ago ...

Also : I use PNG file, you could also generate a JPG file - just stick to what you choosed in the admin section of siggen.

&saveonly=0 means : don't save the file (for later - faster use) when generated.

PS : Nowwhat == "tuigii" :wink:
Last edited by tuigii on Sat Jul 28, 2007 1:23 am, edited 1 time in total.
User avatar
tuigii
WR.net Master
WR.net Master
 
Posts: 891
Joined: Wed Dec 27, 2006 12:57 pm
Location: Somewhere in the South Ouest of France


Return to SigGen

Who is online

Users browsing this forum: No registered users and 1 guest

cron