jmr3460 Posted April 19, 2009 Share Posted April 19, 2009 I get a warning when I try and set the admin settings for the Webcalendar 1.2 the warning says: Warning: unlink(/tmp/cf556e7d9a5d3658018d3287e86fccbezB1dat) [function.unlink]: Operation not permitted in /home/crowleys/public_html/calendar/includes/dbi4php.php on line 828 This is the snippet from the script: function dbi_clear_cache () { global $db_connection_info; if ( empty ( $db_connection_info['cachedir'] ) ) return 0; $cnt = 0; $fd = @opendir ( $db_connection_info['cachedir'] ); if ( empty ( $fd ) ) dbi_fatal_error ( translate ( 'Error opening cache dir' ) . ': ' . $db_connection_info['cachedir'] ); $b = 0; while ( false !== ( $file = readdir ( $fd ) ) ) { if ( preg_match ( '/^\S\S\S\S\S\S\S\S\S\S+.dat$/', $file ) ) { // echo 'Deleting ' . $file . '<br />'; $cnt++; $fullpath = $db_connection_info['cachedir'] . '/' . $file; $b += filesize ( $fullpath ); if ( ! unlink ( $fullpath ) ) echo '<!-- ' . translate ( 'Error' ) . ': ' . str_replace ( 'XXX', translate ( 'delete' ), translate ( 'Could not XXX file' ) ) . " $file. -->\n"; // TODO: log this somewhere??? } } return $cnt; } It seems to be an infinite loop, I have to stop the browser from running it. Can anyone help? Is there another function used instead of unlink(). Quote Link to comment https://forums.phpfreaks.com/topic/154714-solved-webcalendar-12-problem/ Share on other sites More sharing options...
jmr3460 Posted April 19, 2009 Author Share Posted April 19, 2009 I just thought about this, Why did this script work when my server was using php 4 but not when the server went to php 5. Has unlink been deprecated? Quote Link to comment https://forums.phpfreaks.com/topic/154714-solved-webcalendar-12-problem/#findComment-813566 Share on other sites More sharing options...
agaston Posted June 18, 2009 Share Posted June 18, 2009 The reason for the error is because it's trying to delete the temp files in the /tmp dir of the server. Which you do not have access to delete those files. I found my solution to be a bit more correct, as the application was designed to have a temp file system. Yes you can comment out the line db_cachedir: But you can also change it to another path. Example: db_cachedir: /home/user/tmp_cal Then CHMOD permissions to 0777 This will let the application do what is was designed to do. Also remember for security reasons do not make db_cachedir: in or after www or public_html Hope this helps others.. -Anthony Quote Link to comment https://forums.phpfreaks.com/topic/154714-solved-webcalendar-12-problem/#findComment-858556 Share on other sites More sharing options...
jmr3460 Posted June 18, 2009 Author Share Posted June 18, 2009 Thanks, yea that is what I finally did. I will have to look into where I have my temp folder. Does anyone know how I can check to see if my send_reminder.php is not sending me my email? I really do not know what it does yet. Can anyone answer these question? Quote Link to comment https://forums.phpfreaks.com/topic/154714-solved-webcalendar-12-problem/#findComment-859173 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.