Zend Framework

Zend_Captcha_Image: default dir is relative to public folder, not to bootstrap script

Details

  • Type: Docs:  Problem Docs: Problem
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Cannot Reproduce
  • Affects Version/s: 1.7.5
  • Fix Version/s: None
  • Component/s: Zend_Captcha
  • Labels:
    None
  • Language:
    English

Description

In current online manual, it is written:

setImgDir($imgDir) and getImgDir() allow you to specify the directory in which captcha images are stored. This defaults to "./images/captcha/", which should look relative to the bootstrap script.

(source: http://framework.zend.com/manual/en/zend.captcha.adapters.html#zend.captcha.adapters.image)

When I created './images/captcha' relative to bootstrap script (ie. /application/images/captcha), it did not solve the problem.
However when I created './images/captcha' relative to public folder (ie. /public/images/captcha), it worked and captcha got generated.

=> default path does not seem to be relative to bootstrap script but to public folder

Activity

Hide
Stanislav Malyshev added a comment -

By default it's relative to the current directory, which usually would be bootstrap directory unless it was changed since bootstrap.
I'd recommend to set the directory explicitly if unsure.

Show
Stanislav Malyshev added a comment - By default it's relative to the current directory, which usually would be bootstrap directory unless it was changed since bootstrap. I'd recommend to set the directory explicitly if unsure.

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: