Install php apache2 phpmyadmin
sudo apt update
sudo apt install apache2
sudo systemctl start apache2
sudo systemctl enable apache2
sudo apt install mysql-server
sudo mysql_secure_installation
sudo apt install php libapache2-mod-php php-mysql
echo "<?php phpinfo(); ?>" | sudo tee /var/www/html/info.php
http://your_server_ip/info.php
Open a web browser and navigate to .You
sudo apt install phpmyadmin
sudo ln -s /usr/share/phpmyadmin /var/www/html/phpmyadmin
sudo systemctl restart apache2
http://your_server_ip/phpmyadminin your
Access phpMyAdmin by going to
Install OpenSSH Server
sudo apt update
sudo apt install openssh-server
sudo systemctl status ssh
sudo systemctl start ssh
sudo systemctl enable ssh
Find Your Server’s IP Address on linux
ip a
ip addr show
ssh username@server_ip_address
Install FTP / Cron job / https
udo apt update
s
sudo apt install vsftpd
sudo nano /etc/vsftpd.conf
local_enable=YES
write_enable=YES
chroot_local_user=YES
#
sudo systemctl restart vsftpd
Install tcpdf
1 . ownload tcpdf from github
D
2. Unzip and upload to /var/www/html/[folder of the project]
3. Use sudo to install font
4. Download font upload to tcpdf/fonts
tep 1: Check the Font Path
S
Ensure that the font file is correctly placed in the fonts directory. Run the
following command to check if THSarabunNew.ttf exists:
ls /var/www/pdf/tcpdf/fonts/THSarabunNew.ttf
If it doesn't exist, move the file to the fonts directory:
mv /path/to/THSarabunNew.ttf /var/www/pdf/tcpdf/fonts/
tep 2: Run the Font Conversion Command
S
Navigate to your TCPDF directory and run the tcpdf_addfont.php script:
d /var/www/pdf/tcpdf
c
php tcpdf_addfont.php fonts/THSarabunNew.ttf
tep 3: Check for Errors
S
If you're still encountering the same error, try running the command with
more specific arguments:
php tcpdf_addfont.php -i fonts/THSarabunNew.ttf -o fonts/
This command should explicitly tell TCPDF to convert and install the font.
tep 4: Check Output in Fonts Directory
S
Once this command runs, check if TCPDF generated the corresponding font
files (e.g., THSarabunNew.php or .z files) in the fonts directory:
ls /var/www/pdf/tcpdf/fonts/
tep 5: Update Your PHP Script
S
If the font files are generated, update your PHP code to use the newly added
font:
$pdf->SetFont('THSarabunNew', '', 12);
tep 6: Ensure Permissions
S
If the issue persists, there might be permission issues. Set the necessary
permissions for the fonts directory:
sudo chmod -R 755 /var/www/pdf/tcpdf/fonts