Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Vanilla showing...er..nothing.
This discussion has been closed.
Comments
Don't know how you do the nice code block thing, sorry...
// Database Settings define("dbHOST", "localhost"); define("dbNAME", "sermo_test"); define("dbUSER", "******"); define("dbPASSWORD", "******"); // Path Settings define("agAPPLICATION_PATH", "/srv/www/vhosts/test.sermo.nl/"); define("sgLIBRARY", agAPPLICATION_PATH."library/"); define("agEXTENSIONS", agAPPLICATION_PATH."extensions/"); define("agLANGUAGES", agAPPLICATION_PATH."languages/"); // Application Settings define("agAPPLICATION_TITLE", "Vanilla"); define("agBANNER_TITLE", "Lussumo <strong>Vanilla</strong>"); define("agDEFAULT_STYLE", "styles/vanilla/"); define("agBANNER_TITLE", "Lussumo <strong>Vanilla</strong>"); define("agDEFAULT_STYLE", "styles/vanilla/"); define("agDOMAIN", "test.sermo.nl"); define("agSAFE_REDIRECT", "signin.php?PageAction=SignOut"); define("agDISCUSSIONS_PER_PAGE", "30"); define("agDISCUSSIONS_PER_FEED", "20"); define("agCOMMENTS_PER_PAGE", "50"); define("agSEARCH_RESULTS_PER_PAGE", "30"); define("agCOOKIE_DOMAIN", "test.sermo.nl"); define("agSUPPORT_EMAIL", "lennart@sermo.nl"); define("agSUPPORT_NAME", "Support"); define("agALLOW_NAME_CHANGE", "1"); define("agPUBLIC_BROWSING", "0"); define("agUSE_CATEGORIES", "1"); define("agLOG_ALL_IPS", "0"); // Panel Settings define("agPANEL_BOOKMARK_COUNT", "20"); define("agPANEL_PRIVATE_COUNT", "5"); define("agPANEL_HISTORY_COUNT", "5"); define("agPANEL_USERDISCUSSIONS_COUNT", "5"); define("agPANEL_SEARCH_COUNT", "20"); // Discussion Settings define("agMAX_COMMENT_LENGTH", "5000"); define("agMAX_TOPIC_WORD_LENGTH", "45"); define("agDISCUSSION_POST_THRESHOLD", "3"); define("agDISCUSSION_TIME_THRESHOLD", "60"); define("agDISCUSSION_THRESHOLD_PUNISHMENT", "120"); define("agCOMMENT_POST_THRESHOLD", "5"); define("agCOMMENT_TIME_THRESHOLD", "60"); define("agCOMMENT_THRESHOLD_PUNISHMENT", "120"); define("agCOMMENT_TIME_THRESHOLD", "60"); define("agCOMMENT_THRESHOLD_PUNISHMENT", "120"); define("agTEXT_WHISPERED", "Private"); define("agTEXT_STICKY", "Sticky"); define("agTEXT_CLOSED", "Closed"); define("agTEXT_HIDDEN", "Hidden"); define("agTEXT_BOOKMARKED", ""); define("agTEXT_PREFIX", "["); define("agTEXT_SUFFIX", "]"); // String Formatting Settings define("agDEFAULTSTRINGFORMAT", "Text"); define("agFORMATSTRINGFORDISPLAY", "DISPLAY"); define("agFORMATSTRINGFORDATABASE", "DATABASE"); // Application Mode Constants define("agMODE_DEBUG", "DEBUG"); define("agMODE_RELEASE", "RELEASE"); define("agMODE_UPGRADE", "UPGRADE"); // Registration settings define("agDEFAULT_ROLE", "0"); define("agALLOW_IMMEDIATE_ACCESS", "0"); define("agAPPROVAL_ROLE", "3"); // Application version - Don't change this value or you may have // problems upgrading later. define("agVANILLA_VERSION", "0.9.2.6"); // Note: Vanilla 0.9.2.6 included some extremely important security patches. // If you do not have this version installed, we highly recommend that you replace your old vanilla // files with this version. It is okay to leave all files in the appg folder as they are.
ok thanx
by the way, start your code blocks with <code> and end with </code>
http://blog.taragana.com/index.php/archive/understanding-_serverphp_self-php_self-_serverrequest_uri-and-_serverscript_name-in-php-and-when-to-use-what/2/
"$PHP_SELF
$PHP_SELF is deprecated and should not be used because it will not work without register_globals being enabled. As of PHP 4.2.0 the default for the PHP directive register_globals
went from on to off."
Could it be, that since my "register_globals" are off by default, this is causing a problem?
See the code:
(library/Utility.Page.class.php)
$this->SelfUrl = basename(ForceString(@$_SERVER['PHP_SELF'], "index.php"));
it should be $_SERVER['PHP_SELF'] .
sorry. forget the post!
if you want to test it, put
echo $this->SelfUrl;exit;
after that line and see what shows up.echo "PHP_SELF is: " . $this->SelfUrl;
if nothing shows up then that file, whatever it is, is probably not getting included.
I used your first example, and the index page now reads:
index.php.
So this means it works right?
Time to get some sleep.
Here is the full error. The one returned by the parser, and
the one returned by vanilla
Warning: import(controls/index.php): failed to open stream: No such file or directory in /srv/www/vhosts/test.sermo.nl/library/Utility.Page.class.php on line 47 Warning: import(): Failed opening 'controls/index.php' for inclusion (include_path='/usr/share/php') in /srv/www/vhosts/test.sermo.nl/library/Utility.Page.class.php on line 47 A fatal, non-recoverable error has occurred Technical information (for support personel): Error Message: Failed to import file "controls/index.php". Affected Elements: Page.Import();
Assuming that the controls/index.php file is there, I'm not really sure what to tell you.
I guess the next thing I'd try is creating a test page with an include to that file.
So, in the vanilla root, create test.php with this in it:
<?php include('controls/index.php'); echo('Did that work?'); ?>
If *that* fails, then the file definitely isn't there or there is something wacky going on in your php config.
Fatal error: Class discussiongrid: Cannot inherit from undefined class control in /srv/www/vhosts/test.sermo.nl/controls/index.php on line 15
controls/index.php is there.
Did I do the permissions correct?
(wwwrun:www is the apache deamon user)
-rwxr-xr-x 1 wwwrun www 4914 2005-07-21 22:20 index.php
Let's try something different. Let's try changing the file's include path to be explicit directly from root.
In your appg/init_internal.php file, change line 92 from this:
$Page->Import($Context->ControlFile);
To this:
$Page->Import('/srv/www/vhosts/test.sermo.nl/'.$Context->ControlFile);
If that doesn't work, then let's try changing line 92 to this:
include('/srv/www/vhosts/test.sermo.nl/'.$Context->ControlFile);
If either of those work, you'll need to do the same thing in appg/init_external.php.
Notice: Undefined property: ControlFile in /srv/www/vhosts/test.sermo.nl/appg/init_internal.php on line 93 Warning: import(/srv/www/vhosts/test.sermo.nl/): failed to open stream: Permission denied in /srv/www/vhosts/test.sermo.nl/library/Utility.Page.class.php on line 47 Warning: import(): Failed opening '/srv/www/vhosts/test.sermo.nl/' for inclusion (include_path='/usr/share/php') in /srv/www/vhosts/test.sermo.nl/library/Utility.Page.class.php on line 47
replacement two yields:
Notice: Undefined property: ControlFile in /srv/www/vhosts/test.sermo.nl/appg/init_internal.php on line 93 Warning: main(/srv/www/vhosts/test.sermo.nl/): failed to open stream: Permission denied in /srv/www/vhosts/test.sermo.nl/appg/init_internal.php on line 93 Warning: main(): Failed opening '/srv/www/vhosts/test.sermo.nl/' for inclusion (include_path='/usr/share/php') in /srv/www/vhosts/test.sermo.nl/appg/init_internal.php on line 93 Warning: Cannot modify header information - headers already sent by (output started at /srv/www/vhosts/test.sermo.nl/appg/init_internal.php:93) in /srv/www/vhosts/test.sermo.nl/library/Vanilla.Session.class.php on line 27
while the original code returned:
Warning: import(controls/index.php): failed to open stream: No such file or directory in /srv/www/vhosts/test.sermo.nl/library/Utility.Page.class.php on line 47 Warning: import(): Failed opening 'controls/index.php' for inclusion (include_path='/usr/share/php') in /srv/www/vhosts/test.sermo.nl/library/Utility.Page.class.php on line 47
So even more errors