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

0 Members and 1 Guest are viewing this topic.

maxhasher

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Re: PHP 7.0
« Reply #20 on: Yesterday at 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

maxhasher

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Re: PHP 7.0
« Reply #21 on: Yesterday at 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

  • Dev Team member
  • Coppermine frequent poster
  • ****
  • Country: us
  • Offline Offline
  • Posts: 496
Re: PHP 7.0
« Reply #22 on: Today at 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
Pages: 1 [2]   Go Up
 

Page created in 0.068 seconds with 22 queries.