Advanced search  

News:

cpg1.5.46 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter recently discovered vulnerabilities. It is important that all users who run version cpg1.5.44 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: PHP does not have MySQL support enabled  (Read 2790 times)

0 Members and 1 Guest are viewing this topic.

jccman

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
PHP does not have MySQL support enabled
« on: January 24, 2016, 01:16:49 pm »

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
Logged

ron4mac

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Posts: 668
Re: PHP does not have MySQL support enabled
« Reply #1 on: January 24, 2016, 02:06:17 pm »

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:
Code: [Select]
  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.
Logged

jccman

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: PHP does not have MySQL support enabled
« Reply #2 on: January 24, 2016, 03:24:02 pm »

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.
Logged

ron4mac

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Posts: 668
Re: PHP does not have MySQL support enabled
« Reply #3 on: January 24, 2016, 04:01:13 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?
Logged

ron4mac

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Posts: 668
Re: PHP does not have MySQL support enabled
« Reply #4 on: January 24, 2016, 04:27:29 pm »

Create this file phpinfo.php in your root web directory:
Code: [Select]
<?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/
« Last Edit: January 24, 2016, 04:35:36 pm by ron4mac »
Logged
Pages: [1]   Go Up
 

Page created in 0.015 seconds with 20 queries.