500 Internal Server Error for a PHP file on LAMP server -


i have simple code generate captcha image :

<?php     session_start();     $captchanumber = 'abcdefghijklmnopqrstuvwxyz1234567890abcdefghijklmnopqrstuvwxyz';     $captchanumber = substr(str_shuffle($captchanumber), 0, 6);     $_session["code"] = $captchanumber;     $image = imagecreatefromjpeg("bj.jpg");     $foreground = imagecolorallocate($image, 175, 199, 200); //font color     imagestring($image, 5, 15, 15, $captchanumber, $foreground);     header('content-type: image/png');     imagepng($image); ?> 

on localhost image generated , on lamp gives 500 internal error. checked php.ini setting :

 session.save_handler = files  

is there other setting need check / change ?


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

python - Django-cities exits with "killed" -

python - How to get a widget position inside it's layout in Kivy? -