Problem with login.php on Linux

OrangeHRM installation experiences

Moderator: Admin

Problem with login.php on Linux

Postby sthatte » Wed Nov 15, 2006 11:42 am

Hi,

Am trying to install and get OrangeHRM 1.2 working on Linux.

Have manually created the MySQL database. We are running Apache.

After installation http://localhost/orangehrm we get the login.php screen.

Whatever username/password is entered here we only get a blank screen. Is there a way to debug this ?

Did notice on one post mention about not configuring PHP as CGI. How is this set in Apache ?

Any help much apprciated.

Regards
Shyamal
sthatte
 
Posts: 7
Joined: Wed Nov 15, 2006 11:37 am

Re: Problem with login.php on Linux

Postby sthatte » Wed Nov 15, 2006 5:44 pm

When I try and run the login.php standalone with
php -e -f /var/www/html/orangehrm/login.php

get the following error
PHP Notice: Undefined index: REQUEST_URI in

Any clues

Thanks in advance

Regards
Shyamal

[quote="sthatte"]Hi,

Am trying to install and get OrangeHRM 1.2 working on Linux.

Have manually created the MySQL database. We are running Apache.

After installation http://localhost/orangehrm we get the login.php screen.

Whatever username/password is entered here we only get a blank screen. Is there a way to debug this ?

Did notice on one post mention about not configuring PHP as CGI. How is this set in Apache ?

Any help much apprciated.

Regards
Shyamal[/quote]
sthatte
 
Posts: 7
Joined: Wed Nov 15, 2006 11:37 am

Re: Problem with login.php on Linux

Postby koshika » Thu Nov 16, 2006 3:53 pm

Hi,

Thanks for your interest in OrangeHRM.

This is in regard to the previous two postings.

From what you have said, you have installed OrangeHRM manually without the help of the in-built web-installer. Since you were forwarded into login.php when you entered http://localhost/orangehrm you have created the Conf.php too. I hope you used dbscript.sql to create the database since that is the one required if you are doing a manual installation. (refer OrangeHRM FAQ; http://www.orangehrm.com/home/index.php?option=com_content&task=view&id=22&Itemid=54 for more details on how to install OrangeHRM manually)

If you did a manual installation the login credentials would be;
user-name: demo
password: demo

If the login results in a blank screen, as most PHP developers would tell you it is because there is an error in the page, and since by default (in PHP5) error display is set to off you get a blank screen. Now don't be mistaken into the error you have received (said in the second posting, that is due to something else). The only means of debugging I recommend in this case is Apache error log, which would contain all the errors encountered.

Having PHP running as CGI mode reduces performance and functionally there are certain limitations while being more secure. To run PHP in CGI mode you have to re-compile PHP with --enable-cgi in configure command. I don't think this has anything got to do with your problem.

Running the command line "php -e -f /var/www/html/orangehrm/login.php" will not help your course. PHP command-line is meant for stand-alone PHP scripts and not meant for scripts meant to be processed by a Web Server. "REQUEST_URI" is a environment variable set by the web-server and because it was not set when you ran the script command-line you get the error.

So the best thing you can do is to quote whatever error that is captured in the Apache error_log.

Hoping to hear from you soon.

Regards,

Koshika Surasena
koshika
 
Posts: 202
Joined: Thu Oct 19, 2006 10:07 am

Postby sthatte » Thu Nov 16, 2006 4:15 pm

Hi Koushika,

Thank you for your reply.

Had run the dbscript.sql script successfully and run the same sql as provided for manual installation to create admin user. Can this be checked ?

With what user/privileges does Orangehrm login to mysql ?

Stopped both http/mysql, cleaned logs, started both and did the same.

Below are the logs

=========== access.log ============
127.0.0.1 - - [16/Nov/2006:16:37:19 -0500] "GET /orangehrm/ HTTP/1.1" 302 - "-" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.13) Gecko/20060501 Fedora/1.7.13-1.1.fc5"
127.0.0.1 - - [16/Nov/2006:16:37:19 -0500] "GET /orangehrm/login.php HTTP/1.1" 200 8314 "-" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.13) Gecko/20060501 Fedora/1.7.13-1.1.fc5"
127.0.0.1 - - [16/Nov/2006:16:37:42 -0500] "POST /orangehrm/login.php HTTP/1.1" 200 - "http://localhost/orangehrm/login.php" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.13) Gecko/20060501 Fedora/1.7.13-1.1.fc5"
127.0.0.1 - - [16/Nov/2006:16:39:30 -0500] "GET /orangehrm/login.php HTTP/1.1" 200 8314 "-" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.13) Gecko/20060501 Fedora/1.7.13-1.1.fc5"
127.0.0.1 - - [16/Nov/2006:16:39:46 -0500] "POST /orangehrm/login.php HTTP/1.1" 200 - "http://localhost/orangehrm/login.php" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.13) Gecko/20060501 Fedora/1.7.13-1.1.fc5"

