using the cssBuilder.php with latest master code

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

using the cssBuilder.php with latest master code

Günter Hipler
Hi,

just another error using the latest master code - I can't find out the
reason for it on the first view, sorry.

I used the util/cssBuilder.php utility and got an error as you can see
in the bottom of this eMail.

The Less component wants to create a cache directory in
/cache/cli/less/
which is not possible because of missing permissions. Is there any new
configuration I haven't seen so far?

Thanks for a hint, Günter


swissbib@ub-sbhp01:/usr/local/vufind/httpvfrd$ php util/cssBuilder.php
Processing bootprint3
     compiling 'compiled.less' into
'/usr/local/vufind/httpvfrd/themes/bootprint3/css/compiled.css'
PHP Warning:  mkdir(): No such file or directory in
/usr/local/vufind/httpvfrd/vendor/oyejorge/less.php/lib/Less/Cache.php
on line 219
PHP Stack trace:
PHP   1. {main}() /usr/local/vufind/httpvfrd/util/cssBuilder.php:0
PHP   2. require_once() /usr/local/vufind/httpvfrd/util/cssBuilder.php:32
PHP   3. Zend\Mvc\Application->run()
/usr/local/vufind/httpvfrd/public/index.php:77
PHP   4. Zend\EventManager\EventManager->trigger()
/usr/local/vufind/httpvfrd/vendor/zendframework/zendframework/library/Zend/Mvc/Application.php:314
PHP   5. Zend\EventManager\EventManager->triggerListeners()
/usr/local/vufind/httpvfrd/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php:205
PHP   6.
call_user_func:{/usr/local/vufind/httpvfrd/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php:444}()
/usr/local/vufind/httpvfrd/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php:444
PHP   7. Zend\Mvc\DispatchListener->onDispatch()
/usr/local/vufind/httpvfrd/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php:444
PHP   8. Zend\Mvc\Controller\AbstractController->dispatch()
/usr/local/vufind/httpvfrd/vendor/zendframework/zendframework/library/Zend/Mvc/DispatchListener.php:93
PHP   9. Zend\EventManager\EventManager->trigger()
/usr/local/vufind/httpvfrd/vendor/zendframework/zendframework/library/Zend/Mvc/Controller/AbstractController.php:118
PHP  10. Zend\EventManager\EventManager->triggerListeners()
/usr/local/vufind/httpvfrd/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php:205
PHP  11.
call_user_func:{/usr/local/vufind/httpvfrd/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php:444}()
/usr/local/vufind/httpvfrd/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php:444
PHP  12. Zend\Mvc\Controller\AbstractActionController->onDispatch()
/usr/local/vufind/httpvfrd/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php:444
PHP  13. VuFindConsole\Controller\UtilController->cssbuilderAction()
/usr/local/vufind/httpvfrd/vendor/zendframework/zendframework/library/Zend/Mvc/Controller/AbstractActionController.php:82
PHP  14. VuFindTheme\LessCompiler->compile()
/usr/local/vufind/httpvfrd/module/VuFindConsole/src/VuFindConsole/Controller/UtilController.php:613
PHP  15. VuFindTheme\LessCompiler->processTheme()
/usr/local/vufind/httpvfrd/module/VuFindTheme/src/VuFindTheme/LessCompiler.php:120
PHP  16. VuFindTheme\LessCompiler->compileFile()
/usr/local/vufind/httpvfrd/module/VuFindTheme/src/VuFindTheme/LessCompiler.php:141
PHP  17. Less_Cache::Get()
/usr/local/vufind/httpvfrd/module/VuFindTheme/src/VuFindTheme/LessCompiler.php:208
PHP  18. Less_Cache::CheckCacheDir()
/usr/local/vufind/httpvfrd/vendor/oyejorge/less.php/lib/Less/Cache.php:65
PHP  19. mkdir()
/usr/local/vufind/httpvfrd/vendor/oyejorge/less.php/lib/Less/Cache.php:219
======================================================================
    The application has thrown an exception!
======================================================================
  Less_Exception_Parser
  Less.php cache directory couldn't be created: /cache/cli/less/
----------------------------------------------------------------------
/usr/local/vufind/httpvfrd/vendor/oyejorge/less.php/lib/Less/Cache.php:220
#0
/usr/local/vufind/httpvfrd/vendor/oyejorge/less.php/lib/Less/Cache.php(65):
Less_Cache::CheckCacheDir()
#1
/usr/local/vufind/httpvfrd/module/VuFindTheme/src/VuFindTheme/LessCompiler.php(208):
Less_Cache::Get(Array, Array)
#2
/usr/local/vufind/httpvfrd/module/VuFindTheme/src/VuFindTheme/LessCompiler.php(141):
VuFindTheme\LessCompiler->compileFile('bootprint3', 'compiled.less')
#3
/usr/local/vufind/httpvfrd/module/VuFindTheme/src/VuFindTheme/LessCompiler.php(120):
VuFindTheme\LessCompiler->processTheme('bootprint3')
#4
/usr/local/vufind/httpvfrd/module/VuFindConsole/src/VuFindConsole/Controller/UtilController.php(613):
VuFindTheme\LessCompiler->compile(Array)
#5
/usr/local/vufind/httpvfrd/vendor/zendframework/zendframework/library/Zend/Mvc/Controller/AbstractActionController.php(82):
VuFindConsole\Controller\UtilController->cssbuilderAction()
#6 [internal function]:
Zend\Mvc\Controller\AbstractActionController->onDispatch(Object(Zend\Mvc\MvcEvent))
#7
/usr/local/vufind/httpvfrd/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php(444):
call_user_func(Array, Object(Zend\Mvc\MvcEvent))
#8
/usr/local/vufind/httpvfrd/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php(205):
Zend\EventManager\EventManager->triggerListeners('dispatch',
Object(Zend\Mvc\MvcEvent), Object(Closure))
#9
/usr/local/vufind/httpvfrd/vendor/zendframework/zendframework/library/Zend/Mvc/Controller/AbstractController.php(118):
Zend\EventManager\EventManager->trigger('dispatch',
Object(Zend\Mvc\MvcEvent), Object(Closure))
#10
/usr/local/vufind/httpvfrd/vendor/zendframework/zendframework/library/Zend/Mvc/DispatchListener.php(93):
Zend\Mvc\Controller\AbstractController->dispatch(Object(Zend\Console\Request),
Object(Zend\Console\Response))
#11 [internal function]:
Zend\Mvc\DispatchListener->onDispatch(Object(Zend\Mvc\MvcEvent))
#12
/usr/local/vufind/httpvfrd/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php(444):
call_user_func(Array, Object(Zend\Mvc\MvcEvent))
#13
/usr/local/vufind/httpvfrd/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php(205):
Zend\EventManager\EventManager->triggerListeners('dispatch',
Object(Zend\Mvc\MvcEvent), Object(Closure))
#14
/usr/local/vufind/httpvfrd/vendor/zendframework/zendframework/library/Zend/Mvc/Application.php(314):
Zend\EventManager\EventManager->trigger('dispatch',
Object(Zend\Mvc\MvcEvent), Object(Closure))
#15 /usr/local/vufind/httpvfrd/public/index.php(77):
Zend\Mvc\Application->run()
#16 /usr/local/vufind/httpvfrd/util/cssBuilder.php(32):
require_once('/usr/local/vufi...')
#17 {main}
======================================================================
    Previous Exception(s):



--
UNIVERSITÄT BASEL
Universitätsbibliothek
Günter Hipler
Projekt swissbib
Schönbeinstrasse 18-20
4056 Basel, Schweiz
Tel.: +41 61 267 31 12
Fax: +41 61 267 31 03
E-Mail [hidden email]
URL www.swissbib.org


------------------------------------------------------------------------------
Presto, an open source distributed SQL query engine for big data, initially
developed by Facebook, enables you to easily query your data on Hadoop in a
more interactive manner. Teradata is also now providing full enterprise
support for Presto. Download a free open source copy now.
http://pubads.g.doubleclick.net/gampad/clk?id=250295911&iu=/4140
_______________________________________________
Vufind-tech mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/vufind-tech
Reply | Threaded
Open this post in threaded view
|

Re: using the cssBuilder.php with latest master code

