Jump to content

PHP Linux Unable to open


micha8l

Recommended Posts

Hello, I'm working with Zend Framework on Linux, and I'm trying to generate a CAPTCHA using Zend_Form_Element_Captcha. Whenever the CAPTCHA page loads I get this error:

 

[12-Jan-2011 18:14:54] PHP Warning:  imagepng() [<a href='function.imagepng'>function.imagepng</a>]: Unable to open '/var/www/square/application/../public/captcha/ebf44d292149b3ebda05571c54c463a8.png' for writing: Permission denied in /usr/local/zend/share/ZendFramework/library/Zend/Captcha/Image.php on line 563

 

Here's my code for generating the CAPTCHA:

    // create captcha

    $captcha = new Zend_Form_Element_Captcha('captcha', array(

      'captcha' => array(

        'captcha' => 'Image',

        'wordLen' => 6,

        'timeout' => 300,

        'width'   => 300,

        'height'  => 100,

        'imgUrl'  => '/captcha',

        'imgDir'  => APPLICATION_PATH . '/../public/captcha',

        'font'    => APPLICATION_PATH . '/../public/fonts/LiberationSansRegular.ttf',

        )

    ));

 

I've checked permissions, and all directories mentioned above are accessible to root. Has anyone had a similar problem or have an idea how I can fix this?

 

Kind Regards,

Mike

Link to comment
https://forums.phpfreaks.com/topic/224210-php-linux-unable-to-open/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.