Hi,
It is not exactly the same : have reponse
It is not at all result expected for cryptData (should be some ; separated fields)
In fact, result is a generic message that occurs when session is lost.
So it seems Nginx does not support PHP session.
Maybe it should be configured to use sessions. If it is not possible, so Nginx will never be able to run ProjeQtOr.
<?php // Start Session session_start(); // Show banner echo 'Session Support Checker
'; // Check if the page has been reloaded if(!isset($_GET['reload']) OR $_GET['reload'] != 'true') { // Set the message $_SESSION['MESSAGE'] = 'Session support enabled!
'; // Give user link to check echo 'Click HERE to check for PHP Session Support.
'; } else { // Check if the message has been carried on in the reload if(isset($_SESSION['MESSAGE'])) { echo $_SESSION['MESSAGE']; } else { echo 'Sorry, it appears session support is not enabled, or you PHP version is to old. Click HERE to go back.
'; } } ?>
i've tested your idea with this script. Runs fine -> Session Support enabled. Therefore i think that it's not the problem or how do you think?
I have an idea, that could explain behavior : content of $_SERVER variable.
Could you please try and add a debug line on line 30 (about) of /tool/projeqtor.php :
debugLog($_SERVER);
Try again.
Then post log file here.
i placed it beyond the session_start(): directive.
After that the Server returns a 502 Bad Gateway - after removing the Site is loading again. Do you think that this could lead us to a solution?
Yes, this may be the point going wrong with Nginx.
The $_SERVER PHP varialbe (an array) depends on ... the server.
ProjeQtOr works fine with $_SERVER provided by Apache and has been adapted to fit IIS.
But it seems Nginx is very restrictive with this variable.
Data ha to be explicitly defined.
Here are some examples :
https://ma.ttias.be/setting-https-server-variables-in-php-fpm-with-nginx/
http://wiki.nginx.org/HttpCoreModule#.24hostname
http://serverfault.com/questions/324420/nginx-doesnt-send-serverdocument-root-to-php-fpm
and also, with an explicit list of standard params expected in $_SERVER :
http://kbeezie.com/php-self-path-nginx/
So please try and configure Nginx so the the
debugLog($_SERVER);
returns something, then we'll be able to check which params may be mission.
it does not seem to be a Problem with "$_SERVER" in general
trying to run a
returns
array(35) { ["USER"]=> string(8) "www-data" ["HOME"]=> string(8) "/var/www" ["FCGI_ROLE"]=> string(9) "RESPONDER" ["PATH_INFO"]=> string(0) "" ["SCRIPT_FILENAME"]=> string(27) "/var/www/project/maxexe.php" ["QUERY_STRING"]=> string(0) "" ["REQUEST_METHOD"]=> string(3) "GET" ["CONTENT_TYPE"]=> string(0) "" ["CONTENT_LENGTH"]=> string(0) "" ["SCRIPT_NAME"]=> string(11) "/maxexe.php" ["REQUEST_URI"]=> string(11) "/maxexe.php" ["DOCUMENT_URI"]=> string(11) "/maxexe.php" ["DOCUMENT_ROOT"]=> string(16) "/var/www/project" ["SERVER_PROTOCOL"]=> string(8) "HTTP/1.1" ["HTTPS"]=> string(2) "on" ["GATEWAY_INTERFACE"]=> string(7) "CGI/1.1" ["SERVER_SOFTWARE"]=> string(11) "nginx/1.6.2" ["REMOTE_ADDR"]=> string(13) "" ["REMOTE_PORT"]=> string(5) "53818" ["SERVER_ADDR"]=> string(14) "" ["SERVER_PORT"]=> string(3) "443" ["SERVER_NAME"]=> string(23) "project.certifiedit.net" ["REDIRECT_STATUS"]=> string(3) "200" ["HTTP_HOST"]=> string(23) "project.certifiedit.net" ["HTTP_CONNECTION"]=> string(10) "keep-alive" ["HTTP_CACHE_CONTROL"]=> string(9) "max-age=0" ["HTTP_ACCEPT"]=> string(74) "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8" ["HTTP_USER_AGENT"]=> string(110) "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.130 Safari/537.36" ["HTTP_DNT"]=> string(1) "1" ["HTTP_ACCEPT_ENCODING"]=> string(19) "gzip, deflate, sdch" ["HTTP_ACCEPT_LANGUAGE"]=> string(35) "de-DE,de;q=0.8,en-US;q=0.6,en;q=0.4" ["HTTP_COOKIE"]=> string(36) "PHPSESSID=s61rb043dk81cufdjco8f5c4o5" ["PHP_SELF"]=> string(0) "" ["REQUEST_TIME_FLOAT"]=> float(1436008843.7384) ["REQUEST_TIME"]=> int(1436008843) }
just the debugLog Funktion seems to break the Server
array(39) { ["USER"]=> string(8) "www-data" ["HOME"]=> string(8) "/var/www" ["FCGI_ROLE"]=> string(9) "RESPONDER" ["PATH_INFO"]=> string(0) "" ["SCRIPT_FILENAME"]=> string(36) "/var/www/project/tool/loginCheck.php" ["QUERY_STRING"]=> string(40) "destinationWidth=300&destinationHeight=0" ["REQUEST_METHOD"]=> string(4) "POST" ["CONTENT_TYPE"]=> string(33) "application/x-www-form-urlencoded" ["CONTENT_LENGTH"]=> string(2) "81" ["SCRIPT_NAME"]=> string(20) "/tool/loginCheck.php" ["REQUEST_URI"]=> string(61) "/tool/loginCheck.php?destinationWidth=300&destinationHeight=0" ["DOCUMENT_URI"]=> string(20) "/tool/loginCheck.php" ["DOCUMENT_ROOT"]=> string(16) "/var/www/project" ["SERVER_PROTOCOL"]=> string(8) "HTTP/1.1" ["HTTPS"]=> string(2) "on" ["GATEWAY_INTERFACE"]=> string(7) "CGI/1.1" ["SERVER_SOFTWARE"]=> string(11) "nginx/1.6.2" ["REMOTE_ADDR"]=> string(13) "" ["REMOTE_PORT"]=> string(5) "54164" ["SERVER_ADDR"]=> string(14) "" ["SERVER_PORT"]=> string(3) "443" ["SERVER_NAME"]=> string(23) "site" ["REDIRECT_STATUS"]=> string(3) "200" ["HTTP_HOST"]=> string(23) "site" ["HTTP_CONNECTION"]=> string(10) "keep-alive" ["HTTP_CONTENT_LENGTH"]=> string(2) "81" ["HTTP_ORIGIN"]=> string(31) "https://site" ["HTTP_X_REQUESTED_WITH"]=> string(14) "XMLHttpRequest" ["HTTP_USER_AGENT"]=> string(110) "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.130 Safari/537.36" ["HTTP_CONTENT_TYPE"]=> string(33) "application/x-www-form-urlencoded" ["HTTP_ACCEPT"]=> string(3) "*/*" ["HTTP_DNT"]=> string(1) "1" ["HTTP_REFERER"]=> string(45) "https://site/view/main.php" ["HTTP_ACCEPT_ENCODING"]=> string(13) "gzip, deflate" ["HTTP_ACCEPT_LANGUAGE"]=> string(35) "de-DE,de;q=0.8,en-US;q=0.6,en;q=0.4" ["HTTP_COOKIE"]=> string(36) "PHPSESSID=s61rb043dk81cufdjco8f5c4o5" ["PHP_SELF"]=> string(0) "" ["REQUEST_TIME_FLOAT"]=> float(1436009111.9144) ["REQUEST_TIME"]=> int(1436009111) } Verbindung abgebrochen. Bitte neu anmelden.
(Connection Broken)
above shown when trying to login at the space (line30) of the projeqtor. If you say that there is something wrong with the server directive i will take a deeper look. As it seems to me just the debugLog Function breaks the Server
Hi,
If there is an issue with debugLog, then possibly you have access right issue to target folder.
Try and set access rights as wide as possible (777 would be good to test).
Then, all expected params are not all there.
At least ['PHP_SELF'] is missing, what explains invalid connection.
I'll check all requested params and let you know what must be added in server and what can be provided through a patch
Hi,
I found an issue : $_SERVER['PHP_SELF'] is empty.
Here is a workaround to configure Ngnix :
http://thehungrycoder.com/tutorial/php_self-is-empty.html
I'll try and add a patch to define PHP_SELF when it is not set.
About debugLog() issue, it is just that this function must be called after
include_once "../tool/parameters.php";
where paraeters to log file are defined 😉
Hi,
Here is a patch to avoid changing Nginx configuration :
just add these line about line 47 or /tool/projeqtor.php
// some servers provide empty PHP_SELF, fill it
if (! isset($_SERVER ['PHP_SELF']) or ! $_SERVER ['PHP_SELF']) { // PHP_SELF do not exist or is empty
$_SERVER ['PHP_SELF']=$_SERVER ['SCRIPT_NAME'];
}
Tell me if this help.
thank you this helped but...wondering why...
2015-07-04 18:51:41.225 ===== TRACE ===== Migrating from version < V4.0.0 : previous errors are expected for Class 'User' on fields 'loginTry', 'salt' and 'crypto'
2015-07-04 18:51:41.235 ===== TRACE ===== Login error for user '9Z▒?b'
2015-07-04 18:52:11.437 ===== TRACE ===== Migrating from version < V4.0.0 : previous errors are expected for Class 'User' on fields 'loginTry', 'salt' and 'crypto'
2015-07-04 18:52:11.451 ===== TRACE ===== Login error for user '
▒H▒'
2015-07-04 18:53:57.050 ===== TRACE ===== Migrating from version < V4.0.0 : previous errors are expected for Class 'User' on fields 'loginTry', 'salt' and 'crypto'
2015-07-04 18:53:57.060 ===== TRACE ===== Login error for user '▒q▒▒▒'
but now i am getting a bit angry...
which modules does the programm all in all need for running fine.
ok does not seem as the server would import the Databases. Tried it now within an hosted server under apache, therefore i had to comment lines 2528++ with replacing time limits before it runs. There it seems to have problems with UTF8/ German Special Chars (äöü and €)
array(39) { ["USER"]=> string(8) "www-data" ["HOME"]=> string(8) "/var/www" ["FCGI_ROLE"]=> string(9) "RESPONDER" ["PATH_INFO"]=> string(0) "" ["SCRIPT_FILENAME"]=> string(36) "/var/www/project/tool/loginCheck.php" ["QUERY_STRING"]=> string(55) "destinationWidth=300&destinationHeight=37.2727279663086" ["REQUEST_METHOD"]=> string(4) "POST" ["CONTENT_TYPE"]=> string(33) "application/x-www-form-urlencoded" ["CONTENT_LENGTH"]=> string(2) "81" ["SCRIPT_NAME"]=> string(20) "/tool/loginCheck.php" ["REQUEST_URI"]=> string(76) "/tool/loginCheck.php?destinationWidth=300&destinationHeight=37.2727279663086" ["DOCUMENT_URI"]=> string(20) "/tool/loginCheck.php" ["DOCUMENT_ROOT"]=> string(16) "/var/www/project" ["SERVER_PROTOCOL"]=> string(8) "HTTP/1.1" ["HTTPS"]=> string(2) "on" ["GATEWAY_INTERFACE"]=> string(7) "CGI/1.1" ["SERVER_SOFTWARE"]=> string(11) "nginx/1.6.2" ["REMOTE_ADDR"]=> string(13) "" ["REMOTE_PORT"]=> string(5) "57070" ["SERVER_ADDR"]=> string(14) "" ["SERVER_PORT"]=> string(3) "443" ["SERVER_NAME"]=> string(23) "site" ["REDIRECT_STATUS"]=> string(3) "200" ["HTTP_HOST"]=> string(23) "site" ["HTTP_CONNECTION"]=> string(10) "keep-alive" ["HTTP_CONTENT_LENGTH"]=> string(2) "81" ["HTTP_ORIGIN"]=> string(31) "https://site" ["HTTP_X_REQUESTED_WITH"]=> string(14) "XMLHttpRequest" ["HTTP_USER_AGENT"]=> string(110) "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.130 Safari/537.36" ["HTTP_CONTENT_TYPE"]=> string(33) "application/x-www-form-urlencoded" ["HTTP_ACCEPT"]=> string(3) "*/*" ["HTTP_DNT"]=> string(1) "1" ["HTTP_REFERER"]=> string(45) "https://site/view/main.php" ["HTTP_ACCEPT_ENCODING"]=> string(13) "gzip, deflate" ["HTTP_ACCEPT_LANGUAGE"]=> string(35) "de-DE,de;q=0.8,en-US;q=0.6,en;q=0.4" ["HTTP_COOKIE"]=> string(36) "PHPSESSID=s61rb043dk81cufdjco8f5c4o5" ["PHP_SELF"]=> string(0) "" ["REQUEST_TIME_FLOAT"]=> float(1436029539.6774) ["REQUEST_TIME"]=> int(1436029539) }
Hi,
first log show normal "traces" : this show try to migrate from version < V4.0.0 and just points out that some errors may be displayed, without affecting correct execution.
You get connection error : only admin/admin is allowed during migration.
Maybe you should try brand new install from scratch with this configuration.
I don't understand why you had to comment function projeqtor_set_time_limit().
What was the error ?
About german characters, as many german users have contributed to the forum, I really thing it is a simple configuration issue.
Server must accept UTF8, and maybe you should play with ProjeQtOr parameter
$enforceUTF8 = '1';
This parameter has been introduced in V4.4 to fox some UTF8 transposition, maybe it is an issue in your case.
You can for instance try to set it to '0'.
Maybe you can ask climb4fun for hints.
Hi,
i already tried to do a full new installation. Same failure - and as it seems the db isnt populated at all (zero Tables). - no failure ecxept that one.
with UTF i will give it a try.
Therefore under Apache => .htaccess ->
AddDefaultCharset UTF-8
# vim nginx.conf
Append/modify the following directive in http, server, or location:
charset UTF-8;
(originated in the other problem untested)
reasonable for the needed outcomment was, that the server doesn't allow to set the execution time to populate the db - but runs smooth after this outcomment-job.
Seems as 5.0.2 has fixed the problem. Projeqtor is now running under nginx.
Great :woohoo:
I'd like to understand what made it work, but not sure I will get this answer.