General > Support
Larger Font size for Captcha
shwekhaw:
Strangely there is nothing in error log. I run test script mentioned in php.net and browser said the image cannot be displayed because it contains error. All ttf files are in same folder as captcha.php (libs folder). I got them from under Win 7 as well my raspberry pi running wheezy.
faf:
--- Quote from: shwekhaw on December 01, 2014, 08:30:00 AM ---Strangely there is nothing in error log.
--- End quote ---
Then your server settings probably prevents PHP warnings from appearing in error logs.
--- Quote from: shwekhaw on December 01, 2014, 08:30:00 AM ---All ttf files are in same folder as captcha.php (libs folder).
--- End quote ---
And what makes you think that the script from root directory will find the font file without full path? ::)
Try this:
--- Code: ---$font = dirname(__FILE__) . '/arial.ttf';
--- End code ---
shwekhaw:
Sever is reporting other php errors in log file so I am assuming error is not with php. I am using example 1 at http://php.net/manual/en/function.imagettftext.php. Full path does not work either. I think the problem is with font file. I am not familiar with installing font in linux system. Do I need to install font to the system like in Windows or just copying should work?
faf:
--- Quote from: shwekhaw on December 01, 2014, 04:43:36 PM ---Do I need to install font to the system like in Windows or just copying should work?
--- End quote ---
A TTF font is just a file. So copying should be enough.
At the same time, I don't think that this problem is somehow related to Mibew Messenger. It looks more like a problem with PHP and/or some of its libraries. Or a problem with the font. Or with the environment (for example, with some system limits and/or insufficient system resources). As a matter of fact, I can only stare into a crystal ball and make abstract guesses.
shwekhaw:
Thanks. For now imagecopyresampled does the job.
Navigation
[0] Message Index
[*] Previous page
Go to full version