Access Denied. Please Contact The Administrator.) : Making To Work. (Fatal Error: Cannot Connect To Database

You might also like

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 5

MAKING http://www.crrc.am/lists/admin/ to work.

(Fatal Error: Cannot connect to database,


access denied. Please contact the administrator.)

Have changed config.php file to


# what is the name of the database we are using
$database_name = "crrcam_lists";

# who do we log in as?


$database_user = "phlist_user";

# and what password do we use


$database_password = "PL_Crrc_ip1";

Delete Unsubscribe link from subscribe page

Open /[home directory of PHPList]/index.php in an editor


Find this bit of code

  $html .= '<div class="adminmessage"><p><b>You are logged in as


administrator ('.$_SESSION["logindetails"]["adminname"].') of this
phplist system</b></p>';
    $html .= '<p>You are therefore offered the following choice, which
your users will not see when they load this page.</p>';
    $html .= '<p><a href="'.$GLOBALS['adminpages'].'">Go back to admin
area</a></p>';
    $html .= '<p><b>Please choose</b>: <br/><input type=radio
name="makeconfirmed" value="1"> Make this user confirmed immediately
      <br/><input type=radio name="makeconfirmed" value="0" checked>
Send this user a request for confirmation email </p></div>';
  }
  $html .= '<table border=0>';
  $html .= ListAttributes($attributes,$attributedata,
$data["htmlchoice"],0,$data['emaildoubleentry']);
  $html .= '</table>';
  if (ENABLE_RSS) {
    $html .= RssOptions($data);
   }
  $html .= ListAvailableLists("",$data["lists"]);

  if (empty($data['button'])) {
    $data['button'] = $GLOBALS['strSubmit'];
  }
  if (USE_SPAM_BLOCK)
    $html .= '<div style="display:none"><input type="text"
name="VerificationCodeX" value="" size="20"></div>';
  $html .= '<p><input type=submit name="subscribe" value="'.
$data["button"].'" onClick="return checkform();"></p>
    </form><br/><br/>
    <p><a href="'.getConfig("unsubscribeurl").'&id='.$id.'">'.
$GLOBALS["strUnsubscribe"].'</a></p>
  '.$GLOBALS["PoweredBy"];
  $html .= $data["footer"];

and change this specific line:

$html .= '<p><input type=submit name="subscribe" value="'.


$data["button"].'" onClick="return checkform();"></p>
    </form><br/><br/>
    <p><a href="'.getConfig("unsubscribeurl").'&id='.$id.'">'.
$GLOBALS["strUnsubscribe"].'</a></p>
  '.$GLOBALS["PoweredBy"];

to this:

$html .= '<p><input type=submit name="subscribe" value="'.


$data["button"].'" onClick="return checkform();"></p>
    </form><br/>'.$GLOBALS["PoweredBy"];

Delete “required field”


In lists->texts-> english.inc ($strRequired) delete

Add new spage.

1. in spage Message they receive when they subscribe write Without this confirmation,
you will not receive any messages

[CONFIRMATIONURL]

and it will get UID. User is added to the list

2. made attributes with LNAME,FNAME from admin main page, attributes and set them
required.

PROCESSING BOUNCES

3) Open your phplist config.php file. It is on your web server. If you installed phplist in the default folder,
it would be:
www.mydomain.com/lists/config/config.php

Use FTP or your web host's control panel to download a copy of this file (config.php) and save it to your
computer. Once you have it, open the file in a text editor. Windows notepad will NOT work. I use
EmEditor Free for stuff like this, which is a great free unicode text editor.

4) Edit your phplist config file.


Scroll down to the "Settings for handling bouces" section of the file. As it has been said before:
Remove the "#" from this line and put the email account that you just created in there so that you
change this:

Code: Select all

# $message_envelope = 'listbounces@yourdomain';

into this:

Code: Select all

$message_envelope = 'no-reply@mydomain.com';

Next, scroll down a bit and enter the information. Replace localhost with your email server (probably
something like mail.mydomain.com), and then replace popuser with the user name that you use to log
in to the new email account (no-reply@mydomain.com) and replace password with the password for
the new account. For example, change the following:

Code: Select all

$bounce_mailbox_host = 'localhost';
$bounce_mailbox_user = 'popuser';
$bounce_mailbox_password = 'password';

to this:

Code: Select all

$bounce_mailbox_host = 'pop.gmail.com';
$bounce_mailbox_user = 'no-reply@crrc.am ';
$bounce_mailbox_password = 'KcRRc1234';

3.
Note that you SHOULD have received this information (mail server, username, and
password) when you created the new email account no-reply@mydomain.com). This
info is going to be different for everyone. For example, my hosting co uses the "+" sign
instead of the "@" when you log in. Weird.

Now, save config.php and upload it to your web server using FTP or your web host's
control panel. Replace (overwrite) the original config.php in the same folder.

5) Now, go into phplist and create a new list. Add your personal email to this list so you
can check if it works. Also add some email that couldn't possibly exist, like:
somecrazyguy@somereallylongwebsiteurlth ... yexist.com
This way, that email will get bounced and you can see if bounces are working.

6) Send a message to the new list. When you receive it at your personal email address,
check the message header like you did before. You should now see:

envelope-from <no-reply@mydomain.com>)

and

Return-Path: no-reply@mydomain.com

SENDING AN ATTACHMENT

1. You can add as many attachments to your message as you like, but the number listed here
is defined in your config.php file:

# attachments is a new feature and is currently still


experimental
# set this to 1 if you want to try it
# caution, message may become very large. it is generally more
# acceptable to send a URL for download to users
# if you try it, it will be appreciated to give feedback to the
# users mailinglist, so we can learn whether it is working ok
# using attachments requires PHP 4.1.0 and up
define("ALLOW_ATTACHMENTS",1);

# if you use the above, how many would you want to add per
message (max)
# You can leave this 1, even if you want to attach more files,
because
# you will be able to add them sequentially
define("NUMATTACHMENTS",1);

# when using attachments you can upload them to the server


# if you want to use attachments from the local filesystem
(server) set this to 1
# filesystem attachments are attached at real send time of the
message, not at
# the time of creating the message
define("FILESYSTEM_ATTACHMENTS",0);

# if you add filesystem attachments, you will need to tell


PHPlist where your
# mime.types file is.
define("MIMETYPES_FILE","/etc/mime.types");

# if a mimetype cannot be determined for a file, specify the


default mimetype here:
define("DEFAULT_MIMETYPE","application/octet-stream");

You might also like