CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 Database Error: No Database Selected

Print topic Send  topic

Author Message
gulamc

Posts: 17
Posted: 02/22/2020, 2:14 AM

Hi,

I had program that was running perfectly for several years, out a sudden it started throwing an error:

Fatal error: Uncaught Error: [] operator not supported for strings in /home/xyz/public_html/scripts/outages/v1/Common.php:399 Stack trace

I therefore tried to recompile the same program using the same connection settings in another location to try to test, now the program is running but is throwing the following error:

Database Error: No Database Selected

What could be the problem, would appreciate any help

GC
View profile  Send private message
gulamc

Posts: 17
Posted: 02/22/2020, 3:35 AM

I have seen the problem, its because I have switched to PHP v7.x If I go back to PHP5.6, the program runs ok.

What still baffles me is if CCS5 does not support PHP 7, then why is it that other pages developed using CCS5 on the same site work ok.

Is there anything I can do to make CCS5 pages work on PHP 7.x?

GC
View profile  Send private message
PCHome

Posts: 57
Posted: 02/22/2020, 9:21 AM

CCS uses far too many obsolete functions that are no longer included with PHP. For example, the mysql drivers were removed long ago in favor of mysqli and CCS says it is supported but that has not been my experience so I stopped using it altogether. Just too buggy to be useful with nonexistent support and no updates for many years. Even when CCS was active, Yes tended to release new versions with little testing.
View profile  Send private message
enko


Posts: 74
Posted: 02/28/2020, 2:31 AM

I have the same problem with php 7.1.26 ad upper but NOT with 7.0.33 !
_________________
Italy - CodeCargeStudio (5.1.1.18992) - Dephi RIO - Lazarus (Free Pascal) - www.egsoft.it - www.egauto.it - www.egcourier.it - www.egestetica.it - Windows, Linux, Raspberry Apps.
View profile  Send private message
enko


Posts: 74
Posted: 02/28/2020, 3:09 AM

To solve
Fatal error: Uncaught Error: [] operator not supported for strings in /www/wwwmysite/Common.php:399 Stack trace

Go to Line 399 and you should find
$values[] = array($bound_column_value, $db->f($text_column));

You can fix the PHP error by first initializing $values[] as an array:

$values = [];
$values[] = array($bound_column_value, $db->f($text_column));

Tested with PHP 7.4.3


_________________
Italy - CodeCargeStudio (5.1.1.18992) - Dephi RIO - Lazarus (Free Pascal) - www.egsoft.it - www.egauto.it - www.egcourier.it - www.egestetica.it - Windows, Linux, Raspberry Apps.
View profile  Send private message
DonWolli


Posts: 93
Posted: 02/29/2020, 6:01 AM

Dont use any PHP 7 less 7.3. these are "in-between" releases and off-support ....
_________________
You may say I'm a dreamer, but I'm not the only one.(J.Lennon)
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.