So, I am just trying to resize an image with WideImage, the code is very simple and I cant get it to work. I have checked the server so GD is enabled and the PHP version is 5.2, according to the documentation at WideImage website, it should works fine.
This is my form:
<form name="form2" enctype="multipart/form-data" method="post" action="upload.php" />
<p><input type="file" size="32" name="myimg" value="" /></p>
<p><input type="submit" name="Submit" value="upload" /></p>
</form>
And this is the file that receives the image:
<?php
require ('WideImage.inc.php');
$resize = WideImage::load('myimg');
$image = $resize->resize(400, 300);
$image->saveToFile('/imagens/1.jpg');
?>
I get no error simply the page becomes blank and I check the folder, the image isn’t there either.
Looking at the server log, this is what I get:
[Sat Feb 04 16:43:35 2012] [error] [client 189.46.135.165] PHP Fatal error: require_once() [<a href='function.require'>function.require</a>]: Failed opening required '/home/storage/8/82/8a/buenavistaviagens/public_html/Exception.class.php' (include_path='.:/usr/share/pear') in /home/storage/8/82/8a/buenavistaviagens/public_html/WideImage.inc.php on line 20, referer: http://www.buenavistaviagens.com.br/imagem.php
I’ve tried putting the class file into different folders, and now I just put it on the root and also set the permissions to 777, so, I really cant figure out whats wrong.
Any idea? thanx guys!
Youre missing
Exception.class.phpwhich is required byWideImage. You need to adjust your include path or the autoloader you are using so you can load all the classes you need.