Character Browser Character Sig
Reply
Character Sig
One thing I have never been able to get working is the Character Signature. I have confirmed my mod rewrite is enabled, phpinfo shows it working. I have the .htaccess in the proper place but I still get the broken graphic. Ideas?
Tue Jul 07, 2015 9:05 pm
You could try adding some custom rewrite rules to see if other stuff is working maybe
Wed Jul 08, 2015 3:48 pm
Project Lead
I forgot, as a first step, try manually rewriting the URL and paste the rewritten URL into your browser to make sure the PHP script that generates the image works. If the script works it pretty much guarantees it's the htaccess. It might be something like you are lacking one of the functions the image script uses and its posting an error as text. Since the script sends an image header, your browser is expecting an image and the error's text gets interpreted as a busted image. If you're confident the htaccess is right, then this is a likely scenario.

If this ends up being the case, make sure you have the GD library installed, or you could pick apart the script and make sure each function is available...
Thu Jul 09, 2015 5:50 pm
Project Lead
You might be able to tweak the script too so that it doesn't send the image header... If you can get that going you'll see the error message in the browser instead of a broken image. Duh, the easiest thing is you can peek at the error logs too... Sorry, my heads um my ass right now.
Thu Jul 09, 2015 5:51 pm
Project Lead
I did a simple rewrite test and it worked fine, so I know .htaccess is working.

Looking at my log I see this.

[Sat Jul 18 08:51:13 2015] [error] [client 162.233.212.177] PHP Notice: Undefined property: Template::$destroy in /var/www/CharBrowser/include/header.php on line 48, referer: http://legacyoffroststone.com/CharBrowser/signaturebuilder.php
[Sat Jul 18 08:51:13 2015] [error] [client 162.233.212.177] PHP Notice: Undefined variable: filename2 in /var/www/CharBrowser/signaturebuilder.php on line 24, referer: http://legacyoffroststone.com/CharBrowser/signaturebuilder.php
[Sat Jul 18 08:51:13 2015] [error] [client 162.233.212.177] PHP Notice: Undefined property: Template::$destroy in /var/www/CharBrowser/signaturebuilder.php on line 203, referer: http://legacyoffroststone.com/CharBrowser/signaturebuilder.php
[Sat Jul 18 08:51:13 2015] [error] [client 162.233.212.177] PHP Notice: Undefined property: Template::$destroy in /var/www/CharBrowser/include/footer.php on line 38, referer: http://legacyoffroststone.com/CharBrowser/signaturebuilder.php
[Sat Jul 18 08:51:13 2015] [error] [client 162.233.212.177] File does not exist: /var/www/CharBrowser/cbsig, referer: http://legacyoffroststone.com/CharBrowser/signaturebuilder.php
[Sat Jul 18 08:51:13 2015] [error] [client 162.233.212.177] File does not exist: /var/www/CharBrowser/cbsig, referer: http://legacyoffroststone.com/CharBrowser/signaturebuilder.php
Sat Jul 18, 2015 7:53 am
Also I do have php5-gd installed.
Sat Jul 18, 2015 8:01 am
Hmmm, maybe try making the rewrite not silent. At the end of the rule change [L] to [R=301,L]

That will send a redirect to the client accessing. In that way the client can actually see what the rewrite rule did. So if you try to visit

http://charbrowser.mqemulator.net/cbsig/backsplatter-5-FFFFFF-0/backsplatter-5-FFFFFF-0/0/0-FFFFFF-0-0-0-0-0/0/2A2A2A-0-0/Ivorii.png

the url in the browser changes to this:

http://charbrowser.mqemulator.net/sig.php?one=backsplatter-5-FFFFFF-0&two=backsplatter-5-FFFFFF-0&epic=0&stat=0-FFFFFF-0-0-0-0-0&border=0&background=2A2A2A-0-0&char=Ivorii

That will illuminate if it's just rewriting it incorrectly.

Based off those errors though, I'm thinking you might have a rewrite rule in another higher directory that is triggering and preventing this one from running. You might try simplifying the rule to something basic (to remove some variables) too, like

RewriteRule ^cbsig/sig.png$ %1sig.php [R=301,L]

Then navigate to http://legacyoffroststone.com/CharBrowser/cbsig/sig.png and see what happens. If it's fails on that (which I think ir probably will) then it's got to be somewhere else. I hate to turn anyone away, but it might be worth it posting the issue in it's simplest form on stack overflow to get more eyes on it.

EDIT: I like your site design BTW.
Sun Jul 19, 2015 3:00 pm
Project Lead
I noticed you took the Character Mover link out of the header. Make sure, if you don't want people to access it, to turn it off in the config. Otherwise people can navigate to http://legacyoffroststone.com/CharBrowser/charmove.php and use it anyway. If you want you could probably just delete the charmove.php to be extra safe (thought I haven't tested that)
Sun Jul 19, 2015 3:04 pm
Project Lead
Yeah that being removed was accidental, probably from playing around with it. Thanks for the complement. I will reply back tomorrow and maybe we can get a step further.
Sun Jul 19, 2015 7:21 pm
Character Browser Character Sig
Reply