CodeIgniter Forums
dx_auth unlink error - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22)
+--- Thread: dx_auth unlink error (/showthread.php?tid=15793)



dx_auth unlink error - El Forum - 02-15-2009

[eluser]bgreene[/eluser]
Hi, just installed dx_auth and i keep getting this message in my log file.
Seems very strange because it writes the images to the folder. can u help please?

ERROR - 2009-02-15 13:28:26 --&gt; Severity: Warning --&gt; unlink(./captcha/fonts) [<a
href='function.unlink'>function.unlink</a>]: Permission denied E:\website\CodeIgniter\application\plugins\dx_captcha_pi.php 258


dx_auth unlink error - El Forum - 02-15-2009

[eluser]brianw1975[/eluser]
Howdy,

The error says it all "Permission denied" - you don't have permission to delete that folder (either your server user account or the webserver daemon). You'll have to ask your sys-admin to change /captcha/fonts to the proper permissions.


dx_auth unlink error - El Forum - 02-15-2009

[eluser]bgreene[/eluser]
Hi, thanks for such a quick reply. I thought unlink was like closefile (as in close file handle), didn't realise it translated to deletefile


dx_auth unlink error - El Forum - 02-16-2009

[eluser]bgreene[/eluser]
Hi, I was still a bit puzzled about the error warning so i looked at it a bit deeper and found that in the section below, the program sees the fonts folder (i have captcha/fonts as it is in the dxauth package) as being an image file and tries to delete it which is why an error occurs. I've cured it by changing the if condition to
" ...and $filename != "index.html" and $filename != "fonts")"

Oh, and my apologies for this getting a thread of its own rather than being in the dxauth thread. I'm a first timer. Won't happen again, mea culpa.

while($filename = @readdir($current_dir)) {
if ($filename != "." and $filename != ".." and $filename != "index.html") {
$name = str_replace(".png", "", $filename);
if (($name + $expiration) < $now) {
@unlink($img_path.$filename);
}
}
}


dx_auth unlink error - El Forum - 11-11-2009

[eluser]Niraj Dave[/eluser]
hello

i think
ERROR - 2009-02-15 13:28:26—> Severity: Warning —> unlink(./captcha/fonts) [function.unlink]: Permission denied E:\website\CodeIgniter\application\plugins\dx_captcha_pi.php 258

this error because of javascript which may be interact with session.

disable javascript in your browser and then refresh and run.

try...!
but still i have a problem with captcha with javaenable.


dx_auth unlink error - El Forum - 11-11-2009

[eluser]brianw1975[/eluser]
Niraj,

Javascript has absolutely nothing to do with it, the problem is a permission problem on the server.


dx_auth unlink error - El Forum - 11-11-2009

[eluser]Niraj Dave[/eluser]
thanks for fast replying...

i have set captcha folder permission by using "chmod 777". but still same problem.

please give solution..


dx_auth unlink error - El Forum - 11-11-2009

[eluser]Niraj Dave[/eluser]
please help...

after disable javascript in browser, captcha works perfact.

but by enable javascript, error is

ERROR - 2009-11-12 08:18:17 --&gt; Severity: Warning --&gt; unlink(./captcha/fonts) [<a href='function.unlink'>function.unlink</a>]: Is a directory html/ci/system/application/plugins/dx_captcha_pi.php 258

ERROR - 2009-11-12 08:18:17 --&gt; Severity: Warning --&gt; unlink(./captcha/.svn) [<a href='function.unlink'>function.unlink</a>]: Is a directory html/ci/system/application/plugins/dx_captcha_pi.php 258

------------
is it really permission problem ?

please give me solution ....


dx_auth unlink error - El Forum - 04-17-2010

[eluser]bema2004sw[/eluser]
[quote author="Niraj Dave" date="1258018565"]please help...

after disable javascript in browser, captcha works perfact.

but by enable javascript, error is

ERROR - 2009-11-12 08:18:17 --&gt; Severity: Warning --&gt; unlink(./captcha/fonts) [<a href='function.unlink'>function.unlink</a>]: Is a directory html/ci/system/application/plugins/dx_captcha_pi.php 258

ERROR - 2009-11-12 08:18:17 --&gt; Severity: Warning --&gt; unlink(./captcha/.svn) [<a href='function.unlink'>function.unlink</a>]: Is a directory html/ci/system/application/plugins/dx_captcha_pi.php 258

------------
is it really permission problem ?

please give me solution ....[/quote]

Find this line:
Code:
if ($filename != "." and $filename != ".." and $filename != "index.html")

And replace with this one:
Code:
if ($filename != "." and $filename != ".." and $filename != "index.html" and $filename != "fonts")