CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 PHP 7.0

Print topic Send  topic

Author Message
Dorin

Posts: 50
Posted: 10/20/2016, 3:33 AM

Hello,

Is there a chance for a project to run on PHP 7?

Regards.
View profile  Send private message
mamboBROWN


Posts: 1713
Posted: 11/06/2016, 8:58 AM

Assuming that you have the current version of CCS and that you started building your project in PHP 7 the answer to your question is Yes.
View profile  Send private message
Dorin

Posts: 50
Posted: 11/06/2016, 11:41 PM

Thanks.
View profile  Send private message
phpGeek

Posts: 13
Posted: 11/17/2016, 4:13 PM

it says its compatible but its not... you will have to replace a lot of the code..
View profile  Send private message
cleyan


Posts: 136
Posted: 12/25/2016, 8:27 PM

Yes, is compatible like most of old php code,
but you will need to disable the E_DECRECATED alerts on php.ini or in php code (maybe on Common.php) that's because most of php code is "old fashion" and YesSoftware don't seem to want a real upgrade of the product,
as an example all classes of CCs use the name of the class as constructor instead of __construct() method as php7 recommend

Good luck!
_________________
**************************************************
Carlos Leyan B.
Temuco, Chile
www.leytec.net
View profile  Send private message
ccsminer

Posts: 159
Posted: 01/27/2017, 5:58 PM

Quote cleyan:
Yes, is compatible like most of old php code,
but you will need to disable the E_DECRECATED alerts on php.ini or in php code (maybe on Common.php) that's because most of php code is "old fashion" and YesSoftware don't seem to want a real upgrade of the product,
as an example all classes of CCs use the name of the class as constructor instead of __construct() method as php7 recommend

Good luck!

When you mean "old fashion", are you saying that CCS generated code for older versions of PHP (i.e. 5.2.x) will still run as expected under a newer version of PHP (i.e. PHP 5.4.6) ?

View profile  Send private message
eratech


Posts: 513
Posted: 02/11/2017, 10:36 PM

Quote ccsminer:
Quote cleyan:
Yes, is compatible like most of old php code,
but you will need to disable the E_DECRECATED alerts on php.ini or in php code (maybe on Common.php) that's because most of php code is "old fashion" and YesSoftware don't seem to want a real upgrade of the product,
as an example all classes of CCs use the name of the class as constructor instead of __construct() method as php7 recommend

Good luck!

When you mean "old fashion", are you saying that CCS generated code for older versions of PHP (i.e. 5.2.x) will still run as expected under a newer version of PHP (i.e. PHP 5.4.6) ?


@ccsminer - that's my reading of it, and I've done a little testing on PHP 7 and many of the 'old' code will work (mostly) but will raise DEPRECATED errors.

Of course, the solution would be to update the PHP function templates that CCS uses to generate code but I don't know if that's going to happen.

I include my own set of functions as a separate file and use them instead of the built in ones if I need to.

Eric
(Sorry for the late reply. Took some time off forums and non-work related internet etc during January.)
_________________
CCS 3/4/5 ASP Classic, VB.NET, PHP
Melbourne, Victoria, Australia
View profile  Send private message
JayEdgar


Posts: 77
Posted: 04/06/2017, 12:26 PM

Quote eratech:
@ccsminer - that's my reading of it, and I've done a little testing on PHP 7 and many of the 'old' code will work (mostly) but will raise DEPRECATED errors.

Of course, the solution would be to update the PHP function templates that CCS uses to generate code but I don't know if that's going to happen.

I include my own set of functions as a separate file and use them instead of the built in ones if I need to.

Eric
(Sorry for the late reply. Took some time off forums and non-work related internet etc during January.)

Eric, would you be willing to share your functions?

MamboBROWN, do you have any suggestions for someone who has a large project in v 4.3 and needs to convert it to 5.1?

Thank you,

Jay

View profile  Send private message
DonWolli


Posts: 93
Posted: 05/31/2018, 6:31 AM

Anyone else with experience CCS and PHP 7.x??

We have a big project with about 100 small and about 20 more complex 4.1/4.3 programs.
I would like to convert them to 5.1 working with PHP 7.1
OR
change everything to another(what) RAD Software

