Site Links
Home
Features
Documentation
Pricing & Order
Members Area
Support Options
UBBDev.com
UBBWiki.com
Who's Online Now
2 registered members (Pilgrim, mmkk), 46 guests, and 257 spiders.
Key: Admin, Global Mod, Mod
Member Spotlight
Posts: 82
Joined: September 2008
Show All Member Profiles 
Top Posters(30 Days)
Gizmo 15
FREAK 11
M4TT 10
Ruben 5
mmkk 5
isaac 4
Latest Photos
Chinese Buddhist temple.
My buddha beads.
Rendered Walls
Multi-Screen wallpaper
Stockholm Metro
Previous Thread
Next Thread
Print Thread
PHP 5.6 Error When Posting #258936
01/19/17 07:40 AM
01/19/17 07:40 AM
Joined: Aug 2006
Posts: 51
Florida
G
Geoff Offline OP
journeyman
Geoff  Offline OP
journeyman
G
Joined: Aug 2006
Posts: 51
Florida
Hosting provider upgraded server to php 5.6 and started having issues with functions no longer supported.

Running 7.5.9

Server Info
Server Type Linux
Server Load 0.17
Web Server Apache/2.4.18
PHP Version 5.6.29-1+deb.sury.org~xenial+1
MySQL Version 5.7.16-0ubuntu0.16.04.1

See attached of error msg and response from hosting privider.


Msg from host tech:
Quote:
Thank you for your email. I am actually seeing that an upgrade to your server was made just today, and is now running PHP 5.6, so this would not be the same issue as the weekend. However, I think I know what the issue is.

PHP developers removed support for the mysql_connect function in PHP 5.6, either as a bug, or they no longer cared for it. The legacy mysql_* functions are deprecated, but it seems that we can still get them to connect by passing an extra flag. Apparently, the PHP function is trying to pass an empty database name, without setting the flag to indicate it's trying to do that.

Please refer to "htdocs/dk3jas8d.php" within oakmediacreations.com to see an example of the modified mysql_connect function. If this doesn't take care of the problem, you will need to convert the code to use one of the modern connection frameworks, I'm really sorry. But PHP is moving away from those functions, and are subject to stop working at any time.

We will be upgrading our version of MySQL in the near future (5.5 to 5.7), which could make things better or worse, but since we are expecting that customers are not using mysql_* functions, we will not be testing code written with that when performing the upgrade. I sincerely apologize for any inconvenience this may cause.


Any solutions until 7.6 released?

Express Hosting
Express Hosting "We are the official hosting company of UBB.threads. Ask us about our free migration services to migrate your UBB.threads installation."
Re: PHP 5.6 Error When Posting [Re: Geoff] #258937
01/19/17 07:45 AM
01/19/17 07:45 AM
Joined: Aug 2006
Posts: 51
Florida
G
Geoff Offline OP
journeyman
Geoff  Offline OP
journeyman
G
Joined: Aug 2006
Posts: 51
Florida
Error Msg (txt version)

We encountered a problem. The reason reported was
Script: /users/oakmediacreations.com/htdocs/forums/libs/ubbthreads.inc.php
Line#: 1111
SQL Error: Expression #3 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'db_ubb.wl.WATCH_TYPE' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
SQL Error #: 1055
Query: SELECT up.USER_REAL_EMAIL, up.USER_LANGUAGE, wl.WATCH_TYPE, u.USER_DISPLAY_NAME, up.USER_TIME_OFFSET, up.USER_TIME_FORMAT FROM ubbt_USER_PROFILE up, ubbt_WATCH_LISTS wl, ubbt_USER_GROUPS ug, ubbt_USERS u WHERE ((wl.WATCH_ID = 31 and wl.WATCH_TYPE = 'f') OR (wl.WATCH_ID = 2 and wl.WATCH_TYPE = 'u') OR (wl.WATCH_ID = 37323 and wl.WATCH_TYPE = 't')) AND up.USER_ID = wl.USER_ID AND ug.USER_ID = up.USER_ID AND up.USER_ID = u.USER_ID AND (wl.WATCH_NOTIFY_IMMEDIATE = 1 OR wl.WATCH_NOTIFY_IMMEDIATE = 2 ) AND up.USER_ID <> 2 AND ug.GROUP_ID IN ( 1, 3, 2 ) AND u.USER_IS_BANNED <> 1 GROUP BY up.USER_ID ORDER BY up.USER_LANGUAGE

Please click [ Back ] to return to the previous page.

Re: PHP 5.6 Error When Posting [Re: Geoff] #258938
01/19/17 09:36 AM
01/19/17 09:36 AM
Joined: Apr 2004
Posts: 1,004
California
isaac Offline
UBB.threads Developer
isaac  Offline
UBB.threads Developer
Joined: Apr 2004
Posts: 1,004
California
Originally Posted by Geoff
Msg from host tech:

Thank you for your email. I am actually seeing that an upgrade to your
server was made just today, and is now running PHP 5.6, so this would not be
the same issue as the weekend. However, I think I know what the issue is.

PHP developers removed support for the mysql_connect function in PHP 5.6,
either as a bug, or they no longer cared for it. The legacy mysql_*
functions are deprecated, but it seems that we can still get them to connect
by passing an extra flag. Apparently, the PHP function is trying to pass an
empty database name, without setting the flag to indicate it's trying to do
that.

