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 -> General/Other

 Re. Getting CCS to work correctly with most recent PHP version.

Print topic Send  topic

Author Message
ccsminer

Posts: 101
Posted: 01/05/2019, 10:52 AM Quote message

Forum members want to know . . .

#1: What version(s) of CCS can work most effectively with most recent version of PHP?

#2: What CCS PHP module(s) must be modified to work with most recent version of PHP, and what
specifically are those modifications?

NOTE:
The following example updates may work, but would require updates for each page component event binding within an application:
//BindEvents Method @1-965C2F41
function BindEvents()
{
global $Login;
global $CCSEvents;
$CCSEvents = []; //Update CCS
$Login->newpassword->CCSEvents = []; //CCS Update
$Login->newpassword->CCSEvents["BeforeShow"] = "Login_newpassword_BeforeShow";
$Login->rnewpassword->CCSEvents = []; //CCS Update
$Login->rnewpassword->CCSEvents["BeforeShow"] = "Login_rnewpassword_BeforeShow";
$Login->SecureLogin->CCSEvents = []; //CCS Update
$Login->SecureLogin->CCSEvents["BeforeShow"] = "Login_SecureLogin_BeforeShow";
$Login->Button_DoLogin->CCSEvents = []; //CCS Update
$Login->Button_DoLogin->CCSEvents["OnClick"] = "Login_Button_DoLogin_OnClick";
$Login->SecurityCertificateSeal->CCSEvents = []; //CCS Update
$Login->SecurityCertificateSeal->CCSEvents["BeforeShow"] = "Login_SecurityCertificateSeal_BeforeShow";
$CCSEvents["AfterInitialize"] = "Page_AfterInitialize";
}
//End BindEvents Method

#3: Will source modifications have to be made each time after CCS PHP module rebuilds?

#4: Will source modifications have to be made each time after CCS PHP module publishing?

#5: What version(s) of MariaDB, POSTGRE, MySQL are recommended for CCS when generating code to run under most recent version of PHP?
View profile  Send private message
saseow

Posts: 726
Posted: 01/05/2019, 9:03 PM Quote message

I have successfully updated a CCS project with Artisteer graphics to run on PHP 7.3 but one problem remains which I have yet to find the solution to.
The problem is that all dropdown boxes only display a single database record. I am still trying to figure out a fix but if anyone does find one, please post it here.
Regards,
Trevor
View profile  Send private message
ccsminer

Posts: 101
Posted: 01/06/2019, 12:13 AM Quote message

Quote saseow:
I have successfully updated a CCS project with Artisteer graphics to run on PHP 7.3 but one problem remains which I have yet to find the solution to.
The problem is that all dropdown boxes only display a single database record. I am still trying to figure out a fix but if anyone does find one, please post it here.
Regards,
Trevor
Which version(s) of CCS were used, and what modules had to be modified to get your application to work (mostly) with PHP 7.3?

Have you tried debugging (i.e. via XDebug) the query which populates your drop-down boxes, to see why only one record is being returned? How many database records are supposed to be returned, and is the actual complete SQL statement in the CCS event file actually what is expected?


View profile  Send private message
saseow

Posts: 726
Posted: 01/06/2019, 6:49 AM Quote message

The project was done using 5.1.1. 18990 which I updated using 5.1.1.18992 and then did the changes on a VM using PHP 7.3.
The most changes are in every page with the Bind Events and declaring a var as an array e.g. $CCSEvents = []; //Update CCS and $users->users_TotalRecords->CCSEvents = []; //Update CCS.

Other changes like $Login1->Button_DoLogin->CCSEvents = []; //Update CCS had to be done.
Also getting the last ID I used $last_id = mysqli_insert_id($Component->DataSource->Link_ID);.

All easy changes but very time consuming. I put a support ticket in with CCS but I am not expecting a reply.
No, I have not used a debugger yet but thank you for the idea. That I will do.
View profile  Send private message
saseow

Posts: 726
Posted: 01/06/2019, 6:54 AM Quote message

The number of records supposed to be return for the dropdown boxes varies but none are supposed to return only one record. The SQL statement is correct with no LIMIT or anything strange. It seems that in classes.php the correct number of records is there but are removed somewhere in the classes code so only the very last record populates the dropdown.
View profile  Send private message
DonWolli


Posts: 76
Posted: 01/06/2019, 8:48 AM Quote message

The modules of CCS make use of the PHP function "list". I think the option values are set with list.

BUT:
the parameter sequence hast changed from PHP 7.1.
Regard:
http://php.net/manual/en/function.list.php
(especially use of arrays in List)
I did not really prove that ...
Perhaps someone have a deeper look at that point
_________________
You may say I'm a dreamer, but I'm not the only one.(J.Lennon)
View profile  Send private message
osulywan


Posts: 16
Posted: 01/06/2019, 1:21 PM Quote message

In Common.php, find CCGetListValues function.

Change $values = ""; to $values = array();
View profile  Send private message
osulywan


Posts: 16
Posted: 01/06/2019, 1:22 PM Quote message

In Common.php, find CCGetListValues function.

Change $values = ""; to $values = array();
View profile  Send private message
saseow

Posts: 726
Posted: 01/06/2019, 7:26 PM Quote message

Thanks for the reply osulywan but changing that does not fix the listbox problem unfortunately.
View profile  Send private message
DataDoIT
Posted: 01/07/2019, 6:22 AM Quote message

Have a look at the PHP7.3 demo here:
http://ec2-3-82-165-202.compute-1.amazonaws.com/EmpsGrid.php

Not seeing the listbox values issue you're reporting. CodeCharge doesn't
appear to be the inhibiting factor.
DonWolli


