Internal Server Error with WordPress and PHP
-
I have a very simple PHP code which does a circular crop for the gravatar.
In the loop, the code is being executed like so:
<img src="<?php echo crop_avatar(get_avatar(get_the_author_ID(), 200)); ?>" width="85" height="85"><?php
// Sends the gravatar path to image.php
function crop_avatar($path) {preg_match("/src='(.*?)'/i", $path, $matches);
return get_template_directory_uri() . "/image.php?path=". $matches[1];
}?>
and in PHP the code would be something like this
if(isset($_GET['path'])) {$path = $_GET["path"];
$image = imagecreatefromjpeg($path);$width = imagesx($image);
$height = imagesy($image);
// CircleCrop class is just a simple PHP GD image manipulation
$crop = new CircleCrop($image,$width,$height);// Convert the header to PNG
$crop->crop()->display();}
anybody has any ideas? please..
The blog I need help with is: (visible only to logged in users)
-
That site is not being hosted by WordPress.com and you are posting to the wrong support forum. We cannot help you here. Support for your website software and any advice you need are provided on the WordPress.org support forums and they are here http://wordpress.org/support/ If you don’t have a username account at WordPress.org, click that link and register one on the top right hand corner of the page that opens, so you can post to the correct support forums for your software.
-
- The topic ‘Internal Server Error with WordPress and PHP’ is closed to new replies.