Skip to content

os-fcgi: process.cwd() returning nothing... #65

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
IngwiePhoenix opened this issue Apr 4, 2015 · 0 comments
Open

os-fcgi: process.cwd() returning nothing... #65

IngwiePhoenix opened this issue Apr 4, 2015 · 0 comments

Comments

@IngwiePhoenix
Copy link
Contributor

So I wanted to do some serious work on my FlapWorks framework for OS...untill:

<code><%
echo typeOf(process.cwd())
echo ": "
echo process.cwd().length
%></code>

Returned:

string: 0

o.o... I did look into os-fcgi.cpp and figured, that it only called os->require(), but there is no indication that we're changing directories at all. These are the _SERVER variables that I am giving OS...

FCGI_ROLE: RESPONDER
PATH_INFO: 
PATH_TRANSLATED: /Users/Ingwie/public_html
QUERY_STRING: 
REQUEST_METHOD: GET
CONTENT_TYPE: 
CONTENT_LENGTH: 
SCRIPT_NAME: /fw/index.osh
REQUEST_URI: /fw/
DOCUMENT_URI: /fw/index.osh
DOCUMENT_ROOT: /Users/Ingwie/public_html
SERVER_PROTOCOL: HTTP/1.1
GATEWAY_INTERFACE: CGI/1.1
SERVER_SOFTWARE: nginx/1.6.1
REMOTE_ADDR: 127.0.0.1
REMOTE_PORT: 56150
SERVER_ADDR: 127.0.0.1
SERVER_PORT: 80
SERVER_NAME: localhost
REDIRECT_STATUS: 200
HTTP_HOST: localhost
HTTP_CONNECTION: keep-alive
HTTP_ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
HTTP_USER_AGENT: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.118 Safari/537.36
HTTP_ACCEPT_ENCODING: gzip, deflate, sdch
HTTP_ACCEPT_LANGUAGE: de-DE,de;q=0.8,en-US;q=0.6,en;q=0.4
HTTP_COOKIE: < ... Cut out ... >
SCRIPT_FILENAME: /Users/Ingwie/public_html/fw/index.osh

Which value is being set wrong? Same values are given to PHP:

USER: Ingwie
HOME: /Users/Ingwie
FCGI_ROLE: RESPONDER
QUERY_STRING: 
REQUEST_METHOD: GET
CONTENT_TYPE: 
CONTENT_LENGTH: 
SCRIPT_NAME: /index.php
REQUEST_URI: /index.php
DOCUMENT_URI: /index.php
DOCUMENT_ROOT: /Users/Ingwie/public_html
SERVER_PROTOCOL: HTTP/1.1
GATEWAY_INTERFACE: CGI/1.1
SERVER_SOFTWARE: nginx/1.6.1
REMOTE_ADDR: 127.0.0.1
REMOTE_PORT: 56264
SERVER_ADDR: 127.0.0.1
SERVER_PORT: 80
SERVER_NAME: localhost
REDIRECT_STATUS: 200
SCRIPT_FILENAME: /Users/Ingwie/public_html/index.php
PATH_INFO: 
PATH_TRANSLATED: /Users/Ingwie/public_html/index.php
HTTP_HOST: localhost
HTTP_CONNECTION: keep-alive
HTTP_ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
HTTP_USER_AGENT: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.118 Safari/537.36
HTTP_ACCEPT_ENCODING: gzip, deflate, sdch
HTTP_ACCEPT_LANGUAGE: de-DE,de;q=0.8,en-US;q=0.6,en;q=0.4
HTTP_COOKIE: < ... Cut out ... >
PHP_SELF: /index.php
REQUEST_TIME_FLOAT: 1428121616.2923
REQUEST_TIME: 1428121616
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant