Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Mar 2004
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    How to point to INCLUDES directory

    I have been using phpmailer for some time now on my home server, and have switched to a hosting company. I need to install three files for phpmailer to work in the "includes" directory.

    I do not have access to this directory, but there is a comment on the phpmailer site giving me these instructions.

    I am not a linux person, so knowing how to point to directories is foreign to me.

    Their instructions tell me to add the following statement to my script.

    ini_set("include_path", ".:/path/to/phpmailer/dir");

    I did so with this statement:

    ini_set("include_path", ".:/includes");
    require("class.phpmailer.php");

    class.phpmailer.php is in the includes directory.

    I get this error when executing this script:

    Warning: main(class.phpmailer.php): failed to open stream: No such file or directory in /home/semmesd/public_html/roster/register.php on line 85

    Fatal error: main(): Failed opening required 'class.phpmailer.php' (include_path='.:/includes') in /home/semmesd/public_html/roster/register.php on line 85


    I placed a directory in my /public_html directory called "includes" and it has the proper files in it.

    Have I correctly pointed to this directory?

    On my hosting company, the actual full path is:

    /home/semmesd/public_html/includes

    I tried using that as well, and get the same error.

    I am sure my problem is I just don't know how to point to the directory correctly.

    I hope someone can help me with this.

    Tom R.

  • #2
    Super Moderator
    Join Date
    May 2002
    Location
    Perth Australia
    Posts
    4,040
    Thanks
    10
    Thanked 92 Times in 90 Posts
    to account for the usual include path that should be ...

    PHP Code:
    <?php
    ini_set
    ('include_path',ini_get('include_path').':/home/semmesd/public_html/includes');
    ?>
    if that does not work (and it really should) , try simply dumping those files in
    /home/semmesd/public_html/roster/register/class.phpmailer.php
    etc
    resistance is...

    MVC is the current buzz in web application architectures. It comes from event-driven desktop application design and doesn't fit into web application design very well. But luckily nobody really knows what MVC means, so we can call our presentation layer separation mechanism MVC and move on. (Rasmus Lerdorf)

  • #3
    New to the CF scene
    Join Date
    Mar 2004
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Firepages,

    Thanks a million, Your example pointed out the single typo I was making.

    I failed to place the "/" in front of the directory path.

    Amazing how something so simple is so hard to notice once you have looked at it five or ten times.

    Thanks again.

    Tom


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •