PHP 7.0 - Page 2 PHP 7.0 - Page 2
 

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

Main Menu

PHP 7.0

Started by luchtzak, January 10, 2017, 08:12:11 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

maxhasher

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.

ron4mac

Quote from: maxhasher 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.

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.

maxhasher

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..

maxhasher

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.

maxhasher

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

ron4mac

Okay ... thanks.

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

with
. "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.

maxhasher

ok thanks.

I'll do that then on git

maxhasher

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

ron4mac

Quote from: maxhasher on March 31, 2017, 08:24:12 PM
Sorry, my testing background has kicked in  ;D

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


ron4mac



phill104

In what way "doesn't work"? A bit more information telling us exactly the problem might help us help you.
It is a mistake to think you can solve any major problems just with potatoes.

luchtzak

Quote from: Phill Luckhurst 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.

Works again! The database crashed...