Hi here are few observations,Click Here
I have a php program`
<?php$op=exec('node -v');$op1=exec('which node');echo "Node version : $op";echo "\n Node path : $op1";echo "\nUser : ". get_current_user();?>
`when i run this program from my command line as ubuntu user
Node version : v20.11.1Node path : /home/ubuntu/.nvm/versions/node/v20.11.1/bin/nodeUser : root
when i run this program from command line as root user
Node version : v18.20.0Node path : /root/.nvm/versions/node/v18.20.0/bin/nodeUser : root
and when i run this file from browser
Node version : v10.19.0 Node path : /usr/bin/node User : root
I want the node version used by apache web server also to be set to node 18 or node 20. How can i do that? as i want to use some node modules that are not compatible with node 10. How can i change node js version for apache web server to 18 or 20?