Work - here are some debug findings
Hi Tim,
Thanks for the reply and the osfaq itself. I think I am working OK now. I kept the debug info I created after your reply, in case it would help you. Thanks again,
Jamie
I did some debugging before and after apply some fixes based on your post and what I see in the variables. I added some echo statements to dump values of the $_SERVER and the constants.
Here are my findings - hope it helps you and/or others.
I think I have a fully functional system now - thanks ;-)
Jamie
BEFORE:
phpself=/home/insmalls/webapps/support_llr/faq.php
FSWR=/home/insmalls/webapps/support_llr/
DIR_FS_WEB_ROOT=/home/insmalls/webapps/support_llr/
SCRIPT_FILENAME=/home/insmalls/webapps/support_llr/faq.php
DOCUMENT_ROOT=/home/insmalls/webapps/_
DIR_WS_DOC=/home/insmalls/webapps/support_llr/faq/pdf/
DIR_WS_IMAGES=/home/insmalls/webapps/support_llr/faq/images/
DIR_FS_DOC=/home/insmalls/webapps/_/home/insmalls/webapps/support_llr/faq/pdf/
DIR_FS_IMAGES=/home/insmalls/webapps/_/home/insmalls/webapps/support_llr/faq/images/
FIX#1:
//define('DIR_FS_WEB_ROOT', $FSWR);// absolute web file-system path
define('DIR_FS_WEB_ROOT', '/');// absolute web file-system path
AFTER FIX#1:
phpself=/home/insmalls/webapps/support_llr/faq.php
FSWR=/home/insmalls/webapps/support_llr/
DIR_FS_WEB_ROOT=/
SCRIPT_FILENAME=/home/insmalls/webapps/support_llr/faq.php
DOCUMENT_ROOT=/home/insmalls/webapps/_
DIR_WS_DOC=/faq/pdf/
DIR_WS_IMAGES=/faq/images/
DIR_FS_DOC=/home/insmalls/webapps/_/faq/pdf/
DIR_FS_IMAGES=/home/insmalls/webapps/_/faq/images/
Now in the admin - FAQ , I see the two error warnings in red:
Error The FAQs document upload directory does not exist.
Please create it at: /home/insmalls/webapps/_/faq/pdf/
Error The FAQ images upload directory does not exist.
Please create it at: /home/insmalls/webapps/_/faq/images/
But I am able to add.. edit , and view the FAQs OK.
FIX#2:
// fix #1
//define('DIR_FS_WEB_ROOT', $FSWR);// absolute web file-system path
define('DIR_FS_WEB_ROOT', '/');// absolute web file-system path
//fix #2
//unset($FSWR);//unset temp var
...
// fix#2
//define('DIR_FS_DOC', $_SERVER . DIR_WS_DOC);// absolute file-system path
//define('DIR_FS_IMAGES', $_SERVER . DIR_WS_IMAGES);// absolute file-system path
define('DIR_FS_DOC', $FSWR . 'faq/pdf/');// absolute file-system path
define('DIR_FS_IMAGES', $FSWR . 'faq/images/');// absolute file-system path
unset($FSWR);//unset temp var
AFTER FIX#2:
phpself=/home/insmalls/webapps/support_llr/scp/faq_admin.php
FSWR=/home/insmalls/webapps/support_llr/
DIR_FS_WEB_ROOT=/
SCRIPT_FILENAME=/home/insmalls/webapps/support_llr/scp/faq_admin.php
DOCUMENT_ROOT=/home/insmalls/webapps/_
DIR_WS_DOC=/faq/pdf/
DIR_WS_IMAGES=/faq/images/
DIR_FS_DOC=/home/insmalls/webapps/support_llr//faq/pdf/
DIR_FS_IMAGES=/home/insmalls/webapps/support_llr//faq/images/
PS I also sent a ticket to my hosting service - webfaction - who are really great work with. I asked about that apache variable.