Please refer to "htdocs/dk3jas8d.php" within oakmediacreations.com to see an
example of the modified mysql_connect function. If this doesn't take care
of the problem, you will need to convert the code to use one of the modern
connection frameworks, I'm really sorry. But PHP is moving away from those
functions, and are subject to stop working at any time.

We will be upgrading our version of MySQL in the near future (5.5 to 5.7),
which could make things better or worse, but since we are expecting that
customers are not using mysql_* functions, we will not be testing code
written with that when performing the upgrade. I sincerely apologize for any
inconvenience this may cause.


Their reply seems as though they are a bit confused.

Either I am reading their message wrong, or they are confused in mixing up the discussion between PHP and MySQL:
"PHP developers removed support for the mysql_connect function in PHP 5.6"
This is not true. It has a depreciation notice, but is not removed.

UBB.threads 7.5.x and 7.6.x run just fine on PHP 5.6

"We will be upgrading our version of MySQL in the near future (5.5 to 5.7)"
This is unrelated to PHP.

It also doesnt help by the fact that they reference a website which forwards instead to a car website (oakmediacreations.com => http://firstgenfirebird.org) and I am unable to find anything related to "htdocs/dk3jas8d.php" on their pages. They also seem to be running UBB.threads 7.5.9 without problems.

---

As of today, There is no such thing as PHP 5.7. While in its alpha stages, 5.7 was likely used as just a placeholder. In 2015, The version number of PHP "5.7" has been downvoted in favor of moving directly to "7".
https://www.reddit.com/r/programmin...ka_phpng_is_now_nearly_twice_as_fast_as/

Current versions of PHP:
http://php.net/downloads.php

PHP Release history:
https://en.wikipedia.org/wiki/PHP#Release_history

To review; PHP developers removed support for the mysql_connect function in PHP 7.0.
It is still available in PHP 5.6, but with depreciation notice.


Originally Posted by Geoff
Any solutions until 7.6 released?

UBB.threads 7.6.0 does not contain any changes in the way the mysql_connect function is used. It continues to use the same function calls. I have looked at upgrading the scripts to PHP 7.0. Its a huge undertaking to do. It will be done eventually, PHP 5.6 is still supported officially until at least December 31, 2018.

Re: PHP 5.6 Error When Posting [Re: Geoff] #258939
01/19/17 09:52 AM
01/19/17 09:52 AM
Joined: Apr 2004
Posts: 1,004
California
isaac Offline
UBB.threads Developer
isaac  Offline
UBB.threads Developer
Joined: Apr 2004
Posts: 1,004
California
The errors you've posted are related to your MySQL configuration, and not UBB.threads.

Your server's MySQL setting which is throwing the error:
sql_mode=only_full_group_by

MySQL 5.7 ships with this mode enabled by default.

Prior versions of MySQL shipped with the following setting:
sql_mode = ''

Source:
http://stackoverflow.com/questions/23921117/disable-only-full-group-by

Server SQL Modes:
https://dev.mysql.com/doc/refman/5.6/en/sql-mode.html

Further reading at:
http://www.mysqlfaqs.net/mysql-clie...-sql-mode-in-mysql-and-how-can-we-set-it

Last edited by id242; 01/19/17 10:21 AM. Reason: Edited based on Error Msg in OP's second post.
Re: PHP 5.6 Error When Posting [Re: Geoff] #258943
01/19/17 03:53 PM
01/19/17 03:53 PM
Joined: Jun 2006
Posts: 16,785
Portland, OR; USA
Gizmo Offline
UBB.threads Developer
Gizmo  Offline
UBB.threads Developer
Joined: Jun 2006
Posts: 16,785
Portland, OR; USA
I am running (Stablehost VPS):
UBB.threads v7.6.0 and v7.5.9
PHP: v5.6.29
MySQL: v5.1.73

At UBB.Developers we're running:
UBB.threads v7.6.0
PHP: v5.4.45
MySQL: v5.5.52-0+deb8u1 - (Debian)

We have an ongoing thread here at "What version of PHP and MySQL are you running?" as well, though it was created before v5.6 was released.


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Forums: A Gardeners Forum Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Re: PHP 5.6 Error When Posting [Re: isaac] #258948
01/20/17 11:28 AM
01/20/17 11:28 AM
Joined: Aug 2006
Posts: 51
Florida
G
Geoff Offline OP
journeyman
Geoff  Offline OP
journeyman
G
Joined: Aug 2006
Posts: 51
Florida
Thank you. Sent request to have this changed

Re: PHP 5.6 Error When Posting [Re: Geoff] #258964
01/22/17 10:30 AM
01/22/17 10:30 AM
Joined: Aug 2006
Posts: 51
Florida
G
Geoff Offline OP
journeyman
Geoff  Offline OP
journeyman
G
Joined: Aug 2006
Posts: 51
Florida
Changing that setting did the trick. Thanks again!


Shout Box
Today's Birthdays
No Birthdays
Recent Topics
Shout Box Sound Effect
by M4TT. 11/29/17 08:28 PM
Ad island
by TGCsanderson. 11/25/17 06:41 PM
Taking to long to connect to DB
by AstroCat. 11/24/17 12:34 PM
I want to update forum but can't find license
by dimaninc. 11/23/17 10:51 AM
Forum Statistics
Forums36
Topics35,014
Posts190,533
Members12,045
Most Online978
Jun 24th, 2007
Random Image
Powered by UBB.threads™ PHP Forum Software 7.6.1
(Snapshot build 20171106)