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] 2   Go Down

Author Topic: PHP 7.0  (Read 3893 times)

0 Members and 1 Guest are viewing this topic.

luchtzak

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 33
    • Luchtzak Aviation
PHP 7.0
« on: January 10, 2017, 09:12:11 PM »

Got my server upgraded to 7.0 yet coppermine is INOP now.

Any solution ?

Phill Luckhurst

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4368
    • Windsurf.me
Re: PHP 7.0
« Reply #1 on: January 10, 2017, 10:26:17 PM »

Coppermine 1.5.x does not support PHP7. There is available version 1.6.x which is still in beta and does support PHP 7.
Logged
It is a mistake to think you can solve any major problems just with potatoes.

ron4mac

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Posts: 535
Re: PHP 7.0
« Reply #2 on: January 11, 2017, 01:56:28 AM »

Any solution ?

If what you were running was a fairly recent version of CPG1.5.x (say at least version 1.5.38), you should be able to upgrade your installation following these directions: http://forum.coppermine-gallery.net/index.php/topic,78505.msg381584.html#msg381584
[edit: that won't work because you can't log in .. duh]
You'll have to do a manual install of v1.6.01: https://github.com/coppermine-gallery/cpg1.6.x/releases
Logged

Phill Luckhurst

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4368
    • Windsurf.me
Re: PHP 7.0
« Reply #3 on: January 11, 2017, 02:50:10 PM »

Many hosts also allow the possibility to continue running an older version of PHP for specific URLs via either an .htaccess, via the cpanel or via the php.ini. It might be worth speaking to your host if you want to use the upgrade method mentioned above.
Logged
It is a mistake to think you can solve any major problems just with potatoes.

maxhasher

  • Coppermine newbie
  • Offline Offline
  • Posts: 16
Re: PHP 7.0
« Reply #4 on: January 12, 2017, 02:53:21 PM »

I know 1 and 1 will allow you to use older versions of php5 but will add a maintenance fee for doing so.
I have got the 1.6 working on my local box.
Do you think it is more sense just downloading the production gallery tables and albums, converting the tables and then  uploading the code and  tables to replace the existing ones but with the prod passwords in place?

p.s. would you want any test support? I used to be employed as an IT tester.
Logged

ron4mac

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Posts: 535
Re: PHP 7.0
« Reply #5 on: January 12, 2017, 03:05:53 PM »

It makes the most sense to just upgrade your site in the standard way with a fresh copy of CPG 1.6.
Logged

Phill Luckhurst

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4368
    • Windsurf.me
Re: PHP 7.0
« Reply #6 on: January 12, 2017, 04:32:51 PM »

p.s. would you want any test support? I used to be employed as an IT tester.

We always appreciate any contributions from the community. The whole project is community based, the admin team here do it as a hobby. As you know, much of the code, themes, language packs, documentation etc has been contributed by the users. We would love to grow the team and see more people developing as that would really speed things up.
Logged
It is a mistake to think you can solve any major problems just with potatoes.

luchtzak

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 33
    • Luchtzak Aviation
Re: PHP 7.0
« Reply #7 on: January 15, 2017, 11:59:12 PM »

I have the following error code, do I need to change something in the config.php file ?

Code: [Select]
Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /home/luchtzak/domains/luchtzak.be/public_html/pictures/include/database/mysql/dbase.inc.php:29 Stack trace: #0 /home/luchtzak/domains/luchtzak.be/public_html/pictures/include/init.inc.php(173): CPG_Dbase->__construct(Array) #1 /home/luchtzak/domains/luchtzak.be/public_html/pictures/index.php(25): require('/home/luchtzak/...') #2 {main} thrown in /home/luchtzak/domains/luchtzak.be/public_html/pictures/include/database/mysql/dbase.inc.php on line 29

gmc

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 686
    • GMC Design Photo Gallery
Re: PHP 7.0
« Reply #8 on: January 16, 2017, 03:25:01 AM »

Deleted...
« Last Edit: January 16, 2017, 05:26:45 AM by gmc »
Logged
Thanks!
Greg
My Coppermine Gallery
Need a web hosting account? See my gallery for an offer for CPG Forum users.
Send me money

ron4mac

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Posts: 535
Re: PHP 7.0
« Reply #9 on: January 16, 2017, 05:25:03 AM »

I have the following error code, do I need to change something in the config.php file ?

It looks like you are running CGP 1.6 that was configured to access the db via the mysql interface but must have switched to PHP 7 ... where mysql does not work.

In the file include/config.inc.php, change the database type to mysqli.

Code: [Select]
$CONFIG['dbtype'] = 'mysqli'; // Your database type
Logged

luchtzak

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 33
    • Luchtzak Aviation
Re: Re: PHP 7.0
« Reply #10 on: January 16, 2017, 11:21:56 AM »

It looks like you are running CGP 1.6 that was configured to access the db via the mysql interface but must have switched to PHP 7 ... where mysql does not work.

In the file include/config.inc.php, change the database type to mysqli.

Code: [Select]
$CONFIG['dbtype'] = 'mysqli'; // Your database type

