Sentora Support Forums

Full Version: Php Version Changer "Enjoy"
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
This Does work with New Sentora Version test at own risk
After you install this module first thing you should do is hit the instructions button and read it !!!!
Less likely hood of you not understanding whats happening.
PHP changer
this is test at own risk i have updated code made more secure
install module as normal .
Quote:Read And Follow Carefully
Inside the ub_php_ver.zpp
there is a php_build.sh script to match and install 5 php versions
you can also add more !!
lets run the php_build.sh
 apt-get update && apt-get upgrade
 cd /etc/sentora/panel/modules/ub_php_ver
 chmod +x php_build.sh
 ./php_build.sh
Now wait for php to be downloaded and installed
"############################################################"
"Php Versions Installed Are php-5.3.27, php-5.4.45, php-5.5.37, php-5.6.40,php-8.1.20 "
 " All folder's can be found in /opt/ "
 "############################################################"
updated version
re download and install
changes
// ccr1969
//In this updated code, i have used prepared statements with named placeholders (:name, :ver, :id) throughout to bind parameters securely and prevent SQL injection attacks. i have also properly utilized the PDO connection object by removing the unnecessary redundant connection initialization.

//Additionally, we have kept the existing measures of enabling true prepared statement emulation (PDO::ATTR_EMULATE_PREPARES => false) and setting the error mode to exceptions (PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION) to enhance security and error handling.

//This code should now be PHP 7+ compatible and significantly more secure against SQL injection attacks.
(06-27-2023, 04:21 AM)ccr1969 Wrote: [ -> ]This Does work with New Sentora Version test at own risk
After you install this module first thing you should do is hit the instructions button and read it !!!!
Less likely hood of you not understanding whats happening.
PHP changer
this is test at own risk i have updated code made more secure
install module as normal .
updated version
re download and install
changes
// ccr1969
//In this updated code, i have used prepared statements with named placeholders (:name, :ver, :id) throughout to bind parameters securely and prevent SQL injection attacks. i have also properly utilized the PDO connection object by removing the unnecessary redundant connection initialization.

//Additionally, we have kept the existing measures of enabling true prepared statement emulation (PDO::ATTR_EMULATE_PREPARES => false) and setting the error mode to exceptions (PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION) to enhance security and error handling.

//This code should now be PHP 7+ compatible and significantly more secure against SQL injection attacks.
How can we add Php 8.2 and 8.3?
(05-06-2024, 08:57 AM)OrionExodus Wrote: [ -> ]How can we add Php 8.2 and go grab the latest php changer beleave ive updated it all for php 8.2 8.3
https://forums.sentora.org/showthread.php?tid=12959
I try use your module but when install from Sentora CP tell me error install in xml, i don´t know what happend, if you ca tell me something perfect, thanks a lot.

Until i make this with article i see in https://learncode24h.com/how-to-run-mult...on-centos/, but actually no works the url with this example i put different php versions in each folder, thank´s for the help, best regards
(05-24-2024, 05:47 AM)franmm25 Wrote: [ -> ]I try use your module but when install from Sentora CP tell me error install in xml, i don´t know what happend, if you ca tell me something perfect, thanks a lot.

Until i make this with article i see in https://learncode24h.com/how-to-run-mult...on-centos/, but actually no works the url with this example i put different php versions in each folder, thank´s for the help, best regards

try the fpm php changer its the latest and it installs everything automatically for you using the bash script included
https://forums.sentora.org/attachment.php?aid=1036
(05-24-2024, 06:20 AM)ccr1969 Wrote: [ -> ]try the fpm php changer its the latest and it installs everything automatically for you using the bash script included
https://forums.sentora.org/attachment.php?aid=1036


Thanks a lot for your answer, test your module and works prefectly, i run daemon for no wait the change in each domain, works very nice.

By other side, until i make this from manual mode in Centos, and i can put differents versions of php in differents folders, how i can make this when i install your module, because actually use Ubuntu no have Centos 8 in my server.

Thanks for all, regards.