André Lahmann
Hi Günter,

we recently moved the cache setting from config.ini to httpd-vufind.conf
using VUFIND_LOCAL_DIR/cache as default or overriding this by
VUFIND_CACHE_DIR - this might be the reason for the error you are seeing
although I cannot say for sure as we are not using less-compiler.

Here's Demians announcement two weeks ago:

> Hello,
> As mentioned on yesterday’s dev call, I’ve merged the pull request that removes the config.ini cache_dir setting and replaces it with a new environment variable in httpd-vufind.conf:
> https://github.com/vufind-org/vufind/commit/c797cfb1b45a649f9dc85461e77199e25da25c01
> I don’t think many people are taking advantage of this setting, but if you are, you’ll need to adjust your configuration; VuFind will throw an exception to point you in the right direction.
> Please let me know if you have any questions or problems!
> thanks,
> Demian

Hope that helps a bit!

Best,
André


Am 09.11.2015 um 17:22 schrieb Günter Hipler:

> Hi,
>
> just another error using the latest master code - I can't find out the
> reason for it on the first view, sorry.
>
> I used the util/cssBuilder.php utility and got an error as you can see
> in the bottom of this eMail.
>
> The Less component wants to create a cache directory in
> /cache/cli/less/
> which is not possible because of missing permissions. Is there any new
> configuration I haven't seen so far?
>
> Thanks for a hint, Günter
>
>
> swissbib@ub-sbhp01:/usr/local/vufind/httpvfrd$ php util/cssBuilder.php
> Processing bootprint3
>       compiling 'compiled.less' into
> '/usr/local/vufind/httpvfrd/themes/bootprint3/css/compiled.css'
> PHP Warning:  mkdir(): No such file or directory in
> /usr/local/vufind/httpvfrd/vendor/oyejorge/less.php/lib/Less/Cache.php
> on line 219
> PHP Stack trace:
> PHP   1. {main}() /usr/local/vufind/httpvfrd/util/cssBuilder.php:0
> PHP   2. require_once() /usr/local/vufind/httpvfrd/util/cssBuilder.php:32
> PHP   3. Zend\Mvc\Application->run()
> /usr/local/vufind/httpvfrd/public/index.php:77
> PHP   4. Zend\EventManager\EventManager->trigger()
> /usr/local/vufind/httpvfrd/vendor/zendframework/zendframework/library/Zend/Mvc/Application.php:314
> PHP   5. Zend\EventManager\EventManager->triggerListeners()
> /usr/local/vufind/httpvfrd/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php:205
> PHP   6.
> call_user_func:{/usr/local/vufind/httpvfrd/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php:444}()
> /usr/local/vufind/httpvfrd/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php:444
> PHP   7. Zend\Mvc\DispatchListener->onDispatch()
> /usr/local/vufind/httpvfrd/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php:444
> PHP   8. Zend\Mvc\Controller\AbstractController->dispatch()
> /usr/local/vufind/httpvfrd/vendor/zendframework/zendframework/library/Zend/Mvc/DispatchListener.php:93
> PHP   9. Zend\EventManager\EventManager->trigger()
> /usr/local/vufind/httpvfrd/vendor/zendframework/zendframework/library/Zend/Mvc/Controller/AbstractController.php:118
> PHP  10. Zend\EventManager\EventManager->triggerListeners()
> /usr/local/vufind/httpvfrd/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php:205
> PHP  11.
> call_user_func:{/usr/local/vufind/httpvfrd/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php:444}()
> /usr/local/vufind/httpvfrd/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php:444
> PHP  12. Zend\Mvc\Controller\AbstractActionController->onDispatch()
> /usr/local/vufind/httpvfrd/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php:444
> PHP  13. VuFindConsole\Controller\UtilController->cssbuilderAction()
> /usr/local/vufind/httpvfrd/vendor/zendframework/zendframework/library/Zend/Mvc/Controller/AbstractActionController.php:82
> PHP  14. VuFindTheme\LessCompiler->compile()
> /usr/local/vufind/httpvfrd/module/VuFindConsole/src/VuFindConsole/Controller/UtilController.php:613
> PHP  15. VuFindTheme\LessCompiler->processTheme()
> /usr/local/vufind/httpvfrd/module/VuFindTheme/src/VuFindTheme/LessCompiler.php:120
> PHP  16. VuFindTheme\LessCompiler->compileFile()
> /usr/local/vufind/httpvfrd/module/VuFindTheme/src/VuFindTheme/LessCompiler.php:141
> PHP  17. Less_Cache::Get()
> /usr/local/vufind/httpvfrd/module/VuFindTheme/src/VuFindTheme/LessCompiler.php:208
> PHP  18. Less_Cache::CheckCacheDir()
> /usr/local/vufind/httpvfrd/vendor/oyejorge/less.php/lib/Less/Cache.php:65
> PHP  19. mkdir()
> /usr/local/vufind/httpvfrd/vendor/oyejorge/less.php/lib/Less/Cache.php:219
> ======================================================================
>      The application has thrown an exception!
> ======================================================================
>    Less_Exception_Parser
>    Less.php cache directory couldn't be created: /cache/cli/less/
> ----------------------------------------------------------------------
> /usr/local/vufind/httpvfrd/vendor/oyejorge/less.php/lib/Less/Cache.php:220
> #0
> /usr/local/vufind/httpvfrd/vendor/oyejorge/less.php/lib/Less/Cache.php(65):
> Less_Cache::CheckCacheDir()
> #1
> /usr/local/vufind/httpvfrd/module/VuFindTheme/src/VuFindTheme/LessCompiler.php(208):
> Less_Cache::Get(Array, Array)
> #2
> /usr/local/vufind/httpvfrd/module/VuFindTheme/src/VuFindTheme/LessCompiler.php(141):
> VuFindTheme\LessCompiler->compileFile('bootprint3', 'compiled.less')
> #3
> /usr/local/vufind/httpvfrd/module/VuFindTheme/src/VuFindTheme/LessCompiler.php(120):
> VuFindTheme\LessCompiler->processTheme('bootprint3')
> #4
> /usr/local/vufind/httpvfrd/module/VuFindConsole/src/VuFindConsole/Controller/UtilController.php(613):
> VuFindTheme\LessCompiler->compile(Array)
> #5
> /usr/local/vufind/httpvfrd/vendor/zendframework/zendframework/library/Zend/Mvc/Controller/AbstractActionController.php(82):
> VuFindConsole\Controller\UtilController->cssbuilderAction()
> #6 [internal function]:
> Zend\Mvc\Controller\AbstractActionController->onDispatch(Object(Zend\Mvc\MvcEvent))
> #7
> /usr/local/vufind/httpvfrd/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php(444):
> call_user_func(Array, Object(Zend\Mvc\MvcEvent))
> #8
> /usr/local/vufind/httpvfrd/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php(205):
> Zend\EventManager\EventManager->triggerListeners('dispatch',
> Object(Zend\Mvc\MvcEvent), Object(Closure))
> #9
> /usr/local/vufind/httpvfrd/vendor/zendframework/zendframework/library/Zend/Mvc/Controller/AbstractController.php(118):
> Zend\EventManager\EventManager->trigger('dispatch',
> Object(Zend\Mvc\MvcEvent), Object(Closure))
> #10
> /usr/local/vufind/httpvfrd/vendor/zendframework/zendframework/library/Zend/Mvc/DispatchListener.php(93):
> Zend\Mvc\Controller\AbstractController->dispatch(Object(Zend\Console\Request),
> Object(Zend\Console\Response))
> #11 [internal function]:
> Zend\Mvc\DispatchListener->onDispatch(Object(Zend\Mvc\MvcEvent))
> #12
> /usr/local/vufind/httpvfrd/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php(444):
> call_user_func(Array, Object(Zend\Mvc\MvcEvent))
> #13
> /usr/local/vufind/httpvfrd/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php(205):
> Zend\EventManager\EventManager->triggerListeners('dispatch',
> Object(Zend\Mvc\MvcEvent), Object(Closure))
> #14
> /usr/local/vufind/httpvfrd/vendor/zendframework/zendframework/library/Zend/Mvc/Application.php(314):
> Zend\EventManager\EventManager->trigger('dispatch',
> Object(Zend\Mvc\MvcEvent), Object(Closure))
> #15 /usr/local/vufind/httpvfrd/public/index.php(77):
> Zend\Mvc\Application->run()
> #16 /usr/local/vufind/httpvfrd/util/cssBuilder.php(32):
> require_once('/usr/local/vufi...')
> #17 {main}
> ======================================================================
>      Previous Exception(s):
>
>
>

