How to display euro symbol (€) with symfony on centos server - twig

I use the symfony MoneyType field and the twig extension Twig_Extensions_Extension_Intl for display currencies. On my dev computer using Ubuntu, I can see the symbol € but on the prod server, using Centos 6, letters 'eur' are displayed.
I suppose it's due to a missing font, but which one? and how to install?

Maybe you need to install this RPM:
https://www.rpmfind.net/linux/RPM/centos/6.8/i386/Packages/iso-codes-3.16-2.el6.noarch.html
Not certain. Try it.
Edit #2.
In order to find it.
I tried this on my system:
$ yum search iso-codes
Which returns:
iso-codes-devel.noarch : Files for development using iso-codes
iso-codes.noarch : ISO code lists and translations
Thus you could try:
yum install iso-codes
and that might work. My repositories my be setup differently, but try the above command.

Related

Linux download wildcard URL

Using my script I'd like to be able to go to Chef Inspec and download the latest version. However the URL they use has versions. The versions will change and eventually, if I hard code the URL, I won't be getting the latest.
How do I use the wget command with wildcards to always get the latest version and never have to check it?
Here is the URL they offer:
https://packages.chef.io/files/stable/inspec/2.3.4/ubuntu/16.04/inspec_2.3.4-1_amd64.deb
I just want it downloaded and autoinstalled, but when the version changes I'm going to fall behind.
UPDATE: This doesn't answer the question exactly, but works. What I ended up doing was using the Curl command. This gave me the end result needed:
curl https://omnitruck.chef.io/install.sh | sudo bash -s -- -P inspec
You should add their repository to /etc/apt/sources.list. Then you can use apt to update their software.
Chef Software Inc Packages
Debian has a tool called uscan which can download from URLs using wildcards, but this isn't the right tool for installing packages.

Error building a script for linux

I'm trying to build a script for linux to help me each time I install linux from scratch.
The Script have to 1.- Add repositories 2.- Install software from those repositories.
Adding repositories are not the problem, the problem is when i try to install software from this repo.
For the Repo:
sudo add-apt-repository -y ppa:webupd8team/java
After that, the script should make an update, so:
sudo apt-get update
It looks simple, but is not, because I receive an error:
The command Update could not be found.
And so on the rest of the softwares
apt-get -y install oracle-java8-installer
The package oracle-java8-installer couldn't be found..
I really don't know what should I do, nothing looks to work, I gave full rigths to the file and so on... always the same error.
But if I run the command apt-get install direct from the terminal, works without problem..
Any help?
actually I wrote a script in windows to use it in future Linux installations, for some reasons it doesn't work as I want it. Thinking it was a command or misspelled words, I search for a solution, wich didn't help anyways.
Debugging my script in a virtual Machine, I found that the script was giving some random errors like '/r' doesn't support and like that. Really weird because after searching in my script for that line code I didn't find it.
With that in mind, I search again for those errors, and found that for some reasons, if you write your code in a Windows maschine, it save it in a crlf type, wich in a Linux system is interpreted really wrong.
A solution of some users was converting the type from CRLF to LF, wich in linux is using the command dos2unix.
dos2unix filename.sh
After making that and runing my script again everything works perfectly.

Selected the second PHP version, but on the command line it's still the first

I have installed 2 PHP version in my DirectAdmin environment: php5.5 (php1_release) and php7.1 (php2_release). Now I have one user set to php 7.1 with the PHP Versions Selector under Domain Setup. On the website in the browser it seems to work well, phpinfo tells me that php7.1 is running for this domain. But when I use composer from the command line it gives an error because it detects php5.5:
Any ideas how to solve this?
Try compiling with the full path of the php binary - "/usr/local/php70/bin/php70" - instead of just "php". Now command will be like that.
/usr/local/php70/bin/php70 composer.phar update
Important note : PHP binary Path will be different for each server.

Pimcore document tree preview not working

When hovering over the pimcore document tree in the admin panel you get a quick preview of the documents. It's working on pimcore's admin demo page:
https://www.pimcore.org/en/resources/try
But it's not working on 2 different installations i tried, one on windows one on linux. I have seen the option "generate previews" in the document-setting, but it's alreay selected. What can be the problem? Are there other settings or do i need to install something for it?
Edit:
For the assets it's working just fine, i get the preview. But it's not working for the documents.
You must have wkhtmltoimage installed on your system.
In Pimcore backend go to:
Tools > System Info & Tools > System-Requirements Check
wkhtmltoimage must be green.
You have to install wkhtmltoimage, which comes paired with wkhtmltopdf.
I advise to install the Versions from wkhtmltopdf.org. They are up-to-date and work right out of the box since they are statically linked.
On a 64bit Linux box do this:
wget http://download.gna.org/wkhtmltopdf/0.12/0.12.4/wkhtmltox-0.12.4_linux-generic-amd64.tar.xz
tar --directory=/usr/local --strip-components=1 -xvJf wkhtmltox-0.12.4_linux-generic-amd64.tar.xz
Afterwards wkhtmltoimage and wkhtmltopdf are available in /usr/local/bin where Pimcore finds them.
Usually you don't need xvfb anymore with recent builds - except if you run into a wkhtmltopdf - QXcbConnection: Could not connect to display-Error.

Xampp on linux mint

im trying to install xampp on "new" linux mint machine.
However im quite a noob to linux since i havnt used it for that long.
When i try to run the file that ive download from the following page:
Xampp download
i get the following error two errors:
Could not display "/home/marc/Downloads/xampp-linux-x64-1.8.3-0-installer.run".
and if i click yes
Installing mime type handlers isn't supported
To search and install software which can open certain file types you have to install app-install-data.
can anyone tell me what the problem is and how i might fix it?
you need to execute the file (e.g. open a terminal, navigate to your Downloads folder and run bash xampp-linux-x64-1.8.3-0-installer.run (possibly it might need to be run otherwise, but thats my best guess)).
alternatively you might be presented to run/execute the file (instead of displaying it). if so, choose this option.
on the other hand, you might consider installing apache/php/mysql via your package manager.
what you can do is that you can use the chmod +x /your folder location/.run file that you want to install
after that you can run following command
./and your .run file name
example:-
in my case :- User#user~$su root
it will ask for password so give it
User#user~chmod +x /Downloads/xampp-linux-x64-1.8.3-0-installer.run
User#user~./xampp-linux-x64-1.8.3-0-installer.run

Resources