I migrated a website that uses moodle. Now I get this error: "Session handler is misconfigured".
I've checked the server for logs, but I couldn't find anything and I've checked all files permission:
php -v
PHP 5.5.9-1ubuntu4.17 (cli) (built: May 19 2016 19:05:57)
mysql -V
mysql Ver 14.14 Distrib 5.5.49, for debian-linux-gnu (x86_64) using readline 6.3
Any ideea how to solve this kind of issues?
Probably missing memcache module, memcache was the most used cache engine.
Simply (in ubuntu) install in this way:
sudo apt-get install php5-memcached memcached
You also have to start memcached and restart apache2 in this way:
service memcached start
service apache2 restart
Related
I'm on Ubuntu 22.10 and I've done a standard apache and php install with
> sudo apt install apache2
and the default page appears at 127.0.0.1 on a browser. It works! Then I installed mySQL and starting it works
> sudo mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 21
Server version: 8.0.31-0ubuntu2 (Ubuntu)
...
then
> sudo apt install php libapache2-mod-php php-mysql
> php -v
PHP 8.1.7-1ubuntu3.1 (cli) (built: Nov 2 2022 13:39:03) (NTS)
...
Now, I create an info.php
<?php
phpinfo();
?>
in /var/www/html/ and try to see it in my browser at 127.0.0.1/info.php and all I get back is the text itself
Obviously php is not engaging. Any ideas what I'm doing wrong?
Just found this post (ERROR: Module php7.0 does not exist!) and it works for 8.1. I followed the first, most popular answer (many others were similar) and restarted apache. Success.
I'm trying to use pthreads but for this i hafe to install the pthread php extention.
My server is already setup with php 7.0 and as I read whats the best way to use it is i found this https://gist.github.com/emiglobetrotting/4663ffc4484e9384a261#file-php7_zts_pthreads-sh-L95
This is a manual how to compile ur own php version with Thread Safety enabled
i did this and now if I run
php -v
it show me the correct php version:
PHP 7.3.0-dev (cli) (built: May 7 2018 09:54:09) ( ZTS DEBUG )
but if i run phpinfo on my Apache I found:
PHP Version 7.0.28-0ubuntu0.16.04.1
So now i look for a way to change this in my apache config but what ever i try it leads me to the same problem:
I need a module that i can enable.
So my question is how could i change my apache to the correct version or how can i create/install a module to use the new php version?
You can do this by following commands.
sudo a2dismod php7.3.0-dev ; // To disable a PHP 7.3.0-dev version
sudo a2enmod php7.0 ; // To enable a PHP 7.0 version
sudo service apache2 restart // then restart apache
I'm trying to create a connection from my PHP application to Memcache, however I keep getting the error 'Could not establish Memcached connection'.
Here's my package version information
Laravel Version: 5.0.32
PHP Version:5.4.39-0+deb7u2
Database Driver & Version:mysql Ver 14.14 Distrib 5.5.31
Server&Version :Debian:7.1.
-memcached:1.4.13-0.2
-php5-memcached:2.0.1-6
I have ensured that memcached is running, as executing service memcached status yields "memcached is running".
I have two servers where my project is deployed:
ubuntu, with memcached:2.1.0 installed
debian, with memcached:2.0.1 installed
Is there a version conflict?
Fixed by myself.
My solution as follow:
1.delete memcache file and apc file in config dir
2.restart php5-fpm and memcached service.
Although issue is fixed, but I'm still not figure out why it was triggered.
This issue only occurs on the server with Debian os installed rather than the other server which with ubuntu os installed.
Hope help somebody~
i solved the problem with
sudo apt-get install memcached
sudo service memcached status
sudo service memcached start
You need to first install memcached :
sudo apt install memcached
Then you need to start it :
sudo service memcached start
After that it will connect. I resolve it by above step in my case.
I have PHP 5.3 and MYSQL 5.1 installed on centos.
PHP uses SQLite as default, how can I configure PHP to use MYSQL instead?
if drupal doesnt recognize mysql as valid database backend, then your mysql doesnt seem to be installed correctly. try
yum install mysql mysql-server php-mysql
chkconfig --levels 235 mysqld on
/etc/init.d/mysqld start
mysql_secure_installation
and restart apache with
/etc/init.d/httpd restart
then try again to configure drupal.
I am trying to use the normalizer_normalize() function introduced in PHP 5.3 (says the doc), however I can't use it:
$ php -r 'echo normalizer_normalize("tést");'
PHP Fatal error: Call to undefined function normalizer_normalize()
in Command line code on line 1
I've checked my PHP version but it's 5.3:
$ php --version
PHP 5.3.6 (cli) (built: Sep 12 2011 18:02:42)
I don't understand why PHP can't find it?
Normalizer is part of the intl extension. While it's built by default, that does not necessarily mean that the specific version of PHP that you are using has it installed or enabled by default.
If you're getting your PHP version from your operating system, check to see if the package manager has a package named php-intl. If not, check for php-pecl-intl. If you're using RHEL/CentOS/Scientific Linux 5.x, also look for php53-intl.
I wanted to give a modern, up-to-date answer, as things seem to have changed a bit since 2012. Using Ubuntu 20.04 and PHP8.1, I was able to get this to work with just...
sudo apt-get install php8.0-intl
Don't forget to do a full apache restart afterwards (either one of these should do it)...
systemctl restart apache2
/etc/init.d/apache2 restart
In addition, this automatically installed the updated 8.1-version...
root# dpkg --list | grep 'intl'
ii php8.0-intl 1:8.0.21-2+ubuntu20.04.1+deb.sury.org+1 amd64 Internationalisation module for PHP
ii php8.1-intl 8.1.8-1+ubuntu20.04.1+deb.sury.org+1 amd64 Internationalisation module for PHP