------------------------------------------------------------------------------
Presto, an open source distributed SQL query engine for big data, initially
developed by Facebook, enables you to easily query your data on Hadoop in a
more interactive manner. Teradata is also now providing full enterprise
support for Presto. Download a free open source copy now.
http://pubads.g.doubleclick.net/gampad/clk?id=250295911&iu=/4140
_______________________________________________
Vufind-tech mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/vufind-tech
Reply | Threaded
Open this post in threaded view
|

Re: using the cssBuilder.php with latest master code

Günter Hipler
Thanks for the hint Andre!
I tried to set the a VUFIND_CACHE_DIR variable but this doesn't seem to
work in Console mode.
The Less component wants to write into a /cache/cli/less directory -
which doesn't exist by default of course.
At the moment I don't have enough time - tomorrow there is hopefully
another day. :-)

Günter

On 11/09/2015 05:31 PM, André Lahmann wrote:

> Hi Günter,
>
> we recently moved the cache setting from config.ini to httpd-vufind.conf
> using VUFIND_LOCAL_DIR/cache as default or overriding this by
> VUFIND_CACHE_DIR - this might be the reason for the error you are seeing
> although I cannot say for sure as we are not using less-compiler.
>
> Here's Demians announcement two weeks ago:
>
>> Hello,
>> As mentioned on yesterday’s dev call, I’ve merged the pull request that removes the config.ini cache_dir setting and replaces it with a new environment variable in httpd-vufind.conf:
>> https://github.com/vufind-org/vufind/commit/c797cfb1b45a649f9dc85461e77199e25da25c01
>> I don’t think many people are taking advantage of this setting, but if you are, you’ll need to adjust your configuration; VuFind will throw an exception to point you in the right direction.
>> Please let me know if you have any questions or problems!
>> thanks,
>> Demian
> Hope that helps a bit!
>
> Best,
> André
>
>
> Am 09.11.2015 um 17:22 schrieb Günter Hipler:
>> Hi,
>>
>> just another error using the latest master code - I can't find out the
>> reason for it on the first view, sorry.
>>
>> I used the util/cssBuilder.php utility and got an error as you can see
>> in the bottom of this eMail.
>>
>> The Less component wants to create a cache directory in
>> /cache/cli/less/
>> which is not possible because of missing permissions. Is there any new
>> configuration I haven't seen so far?
>>
>> Thanks for a hint, Günter
>>
>>
>> swissbib@ub-sbhp01:/usr/local/vufind/httpvfrd$ php util/cssBuilder.php
>> Processing bootprint3
>>        compiling 'compiled.less' into
>> '/usr/local/vufind/httpvfrd/themes/bootprint3/css/compiled.css'
>> PHP Warning:  mkdir(): No such file or directory in
>> /usr/local/vufind/httpvfrd/vendor/oyejorge/less.php/lib/Less/Cache.php
>> on line 219
>> PHP Stack trace:
>> PHP   1. {main}() /usr/local/vufind/httpvfrd/util/cssBuilder.php:0
>> PHP   2. require_once() /usr/local/vufind/httpvfrd/util/cssBuilder.php:32
>> PHP   3. Zend\Mvc\Application->run()
>> /usr/local/vufind/httpvfrd/public/index.php:77
>> PHP   4. Zend\EventManager\EventManager->trigger()
>> /usr/local/vufind/httpvfrd/vendor/zendframework/zendframework/library/Zend/Mvc/Application.php:314
>> PHP   5. Zend\EventManager\EventManager->triggerListeners()
>> /usr/local/vufind/httpvfrd/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php:205
>> PHP   6.
>> call_user_func:{/usr/local/vufind/httpvfrd/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php:444}()
>> /usr/local/vufind/httpvfrd/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php:444
>> PHP   7. Zend\Mvc\DispatchListener->onDispatch()
>> /usr/local/vufind/httpvfrd/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php:444
>> PHP   8. Zend\Mvc\Controller\AbstractController->dispatch()
>> /usr/local/vufind/httpvfrd/vendor/zendframework/zendframework/library/Zend/Mvc/DispatchListener.php:93
>> PHP   9. Zend\EventManager\EventManager->trigger()
>> /usr/local/vufind/httpvfrd/vendor/zendframework/zendframework/library/Zend/Mvc/Controller/AbstractController.php:118
>> PHP  10. Zend\EventManager\EventManager->triggerListeners()
>> /usr/local/vufind/httpvfrd/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php:205
>> PHP  11.
>> call_user_func:{/usr/local/vufind/httpvfrd/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php:444}()
>> /usr/local/vufind/httpvfrd/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php:444
>> PHP  12. Zend\Mvc\Controller\AbstractActionController->onDispatch()
>> /usr/local/vufind/httpvfrd/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php:444
>> PHP  13. VuFindConsole\Controller\UtilController->cssbuilderAction()
>> /usr/local/vufind/httpvfrd/vendor/zendframework/zendframework/library/Zend/Mvc/Controller/AbstractActionController.php:82
>> PHP  14. VuFindTheme\LessCompiler->compile()
>> /usr/local/vufind/httpvfrd/module/VuFindConsole/src/VuFindConsole/Controller/UtilController.php:613
>> PHP  15. VuFindTheme\LessCompiler->processTheme()
>> /usr/local/vufind/httpvfrd/module/VuFindTheme/src/VuFindTheme/LessCompiler.php:120
>> PHP  16. VuFindTheme\LessCompiler->compileFile()
>> /usr/local/vufind/httpvfrd/module/VuFindTheme/src/VuFindTheme/LessCompiler.php:141
>> PHP  17. Less_Cache::Get()
>> /usr/local/vufind/httpvfrd/module/VuFindTheme/src/VuFindTheme/LessCompiler.php:208
>> PHP  18. Less_Cache::CheckCacheDir()
>> /usr/local/vufind/httpvfrd/vendor/oyejorge/less.php/lib/Less/Cache.php:65
>> PHP  19. mkdir()
>> /usr/local/vufind/httpvfrd/vendor/oyejorge/less.php/lib/Less/Cache.php:219
>> ======================================================================
>>       The application has thrown an exception!
>> ======================================================================
>>     Less_Exception_Parser
>>     Less.php cache directory couldn't be created: /cache/cli/less/
>> ----------------------------------------------------------------------
>> /usr/local/vufind/httpvfrd/vendor/oyejorge/less.php/lib/Less/Cache.php:220
>> #0
>> /usr/local/vufind/httpvfrd/vendor/oyejorge/less.php/lib/Less/Cache.php(65):
>> Less_Cache::CheckCacheDir()
>> #1
>> /usr/local/vufind/httpvfrd/module/VuFindTheme/src/VuFindTheme/LessCompiler.php(208):
>> Less_Cache::Get(Array, Array)
>> #2
>> /usr/local/vufind/httpvfrd/module/VuFindTheme/src/VuFindTheme/LessCompiler.php(141):
>> VuFindTheme\LessCompiler->compileFile('bootprint3', 'compiled.less')
>> #3
>> /usr/local/vufind/httpvfrd/module/VuFindTheme/src/VuFindTheme/LessCompiler.php(120):
>> VuFindTheme\LessCompiler->processTheme('bootprint3')
>> #4
>> /usr/local/vufind/httpvfrd/module/VuFindConsole/src/VuFindConsole/Controller/UtilController.php(613):
>> VuFindTheme\LessCompiler->compile(Array)
>> #5
>> /usr/local/vufind/httpvfrd/vendor/zendframework/zendframework/library/Zend/Mvc/Controller/AbstractActionController.php(82):
>> VuFindConsole\Controller\UtilController->cssbuilderAction()
>> #6 [internal function]:
>> Zend\Mvc\Controller\AbstractActionController->onDispatch(Object(Zend\Mvc\MvcEvent))
>> #7
>> /usr/local/vufind/httpvfrd/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php(444):
>> call_user_func(Array, Object(Zend\Mvc\MvcEvent))
>> #8
>> /usr/local/vufind/httpvfrd/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php(205):
>> Zend\EventManager\EventManager->triggerListeners('dispatch',
>> Object(Zend\Mvc\MvcEvent), Object(Closure))
>> #9
>> /usr/local/vufind/httpvfrd/vendor/zendframework/zendframework/library/Zend/Mvc/Controller/AbstractController.php(118):
>> Zend\EventManager\EventManager->trigger('dispatch',
>> Object(Zend\Mvc\MvcEvent), Object(Closure))
>> #10
>> /usr/local/vufind/httpvfrd/vendor/zendframework/zendframework/library/Zend/Mvc/DispatchListener.php(93):
>> Zend\Mvc\Controller\AbstractController->dispatch(Object(Zend\Console\Request),
>> Object(Zend\Console\Response))
>> #11 [internal function]:
>> Zend\Mvc\DispatchListener->onDispatch(Object(Zend\Mvc\MvcEvent))
>> #12
>> /usr/local/vufind/httpvfrd/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php(444):
>> call_user_func(Array, Object(Zend\Mvc\MvcEvent))
>> #13
>> /usr/local/vufind/httpvfrd/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php(205):
>> Zend\EventManager\EventManager->triggerListeners('dispatch',
>> Object(Zend\Mvc\MvcEvent), Object(Closure))
>> #14
>> /usr/local/vufind/httpvfrd/vendor/zendframework/zendframework/library/Zend/Mvc/Application.php(314):
>> Zend\EventManager\EventManager->trigger('dispatch',
>> Object(Zend\Mvc\MvcEvent), Object(Closure))
>> #15 /usr/local/vufind/httpvfrd/public/index.php(77):
>> Zend\Mvc\Application->run()
>> #16 /usr/local/vufind/httpvfrd/util/cssBuilder.php(32):
>> require_once('/usr/local/vufi...')
>> #17 {main}
>> ======================================================================
>>       Previous Exception(s):
>>
>>
>>
> ------------------------------------------------------------------------------
> Presto, an open source distributed SQL query engine for big data, initially
> developed by Facebook, enables you to easily query your data on Hadoop in a
> more interactive manner. Teradata is also now providing full enterprise
> support for Presto. Download a free open source copy now.
> http://pubads.g.doubleclick.net/gampad/clk?id=250295911&iu=/4140
> _______________________________________________
> Vufind-tech mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/vufind-tech

