I installed Tahoma font using the load_font.php from ttf file it was installed successfully so now I can see the file Tahoma.ufm & Tahoma.ttf inside the folder /vendor/dompdf/dompdf/lib/fonts/
I also checked the file dompdf_font_family_cache.php and found the array installed correctly
'tahoma' =>
array (
'normal' => DOMPDF_FONT_DIR . 'Tahoma',
'bold' => DOMPDF_FONT_DIR . 'Tahoma',
'italic' => DOMPDF_FONT_DIR . 'Tahoma',
'bold_italic' => DOMPDF_FONT_DIR . 'Tahoma',
),
I checked the package I am using configuration file app/config/packages/barryvdh I checked where fonts are stored so they were stored in /storage/fonts which I copied Tahoma.ufm to.
These are the trace steps I took but until now I can't mange to get Tahoma to work on the output file which contains Thai characters that are not showing correctly
What I am missing here?
Related
I have a problem with a file named
storage\logs\laravel.log
From LARAVEL Project Files
The strange thing is that this file is automatically increased in size every day, so I needed to delete it so that the site would not stop working
Do you have a solution to this problem how to stop this file from working automatically
So that the site does not stop because there is no free space
You can change logging driver to daily. This will create new log file daily, with date in file name.
in config/logging.php
'default' => env('LOG_CHANNEL', 'daily'),
'channels' => [
....
'daily' => [
'driver' => 'daily',
'path' => storage_path('logs/laravel.log'),
'level' => env('LOG_LEVEL', 'debug'),
'days' => 14,
],
....
Set the number days that you want log files to keep. After that the old log files will be deleted automatically.
For more information Check the Laravel documentation for Logging.
I want to move some file with
Storage::move('posts/temp/'.$val,'photos/'.$post->id.'/'.$val);
but it gives me the
File not found at path: home/vagrant/Code/......
is there some special configuration to look for? Btw, the file is indeed at the not found path.
You need to add disk() detail that you are using for example if you are using amazon s3 you need to add disk('s3') before move so the code will be:
Storage::disk('s3')->move('posts/temp/'.$val,'photos/'.$post->id.'/'.$val);
I had to change to:
'disks' => [
'local' => [
'driver' => 'local',
'root' => public_path(),
],
I had the same problem. I stored files in storage app folder (Storage/app/temp_files) for finding the files I tried public_path(), storage_path(), url() but none of this worked for me. But at the end using PHP native function rename() its worked like a charm.
Here is my example of how I implement this
rename(storage_path("app\\temp_files\\$fileNames"),storage_path("app\\post\\$fileNames"));
Where the 1st argument is for the old path and 2nd for the new path e.g.
rename($oldPath, $newPath);
Note: rename will be move(delete file from old location) your file
from old location to new location
I have recently upgraded my CS Cart website from 4.2.4 to 4.3.1
We have a custom theme installed so encountered a few issues that we didnt have time to address immediatley - so as per instruction, re ran the restore.
Now we have the following fatal error and I don't really know where to start. I am not much of a dev, but can follow instruction and am quite technically minded.
Thanks for any help in advance.
To fix the assets issue please open the config.local.php file in the root directory and replace:
'custom_files' => array(
'dir' => & $config['dir']['var'],
'prefix' => 'custom_files'
)
with
'custom_files' => array(
'dir' => & $config['dir']['var'],
'prefix' => 'custom_files'
),
'assets' => array(
'dir' => & $config['dir']['cache_misc'],
'prefix' => 'assets',
'cdn' => true
),
This is a very interesting issue. I think the fastest way to resolve it, to contact the official CS-Cart Support Team. If you have a legal license, you have support credits, ask the team to resolve the issue will be free.
Have a Python/fastcgi application that serves web pages (.html) and to download packages (.tar.gz). The problem is that lighttpd (on the host) is not finding the .js and .css files to display the web pages correctly. It seems to be an incorrect url.rewrite-once which is written as:
url.rewrite-once = (
"^/favicon.ico$" => "/assets/favicon.ico",
"^/assets/(.*)$" => "/assets/$1",
"^/(.*)$" => "/$1"
)
Is this correct?
I try to config a program use xhprof.
When I use php-cli mode or php's built in webServer, the callgraph generate image works well.
But When I use nginx+php-fpm, the dot exec at xhprof_generate_image_by_dot blocks forever.
Then I install the pear Image_Graphviz.Write a simple case like this:
require_once 'Image/GraphViz.php';
$img = new Image_GraphViz();
$img->addNode(
'Node1',
array(
'URL' => 'http://link1',
'label' => 'This is a label',
'shape' => 'box'
)
);
$img->image('png');
php's built in webServer can generate png files ok,but php-fpm block at dot exec forever.
So, can anybody help me? What's wrong with this? Here is some relevant machine information:
The OS: OSX
The graphviz version:2.34.0
The App: nginx1.2.8+php-fpm+php5.4.21+xhprof(the latest version from github)
After reboot my machine.Everything turn to right.
Mystery.