Thanks!

www.luchtzak.be/pictures

fashionme

  • Coppermine newbie
  • Country: 00
  • Offline Offline
  • Posts: 1
    • fashion me
Re: PHP 7.0
« Reply #11 on: January 26, 2017, 08:46:11 AM »


I also encountered a similar case and fix it. thanks

maxhasher

  • Coppermine newbie
  • Offline Offline
  • Posts: 16
Re: PHP 7.0
« Reply #12 on: March 07, 2017, 07:31:21 PM »

Quite interesting issue on my development machine
It may affect other users on update if they have been running for a while and have custom themes.
The one I had was based on a 1.5.30 template which currently works on the production site but on the development machine with PHP 7.0.15 it stops the thumbnails working in the display website as the theme.php still contained mysql_num_rows code
This is not a problem if you are logged in to admin as that check was not made.
This may need highlighting to others updating to php7
Logged

Phill Luckhurst

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4368
    • Windsurf.me
Re: PHP 7.0
« Reply #13 on: March 07, 2017, 07:50:35 PM »

Thanks. A lot of work still needs to be done before stable release. Theme and plugin updates are going to be a chore as well as documentation. Which theme are you using?
Logged
It is a mistake to think you can solve any major problems just with potatoes.

maxhasher

  • Coppermine newbie
  • Offline Offline
  • Posts: 16
Re: PHP 7.0
« Reply #14 on: March 07, 2017, 08:36:25 PM »

It was a modified version of curve I think. but 1.5.30
 i just copied everything new in 1.6 Curve except the template.html over to the custom theme and it seems ok.
I will try to make it prettier one day.

1.6 is working pretty well in ubuntu . I have selected the mysqli option as the first time i tried the pdo selection on logging it it gave me some issue. (sorry I cant recall at present. I will try re-installing soon over another backup and use PDO to check)
 I am trying to  see if I can work out how to get it to operate with the login via www.cheshirehash.co.uk in place of logging in again to cpg.
Though I could just set up two users in cpg and do something that way.
Good job so far
Keep it up

 aside from the above I had one or two issues in my code due to the mysql version being 5.0.12 . It defaults to strict mode and doesn't like, for example,  0000-00-00 as default dates. I had to rewrite to NULL. and also go tighter using the ORDER by option in queries
I dont think 1and 1 will be updating soon on mysql version but the fixes to strict model are all backward compatible
Logged

maxhasher

  • Coppermine newbie
  • Offline Offline
  • Posts: 16
Re: PHP 7.0
« Reply #15 on: March 27, 2017, 03:05:39 PM »

On Version Check on the cpg1.6.01
I get the following mandatory file missing for xp_publish.php
It doesn't appear in the distribution on github.
Is it critical?
I also get
js/swfupload/    mandatory        n/a       Mandatory file is missing    
jsjs/swfupload/fileprogress.js    mandatory        n/a       Mandatory file is missing    
jsjs/swfupload/handlers.js    mandatory        n/a       Mandatory file is missing    
jsjs/swfupload/swfupload.js    mandatory        n/a       Mandatory file is missing    
swfjs/swfupload/swfupload.swf    mandatory        n/a       Mandatory file is missing    
jsjs/swfupload/swfupload.queue.js    mandatory        n/a       Mandatory file is missing    
jsjs/swfupload/swfupload.swfobject.js    mandatory     
is this still WIP?
Logged

ron4mac

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Posts: 535
Re: PHP 7.0
« Reply #16 on: March 27, 2017, 06:02:15 PM »

On Version Check on the cpg1.6.01
I get the following mandatory file missing for xp_publish.php
is this still WIP?

You can ignore those.  As you determined, they are no longer a part of the distribution. Thanks much for the feedback ... I'll clean that up.

Though stable, yes, it is still somewhat a Work In Progress (with no workers :-\).
Logged

Phill Luckhurst

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4368
    • Windsurf.me
Re: PHP 7.0
« Reply #17 on: March 27, 2017, 06:44:43 PM »

Sadly Andre is very tied up at the moment. I think I may begin to open up the 1.6 forums for contributors to start getting things in motion.
Logged
It is a mistake to think you can solve any major problems just with potatoes.

ron4mac

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Posts: 535
Re: PHP 7.0
« Reply #18 on: March 27, 2017, 06:49:39 PM »

Sadly Andre is very tied up at the moment. I think I may begin to open up the 1.6 forums for contributors to start getting things in motion.
Great idea!
Logged

maxhasher

  • Coppermine newbie
  • Offline Offline
  • Posts: 16
Re: PHP 7.0
« Reply #19 on: March 27, 2017, 06:49:53 PM »

I have been going through the odd 1.5.54 markers and changing the headers to reflect 1.6.01 and eliminating the old uri to sourceforge. There were only a few.
It all looks fairly tight on behaviour IMO.
After looking at the dev route code I see that the js stuff has been relocated to elsewhere.
I'll keep thrashing around seeing what I can break. ;-)

Logged
Pages: [1] 2   Go Up
 

Page created in 0.081 seconds with 21 queries.