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

 [RESOLVED-Cannot login in Portal/EmployeeDirectory]

Print topic Send  topic

Author Message
CodeCharge

Posts: 9
Posted: 04/02/2011, 8:54 AM

Hi all,
I've just installed CCS 4.3 (demo). I try to use EmployeeDirectory and Portal packages in Project Solutions. It's running Ok (IE6, FireFox 4, Google Chrome 10.0.648)! But when i login with default user/password "admin/admin", it's nothing that still login page! Why' that? I cannot login to admin menu to try administrator functions. Please help me to try remain functions!

Thanks!
///////////////////////////////
My solution:

My CCS 4.3 has a problem on my Windows XP SP2. I tried to install it on Windows Vista/ Windows 7, all that are OK!

I found that, When CCS 4.3 Published on my computer it does'nt generate code enough in "Login_events.php" file.

Now I just insert this code:

      
    global $CCSLocales;  
    global $Redirect;  
    if ( !CCLoginUser( $Container->login->Value, $Container->password->Value)) {  
        $Container->Errors->addError($CCSLocales->GetText("CCS_LoginError"));  
        $Container->password->SetValue("");  
        $Login_Login_DoLogin_OnClick = 0;  
    } else {  
        global $Redirect;  
        $Redirect = CCGetParam("ret_link", $Redirect);  
        $Login_Login_DoLogin_OnClick = 1;  
    }  

Between:

//End Login_Login_DoLogin_OnClick
.
.
//Close Login_Login_DoLogin_OnClick @5-08EDA736

Into this function "function Login_Login_DoLogin_OnClick(& $sender)"

Thanks to CodeCharge Studio Team! Thanks to ALL my friends. Now I can try full fuctions in EmployeeDirectory/Portal,... on My System.



View profile  Send private message
damian

Posts: 838
Posted: 04/02/2011, 3:43 PM

most likely two causes are:
1. you didnt setup db or db connections
2. you are using the .html page and not the .php page

_________________
if you found this post useful take the time to help someone else.... :)
View profile  Send private message
CodeCharge

Posts: 9
Posted: 04/02/2011, 9:06 PM


Thank to damian! But login page still ! Not redirect to admin menu.

I have installed XAMPP with my enviroment:
+ Apache 2.2.17
+ MySQL 5.5.8 (Community Server)
+ PHP 5.3.5 (VC6 X86 32bit) + PEAR
+ XAMPP Control Version 2.5 from www.nat32.com
+ XAMPP Security
+ SQLite 2.8.15
+ OpenSSL 0.9.8o
+ phpMyAdmin 3.3.9
+ ADOdb 5.11
+ Mercury Mail Transport System v4.62
+ FileZilla FTP Server 0.9.37
+ Webalizer 2.01-10
+ Zend Optimizer 3.3.0
+ Perl 5.10.1
+ Mod_perl 2.0.4
+ Tomcat 7.0.3
///////////
phpmyAdmin is running ok. I note this "C:\xampp\tmp" in which sessions files are created when phpMyAdmin, Portal/EmployeeDirectory are working. But session files were created by Portal/EmployeeDirectory they are nothing(0 KB). But session file was created by phpMyadmin is really size > 0 KB (that's OK!).

My connections DB are OK both internet and intranet. Portal/EmployeeDirectory are working as ".php" not "html"! I see employees list and articals list, it's real world. Except one thing that poblem login page, i cannot login to admin menu. I am sure my project setting is corrected (PHP 5, Mysql ODBC 5.1 for Disign and Mysql for Server).

My links when i submited login page:
1.Portal
http://localhost/portal/Login.php?ret_link=%2Fportal%2F...&type=notLogged
2. EmployeeDirectory
http://localhost/emp/Login.php?ret_link=%2Femp%2FAdminM...&type=notLogged
View profile  Send private message
damian

Posts: 838
Posted: 04/03/2011, 3:24 PM

both are returning saying notLogged... what if you try a randon user/pass do you get same error?

_________________
if you found this post useful take the time to help someone else.... :)
View profile  Send private message
CodeCharge

Posts: 9
Posted: 04/03/2011, 7:25 PM

Quote damian:
both are returning saying notLogged... what if you try a randon user/pass do you get same error?


Thanks to damian!

I try a random user/pass, i got same problem. Login screen is still, no errors, i don't know why it doesn't report anything?

this is my connection (common.php):
$CCConnectionSettings = array (
"Intranet" => array(
"Type" => "MySQL",
"DBLib" => "MySQL",
"Database" => "Intranet",
"Host" => "localhost",
"Port" => "3306",
"User" => "root",
"Password" => "mypass",
"Persistent" => false,
"DateFormat" => array("yyyy", "-", "mm", "-", "dd", " ", "HH", ":", "nn", ":", "ss"),
"BooleanFormat" => array(1, 0, ""),
"Uppercase" => false
)
);

I guess that it has problems with session vars or version PHP? Because i use the newest xampp so that CCS 4.3 didn't support them?

I am using Windows XP SP2, no firewall, no virus-anti, and phpMyadmin is working ok (export and import Mysql files, set password,...). My session folder is ok, session files were created.

I also tried with the newest WAMPSERVER 2.1, and got the same results.

I am being patient to hearing from your helps!

Thanks!

View profile  Send private message
damian

Posts: 838
Posted: 04/03/2011, 11:07 PM

did you edit common.php settings yourself or did you go thru the connection wizard and project settings?

