Hi Library looks very inviting to use so I've downloaded your demo site and I'm trying to run it on MAMP.
however it keeps falling over because the MAMP server uses port 8888 and for some reason fURL::getdomain() is not capturing this? I'm using a etc/hosts file to map the chosen domain name to localhost and I've setup an apache virtual host to give the project it's own DOCUMENT_ROOT
I can *fix* this by *not* using virtual hosts or by configuring MAMP to use PORT 80 but given this is my dev environment I'd like to be able to run it on port 8888 on a virtual host. ( it strikes me I may have configured my virtual host incorrectly. but I followed instructions on the MAMP forum)
I can partially fix the problem by changing
<base href="<?php echo fURL::getDomain() .URL_ROOT ?>" />
to
<base href="<?php echo fURL::getDomain() . ':8888'.URL_ROOT ?>" />
but then that doesn't fix the submit button link on the login form. I expect it will break all links in forms used by fURL but I didn;t think it worthwhile pursuing in case I'm missing something obvious.
I'm a total Newb to this PHP stuff so not sure how to debug properly. I had to forcible break the page to cause it to dump server array by commenting out //$action = fRequest::get('action'); from the login.php file (incidentally how do i do that at will, dump the server array to screen?)
This showed
[HTTP_HOST] => dev.ircp:8888
[SERVER_NAME] => dev.ircp
[SERVER_ADDR] => 127.0.0.1
[SERVER_PORT] => 80
looking at this I can guess that fURL::getdomain() is using the SERVER_PORT variable whereas the port apache is actually using (or is it?) is defined in the HTTP_HOST
Many thanks for your time and sorry for such a long post the full SERVER array is below :-)
Riga
full output ------------------------------- $
_SERVER: Array
(
[REDIRECT_STATUS] => 200
[HTTP_ACCEPT_LANGUAGE] => en
[HTTP_ACCEPT_ENCODING] => gzip, deflate
[HTTP_COOKIE] => PHPSESSID=4396118e9b0ed45dc6640dacd4310c59
[HTTP_REFERER] => http://dev.ircp:8888/
[HTTP_USER_AGENT] => Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_4_11; en) AppleWebKit/531.9 (KHTML, like Gecko) Version/4.0.3 Safari/531.9
[HTTP_CACHE_CONTROL] => max-age=0
[HTTP_ACCEPT] => application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
[HTTP_CONNECTION] => keep-alive
[HTTP_HOST] => dev.ircp:8888
[PATH] => /usr/bin:/bin:/usr/sbin:/sbin
[SERVER_SIGNATURE] => <address>Apache/2.0.63 (Unix) PHP/5.2.10 DAV/2 Server at dev.ircp Port 80</address>
[SERVER_SOFTWARE] => Apache/2.0.63 (Unix) PHP/5.2.10 DAV/2
[SERVER_NAME] => dev.ircp
[SERVER_ADDR] => 127.0.0.1
[SERVER_PORT] => 80
[REMOTE_ADDR] => 127.0.0.1
[DOCUMENT_ROOT] => /Users/me/Sites/htdocs1
[SERVER_ADMIN] => you@example.com
[SCRIPT_FILENAME] => /Users/me/Sites/htdocs1/login.php
[REMOTE_PORT] => 54411
[REDIRECT_QUERY_STRING] => action=log_in
[REDIRECT_URL] => /log_in
[GATEWAY_INTERFACE] => CGI/1.1
[SERVER_PROTOCOL] => HTTP/1.1
[REQUEST_METHOD] => GET
[QUERY_STRING] => action=log_in
[REQUEST_URI] => /log_in
[SCRIPT_NAME] => /login.php
[PHP_SELF] => /login.php
[REQUEST_TIME] => 1254935067
[argv] => Array
(
[0] => action=log_in
)
[argc] => 1
)
$_POST: Array
(
)
$_GET: Array
(
[action] => log_in
)
$_FILES: Array
(
)
$_SESSION: Array
(
[fCRUD::/manage::previous_sort_column] => date
[fCRUD::/manage::previous_sort_direction] => desc
[fAuthorization::user_token] => 1
)
$_COOKIE: Array
(
[PHPSESSID] => 4396118e9b0ed45dc6640dacd4310c59
)
Notice
------
{doc_root}/login.php(8)
Undefined variable: action
Notice
------
{doc_root}/login.php(18)
Undefined variable: action