PHP does not have MySQL support enabled PHP does not have MySQL support enabled
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

PHP does not have MySQL support enabled

Started by jccman, January 24, 2016, 01:16:49 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

jccman

Hi,

I am trying to install Coppermine on a Raspberry Pi. I have an error message: 'PHP does not have MySQL support enabled'

I didn't find any relevant information on how to enable it. Any ideas?

My PHP version is 5.2. MySQL version is 5.544.

Thanks

JC

ron4mac

Here is a copy of a message I had posted in the developer section here, giving some explanation of a setup I had done. I'll highlight the items that you probably need to do.

v======v=======v
I used a Raspberry Pi version (arm) from Ubuntu: https://wiki.ubuntu.com/ARM/RaspberryPi

Here is some of the bash history from my setup:
  433  sudo apt-get install lighttpd
  434  sudo apt-get install php5-cgi php5-mysql  <<--- make sure these are installed
  435  mysql
  436  sudo lighty-enable-mod fastcgi
  437  /etc/init.d/lighttpd force-reload
  438  sudo lighty-enable-mod fastcgi-php
  439  /etc/init.d/lighttpd force-reload
  440  sudo service lighttpd force-reload
  441  sudo apt-get mysql-server
  442  sudo apt-get install mysql-server   <<--- make sure to install mysql-server
  443  cd /var/www
  444  ls
  445  vi test.php
  446  sudo pico test.php
  447  shutdown -r now
  448  sudo shutdown -r now
  449  ls
  450  sudo mv cpg1.5.40.zip /var/www
  451  cd /var/www
  452  ls
  453  unzip cpg1.5.40.zip
  454  sudo apt-get install unzip
  455  sudo apt-get install zip
  456  unzip
  457  zip
  458  ls
  459  exit
  460  ls
  461  ls cpg15x
  462  ls cpg15xexit
  463  exit
  464  man rsync
  465  exit
  466  ifconfig
  467  exit
  468  ls
  469  ls cpg15x
  470  sudo mv cpg15x /var/www
  471  cd cpg15x
  472  cd /var/www/cpg15x
  473  ls
  474  cd ..
  475  ls -l
  476  groups
  477  ls -l ..
  478  cd cpg15x
  479  ls
  480  sudo chmos www-data:www-data include
  481  sudo chmod www-data:www-data include    <<--- fix directory permissions
  482  sudo chown www-data:www-data include
  483  sudo chown www-data:www-data albums
  484  sudo chown www-data:www-data albums/userpics
  485  sudo chown www-data:www-data albums/edit
  486  sudo apt-get install imagemagick   <<--- install imagemegick
  487  less include/config.tmp.php
  488  sudo pico install.php
  489  less include/config.tmp.php
  490  cd /var/www/cpg15x
  491  ls
  492  sudo pico install.php
  493  less include/config.tmp.php


I couldn't get zip to work so I had to ftp an entire CPG directory to the Pi.

jccman

Thanks ron4mac. I tried what you suggested, but it seems to be the same.

But at line 481, I got this: chmod: invalid mode: 'www-data:www-data'. But before I had opened all permissions (chmod 777) in the 'www' directory.

I had already installed imagemagick before.

My RPi is not a 2. Only a B I think.

ron4mac

Quote from: jccman on January 24, 2016, 03:24:02 PM
But at line 481, I got this: chmod: invalid mode: 'www-data:www-data'. But before I had opened all permissions (chmod 777) in the 'www' directory.
Yeah, that was just an error on my part (and I pointed to the wrong lines(s) .. should be 482,483,484,485).

Are you running Apache? And did you install (and setup) mysql-server? Did you reboot it for good measure?

ron4mac

#4
Create this file phpinfo.php in your root web directory:
<?php
phpinfo
();
?>



Access it from a web browser: <SITE>/phpinfo.php

Look for indications about MySql support.

Also: Though this is dealing with Wordpress, the information may help you get setup properly with MySql.
https://www.raspberrypi.org/learning/lamp-web-server-with-wordpress/worksheet/