0

I am using below captcha.Its working fine in localhost,one server.The problem is same code is not running on different server.
Need suggestion

<?php
session_start();
$ranStr = md5(microtime());
$ranStr = substr($ranStr, 0, 6);
$_SESSION['cap_code'] = $ranStr;
$newImage = imagecreatefromjpeg("img/cap_bg1.jpg");
$txtColor = imagecolorallocate($newImage, 0, 0, 0);
imagestring($newImage, 5, 5, 5, $ranStr, $txtColor);
header("Content-type: image/jpeg");
imagejpeg($newImage);
?>
3
Contributors
7
Replies
8
Views
6 Years
Discussion Span
Last Post by jacob21
0

What is the problem ?

Server error
The website encountered an error while retrieving http://pghostels.co.in/pgfinal/pgfinal2/admin/captcha.php. It may be down for maintenance or configured incorrectly.
Here are some suggestions:
Reload this webpage later.

Its working fine in one server.but getting above error while executing on different server

0

Both don't work for me. If one works, then it could be some server setting. Does one use a htaccess for example, that may get in the way.

0

Do you have the GD library installed on the server where it isn't working?

How to install all this

FreeType Support enabled
FreeType Linkage with freetype
FreeType Version 2.1.9

I installed gd library & getting below.
I am showing text on image.Is there any need of free type support or free type linkage.

Need suggestion
GD Support enabled
GD Version bundled (2.0.34 compatible)
GIF Read Support enabled
GIF Create Support enabled
JPG Support enabled
PNG Support enabled
WBMP Support enabled
XPM Support enabled
XBM Support enabled

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.