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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.