How I can put a SECONDARY PHP in same domain in DIRECT ADMIN ( MOODLE)
Hello boys, i RESOLVED the problem. I suffered until I succeeded, but I succeeded.
I have big work to have two phps running in same domain. An 5.3 and a new 7.0 of MOODLE.
I have installed a moodle 5 and needed a moodle 7
I discovered an article teaching how to install 2 phps in directadmin, so far it was easy. In the control panel I put first php5.3 and second php 7.0
In all website have the same lesson, go to .htaccess and put:
AddHandler application/x-httpd-php70 .php
I try, try, try same times, i try too:
AddHandler application/x-httpd-php7 .php
Few people use directadmin and moodle at the same time, but it's my case, that's what caters me.
But I needed to have an old directory (moodle) and the new one (ava) each with a running version. And the internal DIRECTADMIN option is either one or the other. Then I would have to rename 9000 internal .php files from google to .php70, and even then knowing that it would not work, because moodle uses the "REQUIRE" command.
But what to do?
<FilesMatch "\.(inc|php|phtml|phps|php70)$">
AddHandler "proxy:unix:/usr/local/php70/sockets/
DIRECTADMINUSER.sock|fcgi://localhost" .inc .php .phtml .php70
</FilesMatch>
I locate via shell the file:
/usr/local/directadmin/data/users/
DIRECTADMINUSER/httpd.conf
Look the file inside: <Virtualhost>
....
CustomLog /var/log/httpd/domains/
mywebsiteexample.com.log combined
ErrorLog /var/log/httpd/domains/
mywebsiteexample.error.logrlo.sock|fcgi://localhost" .inc .php .phtml .ph
p56 <Directory /home/carlo/domains/
mywebsiteexample.com/public_html>
<FilesMatch "\.(inc|php|phtml|phps|php56)$">
AddHandler "proxy:unix:/usr/local/php56/sockets/
DIRECTADMINUSER.sock|fcgi://localhost" .inc .php .phtml .ph
p56
</FilesMatch>
<Virtual <FilesMatch "\.(inc|php|phtml|phps|php70)$">
AddHandler "proxy:unix:/usr/local/php70/sockets/
DIRECTADMINUSER.sock|fcgi://localhost" .php70
</FilesMatch>
</Directory>
</VirtualHost>
i take the text inside the <Directory> </Directory> and put its in my .htaccess, like this:
FINALY, my .htaccess file:
<FilesMatch "\.(inc|php|phtml|phps|php70)$">
AddHandler "proxy:unix:/usr/local/php70/sockets/
DIRECTADMINUSER.sock|fcgi://localhost" .inc .php .phtml .php70
</FilesMatch>
Good Luck.
I'm staying here. God bless you all. A big hug!!!
Regards,
Daniel Fernando Ribeiro César -
www.danielcesar.adv.br