one,
Davi: removing the Redirect / https://domain.name/ , etc.
Davi: So HTTPs will be used only when the webapp request is due to security subjects.
Davi: I have done a "git commit" and "git push" to offer a apache_virtual_domain.conf file which does not redirect HTTP to HTTPS
Davi: http://git.savannah.gnu.org/gitweb/?p=gnuherds-app.git;a=blob;f=Layer-0__Site_entry_point/doc/conf/apache_virtual_domain.conf;h=ca77561b4ce66a7911b6e4fb4d0b51e88fde6a9f;hb=6891de62c05c09967c8cdee634dc244a90c7dc72
Davi: Reference from: http://git.savannah.gnu.org/gitweb/?p=gnuherds-app.git;a=commit;h=6891de62c05c09967c8cdee634dc244a90c7dc72
Nicodemo: Hello... I am still not able to http instead of https
Davi: hi again
Davi: The below request redirect yet to HTTPS?
Davi: http://your_domain_name/
Davi: After modifying the configuration you have to restart Apache:
Davi: /etc/init.d/apache2 restart
Nicodemo: I added listen 443
Davi: It is right.
Nicodemo: They actually say for you to use 80 for HTTP and 443 for SSL
Davi: right.
Davi: Note that
Davi: if you are logged
Davi: you will be always on HTTPS.
Davi: You will came back to HTTP after you log out or your PHP session expires. You can login at gnuherds.org to note it.
Davi: That is to tranfer always over HTTPS (encrypted) the HTTP Cookie which your FireFox send to the Apache server.
Davi: What happens if you do an HTTP request to your domain?
Davi: http://your_domain_name/
Nicodemo: I think that is where I was making another error, I can not log in because it throws an error trying to connect to https://localhost
Davi: ah, so your HTTPS configuration is not right yet?
Davi: You have to create the HTTPS certificate and
Davi: install it.
Nicodemo: I think I did.
Davi: ah
Davi: Can yo send me an email with:
Davi: 1. your Virtual domain conf file
Nicodemo: I can connect from my remote using lynx but not through my desktop browser
Davi: 2. your two HTTPs certificate files:
Davi: gnuherds.org.crt
Davi: gnuherds.org.key
Nicodemo: my browser needs to user https://localhost:50443 or http://localhost:50081
Nicodemo: it tries to redirect me to https://localhost and that fails
Davi: ah!, so you can change the HTTP and HTTPS port of your apache
Davi: 80 --> 50081 (http://localhost:50081)
Davi: 443 --> 50443 (https://localhost:50443)
Nicodemo: connecting through lynx gives me this error Fatal error: Uncaught exception 'Exception' with message 'ERROR: PREPARE query(integer) AS SELECT
Q1_ProfessionalExperienceSinceYear,Q1_LA_Id,QP_LK_DesiredContractType,QP_DesiredWageRank,QP_LU_WageRankCurrency,QP_LB_WageRankByPerio
d,QP_CurrentEmployability,QP_AvailableToTravel,QP_AvailableToChangeResidence,Q1_AcademicQualificationDescription,Q1_CompletedEdition
FROM Q1_Qualifications WHERE Q1_E1_Id=$1; EXECUTE query('5');
ERROR: column "q1_la_id" does not exist' in
/var/www/gnuherds-app/gnuherds-app/Layer-5__DB_operation/PostgreSQL.php:57 Stack trace: #0
/var/www/gnuherds-app/gnuherds-app/Layer-5__DB_operation/Qualifications.php(39): PostgreSQL->getPostgreSQLObject('PREPARE
query(i...', 1) #1 /var/www/gnuherds-app/gnuherds-app/Layer-4__DBManager_etc/DB_Manager.php(213):
Qualifications->getQualificationsForEntity('5') #2
/var/www/gnuherds-app/gnuherds-app/Layer-2__Business_logic/others/Log_form.php(60): DBManager->getQualificationsForEntity('5') #3
/var/www/gnuherds-app/gnuherds-app/Layer-2__Business_logic/o in
/var/www/gnuherds-app/gnuherds-app/Layer-5__DB_operation/PostgreSQL.php on line 57
Nicodemo: here let me show you the script I use for qemu
Nicodemo: qemu savane.img -kernel-kqemu -redir tcp:2222::22 -redir tcp:50081::80 -redir tcp:50443::443 $*
Davi: Let me analyze the above error when you connect via lynx...
Davi: Oops!
Davi: There is another error in the GNUHerds__SQL_Implementation.sql file
Davi: The Q1_Qualifications table needs another field
Davi: let me fix it, so you can create the database again.
Davi: Well, the SQL is right, it is the webapp which is worng.
Davi: You can edit the below file:
Davi: gnuherds-app/Layer-5__DB_operation/Qualifications.php
Davi: line 38:
Davi: - Remove the "Q1_LA_Id," string from the SQL query.
Davi: I will fix later the webapp and commit it.
Nicodemo: does it need to be replaced?
Davi: removed.
Davi: Q1_LA_Id,
Davi: That field is old and was removed from the data base schema some month ago, but I forgot update the webapp code.
Davi: I have to remove it from the database of my development environment and from the gnuherds.org production host!
Nicodemo: well I am getting another error.
Davi: Show it here:
Nicodemo: Fatal error: Uncaught exception 'Exception' with message 'ERROR: PREPARE query(integer) AS SELECT
Q1_ProfessionalExperienceSinceYear,QP_LK_DesiredContractType,QP_DesiredWageRank,QP_LU_WageRankCurrency,QP_LB_WageRankByPeriod,QP_Curr
entEmployability,QP_AvailableToTravel,QP_AvailableToChangeResidence,Q1_AcademicQualificationDescription,Q1_CompletedEdition FROM
Q1_Qualifications WHERE Q1_E1_Id=$1; EXECUTE query('5');
ERROR: column "q1_academicqualificationdescription" does not exist'
in /var/www/gnuherds-app/gnuherds-app/Layer-5__DB_operation/PostgreSQL.php:57 Stack trace: #0
/var/www/gnuherds-app/gnuherds-app/Layer-5__DB_operation/Qualifications.php(39): PostgreSQL->getPostgreSQLObject('PREPARE
query(i...', 1) #1 /var/www/gnuherds-app/gnuherds-app/Layer-4__DBManager_etc/DB_Manager.php(213):
Qualifications->getQualificationsForEntity('5') #2
/var/www/gnuherds-app/gnuherds-app/Layer-2__Business_logic/others/Log_form.php(60): DBManager->getQualificationsForEntity('5') #3
/var/www/gnuherds-app/gnuherds-app/Layer-2 in /var/www/gnuherds-app/gnuherds-app/Layer-5__DB_operation/PostgreSQL.php on line 57
Nicodemo: I think that is different
Davi: It is the same rationale. Old field.
Davi: Remove it.
Nicodemo: q1_academicqualif*
Davi: yes
Davi: Additionally you will have to change some more lines of code. That will be your first
Davi: webapp code modification.
Davi: Remove the below lines too:
Davi: $array[1] = pg_fetch_all_columns($result, 1); // Q1_LA_Id
Davi: $array[9] = pg_fetch_all_columns($result, 9); // Q1_AcademicQualificationDescription
Nicodemo: well I am about to do it again
Davi: and update the indexes:
Davi: ($result, XXX);
Davi: as follows:
Davi: $array[0] = pg_fetch_all_columns($result, 0); // Q1_ProfessionalExperienceSinceYear
$array[2] = pg_fetch_all_columns($result, 1); // QP_LK_DesiredContractType
$array[3] = pg_fetch_all_columns($result, 2); // QP_DesiredWageRank
$array[4] = pg_fetch_all_columns($result, 3); // QP_LU_WageRankCurrency
$array[5] = pg_fetch_all_columns($result, 4); // QP_LB_WageRankByPeriod
$array[6] = pg_fetch_all_columns($result, 5); // QP_CurrentEmployability
$array[7] = pg_fetch_all_columns($result, 6); // QP_AvailableToTravel
$array[8] = pg_fetch_all_columns($result, 7); // QP_AvailableToChangeResidence
$array[10] = pg_fetch_all_columns($result, 8); // Q1_CompletedEdition
Nicodemo: well, I see what you mean
Nicodemo: I thought it had a problem with 52, 53
Davi: let me see
Davi: I think they will be right
Davi: Let me check
Nicodemo: Yeah invaid column 10
Nicodemo: invalid*
Davi: Do you have the lines as follows?
Davi: $array[0] = pg_fetch_all_columns($result, 0); // Q1_ProfessionalExperienceSinceYear
$array[2] = pg_fetch_all_columns($result, 1); // QP_LK_DesiredContractType
$array[3] = pg_fetch_all_columns($result, 2); // QP_DesiredWageRank
$array[4] = pg_fetch_all_columns($result, 3); // QP_LU_WageRankCurrency
$array[5] = pg_fetch_all_columns($result, 4); // QP_LB_WageRankByPeriod
$array[6] = pg_fetch_all_columns($result, 5); // QP_CurrentEmployability
$array[7] = pg_fetch_all_columns($result, 6); // QP_AvailableToTravel
$array[8] = pg_fetch_all_columns($result, 7); // QP_AvailableToChangeResidence
$array[10] = pg_fetch_all_columns($result, 8); // Q1_CompletedEdition
Davi: Note we have not changed the array indexes, $array[10]
Davi: but also the ($result, 8)
Davi: Note we are not using the ($result, 10) column 10.
Nicodemo: ah
Nicodemo: no problems now
Davi: it is ok
Davi: Maybe there will be more code which is affected by the removing of the Q1_LA_Id and the other table field. I have to check it.
Davi: Now you can 'play' a little with the source code of the webapp
Nicodemo: yes, but I do not have the volunteer and pledge pages
Davi: You could execute the below command
Davi: mv /var/www/gnuherds-app/ /var/www/gnuherds-app.stable/
Davi: mkdir /var/www/gnuherds-app/
Davi: cd /var/www/gnuherds-app/
Davi: wget http://gnuherds.org/gnuherds-online.tar.gz
Davi: tar xzvf gnuherds-online.tar.gz (http://gnuherds.org/gnuherds-online.tar.gz)
Davi: So you will get the code which is right now at on-line at the gnuherds.org domain name.
Davi: Note: I think you will have to do the above removing of Q1_LA_Id, ... and modify the source code..., at least up to we commit at push to the Git repository such bug fix.
Davi: Note the gnuherds-online.tar.gz (http://gnuherds.org/gnuherds-online.tar.gz) is a draft and transitional state of the "phase 1" code.
Davi: I have a more improved version at my development environment, here at my PC.
Davi: Even more 'transitional'.
Nicodemo: I'll make the environment within the hour but after that it I am going to go outside and do something else. I've been stuck too far long
Davi: It is OK.
Davi: See you
Davi: :)
Nicodemo: all done. Good Night.
Nicodemo has left the conversation.