ccsminer
Posts: 159
|
Posted: 01/05/2019, 10:52 AM |
|
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?
|
|
|
saseow
Posts: 744
|
Posted: 01/05/2019, 9:03 PM |
|
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
|
|
|
ccsminer
Posts: 159
|
Posted: 01/06/2019, 12:13 AM |
|
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?
|
|
|
saseow
Posts: 744
|
Posted: 01/06/2019, 6:49 AM |
|
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.
|
|
|
saseow
Posts: 744
|
Posted: 01/06/2019, 6:54 AM |
|
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.
|
|
|
DonWolli
Posts: 93
|
Posted: 01/06/2019, 8:48 AM |
|
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) |
|
|
osulywan
Posts: 16
|
Posted: 01/06/2019, 1:21 PM |
|
In Common.php, find CCGetListValues function.
Change $values = ""; to $values = array();
|
|
|
osulywan
Posts: 16
|
Posted: 01/06/2019, 1:22 PM |
|
In Common.php, find CCGetListValues function.
Change $values = ""; to $values = array();
|
|
|
saseow
Posts: 744
|
Posted: 01/06/2019, 7:26 PM |
|
Thanks for the reply osulywan but changing that does not fix the listbox problem unfortunately.
|
|
|
DataDoIT
|
Posted: 01/07/2019, 6:22 AM |
|
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: 93
|
Posted: 01/07/2019, 11:10 PM |
|
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) |
|
|
saseow
Posts: 744
|
Posted: 01/08/2019, 5:43 AM |
|
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.
|
|
|
ccsminer
Posts: 159
|
Posted: 01/08/2019, 1:33 PM |
|
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.
|
|
|
DataDoIT
|
Posted: 01/08/2019, 1:38 PM |
|
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: 159
|
Posted: 01/08/2019, 3:42 PM |
|
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.
|
|
|
saseow
Posts: 744
|
Posted: 01/09/2019, 12:11 AM |
|
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.
|
|
|
ckroon
Posts: 869
|
Posted: 01/09/2019, 7:59 AM |
|
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. |
|
|
ccsminer
Posts: 159
|
Posted: 01/09/2019, 2:25 PM |
|
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.
|
|
|
ccsminer
Posts: 159
|
Posted: 01/11/2019, 9:24 AM |
|
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.
|
|
|
ccsminer
Posts: 159
|
Posted: 01/11/2019, 3:05 PM |
|
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.
|
|
|
saseow
Posts: 744
|
Posted: 01/14/2019, 12:07 AM |
|
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!!
|
|
|