Posts: 76
Posted: 01/07/2019, 11:10 PM Quote message

could you pls provide a download link for a zip of that project?
_________________
You may say I'm a dreamer, but I'm not the only one.(J.Lennon)
View profile  Send private message
saseow

Posts: 726
Posted: 01/08/2019, 5:43 AM Quote message

Well I am stumped DataDoIt,
I have created a new project with Ver. 5.1.1.18992 with a simple search form and a list box and exactly the same result i.e. only a single record returned. I have run this project on my VM and have also given it to DonWalli above who has done the same thing on his system with the same result. Ditto, his comment....any chance you could send me a zip file of the project? I really have to get to the bottom of this.
View profile  Send private message
ccsminer

Posts: 101
Posted: 01/08/2019, 1:33 PM Quote message

DataDoIT:

Kindly provide the forum with the following information . . .

#1: Version of CCS used with PHP 7.3

#2: OS Development platform, and any security updates which may help CCS running as stable as possible.

#3: General changes required to get application to publish correctly, preferably *without* having to repeat code modifications on subsequent builds (either individual pages or the entire project).

- Thankyou.
View profile  Send private message
DataDoIT
Posted: 01/08/2019, 1:38 PM Quote message

Just create a new project using the Employee Directory template. Update
the few files with the 'bindings' edits as mentioned.

I suspect your issue will be with your database and/or your database
settings and/or your database connection driver and/or your PHP
settings. It ain't CodeCharge.

After 30+ years of doing this, always ALWAYS keep a raw, non-special
version of a basic web server for testing things like this against. It
could be local WAMP, XAMMP, even on a cloud such as AWS, Azure, Google.
Learn how to write basic, direct scripts against a database for
comparison. You don't need to be an expert. There are plenty of prebuilt
little script nibblets on Github to pull from.

Otherwise you'll find that you're spending 90% of your time barking up
the wrong trees.


ccsminer

Posts: 101
Posted: 01/08/2019, 3:42 PM Quote message

Quote DataDoIT:
Just create a new project using the Employee Directory template. Update
the few files with the 'bindings' edits as mentioned.

I suspect your issue will be with your database and/or your database
settings and/or your database connection driver and/or your PHP
settings. It ain't CodeCharge.

After 30+ years of doing this, always ALWAYS keep a raw, non-special
version of a basic web server for testing things like this against. It
could be local WAMP, XAMMP, even on a cloud such as AWS, Azure, Google.
Learn how to write basic, direct scripts against a database for
comparison. You don't need to be an expert. There are plenty of prebuilt
little script nibblets on Github to pull from.

Otherwise you'll find that you're spending 90% of your time barking up
the wrong trees.



Depending on page complexity, updating CCS page object bindings can be time intensive but doable (assuming only once after new data objects are added to a page).

Based on the experience of other users, it also appears there may be other changes when working with existing projects, as opposed to creating projects from scratch - appears everyone has unique challenges to address.

Thankyou for your responses.
View profile  Send private message
saseow

Posts: 726
Posted: 01/09/2019, 12:11 AM Quote message

OK, so I wanted to narrow down where the problem is. Created a new project with a page containing a grid and a search form. Grid contains only ID and a text field and the search has a list box searching by ID.
Grid displays all records in the table but listbox only shows a single record.
So, I am assuming that everything related to the database is correct and the problem lies ONLY in the PHP code for a list box. If I ever find a solution I will post it here.
Thanks for all the responses and, obviously, if anyone has any more ideas they would certainly be appreciated.
View profile  Send private message
ckroon

Posts: 867
Posted: 01/09/2019, 7:59 AM Quote message

Hi All.
I was struggling with CCS4.3 working with PHP7. A coder I do a lot of work with took it under his wing and made it happen.

jmancera@gmail.com if you are interested.

He is a trustworthy and honest guy who knows his stuff.


_________________
Walter Kempees...you are dearly missed.
View profile  Send private message
ccsminer

Posts: 101
Posted: 01/09/2019, 2:25 PM Quote message

Quote ckroon:
Hi All.
I was struggling with CCS4.3 working with PHP7. A coder I do a lot of work with took it under his wing and made it happen.

jmancera@gmail.com if you are interested.

He is a trustworthy and honest guy who knows his stuff.


Thanks ckroon -

Messaged your work associate directly. Can you post his fndings to the forum as well?
Thankyou.

View profile  Send private message
ccsminer

Posts: 101
Posted: 01/11/2019, 9:24 AM Quote message

Source modifications (to work in PHP 7.x) will likely have to be made after each project module publishing - there is no way around that at this time; with that said, it's a good idea to keep a backup of CCS project modules, since these will likely have to be referenced when updating code logic and publishing within the CCS environment.
View profile  Send private message
ccsminer

Posts: 101
Posted: 01/11/2019, 3:05 PM Quote message

Quote ccsminer:
Source modifications (to work in PHP 7.x) will likely have to be made after each project module publishing - there is no way around that at this time; with that said, it's a good idea to keep a backup of CCS project modules, since these will likely have to be referenced when updating code logic and publishing within the CCS environment - all prior to PHP 7.x modifications.

View profile  Send private message
saseow

Posts: 726
Posted: 01/14/2019, 12:07 AM Quote message

OK, finally got a project updated to run on PHP 7.3. The problem with a single value being returned for list boxes was a simple change in Common.php where $values had to be $values = [] and in the right place.
Relief!!
View profile  Send private message

Add new topic Reply to 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.

PHP Reports

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

Home   |    Search   |    Members   |    Register   |    Login


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