CodeCharge Studio
search Register Login  

Web Reports

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

YesSoftware Forums -> CodeCharge Studio -> General/Other

 [SOLVED] Is CCSecurityRedirect function missing from your CCS4.3.00.7676,? I do not see it in mine.

Print topic Send  topic

Author Message
joejac

Posts: 242
Posted: 07/25/2010, 2:27 PM

Hello everybody.

Suddenly, foreign pages that uses CCS CCSecurityRedirect function stopped working I get:

Fatal error: Call to undefined function CCSecurityRedirect() in W:\www\customer\files\zzz\ajm\inc\config.base.php on line 15

Looking into the code generated by CCS4.3.00.767 in Common.php function CCSecurityRedirect() is missing.

I double checked my Security Settings and Groups and they are fine.

Any Idea to solve this problem?

Thanks a lot
Regards
joejac
View profile  Send private message
datadoit
Posted: 07/25/2010, 3:33 PM

Same version here, but no issues. Function below. Have you tried
completely deleting the Common.php file and letting CCS generate a new one?


<code>
//CCSecurityRedirect @0-0D06D171
function CCSecurityRedirect($GroupsAccess, $URL)
{
global $_SERVER;
$ReturnPage = isset($_SERVER["REQUEST_URI"]) ?
$_SERVER["REQUEST_URI"] : "";
if(!strlen($ReturnPage)) {
$ReturnPage = isset($_SERVER["SCRIPT_NAME"]) ?
$_SERVER["SCRIPT_NAME"] : "";
$QueryString = CCGetQueryString("QueryString", "");
if($QueryString !== "")
$ReturnPage .= "?" . $QueryString;
}
$ErrorType = CCSecurityAccessCheck($GroupsAccess);
if($ErrorType != "success")
{
if(!strlen($URL))
$Link = RelativePath . "/" . "login.php";
else
$Link = $URL;
header("Location: " . $Link . "?ret_link=" .
urlencode($ReturnPage) . "&type=" . $ErrorType);
exit;
}
}
//End CCSecurityRedirect
</code>
joejac

Posts: 242
Posted: 07/25/2010, 6:59 PM

Thanks a lot, datadoit.

I did what you said and it worked, now I have the CCSecurityRedirect function in Common.php, very strange, but it worked.

Best regards
joejac
View profile  Send private message
datadoit
Posted: 07/26/2010, 5:56 AM

We'll call it unexplained phenomenon. :)

This is why I preach to NEVER muck around in the CCS generated files
such as Common.php. There will be times when it simply has to be blown
away and regenerated, and if it's been 'customized', your work will be lost.

The way we handle it here is with one simple line at the top of the
Common file:

include(RelativePath . "/Custom.php");

Then put all of your own custom functions, classes and routines there.
joejac

Posts: 242
Posted: 07/27/2010, 9:29 AM

Great advice datadoit!

I will move my custom code from Common.php to Custom.php, I guess this file has to be created outside of CCS4, because inside CCS as a blank page it gets a lot of extra stuff like i.e Common.php included again, so I guess Custom.php has to be a clean php file, am I right?

Best regards
joejac
View profile  Send private message
datadoit
Posted: 07/27/2010, 9:33 AM

Yes, just create the file and give it the appropriate open/close PHP
tags. After that, you can still open and work with it in CCS.


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.