php,gd,phpthumbRelated issues-Collection of common programming errors


  • sarnold
    php cakephp
    When I login to my web application it shows an error like:Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 87 bytes) in /gt/2.ps.fo/home/hft/domains/console.fo.spalgo.com/public_html/cake/libs/model/datasources/dbo/dbo_mysql.php on line 775Is there any solution to solve this problem? Why do I get this error?

  • KingCrunch
    php mediawiki
    I have MediaWiki 1.13.3 installed and it has been working fine for a couple years. My web host just upgraded PHP versions on the server from 5.2.17 to 5.3.5, and now all of a sudden I’m getting this error:Warning: Parameter 2 to Parser::parse() expected to be a reference, value given in /usr/www/users/…/includes/StubObject.php on line 58Fatal error: Call to a member function getCacheTime() on a non-object in /usr/www/users/…/includes/Article.php on line 3387What changed in the new version of

  • Peter Mortensen
    php include
    When should I use require_once vs include?The code is in a custom WordPress theme, if that matters.

  • jww
    php encryption openssl
    Why if i put w3Zho+mol6yATVfhqi8KkQ== (“ln -s”)Then this doesn’t work: function cdecrypt($data) {$key = ‘000000’;$iv = ‘1234567812345678’;$decrypted = openssl_decrypt($data, “aes-128-cbc”, $key, 0, $iv);return $decrypted; }$c = urlencode($_GET[‘c’]); $comm = cdecrypt(urldecode($c)); echo $comm;Error:Fatal error: Allowed memory size of 268435456 bytes exhausted(tried to allocate 3095496193 bytes) in /var/www/ai/service.php on line 7 but if i change encrypted string toQYRiSyTwk4r6Js6jNVlziQ== (“l

  • Wiglaf
    php joomla joomla2.5
    I wrote a simple authentication plugin that uses a SOAP webservice to check the username and the password. That works fine.I wanted to have some parameter like the SOAP password in the admin of joomla. So I have added the params in the xml, it shows fine in the admin. When I try to get the value of it the php, I get:Fatal error: Call to a member function get() on a non-objectSo I compared with other authentication and I do it exactly the same way…. I do not understand why it is so.Here is the

  • ing0
    php try-catch fatal-error
    I’ve been playing around with a system I’m developing and managed to get it to cause this:Fatal error: Maximum execution time of 30 seconds exceededIt happened when I was doing something unrealistic, but nevertheless it could happen with a user.Does anyone know if there is a way to catch this exception? I’ve read around but everyone seems to suggest upping the time allowed.

  • Jason Sturges
    php joomla joomla-extensions
    I have installed joomsocial component but when I try to click the joomsocial menu it shows following error:Fatal error: Class ‘FacebookLib’ not found inC:\xampp\htdocs\jatc\components\com_community\libraries\facebook.php on line 49Please help me any one. I am new to joom social component.

  • PeeHaa
    image wordpress memory php
    Please can you help me. I’ve got this fatal error in WordPress. My site has been on for years and worked until a few days ago, This happened when I updated the network and my wordpress multi user install? It only does it on the main site, as it works fine on the sub sites.Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 4890018 bytes) in /home/artygirl/public_html/wp-includes/media.php on line 258It can’t be the memory limit as I fixed that ages ago.

  • Krish R
    php wamp phpexcel
    I arleady posted this question on the CodePlex forum… but to no avail yet…I have developed code that creates an array to hold a report structure and then dumps it into excel. So far it has been working flawlessly (in Window 7 Ultimate) until I upgraded to Windows 7 Enterprise… I am now getting an error which is echoed onto the xlsx file and therefore renders it totally corrupt. I am wondering at this sudden change of behaviour… I copy the error here below. (I am running PHPExcel 1.7.8, v

  • Hiral
    php codeigniter
    In codeigniter i have started one property related project for my client.I am getting an errorFatal error: Class ‘CI_Controller’ not found in H:\php2\htdocs\property\system\core\CodeIgniter.php on line 233 after i have complete some development.I have really search it for many time in google and in stackoverflow but still didn’t get solved.Thanks in advance,

  • Charles
    php gd
    I have a simple PHP script that takes an image that’s been uploaded and processes it with imagecreatefromjpeg. It works great on small images, but not on larger ones. With an image of say, 5,799,936 bytes, I get the following error:Fatal error: Out of memory (allocated 56623104) (tried to allocate 3072 bytes)If the image is less than 1MB, I get no such error.I’ve ensured that I always use imagedestroy whenever an image has been successfully processed, and I’ve used memory_get_usage() to see what

  • RAS
    php image-processing gd imagefilter
    What is causing this error?Fatal error: Call to undefined function imagefilter() in /var/www/polaroid.php on line 51 <?PHP2 $img_addr = $_GET[‘image_address’];3 $img = imagecreatefromjpeg($img_addr);4/* everything works as expected without this line */5 imagefilter($img, IMG_FILTER_GRAYSCALE); 67 if ($img)8 {/* I moved the header function here so I can see errors in the browser. If I leave it at the top of the file, the browser expects an image and doesn’t print the error messages.

  • Alexander Farber
    php centos gd
    has anybody solved the problem of installing GDChart on CentOS 5.5 Linux (I’ve tried both 32 and 64 bit versions)?I have:# rpm -qa | grep -i php php-pear-1.4.9-6.el5 php-gd-5.1.6-27.el5 php-ldap-5.1.6-27.el5 php-pgsql-5.1.6-27.el5 php-5.1.6-27.el5 php-pdo-5.1.6-27.el5 php-common-5.1.6-27.el5 php-cli-5.1.6-27.el5 php-devel-5.1.6-27.el5And the “pecl” seems to find GDChart in its repository:# sudo pecl search GDChart Retrieving data…0%….50%….Matched packages, channel pecl.php.net: ==========

  • ultranaut
    php image gd blend multiplying
    I want to blend two images – like multiply, overlay and other blend modes – in PHP with GD library.My images = Image1.jpg — imageblend.jpg or image3.png Please help me write examples or step by step teach me? I’ve found some examples but they don’t work.

  • hakre
    php imagemagick gd osx-snow-leopard
    I’m trying to integrate imageMagick onto my server but I’m having a hard time to get it to work with any php commands. I think it may be because of the previous server configurations I did and now I’m not sure what to do as this is my first time using a Snow Leopard Server. Here is the line of code I am attempting to process:$sCommand=”/opt/local/bin/convert -geometry “.$neededWidth.”x”.$neededHeight.” \”” .$image_path.”\” \””.$newFile.”\” “; $vvv=exec( $sCommand, $exec_output, $exec_retval );He

  • Let’s Code
    php image-processing gd image-rotation
    Ok.. now I have been trying this for long time now.I am trying to rotate image if it has some orientation . I got reference from HereI also refered thisHere is function I am using function adjustPicOrientation($full_filename){ $exif = exif_read_data($full_filename); if($exif && isset($exif[‘Orientation’])) {$orientation = $exif[‘Orientation’];if($orientation != 1){$img = imagecreatefromjpeg($full_filename);$mirror = false;$deg = 0;switch ($orientation) {case 2:$mirror = true;b

  • Dev01
    php image parsing web gd
    I have created a script to resize images and insert dynamically in <img> tags something like:<img src=”includes/thumb.php?src=<?=$filename;?>&w=389&q=100&f=jpg” />In the thumb.php, I resize image using php gd functions and finally include it so that it shows the resized image for the image where thumb.php is called in inside <img> tag.This is how I include the image from thumb.php://header(‘Content-Type: image/’ . $format); //header(‘Content-Disposition: inlin

  • j08691
    php gd
    I am trying to create a chart with PHP GD. The chart is already working but I can’t get the background to be transparant (with anti-aliasing). I want to place an anti-aliased line on a gradient background(this is the html background) but it shows some white pixels (see the image link and my code bellow). Is it possible to do this with GD?? Searched alot on the Internet but can’t find any solutions.PHP<?php $img = imagecreatetruecolor(1000, 1000);imagesavealpha($img, true); imagealphablending(

  • JKirchartz
    php gd pear imagick
    I’m generating a barcode with PEAR::Image_Barcode which uses GD, but I need to write that barcode onto a section of a PDF and PHP/Imagick seems to be the easiest way to do that, is there any way to convert a GD image object into something Imagick can work with?

  • Miral
    php png gd
    I have a need to read in the exact unaltered pixel data (ARGB) from a truecolour PNG file, preferably from PHP.Unfortunately the GD library in PHP messes with the alpha channel (reducing it from 8-bit to 7-bit), making it unusable.I’m currently assuming that my options are either:Implement my own raw PNG reader to extract the necessary data. Use some less-broken language/library and call it from the PHP as a shell process or CGI.I’d be interested to hear any other ideas, though, or recommendatio

  • Mico Abrina
    php image upload pictures phpthumb
    I’m having a very problematic error with phpthumb: http://phpthumb.gxdlabs.com/ So basically, I have a form which uploads a profile picture. The uploading seems to work because it uploads the image in the directory. The problem is that it doesn’t generate the thumbnails but I’m sure that all the variables and names are correct. It gives me the following error. Specifically ‘Image file not found’:Fatal error: Uncaught exception ‘Exception’ with message ‘Image file not found: ????’ in {PATH}\phpth

  • genesis
    php gd phpthumb
    library: http://wiki.github.com/masterexploder/PHPThumb/basic-usagei am using the PhpThumbFactory library to crop and upload an image. the error im receiving is this:Fatal error: Uncaught exception ‘Exception’ with message ‘Image file not found: ‘ in /www/iaddesign/admin/classes/phpthumb/ThumbBase.inc.php:193 Stack trace: #0 /www/iaddesign/admin/classes/phpthumb/ThumbBase.inc.php(172): ThumbBase->triggerError(‘Image file not …’) #1 /www/iaddesign/admin/classes/phpthumb/ThumbBase.inc.php(

  • Jim Garrison
    php phpthumb
    I had downloaded from official website, uploaded to my hosting server. I got this error message. [08-Mar-2012 21:26:07] PHP Fatal error: Class ‘PhpThumb’ not found in /home/sokad /public_html/libs/phpthumb/thumb_plugins/gd_reflection.inc.php on line 179 Fatal error: Uncaught exception ‘RuntimeException’ with message ‘Cannot show image, headers have already been sent’ in /home/sokad/public_html/libs/phpthumb/GdThumb.inc.php:569 Stack trace: #0 /home/sokad/public_html/resize.php(14): GdThumb-&

  • xRobot
    php phpthumb
    require_once ‘../ThumbLib.inc.php’; $thumb = PhpThumbFactory::create(‘test.jpg’); $thumb->resize(100, 100)->save(‘/img/new_thumb.jpg’); $thumb->show();I set 777 permission to img folder but I get this error:Fatal error: Uncaught exception ‘RuntimeException’ with message ‘File not writeable: /img/new_thumb.jpg’ in /home/xjohn/www.mysite.com/phpthumb/GdThumb.inc.php:662 Stack trace: #0 /home/xjohn/www.mysite.com/phpthumb/examples/resize_basic.php(31): GdThumb->save(‘/img/new_th…’) #1

  • Fuxi
    phpthumb
    i’m using ffmpeg for extracting a video frame from which i want to create a thumbnail using php thumb. creating the video frame works, but when trying to save the thumbnail file (under a different name – same directory) i’m getting this error:PHP Fatal error: Uncaught exception ‘RuntimeException’ with message ‘File is not writeable, and could not correct permissions: d:/Webs/bla.jpg’ in D:\Webs\phpThumb\lib\GdThumb.inc.php:656it can’t be a permission problem as i can already store the videofram

  • expiredninja
    php permissions directory-structure thumbnails phpthumb
    I wanted a script that automatically generates thumbnails when from a folder full of larger images. I’ve ran into some problems implementing it.I was getting some errors early on because I hadn’t included all the phpthumb files i needed, but now the errors are coming from within the phpthumb code itself. Will post more code as needed.The errors:Warning: getimagesize(.\.) [function.getimagesize]: failed to open stream: Permission denied in C:\xampp\htdocs\mysite\GdThumb.inc.php on line 1070Fatal

  • Tourshi
    jquery image google-chrome phpthumb
    Im having trouble getting Chrome to recognize an Image width or height after the DOM has loaded. The Image is dynamically loaded through phpThumb script (which resizes the image). If I take away the dynamic url and just replace it with the Image’s direct url I get no issues and everything works in Chrome but with the dynamic url, chrome doesn’t seem to be able to calculate the image width or height.Anyone have any experience with this? Its doing my head in.The code in question is :var theImage

  • user1657958
    php image-upload special-folders phpthumb
    I’m (a newbie in php) still working on a time off project and another problem came up, for which I can’t find a solution. Therefore I hope u guys can help me! Worked great the last time I posted something on here! I really appreciate your help…thx ahead!My problem: I want users to be able to upload pictures when they are logged in. They got several little buttons on their profile with images on them…and they should be able to change them… I want to have it like this -> When a user uploa

Web site is in building