==================================

======= error.log =====================
[Thu Nov 16 16:35:33 2006] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Thu Nov 16 16:35:34 2006] [notice] Digest: generating secret for digest authentication ...
[Thu Nov 16 16:35:34 2006] [notice] Digest: done
[Thu Nov 16 16:35:34 2006] [notice] mod_python: Creating 4 session mutexes based on 256 max processes and 0 max threads.
[Thu Nov 16 16:35:34 2006] [notice] Apache/2.2.0 (Fedora) configured -- resuming normal operations

==============================================

============= ssl_error_log =====================
[Thu Nov 16 16:35:34 2006] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Thu Nov 16 16:35:34 2006] [warn] RSA server certificate CommonName (CN) `localhost.localdomain' does NOT match server name!?
[Thu Nov 16 16:35:34 2006] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Thu Nov 16 16:35:34 2006] [warn] RSA server certificate CommonName (CN) `localhost.localdomain' does NOT match server name!?

===============================================

============ mysqld.log ==============
061116 16:35:25 mysqld started
061116 16:35:26 InnoDB: Started; log sequence number 0 733851
061116 16:35:26 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.0.18' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source distribution

========================================


Any help appreciated
sthatte
 
Posts: 7
Joined: Wed Nov 15, 2006 11:37 am

Postby sthatte » Thu Nov 16, 2006 5:52 pm

Hi Koushik,

The database contains following tables.

mysql> show tables;
+---------------------------------+
| Tables_in_orangehrm |
+---------------------------------+
| hs_hr_compstructtree |
| hs_hr_country |
| hs_hr_currency_type |
| hs_hr_db_version |
| hs_hr_developer |
| hs_hr_district |
| hs_hr_education |
| hs_hr_eec |
| hs_hr_emp_attachment |
| hs_hr_emp_basicsalary |
| hs_hr_emp_children |
| hs_hr_emp_contract_extend |
| hs_hr_emp_dependents |
| hs_hr_emp_education |
| hs_hr_emp_emergency_contacts |
| hs_hr_emp_history_of_ealier_pos |
| hs_hr_emp_language |
| hs_hr_emp_licenses |
| hs_hr_emp_member_detail |
| hs_hr_emp_passport |
| hs_hr_emp_picture |
| hs_hr_emp_reportto |
| hs_hr_emp_skill |
| hs_hr_emp_work_experience |
| hs_hr_employee |
| hs_hr_emprep_usergroup |
| hs_hr_empreport |
| hs_hr_empstat |
| hs_hr_ethnic_race |
| hs_hr_file_version |
| hs_hr_geninfo |
| hs_hr_job_title |
| hs_hr_jobtit_empstat |
| hs_hr_language |
| hs_hr_licenses |
| hs_hr_location |
| hs_hr_membership |
| hs_hr_membership_type |
| hs_hr_module |
| hs_hr_nationality |
| hs_hr_province |
| hs_hr_rights |
| hs_hr_skill |
| hs_hr_user_group |
| hs_hr_users |
| hs_hr_versions |
| hs_pr_salary_currency_detail |
| hs_pr_salary_grade |
+---------------------------------+
48 rows in set (0.00 sec)

mysql> select database();
+------------+
| database() |
+------------+
| orangehrm |
+------------+
1 row in set (0.00 sec)

Any specific table to be looked at ?

Thanks and Regards
Shyamal
sthatte
 
Posts: 7
Joined: Wed Nov 15, 2006 11:37 am

Postby sthatte » Thu Nov 16, 2006 6:10 pm

Hi Koushik,

Got this error in the error_log of httpd after i tried connecting from another machine on the LAN

[Thu Nov 16 18:18:30 2006] [error] [client 192.168.5.8] Directory index forbidden by Options directive: /var/www/html/
[Thu Nov 16 18:18:30 2006] [error] [client 192.168.5.8] File does not exist: /var/www/html/favicon.ico

Something wrong in my httpd setup ?

Regards
Shyamal
sthatte
 
Posts: 7
Joined: Wed Nov 15, 2006 11:37 am

Postby sthatte » Wed Nov 22, 2006 4:11 pm

Hi,

The problem was php-mysql not being installed.

Installed OrangeHRM 2.0, installed php-mysql.

Works like a breeze.

Thank you.

Shyamal
sthatte
 
Posts: 7
Joined: Wed Nov 15, 2006 11:37 am


Return to Setup

Who is online

Users browsing this forum: No registered users and 2 guests