Strange PHP5 Problem with PNG menu
Moderator: General Moderators
Strange PHP5 Problem with PNG menu
Hi,
My host recently upgraded the server I host my Photo Web Site at http://www.photographybykh.com to PHP 5 and MySQL 5.
I'm now having a strange problem. The site uses generated PNG menus that are editable as plain text in smarty templates. The menu items are all showing as broken images and running the menu script directly produces apparently corrupt output.
For example:
http://www.photographybykh.com/site_tit ... itle=ABOUT returns the text characters "mÊzZ‘éÜ" instead of generating a PNG with "ABOUT" as its title. Any text typed directly into the URL after "title=" returns mÊzZ‘éÜ
This problem began after I removed a PHP4 handler from my .htacess file. The handler had to be removed because the script was not closing client connections and over-loading the server.
I don't know where to start on this one--any suggestions?
Thanks,
jayman30
My host recently upgraded the server I host my Photo Web Site at http://www.photographybykh.com to PHP 5 and MySQL 5.
I'm now having a strange problem. The site uses generated PNG menus that are editable as plain text in smarty templates. The menu items are all showing as broken images and running the menu script directly produces apparently corrupt output.
For example:
http://www.photographybykh.com/site_tit ... itle=ABOUT returns the text characters "mÊzZ‘éÜ" instead of generating a PNG with "ABOUT" as its title. Any text typed directly into the URL after "title=" returns mÊzZ‘éÜ
This problem began after I removed a PHP4 handler from my .htacess file. The handler had to be removed because the script was not closing client connections and over-loading the server.
I don't know where to start on this one--any suggestions?
Thanks,
jayman30
Re: Strange PHP5 Problem with PNG menu
Perhaps you could post the code for that file?
Re: Strange PHP5 Problem with PNG menu
Here you go.
Thanks for looking in to this problem.
Code: Select all
<?
include("setting.php");
$file = "$title.png";
$text = $title;
$back_color = array(153, 153, 153); // (red, green, blue)
$front_color = array(255, 255, 255); // (red, green, blue)
$font_file = 'files/font/aglettericacondensedbold.ttf';
$font_size = 10;
$image_width = (strlen($text)) * ($font_size - 1) + 20;
$image_height = 25;
$position_left = 10;
$position_top = 17;
include("system_function_title.php");
?>
Re: Strange PHP5 Problem with PNG menu
Not much there to see...
Try that.
And I'd suggest putting
in your .htaccess file, otherwise people can look through your folders.
Code: Select all
$text = $_GET["title"];And I'd suggest putting
Code: Select all
Options -IndexesRe: Strange PHP5 Problem with PNG menu
Hi,
Thanks for the suggestions I had my CPanel's Index Manager set to keep my folders from being browsed--but I guess that wasn't working? Thanks for the tip, that could have been costing me sales.
I tried changing
to
but no luck. Anything else I could try?
Thanks for the suggestions I had my CPanel's Index Manager set to keep my folders from being browsed--but I guess that wasn't working? Thanks for the tip, that could have been costing me sales.
I tried changing
Code: Select all
$text = $title;Code: Select all
$text = $_GET["title"];but no luck. Anything else I could try?
Re: Strange PHP5 Problem with PNG menu
Oh, missed it. Do the same thing with the $title in $file.
If not then it might help to see what's in system_function_title.php.
If not then it might help to see what's in system_function_title.php.
Re: Strange PHP5 Problem with PNG menu
Changed
to
No luck there either, I'm afraid the developer codelocked system_function_title.php for copy protection and I've been trying to contact him for over a week now. 
Thanks for the help though, at least it was worth a shot.
Code: Select all
$file = "$title.png";Code: Select all
$file = "$_GET["title.png"];Thanks for the help though, at least it was worth a shot.
Re: Strange PHP5 Problem with PNG menu
So I assumed you knew what to do. My mistake.
Hard to debug code when you can't see the code.
Code: Select all
$file = $_GET["title"] . ".png";