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: PHP 7.0  (Read 28319 times)

0 Members and 1 Guest are viewing this topic.

luchtzak

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 36
    • Luchtzak Aviation
PHP 7.0
« on: January 10, 2017, 08:12:11 pm »

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

Any solution ?

phill104

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4885
    • Windsurf.me
Re: PHP 7.0
« Reply #1 on: January 10, 2017, 09: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

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 2026
Re: PHP 7.0
« Reply #2 on: January 11, 2017, 12: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

phill104

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4885
    • Windsurf.me
Re: PHP 7.0
« Reply #3 on: January 11, 2017, 01: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: 18
Re: PHP 7.0
« Reply #4 on: January 12, 2017, 01: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

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 2026
Re: PHP 7.0
« Reply #5 on: January 12, 2017, 02: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

phill104

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4885
    • Windsurf.me
Re: PHP 7.0
« Reply #6 on: January 12, 2017, 03: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: 36
    • Luchtzak Aviation
Re: PHP 7.0
« Reply #7 on: January 15, 2017, 10: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: 785
    • GMC Design Photo Gallery
Re: PHP 7.0
« Reply #8 on: January 16, 2017, 02:25:01 am »

Deleted...
« Last Edit: January 16, 2017, 04: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

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 2026
Re: PHP 7.0
« Reply #9 on: January 16, 2017, 04: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: 36
    • Luchtzak Aviation
Re: Re: PHP 7.0
« Reply #10 on: January 16, 2017, 10: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

maxhasher

  • Coppermine newbie
  • Offline Offline
  • Posts: 18
Re: PHP 7.0
« Reply #11 on: March 07, 2017, 06: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

phill104

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4885
    • Windsurf.me
Re: PHP 7.0
« Reply #12 on: March 07, 2017, 06: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: 18
Re: PHP 7.0
« Reply #13 on: March 07, 2017, 07: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: 18
Re: PHP 7.0
« Reply #14 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

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 2026
Re: PHP 7.0
« Reply #15 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

phill104

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4885
    • Windsurf.me
Re: PHP 7.0
« Reply #16 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

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 2026
Re: PHP 7.0
« Reply #17 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: 18
Re: PHP 7.0
« Reply #18 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

maxhasher

  • Coppermine newbie
  • Offline Offline
  • Posts: 18
Re: PHP 7.0
« Reply #19 on: March 29, 2017, 06:50:57 pm »

I've pulled up an error
(Critical error  There was an error while processing a database query)
 in upload with 1.6.01 with basic details in the attached txt file.
No issue with the cpg Admin user but failure as a Registered user.
Not sure if it is caused by datetime ( as i had an issue of putting 0000-00-00 in a date field in my own tables as deprecated and also if there is an ordering issue that needs specifying for example Order by min(date)
I cant identify exactly at the moment but suspect mySQL 5.7 and strict as no issue on production server
Logged
Pages: [1] 2   Go Up
 

Page created in 0.031 seconds with 20 queries.