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.
Options

Hi, some help needed

edited December 2005 in Vanilla 1.0 Help
Hi, I have a couple of problems using this software... When the admin is approving a new user the following error is shown... A fatal, non-recoverable error has occurred Technical information (for support personel): Error Message: An error occurred while sending the email. Affected Elements: Email.Send(); The user becomes active none the less but the notification isnt sent...any suggestions? also, even though I have set correct permissions for vanilla/appg/settings.php (666) I get the following error when I try update a variable like admin email address: Some problems were encountered The file could not be opened. Please make sure that PHP has write access to the d:\inetpub\dublinsingersongwriter\vanilla/appg/settings.php file. any help appreciated. heres the contents of settings.php maybe someone will spot something: <?php /* * Copyright 2003 - 2005 Mark O'Sullivan * This file is part of Vanilla. * Vanilla is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. * Vanilla is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. * You should have received a copy of the GNU General Public License along with Vanilla; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * The latest source code for Vanilla is available at www.lussumo.com * Contact Mark O'Sullivan at mark [at] lussumo [dot] com * * Description: Global application constants */ // Database Settings define("dbHOST", "**************************"); define("dbNAME", "****"); define("dbUSER", "******"); define("dbPASSWORD", "******"); // Path Settings define("agAPPLICATION_PATH", "d:\inetpub\dublinsingersongwriter\vanilla/"); define("sgLIBRARY", agAPPLICATION_PATH."library/"); define("agEXTENSIONS", agAPPLICATION_PATH."extensions/"); define("agLANGUAGES", agAPPLICATION_PATH."languages/"); // Application Settings define("agAPPLICATION_TITLE", "www.DublinSingerSongwriters.com"); define("agBANNER_TITLE", ".:: Dublin and Cork Singersongwriter.com :: Forum ::."); define("agDEFAULT_STYLE", "styles/vanilla/"); define("agDOMAIN", "www.dublinsingersongwriters.com/vanilla"); 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", "www.dublinsingersongwriters.com"); define("agSUPPORT_EMAIL", "ger@dublinsingersongwriters.com"); 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("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. ?>

Comments

  • Options
    Sounds like you're missing the php email component.
  • Options
    But I didnt take anything from the structure I downloaded..
  • Options
    Not sure, could be an IIS setting.
  • Options
    IIS?
  • Options
    Sorry didn't mean to confuse. IIS is Internet Information Services, the microsoft webserver, which I'm pretty sure is what you're running vanilla on.
  • Options
    Ha, yeah youre right I think... Im trying to set up the forum for a mate - Its his site. I think its a microsoft server. So what kind of settings should I fiddle with? thanks...
  • Options
    MarkMark Vanilla Staff
    edited December 2005
    The error that occurs when you approve a user is because either you don't have email set up on your server, or it is set up incorrectly. When I say "you don't have email set up on your server", I am referring to a standard mail daemon like sendmail. If you are on a shared server, you can certainly contact your hosting provider to ask them why you are unable to send emails with php.

    You can also do some work in Vanilla to find out exactly what the error you are encountering is. I would actually recommend doing this first just in case it is a vanilla problem.

    Here is what you can do:

    Open up library/Utility.Email.class.php and scroll down to line 149.
    That is the line where php's mail function is called to send out any mails going out of Vanilla. You'll notice that there is an '@' symbol in front of the "mail" function call, like this:

    if (!@mail($this->Recipients[0]["Email"], $this->Subject, $Message, $Header)) $this->Context->ErrorManager->AddError($this->Context, $this->Name, "Send", "An error occurred while sending the email.");

    That "@" symbol is actually preventing the real errors from barfing onto your screen. If you remove it and then attempt to approve a user, you will see the actual php error spat out. If you copy and paste that in here, we can verify that our assumptions are correct, or not. Oh, and don't worry about the user not being approved, I've coded it so that the approval process is handled first, and emails are handled second - for precisely this reason.

    As for your global application settings form woes, I'd still say that it is a permissions problem. Who is the owner and group for those files? If I were you I'd switch it over to the www-data:www-data user:group. That way you are guaranteed that php will have permission to access the file. This assumes that you're running debian (on Debian, the apache user/group is www-data. It might be something else on a different system).
  • Options
    If you don't mind wholly disabling the email functionality of Vanilla, you could fix it like I did by simply circumventing the function:
    <?php
    /*
    Extension Name: No Email
    Extension Url: N/A
    Description: Disables E-mail functionality.
    Version: 1.0
    Author: SirNot
    Author Url: N/A
    */
    
    if(class_exists('Email'))
    {
    	$Context->ObjectFactory->SetReference('Email', 'NoEmail');
    	class NoEmail extends Email
    	{
    		function Send()
    		{
    			
    		}
    	}
    }
    
    ?>
  • Options
    OK cheers, Ill try that
  • Options
    edited December 2005
    "As for your global application settings form woes, I'd still say that it is a permissions problem. Who is the owner and group for those files? If I were you I'd switch it over to the www-data:www-data user:group. That way you are guaranteed that php will have permission to access the file. This assumes that you're running debian (on Debian, the apache user/group is www-data. It might be something else on a different system)."

    He's running IIS on Windows.
  • Options
    Ok heres the full error Warning: mail(): Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in d:\inetpub\dublinsingersongwriter\vanilla\library\Utility.Email.class.php on line 149 I get the mail error when a user signs up now as well as when I approve them
  • Options
    re: permissions User: user Group: group I see this in my ftp software. all permissions are 666 for every file
  • Options
    MarkMark Vanilla Staff
    Okay, that is definitely a php configuration issue. Your web host doesn't have their mail server set up properly (or it's not running at all).

    If you have an smtp server that they've told you to use, you can fix it by opening up your appg/settings.php file and adding this line in there somewhere:

    ini_set("SMTP", "your.smtp.server");

    The other one is a toughie as well. You can take the same route as the email error and uncomment the @ symbol in front of where the file is being accessed in the code to see what the actual error is.

    library/Utility.Constant.class.php line 137

    $FileHandle = @fopen($File, "wb");

    becomes

    $FileHandle = fopen($File, "wb");
  • Options
    lechlech Chicagoland
    Don't forget the odd combination of forward and backward slashes of set paths. That one kills all windows users.
  • Options
    thanks its all working now... I had to get onto his server people to get the smtp address. Also even though my ftp software told me settings.php was (666) the web based interface the server provides was stopping write access. cheers..
This discussion has been closed.