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

 SOLVED: Call to undefined function CCSetALCookie()

Print topic Send  topic

Author Message
elmerbakker1

Posts: 4
Posted: 03/03/2015, 4:59 AM

Hi all,

I'm working with 2 webservers (IIS 7 and Uniform server with apache, mysql and PHP). When I try do implement the autologin function, everything on the IIS server is well. The user logs in and the cookie is created. But when I try the same on the Uniform server, it wont login and gives the message below. Any ideas anyone?

Call to undefined function CCSetALCookie()
View profile  Send private message
eratech


Posts: 513
Posted: 03/03/2015, 8:14 PM

I can't find any function called
CCSetALCookie()

in CCS 5.1 only
CCSetCookie()
which is in the Common.php file (around line 240) and according to the Manual it's also in Perl projects.

Check your code if an extra 'AL' has crept in, and also perhaps not all the files have published to the Uniform server?

Cheers

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

Posts: 4
Posted: 03/03/2015, 11:18 PM

Hi Eric,

Thanks very much for your response. I have found the problem and was able to fix it. The CCSetALCookie() function is created in common.php only when the autologin option is used. I did not copy the new common.php to the Uniform server, but only the login page so the function did not exist in common.php.

Thanks again for your help Eric.

Regards,
Elmer
View profile  Send private message
eratech


Posts: 513
Posted: 03/05/2015, 4:02 PM

Cool - and thanks for the info about the Auto Login - I've only used that on a .NET project so never seen it in the PHP projects I normally do.

Interesting that it wasn't mentioned in the PHP Functions in the Manual either (CCSetCookie and CCGetCookie are)

Cheers

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

Posts: 4
Posted: 03/06/2015, 2:07 AM

Just FYI: here is the code that is used in common.php

//CCSetALCookie @0-603F6028  
function CCSetALCookie($login, $password) {  
    $login    = CCEncryptString($login, CCS_ENCRYPTION_KEY_FOR_COOKIE);  
    $password = CCEncryptString($password, CCS_ENCRYPTION_KEY_FOR_COOKIE);  
    $result   = CCEncryptString($login . ":" . $password . ":" . (time() + CCS_EXPIRATION_DATE), CCS_ENCRYPTION_KEY_FOR_COOKIE);  
    CCSetCookie("<COOKIE_NAME>", $result, time() + CCS_EXPIRATION_DATE, "/", "", false);  
}  
//End CCSetALCookie  
  
//CCRefreshALCookie @0-7658D5D5  
function CCRefreshALCookie($expirationDate) {  
    if (CCS_SLIDING_EXPIRATION) {  
        if (($expirationDate - (CCS_EXPIRATION_DATE / 2)) > time()) {  
            list($login, $password, $expDate) = CCParseALCookie("<COOKIE_NAME>");  
            CCSetALCookie($login, $password);  
        }  
    }  
}  
//End CCRefreshALCookie
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.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


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