Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2007
    Posts
    241
    Plugin Contributions
    0

    Default Upgrading PHP from Version 4.X To 5.2 isssue with include_once("Mail.php");

    Hello, all.

    Recently, I've been upgrading all of my carts, from various versions, from 1.3.7, to 1.3.8A, to 1.9H.

    On my server set to PHP 5.2, almost everything works.

    I added a few things that were custom, and porting them to the newer version has me stumped.

    One such change sent out mails, but not via the ZENMail functions within the cart. (I had my reason for this!)

    But now, I get an error message when trying to use the same statement that worked in PHP 4.X:

    include_once("Mail.php");

    I now get get this error msg with PHP 5.2:

    Warning: include_once(Mail.php) [function.include_once] failed to open stream. No such file or directory in my/path/t/o/f/i/l/e/s
    Warning: include_once() [function.include] Failed opening Mail.php for inclusion include_path="./usr/local/php5/lib/php


    Is this not valid for PHP 5.2?
    What should I use instead???
    Last edited by Donn; 31 Aug 2012 at 06:19 PM.

  2. #2
    Join Date
    Jan 2004
    Posts
    65,340
    Blog Entries
    7
    Plugin Contributions
    76

    Default Re: Upgrading PHP from Version 4.X To 5.2 isssue with include_once("Mail.php");

    Your question isn't a Zen Cart issue.

    In its purest sense it's just a basic PHP thing.
    You're asking it to load a file that doesn't exist in either the current directory or the include_path.
    Most contemporary PHP configurations add ".;" into the include_path so that "files in the current folder" (that's what a single-dot means in a directory path) will also be searched when you don't specify a complete path.

    So, either fix your server's PHP configuration, or change your include_once command to specify a complete path to the php file you're trying to load.

    More info on properly configuring include_path can be found at www.php.net
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

 

 

Similar Threads

  1. Replies: 4
    Last Post: 7 May 2016, 05:46 PM
  2. v139h Upgrading PHP version from 4.4.9?
    By PudzPud in forum General Questions
    Replies: 4
    Last Post: 22 Mar 2012, 06:32 PM
  3. Replies: 0
    Last Post: 6 Aug 2011, 08:12 PM
  4. How do I get rid of "tell a friend.php"? version 1.3.0.1
    By cdm5go in forum Customization from the Admin
    Replies: 4
    Last Post: 29 Jan 2010, 03:57 PM
  5. [Not a ZC bug] "Contact Us" PHP mail error
    By Anna718 in forum Bug Reports
    Replies: 1
    Last Post: 14 Dec 2008, 10:51 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR