Previous Thread
Next Thread
Print Thread
Hop To
#258936 01/19/2017 8:40 AM
Joined: Aug 2006
Posts: 96
Likes: 1
G
Journeyman
Journeyman
G Offline
Joined: Aug 2006
Posts: 96
Likes: 1
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?


I am a Superstar! Testing signature here
Joined: Aug 2006
Posts: 96
Likes: 1
G
Journeyman
Journeyman
G Offline
Joined: Aug 2006
Posts: 96
Likes: 1
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.


I am a Superstar! Testing signature here
Joined: Apr 2004
Posts: 1,945
Likes: 145
UBB.threads Developer
UBB.threads Developer
Joined: Apr 2004
Posts: 1,945
Likes: 145
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.


Current developer of UBB.threads PHP Forum Software
Current Release: UBBT 7.7.5 // Preview: UBBT 8.0.0
isaac @ id242.com // my forum @ CelicaHobby.com
Joined: Apr 2004
Posts: 1,945
Likes: 145
UBB.threads Developer
UBB.threads Developer
Joined: Apr 2004
Posts: 1,945
Likes: 145
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/2017 11:21 AM. Reason: Edited based on Error Msg in OP's second post.

Current developer of UBB.threads PHP Forum Software
Current Release: UBBT 7.7.5 // Preview: UBBT 8.0.0
isaac @ id242.com // my forum @ CelicaHobby.com
Joined: Jun 2006
Posts: 16,292
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,292
Likes: 116
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.
Do you need Forum Install or Upgrade Services?
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!
Joined: Aug 2006
Posts: 96
Likes: 1
G
Journeyman
Journeyman
G Offline
Joined: Aug 2006
Posts: 96
Likes: 1
Thank you. Sent request to have this changed


I am a Superstar! Testing signature here
Joined: Aug 2006
Posts: 96
Likes: 1
G
Journeyman
Journeyman
G Offline
Joined: Aug 2006
Posts: 96
Likes: 1
Changing that setting did the trick. Thanks again!


I am a Superstar! Testing signature here

Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
spam issues
by ECNet - 03/19/2024 11:45 PM
Looking for a forum
by azr - 03/15/2024 11:26 PM
Editing Links in Post
by Outdoorking - 03/15/2024 9:31 AM
Question on barkrowler and the like
by Mors - 02/29/2024 6:51 PM
Member Permissions Help
by domspeak - 02/27/2024 6:31 PM
Who's Online Now
1 members (Ruben), 476 guests, and 111 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20230217)