Checking System logs

Revision as of 09:33, 22 August 2022 by Admin (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

PHP RELATED AND DEPLOYMENT


Php There are two versions 7.4 And 8.0 Version

if 8.0 Version is not supporting we should remove 8.0 and we need to install 7.4 version.

If we got any error like some dependency packages are missing means we need to install those dependency packages manually.

To find the list of modules we should run below coommand

php –m

we should take the list of modules which are present on the server and we should compare which modules are from the developer machine.

When we are setting up the new project Env and config PHP files will be missed.We have to copy from existing projects.

To work the setup upgrade command we need to install the Composer and then we need to upgrade composer to 1.10 then only the magento commands will work.


CHECKING LOGS BASED ON ISSUES


If something is not opening like phpmyadmin,Webpage,website.It will stores the logs for every actions.We need to check both the success and error logs we will find the difference.

First we need to go to below path

cd /var/log

here we should find logs by using below command

tail –f php7.4-fpm.log

If this command gives the critical alert means website may not works.

To find the particular modules or configuraion files we should have to use locate php.ini and then we should open below file

vi /etc/php/7.4/cli/php.ini

In this above file file we can find maximum load configurations,Maximum Uploads.

For Mysql Related Configurations we can check in /usr/local/etc/mysql/my.cnf. This location is in magento-database server.

We need to verify all the configurations,.if the bind –ip address column if we are giving 0.0.0.0 means we are allowing all the ip address to login into this server .If we want we can give particular ip address also then it will allow only that ip address.

To verify the logs go to below path

cd /var/log/nginx/

and then run below command

tail –f error.log

it will shows error message

And if we want to check the log for php related run below command at cd /var/log

tail –f php7.4-fpm.log

If we want to find the system authentication logs we should go to

cd /var/log

and run below command

tail –f syslog


To Remove Php from server

sudo apt-get purge php7.*

Sudo apt-get autoclean

Sudo apt-get autoremove