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 28325 times)

0 Members and 1 Guest are viewing this topic.

maxhasher

  • Coppermine newbie
  • Offline Offline
  • Posts: 18
Re: PHP 7.0
« Reply #20 on: March 29, 2017, 07:34:32 pm »

Further to last :-
As I was on my local machine I followed some advice and added
disable_strict_mode.cnf
containing
[mysqld]
sql_mode=IGNORE_SPACE,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION

to the /etc/mysql/conf.d/ folder

this allowed the registered user to upload.
I can't work out where the difference is between the admin and the registered user SQL settings in UPLOAD.PHP that would bar the reg user and not the admin by strict mode.
I would have thought it would be both or neither.
Logged

ron4mac

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 2026
Re: PHP 7.0
« Reply #21 on: March 30, 2017, 01:31:56 am »

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.

Thank you very much for providing good feedback. I created a fresh system (Linux) with PHP 7.0.15 and mysql 5.7.17.  I was able to see the problem that you described and was able to make coding corrections to prevent the error. The error stemmed from strict usage requirements of the sql DISTINCT keyword.

I have applied the corrections to the Github distribution.
Logged

maxhasher

  • Coppermine newbie
  • Offline Offline
  • Posts: 18
Re: PHP 7.0
« Reply #22 on: March 30, 2017, 02:11:46 pm »

Glad to help
Don't think it will be long before 1&1 update php to 5.7 but not sure where they will go with the mysql server. But better to engineer than to repair..
Logged

maxhasher

  • Coppermine newbie
  • Offline Offline
  • Posts: 18
Re: PHP 7.0
« Reply #23 on: March 31, 2017, 04:53:48 pm »

tested ok having just overwritten the january code with the march version.
Good going.
Long way down the code that.
I had a similar issue with not adding a field I was querying with.
Logged

maxhasher

  • Coppermine newbie
  • Offline Offline
  • Posts: 18
Re: PHP 7.0
« Reply #24 on: March 31, 2017, 07:10:22 pm »

Hi ron4mac Got another
In the new version of the code
On the home page it displays a link to the user galleries
Clicking this pulls up the page index.php?cat=1
and produces
Critical error
There was an error while processing a database query
Logged

ron4mac

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 2026
Re: PHP 7.0
« Reply #25 on: March 31, 2017, 08:16:13 pm »

Okay ... thanks.

Fix is:
file bridge/udb_base.inc.php replace line 521
Code: [Select]
. "WHERE ((ISNULL(approved) OR approved='YES') AND category > " . FIRST_USER_CAT . ") $FORBIDDEN_SET GROUP BY user_id "
with
Code: [Select]
. "WHERE ((ISNULL(approved) OR approved='YES') AND category > " . FIRST_USER_CAT . ") $FORBIDDEN_SET GROUP BY category, user_id "

Max, it would be better if you could create 'issues' at the CPG 1.6 Github repository for any additional items that you may run across in your particular system setup.
Logged

maxhasher

  • Coppermine newbie
  • Offline Offline
  • Posts: 18
Re: PHP 7.0
« Reply #26 on: March 31, 2017, 08:20:15 pm »

ok thanks.

I'll do that then on git
Logged

maxhasher

  • Coppermine newbie
  • Offline Offline
  • Posts: 18
Re: PHP 7.0
« Reply #27 on: March 31, 2017, 08:24:12 pm »

works well..
Sorry, my testing background has kicked in  ;D
Logged

ron4mac

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 2026
Re: PHP 7.0
« Reply #28 on: March 31, 2017, 09:54:39 pm »

Sorry, my testing background has kicked in  ;D

No sorry here ... your help is truly appreciated.
Logged

luchtzak

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 36
    • Luchtzak Aviation
Re: PHP 7.0
« Reply #29 on: June 22, 2017, 12:21:13 am »

ron4mac

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 2026
« Last Edit: June 22, 2017, 02:05:24 am by ron4mac »
Logged

luchtzak

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 36
    • Luchtzak Aviation
Re: Re: PHP 7.0
« Reply #31 on: June 22, 2017, 08:44:32 am »

phill104

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4885
    • Windsurf.me
Re: PHP 7.0
« Reply #32 on: June 22, 2017, 11:47:51 am »

In what way "doesn't work"? A bit more information telling us exactly the problem might help us help you.
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: Re: PHP 7.0
« Reply #33 on: June 22, 2017, 11:48:17 am »

In what way "doesn't work"? A bit more information telling us exactly the problem might help us help you.

Works again! The database crashed...
Pages: 1 [2]   Go Up
 

Page created in 0.044 seconds with 20 queries.