Not signed in (Sign In)

Categories

Vanilla 1.1.4 is a product of Lussumo. More Information: Documentation, Community Support.

Help keep Vanilla free:
Welcome Guest!
Want to take part in these discussions? If you have an account, sign in now.
If you don't have an account, apply for one now.
    • CommentAuthorcorwin
    • CommentTimeFeb 15th 2006
     # 1
    That's right. and I know it's something completely stupid on my part, but I just can't seem to find the problem.
    I unpacked Vanilla 0.9.2.6 in a folder, and got a name-based virtual host pointing to it. Now that's working. any test PHP file in there gets parsed correctly.

    I used the manual install procedure for vanilla.
    As far as I can tell, I did everything correct.
    And the big problem is....I don't have an error. the page just returns:

    <html><body></body></html>. that's it.
    and that's probably default in firefox.
    So my guess is that it's returning nothing actually....

    It seems like al the "include" stuff in the index.php just doesn't "include" anything, but isn't resulting in an error either.
    When I intentionally screw up the path in appg/settings.php, I *DO* get an error about files nog being found. So, it seems that the path is not the problem. something with rights then? (altough i'am pretty sure all the files have read permissions at least)

    Does anyone has a clue?
    Please tell if I have to post any configuration.

    any help is greatly appreciated.
    •  
      CommentAuthorBergamot
    • CommentTimeFeb 15th 2006
     # 2
    Did the automatic install process fail too?
    •  
      CommentAuthorMark
    • CommentTimeFeb 15th 2006
     # 3
    What version of PHP do you have?
    What version of MySQL are you using?
    • CommentAuthorcorwin
    • CommentTimeFeb 16th 2006
     # 4
    PHP version: 4.4.0-6
    MySQL version: 4.1.13-3

    The automatic install feature also failed.
    I'am not sure what is was, I will try and reproduce it.
    Maybe it contains a clue.
  1.  # 5
    you using the dreamweaver ftp?

    try re-uploading
    • CommentAuthorcorwin
    • CommentTimeFeb 16th 2006
     # 6
    I work directly on a (test) server.
    So, not using FTP. but thanx anyway.
    •  
      CommentAuthorMark
    • CommentTimeFeb 16th 2006
     # 7
    Well, that's really odd.

    If I were in your shoes, I'd take the route of echoing test strings in the files until I found where the parsing failed. Start at the top of the index file and make your way through the includes.
    • CommentAuthorcorwin
    • CommentTimeFeb 16th 2006
     # 8
    The automatic installation failed with the same problem on page 3.
    "Click here to create Vanilla's database tables and proceed to the next step"
    I get an empty page with no error.

    I tested if I could use PHP to write to a file (using fwrite) with the same rights as the files used by vanilla, and it worked.
    I also test to see if a simple echo worked in index.php.
    That worked, and it triggered an error:

    This is a test <-- // This is the echo();
    Warning: Cannot modify header information - headers already sent by (output started at /srv/www/vhosts/test.sermo.nl/index.php:13) in /srv/www/vhosts/test.sermo.nl/appg/headers.php on line 14

    I also put an echo test in "appg/init_internal.php"
    and it worked. So includes work...but some of them not?
    phew. that's weird. and I'am not so sure includes are the problem anymore....

    If I remove the echo's, I end up with no output at all again.
    Maybe it is something with mysql ? (Does index.php make a connection?)
    •  
      CommentAuthorMark
    • CommentTimeFeb 16th 2006
     # 9
    I'm thinking it's most likely mysql that is giving you the headaches.

    In 0.9.2.6, the database connection is made in library/Utility.Database.class.php on lines 103-105:

    $this->Connection = @mysql_connect($Host, $User, $Password);
    if (!$this->Connection) $Context->ErrorManager->AddError($Context, $this->Name, "OpenConnection", "The connection to the database failed.");
    if (!mysql_select_db(dbNAME, $this->Connection)) $Context->ErrorManager->AddError($Context, $this->Name, "OpenConnection", "Failed to connect to the '".$Name."' database.");


    The first thing I'd try is echoing something before line 103 to make sure that the parser is getting that far.
    Then I'd also try echoing something after line 105 to make sure it's not getting through this code.

    Then I'd remove any @ symbols from those lines so that any error messages are spit out to the screen. The Vanilla code is meant to capture those errors, but from time to time in various setups it fails to do so.
    • CommentAuthorcorwin
    • CommentTimeFeb 16th 2006
     # 10
    Allright. Both echo before 103 and after 105 are printed.
    When removing the @ symbol in "@mysql_connect" etc..
    i get:

    Fatal error: Call to undefined function: mysql_connect() in /srv/www/vhosts/test.sermo.nl/library/Utility.Database.class.php on line 104
    •  
      CommentAuthorBergamot
    • CommentTimeFeb 16th 2006
     # 11
    Make sure you have the library that links php and mysql
    • CommentAuthorithcy
    • CommentTimeFeb 16th 2006 edited
     # 12
    • CommentAuthorithcy
    • CommentTimeFeb 16th 2006
     # 13
    or else compile php with mysql support, or install php4-mysql
    •  
      CommentAuthorBergamot
    • CommentTimeFeb 16th 2006
     # 14
    What OS distro are you running?
    • CommentAuthorcorwin
    • CommentTimeFeb 16th 2006 edited
     # 15
    I use SuSE 10.

    Ok it was the mysql module! thanx Mark, ithcy and Bergamot!
    I thought Yast auto-installed it, but it wasn't installed.
    But, vanilla doesn't give any error in that direction unless you get rid of the "@" as described by Mark in above post.

    I really thought I was there, but noooooo. on to the next error:

    Fatal error: Call to undefined function: session_id() in /srv/www/vhosts/test.sermo.nl/library/Vanilla.Session.class.php on line 63

    http://nl3.php.net/session:
    " Session support is enabled in PHP by default.".

    However, maybe not in SUSE:
    http://forums.suselinuxsupport.de/lofiversion/index.php/t19458.html


    Will check here again in few minutes. This forum is really helpfull !
    • CommentAuthorcorwin
    • CommentTimeFeb 16th 2006 edited
     # 16
    I installed a module for the session function and now it works, but i get yet another error:

    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();

    I feel, that I'am missing a lot of php4 extension modules?
    What extensions do I need besides the "core" module?
    •  
      CommentAuthorMark
    • CommentTimeFeb 16th 2006
     # 17
    I had a feeling you were going to run into that problem. Don't know why.

    There have been a slew of people running into that one lately.
    The first thing to make sure is that the controls/index.php file is actually there.

    There is a pretty good discussion about this error here:

    http://lussumo.com/community/discussion/1325/
    •  
      CommentAuthorMark
    • CommentTimeFeb 16th 2006
     # 18
    • CommentAuthorcorwin
    • CommentTimeFeb 16th 2006
     # 19
    The workaround
    if ($this->SelfUrl == "haliki") $this->SelfUrl = "index.php";
    didn't work. :(

    removing the @ yields:

    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
  2.  # 20
    I'm assuming you replaced 'haliki' with the name of your folder?
    It looks there though asif your paths are wrong in your appg/settings file. Care to paste the relative sections?
    •  
      CommentAuthorBergamot
    • CommentTimeFeb 16th 2006
     # 21
    Note: do NOT post your database password :D
    • CommentAuthorithcy
    • CommentTimeFeb 16th 2006
     # 22
    (or your session id)
    • CommentAuthorcorwin
    • CommentTimeFeb 16th 2006 edited
     # 23
    hehe. stupid. I didn't look at the code. I thought it was a general workaround.

    now I don't have a folder. the url is: test.sermo.nl
    (It's a name based virtual server)
    What to replace "haliki" with?
  3.  # 24
    Um. Try /?
    • CommentAuthorcorwin
    • CommentTimeFeb 16th 2006
     # 25
    No good. it does the same thing.
    • CommentAuthorcorwin
    • CommentTimeFeb 16th 2006 edited
     # 26
    Here is the settings.php
    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 :)
    • CommentAuthorithcy
    • CommentTimeFeb 16th 2006
     # 27
    dude... ****** is my password too!

    by the way, start your code blocks with <code> and end with </code>
    •  
      CommentAuthorBergamot
    • CommentTimeFeb 16th 2006
     # 28
    Also make sure you checked "html" off in the format field.
    • CommentAuthorcorwin
    • CommentTimeFeb 16th 2006 edited
     # 29
    Check this story:

    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"));
    • CommentAuthorithcy
    • CommentTimeFeb 16th 2006
     # 30
    is $PHP_SELF still in the code?

    it should be $_SERVER['PHP_SELF'] .
    • CommentAuthorcorwin
    • CommentTimeFeb 16th 2006
     # 31
    Ow oops. there's is a difference.
    sorry. forget the post! :D
    • CommentAuthorithcy
    • CommentTimeFeb 16th 2006
     # 32
    that code should work,.
    if you want to test it, put echo $this->SelfUrl;exit;after that line and see what shows up.
    • CommentAuthorcorwin
    • CommentTimeFeb 16th 2006 edited
     # 33
    sorry, wrong post.
    • CommentAuthorithcy
    • CommentTimeFeb 16th 2006 edited
     # 34
    hmmm... try this instead
    echo "PHP_SELF is: " . $this->SelfUrl;

    if nothing shows up then that file, whatever it is, is probably not getting included.
    • CommentAuthorithcy
    • CommentTimeFeb 16th 2006
     # 35
    and also view source when it runs to make sure it's not popping up in some non-display area of the page.
    • CommentAuthorcorwin
    • CommentTimeFeb 16th 2006 edited
     # 36
    Ow. sorry. It works. I made a typo.
    I used your first example, and the index page now reads:

    index.php.

    So this means it works right?
    • CommentAuthorcorwin
    • CommentTimeFeb 16th 2006
     # 37
    Well, I call it a day.
    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();
    •  
      CommentAuthorMark
    • CommentTimeFeb 16th 2006
     # 38
    Hmmm. I tried to look at your http://test.sermo.nl/ url, but it failed to load at all.

    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.
    • CommentAuthorcorwin
    • CommentTimeFeb 17th 2006
     # 39
    It *did* fail.

    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
    •  
      CommentAuthorMark
    • CommentTimeFeb 17th 2006 edited
     # 40
    No, that actually included properly. There is a class within controls/index.php that is derived from another class not in that file, so it threw the error.

    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.
    • CommentAuthorcorwin
    • CommentTimeFeb 17th 2006
     # 41
    replacement one yields:


    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 :)
    •  
      CommentAuthorMark
    • CommentTimeFeb 17th 2006
     # 42
    Oh shoot. It was a typo on my part, sorry.

    I should have said:

    In your appg/init_internal.php file, change line 92 from this:

    $Page->Import($Page->ControlFile);

    To this:

    $Page->Import('/srv/www/vhosts/test.sermo.nl/'.$Page->ControlFile);

    If that doesn't work, then let's try changing line 92 to this:

    include('/srv/www/vhosts/test.sermo.nl/'.$Page->ControlFile);

    If either of those work, you'll need to do the same thing in appg/init_external.php.
    • CommentAuthorcorwin
    • CommentTimeFeb 17th 2006 edited
     # 43
    No, it doesn't work.

    I DO see the URL changing:
    (not sure this happened before)

    from test.sermo.nl to
    http://test.sermo.nl/signin.php?PageAction=SignOut&ReturnUrl=%2Findex.php
    • CommentAuthorcorwin
    • CommentTimeFeb 17th 2006
     # 44
    The automatic installer say's something I don't understand:


    Oops. We came across some problems while checking your permissions...
    We couldn't read the "/srv/www/vhosts/test2.sermo.nl/appg/settings.php" file.
    We couldn't open the "/srv/www/vhosts/test2.sermo.nl/appg/settings.php" file.
    We couldn't read the "/srv/www/vhosts/test2.sermo.nl/appg/language.php" file.
    We couldn't open the "/srv/www/vhosts/test2.sermo.nl/appg/language.php" file.
    We couldn't read the "/srv/www/vhosts/test2.sermo.nl/appg/extensions.php" file.
    We couldn't open the "/srv/www/vhosts/test2.sermo.nl/appg/extensions.php" file.
    We couldn't open the "/srv/www/vhosts/test2.sermo.nl/database.sql" file.
    We couldn't create our test file "/srv/www/vhosts/test2.sermo.nl/images/phpinfo.php" in the /images directory.


    But all the directory's and file have
    drwxr-xr-x
    And some files have chmod 666 permissions. (what was in de documentation)
    So all files should be able to be read by anyone right?
    •  
      CommentAuthorMark
    • CommentTimeFeb 17th 2006
     # 45
    Yeah, it did work, then.

    The reason you got another error is because the index page loaded properly, and then found that you weren't signed in, so it redirected you to the sign in page.

    The Sign in page uses a different init_ file (init_external.php), so you will need to make that change to the init_external.php file as well.

    Get that sorted, and then we'll move on to the next issue.
    •  
      CommentAuthorMark
    • CommentTimeFeb 17th 2006
     # 46
    It seems to me that your server is not allowing relative include paths. Probably a php configuration issue, but who knows?
    • CommentAuthorcorwin
    • CommentTimeFeb 17th 2006
     # 47
    IT WORKED !
    Phew. Thank you Mark!

    I didn't change anything in the PHP congfiguration what could have caused this. So if it IS a PHP config issue, then it's a default thing.
    •  
      CommentAuthorMark
    • CommentTimeFeb 17th 2006
     # 48
    Wierdness. Oh well, I'm glad you got it working finally :)
Add your comments
    Username Password
  • Format comments as