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 Ver 5.5.12 and UP

Print topic Send  topic

Author Message
rgmortera


Posts: 4
Posted: 07/20/2015, 2:11 PM

HI
I'm using CodeCharge 4.4.3 but I install wampserver 2.5. When I publish a page the TEMPLATES.PHP from Codecharge send error in some functions like PREG_REPLACE(). The way to solve is use PROG_REPLACE_CALLBACK().
I test too with CodeCharge 5.1 and have same problem.
Any Idea.
Thank you in advanced
(sorry if my redaction no fine, my mother language Spanish) :)
_________________
Rodolfo G. Mortera Ortega
View profile  Send private message
eratech


Posts: 513
Posted: 07/20/2015, 4:19 PM

rgmortera -

Your English is better than my Spanish :-)

There are some functions in CodeCharge from years ago that are being removed from PHP so you get those warnings. Another is the mysql_escape function.

You can change the Templates.php code yourself (and do it for each Project you do), or wait for Codecharge to tweak some of the functions to fit with the more recent PHP versions.

You need to be careful with changing some of the code - if you change code within a page then CCS won't regenerate that part if it changes (eg: if you have a SQL SELECT and you add a new WHERE item, it won't change and you need to manually update it) , but Templates.php should be Ok, as I don't think it is regenerated, it is just included with the project.

But always take a backup just to be safe.

Cheers

Eric
_________________
CCS 3/4/5 ASP Classic, VB.NET, PHP
Melbourne, Victoria, Australia
View profile  Send private message
MichaelMcDonald

Posts: 640
Posted: 07/26/2015, 1:04 PM

Must admit I never have much joy with second release of wampserver, and went to XAMPP. Finding it much more flexible.
_________________
Central Coast, NSW, Australia.

View profile  Send private message
eratech


Posts: 513
Posted: 07/28/2015, 7:39 AM

I suppose I'm still on WAMP as I usually use MAMP on my Mac side of things and wanted to keep them in sync. I'm not using any special feature of either, just web dev locally.

Anything special that XAMPP does over WAMP?

Eric
_________________
CCS 3/4/5 ASP Classic, VB.NET, PHP
Melbourne, Victoria, Australia
View profile  Send private message
eratech


Posts: 513
Posted: 07/28/2015, 7:39 AM

I suppose I'm still on WAMP as I usually use MAMP on my Mac side of things and wanted to keep them in sync. I'm not using any special feature of either, just web dev locally.

Anything special that XAMPP does over WAMP?

Eric
_________________
CCS 3/4/5 ASP Classic, VB.NET, PHP
Melbourne, Victoria, Australia
View profile  Send private message
MichaelMcDonald

Posts: 640
Posted: 08/20/2015, 1:48 AM

no
_________________
Central Coast, NSW, Australia.

View profile  Send private message
ccsminer

Posts: 159
Posted: 10/18/2015, 1:53 PM

Quote rgmortera:
HI
I'm using CodeCharge 4.4.3 but I install wampserver 2.5. When I publish a page the TEMPLATES.PHP from Codecharge send error in some functions like PREG_REPLACE(). The way to solve is use PROG_REPLACE_CALLBACK().
I test too with CodeCharge 5.1 and have same problem.
Any Idea.
Thank you in advanced
(sorry if my redaction no fine, my mother language Spanish) :)

This warning occurs regardless of the web application server configuration (WAMP, XAMPP, MAMP or manual install of MySQL, PHP, Apache/IIS), or the version of CC used - entirely due to the preg_replace /e modified being deprecated - not preg_replace itself.

The following example PHP can cause this warning:
"Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead"
$file_content = preg_replace("/\\{res:\s*(\w+)\\}/ise", "\$CCSLocales->GetText('\\1')", $file_content);

The following code statement will resolve this . . .
$file_content = preg_replace_callback("/\\{res:\s*(\w+)\\}/is", create_function ('$matches', 'return $CCSLocales->GetText($matches[1]);'), $file_content);

NOTE:
The '/e' parameter is removed, and the 'create_function' method is used for the string substitution callback on each matching value returned by the regular expression. Also, since single-quotes are used as parameters to 'create_function', 'return $CCSLocales->GetText($matches[1]);' is used instead of "'return $CCSLocales->GetText($matches[1]);".

View profile  Send private message
eratech


Posts: 513
Posted: 10/18/2015, 10:58 PM

Thanks for the function rewrite. That one (and the mysql slashes deprecation) have been around for a while and hopefully will be tidied up in the next CCS Version.

Time to let go of some of those pre-5.4 settings.

Eric
_________________
CCS 3/4/5 ASP Classic, VB.NET, PHP
Melbourne, Victoria, Australia
View profile  Send private message
ccsminer

Posts: 159
Posted: 10/20/2015, 7:58 AM

Quote rgmortera:
HI
I'm using CodeCharge 4.4.3 but I install wampserver 2.5. When I publish a page the TEMPLATES.PHP from Codecharge send error in some functions like PREG_REPLACE(). The way to solve is use PROG_REPLACE_CALLBACK().
I test too with CodeCharge 5.1 and have same problem.
Any Idea.
Thank you in advanced
(sorry if my redaction no fine, my mother language Spanish) :)
What version of PHP are you using, when experiencing this problem?
View profile  Send private message
rgmortera


Posts: 4
Posted: 11/19/2015, 11:48 AM

Hi all

Sorry for a long time to answer.

We install Debian 8.1 with apache and PHP ver 5.6.

When we use CCDLookUP the only thing to fix was delete the & character before de $DBname and we have the value field. In the explorer to see the system, we cancel the option to show errors in the explorer.

We have another CAUTION ERRORS, and we are trying to solve then. When we find how fix I will send another message
_________________
Rodolfo G. Mortera Ortega
View profile  Send private message
ccsminer

Posts: 159
Posted: 11/28/2015, 10:25 PM

Quote rgmortera:
Hi all

Sorry for a long time to answer.

We install Debian 8.1 with apache and PHP ver 5.6.

When we use CCDLookUP the only thing to fix was delete the & character before de $DBname and we have the value field. In the explorer to see the system, we cancel the option to show errors in the explorer.

We have another CAUTION ERRORS, and we are trying to solve then. When we find how fix I will send another message

Looking forward to your responses.

A forum thread created specifically for these code deprecation errors would be very helpful.
View profile  Send private message
lucasleandrodemo

Posts: 15
Posted: 11/29/2015, 7:02 PM

I hope the YesSoftware bid soon a new version of CCS for we do not need all the time we get to hand modifying the files generated by CCS. The YesSoftware this taking too long to release a new version, will the company still exist? :)


http://forums.yessoftware.com/posts.php?post_id=124349&s_keyword=5.5







_________________
Lucas Leandro de Moura
lucasleandrodemoura@gmail.com
PHP Programmer
Estrela/RS - Brazil
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.

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.