Any ideas???
Regards
Wolfgang

_________________
You may say I'm a dreamer, but I'm not the only one.(J.Lennon)
View profile  Send private message
lsmashnuk

Posts: 13
Posted: 05/31/2018, 6:04 PM

I have a fairly large project working well with ccs 5.1 and php 5 and 7 on a Ubuntu 16 server
View profile  Send private message
djgjohn

Posts: 52
Posted: 06/03/2018, 2:51 AM

Is it possible to update CCS to the latest version and update existing projects to run on PHP 7?
View profile  Send private message
lsmashnuk

Posts: 13
Posted: 06/03/2018, 7:56 PM

Yes, it is possible. My development machine is Windows 10, IIS, MySql, PHP 5 and the production server is Ubuntu Linux, Apache, MySql, PHP 7. You have to make sure any hand coded PHP is compatible with both platforms and also be mindful of any case sensitive issues with PHP and MySql. My project was originally created in CCS 4.3 and then upgraded to CCS 5.1
View profile  Send private message
cleyan


Posts: 136
Posted: 06/23/2018, 12:51 PM

Hi,
most of my software made with CCS 5 work on servers with php 7.0 but none with php 7.1/7.2

Regards


Carlos
_________________
**************************************************
Carlos Leyan B.
Temuco, Chile
www.leytec.net
View profile  Send private message
cleyan


Posts: 136
Posted: 06/23/2018, 12:52 PM

Hi,
most of my software made with CCS 5 work on servers with php 7.0 but none with php 7.1/7.2

Regards


Carlos
_________________
**************************************************
Carlos Leyan B.
Temuco, Chile
www.leytec.net
View profile  Send private message
MichaelMcDonald

Posts: 640
Posted: 06/24/2018, 4:39 AM

sh!t might break !!!

http://php.net/manual/en/function.mysql-insert-id.php
_________________
Central Coast, NSW, Australia.

View profile  Send private message
cleyan


Posts: 136
Posted: 07/05/2018, 9:31 AM

Since php 5.5/5.6 you should use MySQLi or PDO instead of old MySQL library, on CCS choose Improved MySQL

To get the last ID you could use;

  
$last_id = mysqli_insert_id($Component->DataSource->Link_ID);  

On AfterInsert event

Regards


Carlos
_________________
**************************************************
Carlos Leyan B.
Temuco, Chile
www.leytec.net
View profile  Send private message
cleyan


Posts: 136
Posted: 07/05/2018, 9:33 AM

Since php 5.5/5.6 you should use MySQLi or PDO instead of old MySQL library, on CCS choose Improved MySQL

To get the last ID you could use;

  
$last_id = mysqli_insert_id($Component->DataSource->Link_ID);  

On AfterInsert event

Regards


Carlos
_________________
**************************************************
Carlos Leyan B.
Temuco, Chile
www.leytec.net
View profile  Send private message
osulywan


Posts: 16
Posted: 12/06/2018, 3:05 PM

PHP 5.6 end of life is 12/31/2018. PHP 7.1 throws many DEPRECATED messages but the one that kills CCS is Warning: Illegal string offset ...

I chased this warning down to array() variable initialized to "".

I did mass change '$CCSEvents = "";' to '$CCSEvents = array();' to get over this hump.

There is also a function in Common, CCGetListValues where I changed $values = array();

Any other show stoppers?
View profile  Send private message
DataDoIT
Posted: 12/06/2018, 3:30 PM

Here's a quick publish of the Employee Directory sample project onto AWS
with latest PHP7 and MariaDb.

http://ec2-35-173-245-219.compute-1.amazonaws.com/

PHP info: http://ec2-35-173-245-219.compute-1.amazonaws.com/phpinfo.php

I'll take it down in a few days. Just letting you folks know PHP7 is
fine with CCS. Just minor edits with illegal string offsets when CCS
binds events.

//BindEvents Method @1-17538124
function BindEvents()
{
global $Login;
global $CCSEvents;
$CCSEvents = []; //Update CCS
$Login->Button_DoLogin->CCSEvents = []; //Update CCS
$Login->Button_DoLogin->CCSEvents["OnClick"] =
"Login_Button_DoLogin_OnClick";
$CCSEvents["AfterInitialize"] = "Page_AfterInitialize";
}
//End BindEvents Method

