check installed modules yum list installed | grep -i php
service httpd restart
service php-fpm restart
Linux Tutorial and something else…..
I don't know what's the matter with people: they don't learn by understanding, they learn by some other way — by rote or something. Their knowledge is so fragile! (Feynman)
check installed modules yum list installed | grep -i php
service httpd restart
service php-fpm restart
Look up the following inside your script file
phpinfo();
If you can’t find Soap Client
set to enabled
like so:
run for Webstatic repository to install if it’s not present
yum install php70w-soap
Do the following:
php.ini
in your apache bin folder, I.e /etc/php.ini
;
from the beginning of extension=php_soap.so it is present
phpinfo();
again and check if you see a similar picture to the one aboveTo use soap for this roundcube plugin
Assuming you have already installed Roundcube and ISPConfig 3, follow the instructions below. If not, please download and install Roundcube from http://www.roundcube.net/ and ISPConfig 3 from http://www.ispconfig.org/.
Go to your ISPConfig panel and add a new remote user: Tab “System” > “Remote Users”
Tick the checkbox Remote Access and activate the following functions:
Download the latest plugin package for Roundcube. You can either install the files from a ZIP archive or use a version management system, such as Git or Subversion (SVN). Using Git or SVN seems favorable since they feature commands to easily update the plugin package.
As a starting point for any variant, make sure you are located in the Roundcube root directory before executing the listed commands. Also, make sure not to miss the trailing ‘.’ (period) when copying the commands. It causes the plugin folders to be fetched to the current directory (and omits the creation of an undesired extra folder).
cd plugins
git clone https://github.com/w2c/ispconfig3_roundcube.git .
cd plugins
git pull origin master
cd plugins
svn co https://github.com/w2c/ispconfig3_roundcube/trunk/ .
cd plugins
svn up .
Download the most recent version from: https://github.com/w2c/ispconfig3_roundcube/archive/master.zip
Extract the content of the ispconfig3_roundcube-master
folder in the ZIP file to the plugins
directory of your Roundcube installation.
Copy the file ./ispconfig3_account/config/config.inc.php.dist
to ./ispconfig3_account/config/config.inc.php
.
In the newly created config file (./ispconfig3_account/config/config.inc.php
) replace the sample values with your individual settings:
$config['identity_limit'] = false;
$config['remote_soap_user'] = '{REMOTE USERNAME}';
$config['remote_soap_pass'] = '{REMOTE PASSWORD}';
$config['soap_url'] = 'https://{YOUR SERVER}:8080/remote/';
$config['soap_validate_cert'] = true;
Change the port (set to “8080” by default) if necessary. If your ISPConfig installation is using a self-signed server certificate (= not issued by a public CA, such as Letsencrypt), you might have to set soap_validate_cert
to false
. Otherwise, if the certificate is not trusted, you will see the error message “Soap Error: Could not connect to host“.
For example, if your username is “Santa”, your password is “Claus”, your server’s domain is “christmas.com” (or you can use an IP address). If your ISPConfig panel can be accessed via port 1111 and you are using TLS with a trusted certificate, your configuration would be:
$config['identity_limit'] = false;
$config['remote_soap_user'] = 'Santa';
$config['remote_soap_pass'] = 'Claus';
$config['soap_url'] = 'https://christmas.com:1111/remote/';
$config['soap_validate_cert'] = true;
In the config file of Roundcube look for this line:
// List of active plugins (in plugins/ directory)
$config['plugins'] = array();
If there are already plugins listed, add the following to the array:
, "jqueryui", "ispconfig3_account", "ispconfig3_autoreply", "ispconfig3_autoselect", "ispconfig3_pass", "ispconfig3_spam", "ispconfig3_fetchmail", "ispconfig3_filter", "ispconfig3_forward", "ispconfig3_wblist"
!! The jqueryui
plugin has to be listed prior to the ISPConfig3 plugins !! !! If you are just using one server for mail, do not activate the autoselect
plugin !!
Otherwise, if there are no plugins yet, replace the line with the following:
// List of active plugins (in plugins/ directory)
$config['plugins'] = array("jqueryui", "ispconfig3_account", "ispconfig3_autoreply", "ispconfig3_autoselect", "ispconfig3_pass", "ispconfig3_spam", "ispconfig3_fetchmail", "ispconfig3_filter", "ispconfig3_forward", "ispconfig3_wblist");
Any plugins you want to be inactive, have to be removed from this line. For instance, if you do not wish to have “ispconfig3_pass” (password changer) enabled, you have to omit it. The entire line would then look like this:
// List of active plugins (in plugins/ directory)
$config['plugins'] = array("jqueryui", "ispconfig3_account", "ispconfig3_autoreply", "ispconfig3_autoselect", "ispconfig3_spam", "ispconfig3_fetchmail", "ispconfig3_filter", "ispconfig3_forward", "ispconfig3_wblist");
A new tab named “Accounts” should now be visible on your settings page in Roundcube, displaying all plugins enabled in step 6.
PS: If you encounter any issue, look here: Troubleshooting / FAQ
This is solution for CentOS 6.x and 7.x:
yum install epel-release
then install Remi repo, for Centos 6.x:
rpm -Uvh http://rpms.remirepo.net/enterprise/remi-release-6.rpm
and for Centos 7.x:
rpm -Uvh http://rpms.remirepo.net/enterprise/remi-release-7.rpm
or for webstatic rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
check which PHP packages installed:
yum list installed php*
remove current PHP:
yum remove php*
install same packages as were installed for 7.0 using PHP 7.2, for example:
yum install --enablerepo=remi-php72 php php-mcrypt php-cli php-gd php-curl php-mysql php-ldap php-zip php-fileinfo
or for webstatic
yum install php72w php72w-cli php72w-common php72w-gd php72w-intl php72w-mbstring php72w-mcrypt php72w-mysql php72w-pdo php72w-pear php72w-process php72w-xml
check version of PHP installed:
php -v
You don’t need to PHP 7.0 and 7.2 coexist on Your server. If You got a problem using PHP 7.2 You can always reinstall older PHP 7.0. If not sure it will work for You on production server, try it on virtual machine first. But it worked for me on many production servers. PHP is not critical OS component, so server will never fail if PHP changed. It’s just Your web app which may fail when change to 7.2, but as I wrote it’s unlikely and You may reinstall older version if it happens.
I forgot about php.ini. If You want to keep Your php.ini customizations in another PHP version, make a copy of php.ini before running yum remove php*. After PHP reinstall diff saved_php.ini php.ini and look what is need to be merged.
I have the following mysql query in php:
<?php
$con=mysqli_connect("localhost","root","password", "my_db");
//Check connection
if (mysqli_connect_errno()) {
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
$query = "SELECT Balance FROM my_table ORDER BY ID DESC LIMIT 1";
$result = mysqli_query($con, $query);
echo $result;
?>
The echo $result does not work and I get a catchable fatal error that mysqli_query cannot be converted into string.
How do I echo my query result?
I believe that is because result is an object and it is expecting a string. Try looking into the fetch command. I believe it would go something like
while($row = mysql_fetch_assoc($result)){
$stringTest = $row['balance'];
echo $stringTest;
}
Something like that!