10 Oct 2008
whenever I clear the cache of my browser and view a page in zoop I get this error/warning message:
Warning: "unlink(C:\path\tozoop\/tmp/gui\%%70^701^701FAC35%%SPAP.tpl.php) [function.unlink]: No such file or directory" in file \gui\internals\core.write_file.php (on line 44)
can anyone translate what does that mean? after hitting the refresh button it goes away, only comes back when the cache is cleared or if the page is viewed for the first time. I have been getting this message since 1.3b and I would like to know what I am doing wrong
thanks,
Rax
Can you post the controller code that it is using?
That message should have nothing to do with clearing your browser cache, rather clearing the cache on the server.
This is an atypical experience. It isn't cache so much as the compiled template file from smarty that is missing.
If you post your controller code perhaps we will notice what is out of place.
----------------------------------
Co-Author of Zoop Framework
http://spf13.com
Smarty
This is actually a smarty bug that only occurs on windows. The first time $this->guiDisplay('default.tpl'); is run, smarty tries to delete the nonexistent compiled template(using unlink). On windows, this unlink call throws a warning.
To ignore the error, in the newest version of zoop, you can do:
in your application to make sure that this warning is not displayed.
thanks!
thanks it seemed to work..but the site now displays:
backtrace:
\app\error.php 79 fetch_backtrace () \app\utils.php 1161 mkdir ("C:\xampp\htdocs\test-blue/tmp/cache\forms/processed_table_info", 504) \app\utils.php 1159 mkdirr ("C:\xampp\htdocs\test-blue/tmp/cache\forms/processed_table_info", 504) \cache\zcache_driver_cachelite.php 47 mkdirr ("C:\xampp\htdocs\test-blue/tmp/cache\forms/processed_table_info\") \cache\zcache.php 88 zcache_driver_cachelite->zcache_driver_cachelite (<array>)2nd warning message
Warning: "mkdir() [<a href='function.mkdir'>function.mkdir</a>]: No such file or directory" in file \app\utils.php (on line 1161)backtrace:
\app\error.php 79 fetch_backtrace () \app\utils.php 1161 mkdir ("C:\xampp\htdocs\test-blue/tmp/cache\forms/processed_table_info", 504) \app\utils.php 1159 mkdirr ("C:\xampp\htdocs\test-blue/tmp/cache\forms/processed_table_info", 504) \cache\zcache_driver_cachelite.php 47 mkdirr ("C:\xampp\htdocs\test-blue/tmp/cache\forms/processed_table_info\") \cache\zcache.php 88 zcache_driver_cachelite->zcache_driver_cachelite (<array>)but thanks for the reply! :)
Could I also use this to ignore all the warning messages..for now?
where would I put the code?
<?php function ignore_error($errno, $errstr) { global $_error_ignored; if(!isset($_error_ignored[$errno])) $_error_ignored[$errno][] = $errstr; } ?>only found this at zoop/app/error.php
thanks
mkdirr
Zoop is trying to recursively create C:\xampp\htdocs\test-blue/tmp/cache\forms/processed_table_info. The mixing of / and \ is confusing it, and so it isn't making all the necessary parent directories before making the final directory.
One way to fix this is to create C:\xampp\htdocs\test-blue/tmp/cache\forms manually.
Another is to change the path to look like C:\xampp\htdocs\test-blue/tmp/cache/forms/processed_table_info. To do this you may need to modify your declaration of the constant app_cache_dir to look like:
define_once("app_cache_dir", app_temp_dir . '/cache/');. Generally, you should always use '/' in your paths. PHP will always understand your paths, and you won't have trouble with migrating your application across operating systems.This should help zoop figure out exactly what the path should look like, and create the necessary parent directories.
If you were on linux, I would also suggest you check the permissions on your tmp directory, to make sure the web server user has write permissions. But you're on windows, and windows never seems to care about that.
Where do you place the define for solution 2?
I just went with solution.(manually create the directory) :(
but I would like to make solution 2 work if possible...
uhm where do I place
define_once("app_cache_dir", app_temp_dir . '/cache/');because I think it is already defined under app/cache/defaultConstants.php and app/cache/cache_component.php
and they look exactly the same, my guess is that the "real" definition is at cache_component.php but the trailing '/' seems to be removed and is replaced with '\' instead.
I tried commenting out
<?php function mkdir_r($filename, $mode = 0770) { ////str_replace("\\",'/', $filename); $dir = explode(DIRECTORY_SEPARATOR, $filename); array_pop($dir); $path = implode(DIRECTORY_SEPARATOR, $dir); return mkdirr($path, $mode); } ?>and
<?php function mkdirr($pathname, $mode = 0770) { // eliminate the trailing slash if (substr($pathname, -1) == "/") $pathname = substr($pathname, 0, -1); ?>under app/utils but I guess I was waaayyy off...so uhm yeah I guess approach/solution 1 worked for me but I would also like to make solution 2 work.
For the record I usually develop in linux but as my company uses Windowze and is main lang is C# the PHB doesn't want to dualboot...
and thanks for being patient with me :)
Rax