you canalso have isues with mysql4 or above as the complex passwords dont always seem to work for me...

i do the following:

Run mysql and login as root:

mysql -u root -p

Locate all accounts with the new password encryption set (password length will be greater than 16 characters). Type command exactly as is – no changes are required:

SELECT Host, User, Password FROM mysql.user  
WHERE LENGTH(Password) > 16;

Then, type the following command, editing as necessary. Please include all ‘’ marks and change only the following values:
somepassword – set to the required password
someuser – set to the user whose password is being changed
somehost – set to the server on which the database is hosted

UPDATE mysql.user  
SET password=OLD_PASSWORD('somepassword')  
WHERE user='someuser'  
AND host='somehost';

After you have set the passwords to the old format, flush the tables.

flush privileges;

Then exit the mysql client with

quit



_________________
if you found this post useful take the time to help someone else.... :)
View profile  Send private message
CodeCharge

Posts: 9
Posted: 04/04/2011, 1:06 AM

Thanks to damian!
/////////////////////////////////
This is message when I did follow you:
Database error: cannot connect to Database mysqlnd cannot connect to MySQL 4.1+ using the old insecure authentication. Please use an administration tool to reset your password with the command SET PASSWORD = PASSWORD('your_existing_password'). This will store a new, and more secure, hash value in mysql.user. If this user is used in other scripts executed by PHP 5.2 or earlier you might need to remove the old-passwords flag from your my.cnf file
MySQL Error
Session halted.
/////////////////////////////////////

Your solution maybe correct in this case: "Access denied for user: 'root@localhost' to database 'mysql'"

BUT as you know, EmployeeDirectory/Portal 's login pages uses "user" and "employees" tables (Intranet, internet) to get user/pass and compare what we submited. It does'nt use mysql.user table.

I used the connection wizard and project settings, not edit anything in common.php. I connected correctly to Intranet/internet. Because i can see all employee directory, articales, links,...on default pages: Example: http://localhost/emp/default.php

But just login page has the big problem!

When I try to disable CCSecurityRedirect () function in restricted pages: // CCSecurityRedirect("3;2", "Login.php");
example: Adminmenu.php

Now I can access Admin Menu successfully, It proved that my connection is OK, Mysql is running OK! But PHP? I hope I will pass it!

Thanks!


View profile  Send private message
damian

Posts: 838
Posted: 04/04/2011, 1:32 AM

follow my instruction to downgrade the complex secuity that is default in your mysql database
once you have done that the auth pages will work
you should NEVER EVER edit .php pages directly until you know the codecharge way of doing things. undo your changes or even delete the .php pages and regenerate the project

_________________
if you found this post useful take the time to help someone else.... :)
View profile  Send private message
CodeCharge

Posts: 9
Posted: 04/04/2011, 3:58 AM

I am ...tired! Because login problem!

I downgraded with my OLD_PASSWORD. But it's still!

Here:
1. Before Password
root *F176B812C0BA103B44CA066D7F89DFCC49EC1BAA
2.After OLD_PASSWORD (16 chars)
root 1a415fe11f1bc36e

Would you download CCS 4.3 + XAMPP and try on your desktop? Maybe you will teach me some new experience?

Thanks!
View profile  Send private message
damian

Posts: 838
Posted: 04/04/2011, 4:10 AM

set all the passwords now to new simple passwords
add a new user and pass in the intranet database
you learn best by solving issues yourself - the issue here is not with ccs

_________________
if you found this post useful take the time to help someone else.... :)
View profile  Send private message
datadoit
Posted: 04/04/2011, 5:25 AM

Make sure register_globals is off.
CodeCharge

Posts: 9
Posted: 04/04/2011, 7:33 AM

Quote datadoit:
Make sure register_globals is off.

OK! It's always register_globals = Off
But Login Screen is always "Login"

Thanks!
/////

I tried to change all users in mysql.users table with old password (16 chars). And created a new user/pass in which but no more better.
Also created a new user in " Internet; Intranet " to submit. Nothing change after login.
If we downgrated, we will not use phpMyadmin. It's always requested to run in the hightest security so Mysql 4.1+ is used (password >16 chars)

Thanks to ALL!
View profile  Send private message
datadoit
Posted: 04/04/2011, 8:38 AM

You said earlier that you were able to make a connection to the MySQL
server, since you're able to see database content via the Default.php
page. Correct?

So the problem isn't with your connection to the database, from what I
can tell given the information you've provided.

One invaluable lesson you can learn from this is to learn how to debug
your environment. Turn on all logging, and you will know for sure what
is happening. It will tell you whether there's a MySQL connection
problem, a PHP problem, etc.
CodeCharge

Posts: 9
Posted: 04/04/2011, 9:34 AM

Quote datadoit:
You said earlier that you were able to make a connection to the MySQL
server, since you're able to see database content via the Default.php
page. Correct?

So the problem isn't with your connection to the database, from what I
can tell given the information you've provided.

One invaluable lesson you can learn from this is to learn how to debug
your environment. Turn on all logging, and you will know for sure what
is happening. It will tell you whether there's a MySQL connection
problem, a PHP problem, etc.

Thank you very much!

I will try to setup my enviroment in PHP 4.3 / MySQL 4, Apache 2. Maybe It will be OK. If CCS 4.3 only supports in older versions PHP+MYSQL, so I'm really surprise. With Joomla 1.6, Drupal 7 I got easily to setup my enviroment to work.


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.