No issues with mysqli as written by CodeCharge.
saseow

Posts: 744
Posted: 12/18/2018, 1:35 AM

DataDoIt, this is good news. I don't suppose there is a way to make the bind events correct when generating rather than editing every page. If you know of one, please let me know.
Thanks,
Trevor
View profile  Send private message
saseow

Posts: 744
Posted: 12/19/2018, 10:22 PM

As DataDoIT said, CCS works OK with PHP 7.3 except for the small changes in the bind events. I think that the generated code for those is actually in the compiled code of CCS and not from any editable file. Pity.
View profile  Send private message
DonWolli


Posts: 93
Posted: 12/20/2018, 7:07 AM

Quote saseow:
As DataDoIT said, CCS works OK with PHP 7.3 except for the small changes in the bind events. I think that the generated code for those is actually in the compiled code of CCS and not from any editable file. Pity.
Dear Saseow, PHPINFO on DATADOITs Site works with PHP Version 7.2.11, but that is ok for now
I will test that next week on my server ...
_________________
You may say I'm a dreamer, but I'm not the only one.(J.Lennon)
View profile  Send private message
DataDoIT
Posted: 12/20/2018, 8:22 AM

Note that CCS 5.1.1.18992 works 'out-of-the-box' with PHP 7.0. In PHP
7.1+ is where we encounter the binding offset issues. The CCS code
generator defines a variable as string, then later uses that variable
for building an array of values. PHP 7.1+ no longer allows that.

Also recognize that half the planet uses PHP5.6 (including WordPress
which is half of that). That isn't changing anytime soon. CCS as it is
with no changes has a realistic lifespan of a few more years with zero
updates.

Security updates to PHP5.6 will still be happening for the foreseeable
future (they've already extended it twice), and the maintainers will
certainly not stop abruptly as long as a large chunk of the internet
population still uses it. Entrust they'll not cut their noses off spite
their faces.
saseow

Posts: 744
Posted: 12/26/2018, 11:11 PM

OK, have just updated all code in an old project which now runs on a VMware VM running PHP 7.3. All works perfectly except all listboxes only show one item from Mysql tables. I would think that this is a PHP 7 problem and not a VM problem.
Any ideas would be a great help!
View profile  Send private message
clickryan


Posts: 55
Posted: 10/16/2019, 6:27 AM

PHP 7 and codecharge 5 is actually working if you have set up a new project in PHP and MySQL.

the error I encountered is when you upgrade your PHP from 5.6 to 7 that is using a connection to MS SQL
_________________
Codecharge Developer (PHP, ASP.net - C# or VB.net)
for help or inquiries please visit clickryan.com
View profile  Send private message
oasisp

Posts: 48
Posted: 12/09/2019, 3:47 PM

FileUpload is not working using PHP 7.3 & CCS5.1.1.18992.
it keep throwing error The file attachment in field FileUpload1 is required.. i have tried attached jpg, pdf file.
update not using panel.
View profile  Send private message
icehouze

Posts: 1
Posted: 12/13/2019, 9:55 AM

I've been working through the code of an old CCS site trying to bring it up to PHP 7.2. It's been tedious, but not super terrible. However, I am stuck on this function from Classes.php and wondered if anyone has a clue how to convert.

from class clsSQLParameters:

  
function AllParamsSet()  
  {  
    $blnResult = true;  
  
    if(isset($this->Parameters) && is_array($this->Parameters))  
    {  
      reset($this->Parameters);  
  
      while ($blnResult && list ($key, $Parameter) = each ($this->Parameters))   
      {   
        if($Parameter->GetValue() === "" && $Parameter->GetValue() !== false && $Parameter->UseIsNull === false)  
          $blnResult = false;  
      }  
    }  
  
     return $blnResult;  
  }   

It's kicking a "Deprecated: The each() function is deprecated" error and any attempt to convert the deprecated each() results in a "Fatal error: Uncaught Error: Call to a member function GetValue() on bool"

Has anyone come across this or knows how to fix?
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.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


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