In my log file I am getting this :
Undefined variable: rootDir in /lib/fonts/dompdf_font_family_cache.dist.php on line 69
On dozens of lines. This only happened after I updated to newest dompdf version. Is there something I missed?
Put this code in top of the problematic file dompdf_font_family_cache.dist.php:
$rootDir = dirname(/__FILE__/);
Related
app/design/vendor/theme_name/Magento_Catalog/web/css/source/_module.less in file i have some changes in less file then compilation some error like some variable not define and i try replace file _module.less in to _extend.less file then no error in compilation
i try to add _moduele.less file then
Compilation from source: /var/www/html/magento2demo/vendor/magento/theme-frontend-blank/web/css/styles-m.less
variable #product-name-link__color is undefined in file /var/www/html/magento2demo/var/view_preprocessed/pub/static/frontend/Cogent/Cogent_Theme/en_US/css/source/_extends.less in _extends.less on line 294, column 31
292| > a {
293| .lib-link(
294| #_link-color: #product-name-link__color,
295| #_link-text-decoration: #product-name-link__text-decoration
enter image description here
i try _extend.less then work fineenter image description here
what is diifrence between _extend.less and _module.less and when i use ??/
Diffrenec between _extend.less and _module.less files
_extend.less
we use _extend.less file when you want to use parent CSS and want add more CSS
_module.less
_module.less file is used to when we want to completely newly theme at that case we cannot use previous declare variable. we need to declare that variable again into theme variable file.
You can check more guide into following link
Read more
Am trying to read a .docx file which is inside my project folder via PHP Word library. I have included autoloader like this :
include_once 'vendor/autoload.php'; in my controller.
CODE FOR FUNCTION IN CONTROLLER:
function test_phpword()
{
$a=base_url();
$path=$a."".'123.docx';
$source =$path;
echo date('H:i:s'), " Reading contents from `{$source}`";
$phpWord = \PhpOffice\PhpWord\IOFactory::load($source);
echo write($phpWord, basename(__FILE__, '.php'), $writers);
}
BUT GETTING ERROR LIKE BELOW:
06:18:42 Reading contents from http://localhost/myproject/123.docx
Fatal error: Uncaught Exception: Cannot find archive file. in /opt/lampp/htdocs/myproject/vendor/phpoffice/common/src/Common/XMLReader.php:51
Try this
Change
$path=$a."".'123.docx';
to
$path='123.docx';
And put 123.docx beside your php script file. make sure the two files are in the same place. Run your php script again.
If this helps and works fine you can check the file path and make proper change to your php program.
While loading the path, you have to give relative path to the doc file as shown below,
$random_name = 123.docx;
$contents = \PhpOffice\PhpWord\IOFactory::load('../uploads/'.$random_name);
I don't know whats your $base_url, but it will not work if it is absolute path like http://path/to/doc/file.
I have worked on it and tested. Hope it helps.
I have just started using Laravel and cannot get my head around how it throws errors. It doesn't show the line where the error is so I don't know how to locate it. Can anyone help?
htmlentities() expects parameter 1 to be string, array given (View:
M:\webserver\www\app\views\products\admin\create.blade.php)
This file is incredibly long and I cannot see where this array is being sent.
It's obviously coming from a Form::text() but I am passing a null as the second param in all that I can see. Why doesn't Laravel simply tell me the line that is erroring. The error it puts out is no use to me.
check the error file:
app/storage/logs/laravel.log
you can watch changes in the file (on Mac and *NIX) using command line:
tail -f app/storage/logs/laravel.log
remember that the storage directory must be writable by the webserver/PHP process because it's used as scratch space (for blade views, logs, etc.)
I can't understand why this error occurs. I have a file named hello.rb, it is in "C/Ruby192/bin/hello.rb".
irb(main):005:0>load("hello.rb")
Load Error: no such file to load -- hello.rb
from(irb):5:in`load'
from(irb):5
from C:/Ruby192/bin/irb:12:in`<main>'
I would be very appreciative if you could solve this problem.
From the fine manual:
load(filename, wrap=false) → true
Loads and executes the Ruby program in the file filename. If the filename does not resolve to an absolute path, the file is searched for in the library directories listed in $:.
Your "hello.rb" is not an absolute path so load looks through $: to find it in the library directories. Presumably, 'C/Ruby192/bin' isn't in $: (or '.' isn't in $: if you're in C/Ruby192/bin/ already). Try specifying the full path:
> load('C/Ruby192/bin/hello.rb')
> load('./hello.rb') # If you're in C/Ruby192/bin/ already
I am modifying an existing projects framework, its is a custom JavaScriptCore framework. The JavaScriptCore Export Symbol File is included in the project. How do I properly add a function to the list.
They look cryptic like this:
__ZN3WTF21RefCountedLeakCounterD1Ev
__ZN3WTF23callOnMainThreadAndWaitEPFvPvES0_
__ZN3WTF23dayInMonthFromDayInYearEib
__ZN3WTF23waitForThreadCompletionEjPPv
__ZN3WTF27releaseFastMallocFreeMemoryEv
__ZN3WTF28setMainThreadCallbacksPausedEb
So how do I add function name with the correct prefix and suffix on it?
Is there a tool that I am missing or a step I am missing, nothing seems to change this file, except for me doing it manually?
Thanks in advance.
You can use the Unix command line too nm:
http://compute.cnr.berkeley.edu/cgi-bin/man-cgi?nm
nm will print the symbol table of an binary. Then you can find your method in the list and cut and paste that into your export symbol file.