--
UNIVERSITÄT BASEL
Universitätsbibliothek
Günter Hipler
Projekt swissbib
Schönbeinstrasse 18-20
4056 Basel, Schweiz
Tel.: +41 61 267 31 12
Fax: +41 61 267 31 03
E-Mail [hidden email]
URL www.swissbib.org


------------------------------------------------------------------------------
Presto, an open source distributed SQL query engine for big data, initially
developed by Facebook, enables you to easily query your data on Hadoop in a
more interactive manner. Teradata is also now providing full enterprise
support for Presto. Download a free open source copy now.
http://pubads.g.doubleclick.net/gampad/clk?id=250295911&iu=/4140
_______________________________________________
Vufind-tech mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/vufind-tech
Reply | Threaded
Open this post in threaded view
|

Re: using the cssBuilder.php with latest master code

Demian Katz
Did you try exporting the variable to your environment for use in command-line mode? i.e.

export VUFIND_CACHE_DIR=/my/preferred/directory
php util/cssBuilder.php

?

(Obviously, the httpd-vufind.conf settings only apply when you're in web mode... but the environment variable should work regardless of how it is set).

- Demian

-----Original Message-----
From: Günter Hipler [mailto:[hidden email]]
Sent: Monday, November 09, 2015 12:01 PM
To: [hidden email]
Subject: Re: [VuFind-Tech] using the cssBuilder.php with latest master code

Thanks for the hint Andre!
I tried to set the a VUFIND_CACHE_DIR variable but this doesn't seem to work in Console mode.
The Less component wants to write into a /cache/cli/less directory - which doesn't exist by default of course.
At the moment I don't have enough time - tomorrow there is hopefully another day. :-)

Günter

On 11/09/2015 05:31 PM, André Lahmann wrote:

> Hi Günter,
>
> we recently moved the cache setting from config.ini to
> httpd-vufind.conf using VUFIND_LOCAL_DIR/cache as default or
> overriding this by VUFIND_CACHE_DIR - this might be the reason for the
> error you are seeing although I cannot say for sure as we are not using less-compiler.
>
> Here's Demians announcement two weeks ago:
>
>> Hello,
>> As mentioned on yesterday’s dev call, I’ve merged the pull request that removes the config.ini cache_dir setting and replaces it with a new environment variable in httpd-vufind.conf:
>> https://github.com/vufind-org/vufind/commit/c797cfb1b45a649f9dc85461e
>> 77199e25da25c01 I don’t think many people are taking advantage of
>> this setting, but if you are, you’ll need to adjust your configuration; VuFind will throw an exception to point you in the right direction.
>> Please let me know if you have any questions or problems!
>> thanks,
>> Demian
> Hope that helps a bit!
>
> Best,
> André
>
>
> Am 09.11.2015 um 17:22 schrieb Günter Hipler:
>> Hi,
>>
>> just another error using the latest master code - I can't find out
>> the reason for it on the first view, sorry.
>>
>> I used the util/cssBuilder.php utility and got an error as you can
>> see in the bottom of this eMail.
>>
>> The Less component wants to create a cache directory in
>> /cache/cli/less/ which is not possible because of missing
>> permissions. Is there any new configuration I haven't seen so far?
>>
>> Thanks for a hint, Günter
>>
>>
>> swissbib@ub-sbhp01:/usr/local/vufind/httpvfrd$ php
>> util/cssBuilder.php Processing bootprint3
>>        compiling 'compiled.less' into
>> '/usr/local/vufind/httpvfrd/themes/bootprint3/css/compiled.css'
>> PHP Warning:  mkdir(): No such file or directory in
>> /usr/local/vufind/httpvfrd/vendor/oyejorge/less.php/lib/Less/Cache.ph
>> p
>> on line 219
>> PHP Stack trace:
>> PHP   1. {main}() /usr/local/vufind/httpvfrd/util/cssBuilder.php:0
>> PHP   2. require_once() /usr/local/vufind/httpvfrd/util/cssBuilder.php:32
>> PHP   3. Zend\Mvc\Application->run()
>> /usr/local/vufind/httpvfrd/public/index.php:77
>> PHP   4. Zend\EventManager\EventManager->trigger()
>> /usr/local/vufind/httpvfrd/vendor/zendframework/zendframework/library/Zend/Mvc/Application.php:314
>> PHP   5. Zend\EventManager\EventManager->triggerListeners()
>> /usr/local/vufind/httpvfrd/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php:205
>> PHP   6.
>> call_user_func:{/usr/local/vufind/httpvfrd/vendor/zendframework/zendf
>> ramework/library/Zend/EventManager/EventManager.php:444}()
>> /usr/local/vufind/httpvfrd/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php:444
>> PHP   7. Zend\Mvc\DispatchListener->onDispatch()
>> /usr/local/vufind/httpvfrd/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php:444
>> PHP   8. Zend\Mvc\Controller\AbstractController->dispatch()
>> /usr/local/vufind/httpvfrd/vendor/zendframework/zendframework/library/Zend/Mvc/DispatchListener.php:93
>> PHP   9. Zend\EventManager\EventManager->trigger()
>> /usr/local/vufind/httpvfrd/vendor/zendframework/zendframework/library
>> /Zend/Mvc/Controller/AbstractController.php:118
>> PHP  10. Zend\EventManager\EventManager->triggerListeners()
>> /usr/local/vufind/httpvfrd/vendor/zendframework/zendframework/library
>> /Zend/EventManager/EventManager.php:205
>> PHP  11.
>> call_user_func:{/usr/local/vufind/httpvfrd/vendor/zendframework/zendf
>> ramework/library/Zend/EventManager/EventManager.php:444}()
>> /usr/local/vufind/httpvfrd/vendor/zendframework/zendframework/library
>> /Zend/EventManager/EventManager.php:444
>> PHP  12. Zend\Mvc\Controller\AbstractActionController->onDispatch()
>> /usr/local/vufind/httpvfrd/vendor/zendframework/zendframework/library
>> /Zend/EventManager/EventManager.php:444
>> PHP  13. VuFindConsole\Controller\UtilController->cssbuilderAction()
>> /usr/local/vufind/httpvfrd/vendor/zendframework/zendframework/library
>> /Zend/Mvc/Controller/AbstractActionController.php:82
>> PHP  14. VuFindTheme\LessCompiler->compile()
>> /usr/local/vufind/httpvfrd/module/VuFindConsole/src/VuFindConsole/Con
>> troller/UtilController.php:613 PHP  15.
>> VuFindTheme\LessCompiler->processTheme()
>> /usr/local/vufind/httpvfrd/module/VuFindTheme/src/VuFindTheme/LessCom
>> piler.php:120 PHP  16. VuFindTheme\LessCompiler->compileFile()
>> /usr/local/vufind/httpvfrd/module/VuFindTheme/src/VuFindTheme/LessCom
>> piler.php:141
>> PHP  17. Less_Cache::Get()
>> /usr/local/vufind/httpvfrd/module/VuFindTheme/src/VuFindTheme/LessCom
>> piler.php:208
>> PHP  18. Less_Cache::CheckCacheDir()
>> /usr/local/vufind/httpvfrd/vendor/oyejorge/less.php/lib/Less/Cache.ph
>> p:65
>> PHP  19. mkdir()
>> /usr/local/vufind/httpvfrd/vendor/oyejorge/less.php/lib/Less/Cache.ph
>> p:219
>> ======================================================================
>>       The application has thrown an exception!
>> ======================================================================
>>     Less_Exception_Parser
>>     Less.php cache directory couldn't be created: /cache/cli/less/
>> ---------------------------------------------------------------------
>> -
>> /usr/local/vufind/httpvfrd/vendor/oyejorge/less.php/lib/Less/Cache.ph
>> p:220
>> #0
>> /usr/local/vufind/httpvfrd/vendor/oyejorge/less.php/lib/Less/Cache.php(65):
>> Less_Cache::CheckCacheDir()
>> #1
>> /usr/local/vufind/httpvfrd/module/VuFindTheme/src/VuFindTheme/LessCompiler.php(208):
>> Less_Cache::Get(Array, Array)
>> #2
>> /usr/local/vufind/httpvfrd/module/VuFindTheme/src/VuFindTheme/LessCompiler.php(141):
>> VuFindTheme\LessCompiler->compileFile('bootprint3', 'compiled.less')
>> #3
>> /usr/local/vufind/httpvfrd/module/VuFindTheme/src/VuFindTheme/LessCompiler.php(120):
>> VuFindTheme\LessCompiler->processTheme('bootprint3')
>> #4
>> /usr/local/vufind/httpvfrd/module/VuFindConsole/src/VuFindConsole/Controller/UtilController.php(613):
>> VuFindTheme\LessCompiler->compile(Array)
>> #5
>> /usr/local/vufind/httpvfrd/vendor/zendframework/zendframework/library/Zend/Mvc/Controller/AbstractActionController.php(82):
>> VuFindConsole\Controller\UtilController->cssbuilderAction()
>> #6 [internal function]:
>> Zend\Mvc\Controller\AbstractActionController->onDispatch(Object(Zend\
>> Mvc\MvcEvent))
>> #7
>> /usr/local/vufind/httpvfrd/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php(444):
>> call_user_func(Array, Object(Zend\Mvc\MvcEvent))
>> #8
>> /usr/local/vufind/httpvfrd/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php(205):
>> Zend\EventManager\EventManager->triggerListeners('dispatch',
>> Object(Zend\Mvc\MvcEvent), Object(Closure))
>> #9
>> /usr/local/vufind/httpvfrd/vendor/zendframework/zendframework/library/Zend/Mvc/Controller/AbstractController.php(118):
>> Zend\EventManager\EventManager->trigger('dispatch',
>> Object(Zend\Mvc\MvcEvent), Object(Closure))
>> #10
>> /usr/local/vufind/httpvfrd/vendor/zendframework/zendframework/library/Zend/Mvc/DispatchListener.php(93):
>> Zend\Mvc\Controller\AbstractController->dispatch(Object(Zend\Console\
>> Request),
>> Object(Zend\Console\Response))
>> #11 [internal function]:
>> Zend\Mvc\DispatchListener->onDispatch(Object(Zend\Mvc\MvcEvent))
>> #12
>> /usr/local/vufind/httpvfrd/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php(444):
>> call_user_func(Array, Object(Zend\Mvc\MvcEvent))
>> #13
>> /usr/local/vufind/httpvfrd/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php(205):
>> Zend\EventManager\EventManager->triggerListeners('dispatch',
>> Object(Zend\Mvc\MvcEvent), Object(Closure))
>> #14
>> /usr/local/vufind/httpvfrd/vendor/zendframework/zendframework/library/Zend/Mvc/Application.php(314):
>> Zend\EventManager\EventManager->trigger('dispatch',
>> Object(Zend\Mvc\MvcEvent), Object(Closure))
>> #15 /usr/local/vufind/httpvfrd/public/index.php(77):
>> Zend\Mvc\Application->run()
>> #16 /usr/local/vufind/httpvfrd/util/cssBuilder.php(32):
>> require_once('/usr/local/vufi...')
>> #17 {main}
>> ======================================================================
>>       Previous Exception(s):
>>
>>
>>
> ----------------------------------------------------------------------
> -------- Presto, an open source distributed SQL query engine for big
> data, initially developed by Facebook, enables you to easily query
> your data on Hadoop in a more interactive manner. Teradata is also now
> providing full enterprise support for Presto. Download a free open
> source copy now.
> http://pubads.g.doubleclick.net/gampad/clk?id=250295911&iu=/4140
> _______________________________________________
> Vufind-tech mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/vufind-tech

--
UNIVERSITÄT BASEL
Universitätsbibliothek
Günter Hipler
Projekt swissbib
Schönbeinstrasse 18-20
4056 Basel, Schweiz
Tel.: +41 61 267 31 12
Fax: +41 61 267 31 03
E-Mail [hidden email]
URL www.swissbib.org


------------------------------------------------------------------------------
Presto, an open source distributed SQL query engine for big data, initially
developed by Facebook, enables you to easily query your data on Hadoop in a
more interactive manner. Teradata is also now providing full enterprise
support for Presto. Download a free open source copy now.
http://pubads.g.doubleclick.net/gampad/clk?id=250295911&iu=/4140
_______________________________________________
Vufind-tech mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/vufind-tech
------------------------------------------------------------------------------
Presto, an open source distributed SQL query engine for big data, initially
developed by Facebook, enables you to easily query your data on Hadoop in a
more interactive manner. Teradata is also now providing full enterprise
support for Presto. Download a free open source copy now.
http://pubads.g.doubleclick.net/gampad/clk?id=250295911&iu=/4140
_______________________________________________
Vufind-tech mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/vufind-tech
Reply | Threaded
Open this post in threaded view
|

Re: using the cssBuilder.php with latest master code

Günter Hipler
Of course - you are right, in console mode you can't expect to see a webserver environment...

Not so nice is the fact, that you have to export a variable any time you start the script with php in console mode. - what is done in our case.
My suggestion: To enhance the php script util/cssBuilder.php with something like this:

$option = getopt("p:");

if (isset($option['p'])) {
    $pathOption = $option['p'];
    putenv("VUFIND_CACHE_DIR=$pathOption");
} else {
    $cacheDir = dirname(__DIR__) . '/local/cache/cli';
    putenv("VUFIND_CACHE_DIR=$cacheDir");
}
require_once __DIR__ . '/../public/index.php';



Using the option:
php util/cssBuilder.php -p'/temp/take/your/path'
Without the option the temp files are stored in local/cache/cli

I gave it a short try and it works for me.

Günter


On 11/09/2015 07:52 PM, Demian Katz wrote:
Did you try exporting the variable to your environment for use in command-line mode? i.e.

export VUFIND_CACHE_DIR=/my/preferred/directory
php util/cssBuilder.php

?

(Obviously, the httpd-vufind.conf settings only apply when you're in web mode... but the environment variable should work regardless of how it is set).

- Demian

-----Original Message-----
From: Günter Hipler [[hidden email]] 
Sent: Monday, November 09, 2015 12:01 PM
To: [hidden email]
Subject: Re: [VuFind-Tech] using the cssBuilder.php with latest master code

Thanks for the hint Andre!
I tried to set the a VUFIND_CACHE_DIR variable but this doesn't seem to work in Console mode.
The Less component wants to write into a /cache/cli/less directory - which doesn't exist by default of course.
At the moment I don't have enough time - tomorrow there is hopefully another day. :-)

Günter

On 11/09/2015 05:31 PM, André Lahmann wrote:
Hi Günter,

we recently moved the cache setting from config.ini to 
httpd-vufind.conf using VUFIND_LOCAL_DIR/cache as default or 
overriding this by VUFIND_CACHE_DIR - this might be the reason for the 
error you are seeing although I cannot say for sure as we are not using less-compiler.

Here's Demians announcement two weeks ago:

Hello,
As mentioned on yesterday’s dev call, I’ve merged the pull request that removes the config.ini cache_dir setting and replaces it with a new environment variable in httpd-vufind.conf:
https://github.com/vufind-org/vufind/commit/c797cfb1b45a649f9dc85461e
77199e25da25c01 I don’t think many people are taking advantage of 
this setting, but if you are, you’ll need to adjust your configuration; VuFind will throw an exception to point you in the right direction.
Please let me know if you have any questions or problems!
thanks,
Demian
Hope that helps a bit!

Best,
André


Am 09.11.2015 um 17:22 schrieb Günter Hipler:
Hi,

just another error using the latest master code - I can't find out 
the reason for it on the first view, sorry.

I used the util/cssBuilder.php utility and got an error as you can 
see in the bottom of this eMail.

The Less component wants to create a cache directory in 
/cache/cli/less/ which is not possible because of missing 
permissions. Is there any new configuration I haven't seen so far?

Thanks for a hint, Günter


swissbib@ub-sbhp01:/usr/local/vufind/httpvfrd$ php 
util/cssBuilder.php Processing bootprint3
       compiling 'compiled.less' into 
'/usr/local/vufind/httpvfrd/themes/bootprint3/css/compiled.css'
PHP Warning:  mkdir(): No such file or directory in 
/usr/local/vufind/httpvfrd/vendor/oyejorge/less.php/lib/Less/Cache.ph
p
on line 219
PHP Stack trace:
PHP   1. {main}() /usr/local/vufind/httpvfrd/util/cssBuilder.php:0
PHP   2. require_once() /usr/local/vufind/httpvfrd/util/cssBuilder.php:32
PHP   3. Zend\Mvc\Application->run()
/usr/local/vufind/httpvfrd/public/index.php:77
PHP   4. Zend\EventManager\EventManager->trigger()
/usr/local/vufind/httpvfrd/vendor/zendframework/zendframework/library/Zend/Mvc/Application.php:314
PHP   5. Zend\EventManager\EventManager->triggerListeners()
/usr/local/vufind/httpvfrd/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php:205
PHP   6.
call_user_func:{/usr/local/vufind/httpvfrd/vendor/zendframework/zendf
ramework/library/Zend/EventManager/EventManager.php:444}()
/usr/local/vufind/httpvfrd/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php:444
PHP   7. Zend\Mvc\DispatchListener->onDispatch()
/usr/local/vufind/httpvfrd/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php:444
PHP   8. Zend\Mvc\Controller\AbstractController->dispatch()
/usr/local/vufind/httpvfrd/vendor/zendframework/zendframework/library/Zend/Mvc/DispatchListener.php:93
PHP   9. Zend\EventManager\EventManager->trigger()
/usr/local/vufind/httpvfrd/vendor/zendframework/zendframework/library
/Zend/Mvc/Controller/AbstractController.php:118
PHP  10. Zend\EventManager\EventManager->triggerListeners()
/usr/local/vufind/httpvfrd/vendor/zendframework/zendframework/library
/Zend/EventManager/EventManager.php:205
PHP  11.
call_user_func:{/usr/local/vufind/httpvfrd/vendor/zendframework/zendf
ramework/library/Zend/EventManager/EventManager.php:444}()
/usr/local/vufind/httpvfrd/vendor/zendframework/zendframework/library
/Zend/EventManager/EventManager.php:444
PHP  12. Zend\Mvc\Controller\AbstractActionController->onDispatch()
/usr/local/vufind/httpvfrd/vendor/zendframework/zendframework/library
/Zend/EventManager/EventManager.php:444
PHP  13. VuFindConsole\Controller\UtilController->cssbuilderAction()
/usr/local/vufind/httpvfrd/vendor/zendframework/zendframework/library
/Zend/Mvc/Controller/AbstractActionController.php:82
PHP  14. VuFindTheme\LessCompiler->compile()
/usr/local/vufind/httpvfrd/module/VuFindConsole/src/VuFindConsole/Con
troller/UtilController.php:613 PHP  15. 
VuFindTheme\LessCompiler->processTheme()
/usr/local/vufind/httpvfrd/module/VuFindTheme/src/VuFindTheme/LessCom
piler.php:120 PHP  16. VuFindTheme\LessCompiler->compileFile()
/usr/local/vufind/httpvfrd/module/VuFindTheme/src/VuFindTheme/LessCom
piler.php:141
PHP  17. Less_Cache::Get()
/usr/local/vufind/httpvfrd/module/VuFindTheme/src/VuFindTheme/LessCom
piler.php:208
PHP  18. Less_Cache::CheckCacheDir()
/usr/local/vufind/httpvfrd/vendor/oyejorge/less.php/lib/Less/Cache.ph
p:65
PHP  19. mkdir()
/usr/local/vufind/httpvfrd/vendor/oyejorge/less.php/lib/Less/Cache.ph
p:219 
======================================================================
      The application has thrown an exception!
======================================================================
    Less_Exception_Parser
    Less.php cache directory couldn't be created: /cache/cli/less/
---------------------------------------------------------------------
-
/usr/local/vufind/httpvfrd/vendor/oyejorge/less.php/lib/Less/Cache.ph
p:220
#0
/usr/local/vufind/httpvfrd/vendor/oyejorge/less.php/lib/Less/Cache.php(65):
Less_Cache::CheckCacheDir()
#1
/usr/local/vufind/httpvfrd/module/VuFindTheme/src/VuFindTheme/LessCompiler.php(208):
Less_Cache::Get(Array, Array)
#2
/usr/local/vufind/httpvfrd/module/VuFindTheme/src/VuFindTheme/LessCompiler.php(141):
VuFindTheme\LessCompiler->compileFile('bootprint3', 'compiled.less')
#3
/usr/local/vufind/httpvfrd/module/VuFindTheme/src/VuFindTheme/LessCompiler.php(120):
VuFindTheme\LessCompiler->processTheme('bootprint3')
#4
/usr/local/vufind/httpvfrd/module/VuFindConsole/src/VuFindConsole/Controller/UtilController.php(613):
VuFindTheme\LessCompiler->compile(Array)
#5
/usr/local/vufind/httpvfrd/vendor/zendframework/zendframework/library/Zend/Mvc/Controller/AbstractActionController.php(82):
VuFindConsole\Controller\UtilController->cssbuilderAction()
#6 [internal function]:
Zend\Mvc\Controller\AbstractActionController->onDispatch(Object(Zend\
Mvc\MvcEvent))
#7
/usr/local/vufind/httpvfrd/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php(444):
call_user_func(Array, Object(Zend\Mvc\MvcEvent))
#8
/usr/local/vufind/httpvfrd/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php(205):
Zend\EventManager\EventManager->triggerListeners('dispatch',
Object(Zend\Mvc\MvcEvent), Object(Closure))
#9
/usr/local/vufind/httpvfrd/vendor/zendframework/zendframework/library/Zend/Mvc/Controller/AbstractController.php(118):
Zend\EventManager\EventManager->trigger('dispatch',
Object(Zend\Mvc\MvcEvent), Object(Closure))
#10
/usr/local/vufind/httpvfrd/vendor/zendframework/zendframework/library/Zend/Mvc/DispatchListener.php(93):
Zend\Mvc\Controller\AbstractController->dispatch(Object(Zend\Console\
Request),
Object(Zend\Console\Response))
#11 [internal function]:
Zend\Mvc\DispatchListener->onDispatch(Object(Zend\Mvc\MvcEvent))
#12
/usr/local/vufind/httpvfrd/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php(444):
call_user_func(Array, Object(Zend\Mvc\MvcEvent))
#13
/usr/local/vufind/httpvfrd/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php(205):
Zend\EventManager\EventManager->triggerListeners('dispatch',
Object(Zend\Mvc\MvcEvent), Object(Closure))
#14
/usr/local/vufind/httpvfrd/vendor/zendframework/zendframework/library/Zend/Mvc/Application.php(314):
Zend\EventManager\EventManager->trigger('dispatch',
Object(Zend\Mvc\MvcEvent), Object(Closure))
#15 /usr/local/vufind/httpvfrd/public/index.php(77):
Zend\Mvc\Application->run()
#16 /usr/local/vufind/httpvfrd/util/cssBuilder.php(32):
require_once('/usr/local/vufi...')
#17 {main}
======================================================================
      Previous Exception(s):



----------------------------------------------------------------------
-------- Presto, an open source distributed SQL query engine for big 
data, initially developed by Facebook, enables you to easily query 
your data on Hadoop in a more interactive manner. Teradata is also now 
providing full enterprise support for Presto. Download a free open 
source copy now.
http://pubads.g.doubleclick.net/gampad/clk?id=250295911&iu=/4140
_______________________________________________
Vufind-tech mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/vufind-tech
--
UNIVERSITÄT BASEL
Universitätsbibliothek
Günter Hipler
Projekt swissbib
Schönbeinstrasse 18-20
4056 Basel, Schweiz
Tel.: +41 61 267 31 12
Fax: +41 61 267 31 03
E-Mail [hidden email]
URL www.swissbib.org


------------------------------------------------------------------------------
Presto, an open source distributed SQL query engine for big data, initially
developed by Facebook, enables you to easily query your data on Hadoop in a 
more interactive manner. Teradata is also now providing full enterprise
support for Presto. Download a free open source copy now.
http://pubads.g.doubleclick.net/gampad/clk?id=250295911&iu=/4140
_______________________________________________
Vufind-tech mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/vufind-tech

-- 
UNIVERSITÄT BASEL
Universitätsbibliothek
Günter Hipler
Projekt swissbib
Schönbeinstrasse 18-20
4056 Basel, Schweiz
Tel.: +41 61 267 31 12 
Fax: +41 61 267 31 03
E-Mail [hidden email]
URL www.swissbib.org

------------------------------------------------------------------------------

_______________________________________________
Vufind-tech mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/vufind-tech
Reply | Threaded
Open this post in threaded view
|

Re: using the cssBuilder.php with latest master code

Demian Katz

Günter,

 

My practice is to create an “env.sh” file for each of my VuFind instances which exports all of the environment variables necessary for running the CLI scripts (VUFIND_HOME, VUFIND_LOCAL_DIR, etc., etc.). Then I simply export that file prior to running CLI tools. I think this approach is easier than having to specify the cache directory on every command line invocation. It’s also worth taking into consideration the fact that we have multiple CLI tools that make use of the cache, and it would be unwieldy to have to implement this extra command line processing on every single script.

 

In fact, one of my goals for VuFind 3.0 is to eliminate all of the CLI .php files we currently have (and the associated custom ZF2 router, which is more than a little hacky) in favor of running all commands through the standard public/index.php (possibly with some convenience shell scripts for the most common tools, to save a little typing).

 

I don’t mean to completely dismiss your suggestion – but I’m reluctant to adopt it for a few different reasons. If you still think your way is best, though, let me know and we can think about this further.

 

- Demian

 

From: Günter Hipler [mailto:[hidden email]]
Sent: Tuesday, November 10, 2015 12:20 PM
To: [hidden email]
Subject: Re: [VuFind-Tech] using the cssBuilder.php with latest master code

 

Of course - you are right, in console mode you can't expect to see a webserver environment...

Not so nice is the fact, that you have to export a variable any time you start the script with php in console mode. - what is done in our case.
My suggestion: To enhance the php script util/cssBuilder.php with something like this:

$option = getopt("p:");
 
if (isset($option['p'])) {
    $pathOption = $option['p'];
    putenv("VUFIND_CACHE_DIR=$pathOption");
} else {
    $cacheDir = dirname(__DIR__) . '/local/cache/cli';
    putenv("VUFIND_CACHE_DIR=$cacheDir");
}
require_once __DIR__ . '/../public/index.php';
 
 
 
Using the option:
php util/cssBuilder.php -p'/temp/take/your/path'
Without the option the temp files are stored in local/cache/cli
 
I gave it a short try and it works for me.
 
Günter

 

On 11/09/2015 07:52 PM, Demian Katz wrote:

Did you try exporting the variable to your environment for use in command-line mode? i.e.
 
export VUFIND_CACHE_DIR=/my/preferred/directory
php util/cssBuilder.php
 
?
 
(Obviously, the httpd-vufind.conf settings only apply when you're in web mode... but the environment variable should work regardless of how it is set).
 
- Demian
 
-----Original Message-----
From: Günter Hipler [[hidden email]] 
Sent: Monday, November 09, 2015 12:01 PM
To: [hidden email]
Subject: Re: [VuFind-Tech] using the cssBuilder.php with latest master code
 
Thanks for the hint Andre!
I tried to set the a VUFIND_CACHE_DIR variable but this doesn't seem to work in Console mode.
The Less component wants to write into a /cache/cli/less directory - which doesn't exist by default of course.
At the moment I don't have enough time - tomorrow there is hopefully another day. :-)
 
Günter
 
On 11/09/2015 05:31 PM, André Lahmann wrote:
Hi Günter,
 
we recently moved the cache setting from config.ini to 
httpd-vufind.conf using VUFIND_LOCAL_DIR/cache as default or 
overriding this by VUFIND_CACHE_DIR - this might be the reason for the 
error you are seeing although I cannot say for sure as we are not using less-compiler.
 
Here's Demians announcement two weeks ago:
 
Hello,
As mentioned on yesterday’s dev call, I’ve merged the pull request that removes the config.ini cache_dir setting and replaces it with a new environment variable in httpd-vufind.conf:
https://github.com/vufind-org/vufind/commit/c797cfb1b45a649f9dc85461e
77199e25da25c01 I don’t think many people are taking advantage of 
this setting, but if you are, you’ll need to adjust your configuration; VuFind will throw an exception to point you in the right direction.
Please let me know if you have any questions or problems!
thanks,
Demian
Hope that helps a bit!
 
Best,
André
 
 
Am 09.11.2015 um 17:22 schrieb Günter Hipler:
Hi,
 
just another error using the latest master code - I can't find out 
the reason for it on the first view, sorry.
 
I used the util/cssBuilder.php utility and got an error as you can 
see in the bottom of this eMail.
 
The Less component wants to create a cache directory in 
/cache/cli/less/ which is not possible because of missing 
permissions. Is there any new configuration I haven't seen so far?
 
Thanks for a hint, Günter
 
 
swissbib@ub-sbhp01:/usr/local/vufind/httpvfrd$ php 
util/cssBuilder.php Processing bootprint3
       compiling 'compiled.less' into 
'/usr/local/vufind/httpvfrd/themes/bootprint3/css/compiled.css'
PHP Warning:  mkdir(): No such file or directory in 
/usr/local/vufind/httpvfrd/vendor/oyejorge/less.php/lib/Less/Cache.ph
p
on line 219
PHP Stack trace:
PHP   1. {main}() /usr/local/vufind/httpvfrd/util/cssBuilder.php:0
PHP   2. require_once() /usr/local/vufind/httpvfrd/util/cssBuilder.php:32
PHP   3. Zend\Mvc\Application->run()
/usr/local/vufind/httpvfrd/public/index.php:77
PHP   4. Zend\EventManager\EventManager->trigger()
/usr/local/vufind/httpvfrd/vendor/zendframework/zendframework/library/Zend/Mvc/Application.php:314
PHP   5. Zend\EventManager\EventManager->triggerListeners()
/usr/local/vufind/httpvfrd/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php:205
PHP   6.
call_user_func:{/usr/local/vufind/httpvfrd/vendor/zendframework/zendf
ramework/library/Zend/EventManager/EventManager.php:444}()
/usr/local/vufind/httpvfrd/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php:444
PHP   7. Zend\Mvc\DispatchListener->onDispatch()
/usr/local/vufind/httpvfrd/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php:444
PHP   8. Zend\Mvc\Controller\AbstractController->dispatch()
/usr/local/vufind/httpvfrd/vendor/zendframework/zendframework/library/Zend/Mvc/DispatchListener.php:93
PHP   9. Zend\EventManager\EventManager->trigger()
/usr/local/vufind/httpvfrd/vendor/zendframework/zendframework/library
/Zend/Mvc/Controller/AbstractController.php:118
PHP  10. Zend\EventManager\EventManager->triggerListeners()
/usr/local/vufind/httpvfrd/vendor/zendframework/zendframework/library
/Zend/EventManager/EventManager.php:205
PHP  11.
call_user_func:{/usr/local/vufind/httpvfrd/vendor/zendframework/zendf
ramework/library/Zend/EventManager/EventManager.php:444}()
/usr/local/vufind/httpvfrd/vendor/zendframework/zendframework/library
/Zend/EventManager/EventManager.php:444
PHP  12. Zend\Mvc\Controller\AbstractActionController->onDispatch()
/usr/local/vufind/httpvfrd/vendor/zendframework/zendframework/library
/Zend/EventManager/EventManager.php:444
PHP  13. VuFindConsole\Controller\UtilController->cssbuilderAction()
/usr/local/vufind/httpvfrd/vendor/zendframework/zendframework/library
/Zend/Mvc/Controller/AbstractActionController.php:82
PHP  14. VuFindTheme\LessCompiler->compile()
/usr/local/vufind/httpvfrd/module/VuFindConsole/src/VuFindConsole/Con
troller/UtilController.php:613 PHP  15. 
VuFindTheme\LessCompiler->processTheme()
/usr/local/vufind/httpvfrd/module/VuFindTheme/src/VuFindTheme/LessCom
piler.php:120 PHP  16. VuFindTheme\LessCompiler->compileFile()
/usr/local/vufind/httpvfrd/module/VuFindTheme/src/VuFindTheme/LessCom
piler.php:141
PHP  17. Less_Cache::Get()
/usr/local/vufind/httpvfrd/module/VuFindTheme/src/VuFindTheme/LessCom
piler.php:208
PHP  18. Less_Cache::CheckCacheDir()
/usr/local/vufind/httpvfrd/vendor/oyejorge/less.php/lib/Less/Cache.ph
p:65
PHP  19. mkdir()
/usr/local/vufind/httpvfrd/vendor/oyejorge/less.php/lib/Less/Cache.ph
p:219 
======================================================================
      The application has thrown an exception!
======================================================================
    Less_Exception_Parser
    Less.php cache directory couldn't be created: /cache/cli/less/
---------------------------------------------------------------------
-
/usr/local/vufind/httpvfrd/vendor/oyejorge/less.php/lib/Less/Cache.ph
p:220
#0
/usr/local/vufind/httpvfrd/vendor/oyejorge/less.php/lib/Less/Cache.php(65):
Less_Cache::CheckCacheDir()
#1
/usr/local/vufind/httpvfrd/module/VuFindTheme/src/VuFindTheme/LessCompiler.php(208):
Less_Cache::Get(Array, Array)
#2
/usr/local/vufind/httpvfrd/module/VuFindTheme/src/VuFindTheme/LessCompiler.php(141):
VuFindTheme\LessCompiler->compileFile('bootprint3', 'compiled.less')
#3
/usr/local/vufind/httpvfrd/module/VuFindTheme/src/VuFindTheme/LessCompiler.php(120):
VuFindTheme\LessCompiler->processTheme('bootprint3')
#4
/usr/local/vufind/httpvfrd/module/VuFindConsole/src/VuFindConsole/Controller/UtilController.php(613):
VuFindTheme\LessCompiler->compile(Array)
#5
/usr/local/vufind/httpvfrd/vendor/zendframework/zendframework/library/Zend/Mvc/Controller/AbstractActionController.php(82):
VuFindConsole\Controller\UtilController->cssbuilderAction()
#6 [internal function]:
Zend\Mvc\Controller\AbstractActionController->onDispatch(Object(Zend\
Mvc\MvcEvent))
#7
/usr/local/vufind/httpvfrd/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php(444):
call_user_func(Array, Object(Zend\Mvc\MvcEvent))
#8
/usr/local/vufind/httpvfrd/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php(205):
Zend\EventManager\EventManager->triggerListeners('dispatch',
Object(Zend\Mvc\MvcEvent), Object(Closure))
#9
/usr/local/vufind/httpvfrd/vendor/zendframework/zendframework/library/Zend/Mvc/Controller/AbstractController.php(118):
Zend\EventManager\EventManager->trigger('dispatch',
Object(Zend\Mvc\MvcEvent), Object(Closure))
#10
/usr/local/vufind/httpvfrd/vendor/zendframework/zendframework/library/Zend/Mvc/DispatchListener.php(93):
Zend\Mvc\Controller\AbstractController->dispatch(Object(Zend\Console\
Request),
Object(Zend\Console\Response))
#11 [internal function]:
Zend\Mvc\DispatchListener->onDispatch(Object(Zend\Mvc\MvcEvent))
#12
/usr/local/vufind/httpvfrd/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php(444):
call_user_func(Array, Object(Zend\Mvc\MvcEvent))
#13
/usr/local/vufind/httpvfrd/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php(205):
Zend\EventManager\EventManager->triggerListeners('dispatch',
Object(Zend\Mvc\MvcEvent), Object(Closure))
#14
/usr/local/vufind/httpvfrd/vendor/zendframework/zendframework/library/Zend/Mvc/Application.php(314):
Zend\EventManager\EventManager->trigger('dispatch',
Object(Zend\Mvc\MvcEvent), Object(Closure))
#15 /usr/local/vufind/httpvfrd/public/index.php(77):
Zend\Mvc\Application->run()
#16 /usr/local/vufind/httpvfrd/util/cssBuilder.php(32):
require_once('/usr/local/vufi...')
#17 {main}
======================================================================
      Previous Exception(s):
 
 
 
----------------------------------------------------------------------
-------- Presto, an open source distributed SQL query engine for big 
data, initially developed by Facebook, enables you to easily query 
your data on Hadoop in a more interactive manner. Teradata is also now 
providing full enterprise support for Presto. Download a free open 
source copy now.
http://pubads.g.doubleclick.net/gampad/clk?id=250295911&iu=/4140
_______________________________________________
Vufind-tech mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/vufind-tech
 
--
UNIVERSITÄT BASEL
Universitätsbibliothek
Günter Hipler
Projekt swissbib
Schönbeinstrasse 18-20
4056 Basel, Schweiz
Tel.: +41 61 267 31 12
Fax: +41 61 267 31 03
E-Mail [hidden email]
URL www.swissbib.org
 
 
------------------------------------------------------------------------------
Presto, an open source distributed SQL query engine for big data, initially
developed by Facebook, enables you to easily query your data on Hadoop in a 
more interactive manner. Teradata is also now providing full enterprise
support for Presto. Download a free open source copy now.
http://pubads.g.doubleclick.net/gampad/clk?id=250295911&iu=/4140
_______________________________________________
Vufind-tech mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/vufind-tech



-- 
UNIVERSITÄT BASEL
Universitätsbibliothek
Günter Hipler
Projekt swissbib
Schönbeinstrasse 18-20
4056 Basel, Schweiz
Tel.: +41 61 267 31 12 
Fax: +41 61 267 31 03
E-Mail [hidden email]
URL www.swissbib.org

------------------------------------------------------------------------------

_______________________________________________
Vufind-tech mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/vufind-tech