Advanced search  

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

Pages: 1 [2]   Go Down

Author Topic: PHP7 / MySQLi / PDO support in Coppermine?  (Read 58597 times)

0 Members and 1 Guest are viewing this topic.

ron4mac

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 2026
Re: PHP7 / MySQLi / PDO support in Coppermine?
« Reply #20 on: December 10, 2016, 05:01:21 am »

Error
Releases of CPG not found at Github

Any easy way to fix that or have things moved somewhere else now?
It is still in place and works okay in my test. Your setup may not have allow_url_fopen enabled in your PHP and the extension libcurl is also not loaded. One of these is required for the upgrader to be able to access the 1.6.01 release on Github.
Logged

BillR

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Re: PHP7 / MySQLi / PDO support in Coppermine?
« Reply #21 on: December 10, 2016, 05:22:53 am »

It's ok, It didn't take long to do it manually anyway - I dont use any modifications, so 1.6 works just fine. I guess tommorow I'll copy it into a php7 folder and see how that works.
  I can't thank you guys enough for all the work, coppermine has been my preferred gallery for as long as I can remember...10-12 years maybe?
- Bill
Logged

BillR

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Re: PHP7 / MySQLi / PDO support in Coppermine?
« Reply #22 on: December 10, 2016, 06:48:32 am »

Just a last little comment, works great on php7, I'm a happy camper :)
 Thanks again for the gallery work.
Logged

maxhasher

  • Coppermine newbie
  • Offline Offline
  • Posts: 18
Re: PHP7 / MySQLi / PDO support in Coppermine?
« Reply #23 on: January 11, 2017, 09:57:24 pm »

I managed to get 1.6 in upgraded and running. On first choice for login I made the mistake of selecting pdo:mysql and this added pdomysql in the onit as database option. This is not one of the paths. So I edited back yo mysqli and then everything was happy.
The cookie still registered as 1.5x though.. Excellent work there. But I should be OK with updating on the ISP. Which is recommending php7 for the longer term support.
Logged

Dale M.

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Re: PHP7 / MySQLi / PDO support in Coppermine?
« Reply #24 on: July 14, 2017, 09:59:51 pm »

New here and don't know squat about PHP... But got my gallery killed with  server updating to PHP 7..

It appears  as same error  as DAGGERS  posted on 1-27-16 and it appears there is a FIX in very next posting, but I don't know how to go about it (yes I am php ignorant) but is there a  simple set of step by step procedure  to get the fix to work?. I know its to copy "this" to "that"  in the "whatsit" file but its sort of greek as I am not php programmer or even familiar.. I know it has to be simple, but not for me?.... Thank to anyone who can walk me through it...

Dale M.
Logged

phill104

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4885
    • Windsurf.me
Re: PHP7 / MySQLi / PDO support in Coppermine?
« Reply #25 on: July 14, 2017, 11:11:44 pm »

That fix was a temporary workaround. Best bet now is to upgrade to version 1.6.x, but you may run into a few problems if you were not up to date. Do a search on the forums regarding upgrading to 1.6 and you will find plenty of instruction. Here is one such thread - http://forum.coppermine-gallery.net/index.php/topic,79013.0.html
Logged
It is a mistake to think you can solve any major problems just with potatoes.

Dale M.

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Re: PHP7 / MySQLi / PDO support in Coppermine?
« Reply #26 on: July 14, 2017, 11:55:31 pm »

Been there done that, all I get is error when I try to run "upgrader.php"...

This is error, sort of puts me back to square 1...

Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /home/maripos1/public_html/gallery/include/functions.inc.php:183 Stack trace: #0 /home/maripos1/public_html/gallery/include/init.inc.php(171): cpg_db_connect() #1 /home/maripos1/public_html/gallery/upgrader.php(21): require('/home/maripos1/...') #2 {main} thrown in /home/maripos1/public_html/gallery/include/functions.inc.php on line 183

So far "cpg_install_stub.php" and "upgrader.php" are no go.... And yes I did remove the "txt"  in file name and I did verify I was using proper URL to run file.. Just frustrated...

Dale
Logged

phill104

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4885
    • Windsurf.me
Re: PHP7 / MySQLi / PDO support in Coppermine?
« Reply #27 on: July 15, 2017, 01:41:26 pm »

What version of cpg were you running?
Logged
It is a mistake to think you can solve any major problems just with potatoes.

Dale M.

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Re: Re: PHP7 / MySQLi / PDO support in Coppermine?
« Reply #28 on: July 15, 2017, 03:20:13 pm »

What version of cpg were you running?

Version 1.5.42 according to change log in CPG root directory...

Dale


Logged

phill104

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4885
    • Windsurf.me
Re: PHP7 / MySQLi / PDO support in Coppermine?
« Reply #29 on: July 15, 2017, 03:40:18 pm »

I will leave this in the other thread you have as this appears to be a duplicate of the same issue
Logged
It is a mistake to think you can solve any major problems just with potatoes.

donsenilo

  • Coppermine regular visitor
  • **
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 93
    • Bookmarks (Links), Grafik, Musik, Movies (Filme), DVD's, CD's, Amazon-Shop by Starmaker - Mark Tailor
Re: PHP7 / MySQLi / PDO support in Coppermine?
« Reply #30 on: August 17, 2017, 11:24:30 pm »

For the mysql_connect support in PHP7, there is a library on http://sourceforge.net/projects/mysqlwithmysqli/ (usefull also for other projects and temporarly solutions)

cpg1.5.x has other problems with PHP7 and should not be used with it, altough the galery itself runs with the above mysql solution there are issues to solve in the admin section.
Hi

I had (!) to use PHP7.
I've downloaded the library but what now ? How can I use it ?
Logged

gmc

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 785
    • GMC Design Photo Gallery
Re: PHP7 / MySQLi / PDO support in Coppermine?
« Reply #31 on: August 18, 2017, 03:30:54 am »

As stated in the post you quoted - it won't fix all the errors under PHP7.. Likely best to upgrade to CPG 1.6.

But to use the file you downloaded - you would need to place it in the CPG directory on your server - I would suggest in yourcpgfolder/include directory...
Then open yourcpgfolder/include/init.inc.php and find:
Code: [Select]
require 'include/functions.inc.php';
and insert before it:
Code: [Select]
require 'include/mysql_mysqli.inc.php';
(substitute the file name you saved/uploaded as if different...)

When a mysql_ function is called - it will be defined by this addition - and will call the equivalent (assuming the library is coded correctly - I haven't used or tested it) mysqli function for you and return the result.

Again - there will be other issues with CPG 1.5 and PHP7... These are all resolved in CPG 1.6.
Logged
Thanks!
Greg
My Coppermine Gallery
Need a web hosting account? See my gallery for an offer for CPG Forum users.
Send me money
Pages: 1 [2]   Go Up
 

Page created in 0.023 seconds with 20 queries.