This article describes how to connect a PHP script to a MySQL database.
PHP
How to Add a PHP Info File to View PHP Settings
This article describes how to add a PHP Info page to easily view PHP settings on you dedicated , cloud, VPS or Shared Hosting server.
How to install LAMP (Linux, Apache, MySql-Maria, PHP) on Debian 11
This article describes How to install LAMP (Linux, Apache, MySql-Maria, PHP) on Debian 11. The first step is to install a Devian server.
Lamp script for CentOS 8
Here is a simple lamp install script for CentOS 8. Check the installation Insert the PHP code below and save the file. [/bash] Then head out to your browser, and type the URL below. Remember to replace the server IP address with your server’s actual IP address. http://server-ip-address/info.php
Using the MutiPHP Editor changes are overwritten for fopen and exec
Recently there was an issue where the fopen and curl function and shell_exec functions were reverting back to original values. Using the MutiPHP Editor was not working. the resolution was that the php-fmp handler was being used on a cpanel server. So the php-fpm config file needed to be changed. The line that needs to … Read more
Use Path to PHP 7 to run a command vs OS PHP
When needing to run a command in a different version on php. Where is the path to php 7 on cpanel? # /opt/cpanel/ea-php70/root/usr/bin/php -v PHP 7.0.32 (cli) (built: Sep 14 2018 20:36:03) ( NTS ) Copyright (c) 1997-2017 The PHP Group Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies How to specify command line command … Read more
How to install SSH2 extension for PHP on Plesk?
Check settings in plesk: Tools and Settings > General > PHP Settings. Click on a php version: Through the OS vendor (CentOS 7 PHP 5.4.16 OS Vendor) Connect to the server via SSH; Install the pre-compiled extension packages: .rpm-based distribution (CloudLinux, CentOS, RHEL): # yum install -y epel-release # yum install -y php-pecl-ssh2 .deb-based distribution … Read more
Error After Upgrade from PHP 5.4 to 5.6 on CentOS
After an upgrade from PHP 5.4 to 5.6, I received an error when I run an app update: Your requirements could not be resolved to an installable set of packages. Problem 1 – This package requires php >=5.6 but your PHP version (5.4.45) does not satisfy that requirement. Issue: The shell cli is currently running … Read more
Replace PHP 5.4 with 5.6 in CentOS 7.x
How to replace php 5.4 with php 5.6. Before installing PHP 5.6, apply any existing updates available for your distribution: # yum check-update # yum update Also, this is a good moment to get (and save somewhere) a list of our installed packages (in case we need to rollback): # rpm -qa |grep php php-mbstring-5.4.16-36.1.el7_2.1.x86_64 … Read more
How to Edit Your php.ini File on cPanel
On systems that run EasyApache 3, the /usr/local/lib/ directory contains your server’s php.ini file. On systems that run EasyApache 4, multiple php.ini and local.ini files manage your system’s PHP. Each version of PHP on your systems uses its own php.ini and local.ini file. You must make changes to each file separately. On systems that run … Read more