Wednesday 09 February 2011 10:21:24 am
I've finally solved the problem... In class file ezhumancaptchatools.php I've added line with a chmod function and change directory to store token images to storage, also further in the script, it looks like this>
public static function generateImagePath( $encryptedToken )
{
$ini = eZINI::instance('ezhumancaptcha.ini');
$tokenDirectory = eZSys::storageDirectory() . '/'. $ini->variable( 'GeneralSettings', 'TokenCacheDir' ) .'/';
$tokenFormat = $ini->variable( 'CommonCAPTCHASettings', 'TokenFormat' );
if( !eZDir::isWriteable( $tokenDirectory ) )
{
eZDebug::writeNotice( 'Cache subdirectory does not exist, attempting to create', 'eZHumanCAPTCHATools::generateImagePath' );
eZDir::mkdir( $tokenDirectory );
}
$tokenPath = $tokenDirectory.sha1( $encryptedToken ).'.'.$tokenFormat;
chmod( $tokenPath, octdec( eZINI::instance('ezhumancaptcha.ini')->variable( 'CommonCAPTCHASettings','StorageFilePermissions' ) ) );
return $tokenPath; } And in ezhmumancaptha.ini.appen.php I have added under the section CommonCAPTCHASettings this> [CommonCAPTCHASettings] TokenStorageFilePermission=0660 And it works actually, VikTor
|