Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1
    Join Date
    May 2019
    Location
    Adelaide
    Posts
    17
    Plugin Contributions
    0

    Default IPN Not Working Properly and No Digital Product Download Link Displayed

    Hello and i have been trying for some time to find why i get these errors when running the ipncheck.php script. I am setting the shop up to use paypal express checkout.

    Today i did a test purchase of a digital download product through paypal to buy a product and all seemed okay with paypal payment. Paypal redirected me back to my shops Success Page which showed the purchase details.

    I clicked on to step 3 of 3 Order Confirmation. After clicking the "Confirm The Order" button, the next "Order Information" page has all the details of the purchase but No Download Link as it is a downloadable product.

    On this page it shows the link expiry as 06/27/2019 and the remaining downloads as 2 but still No Download Link.

    So I assume that because the IP Check is failing, this affects whether the download link is displayed.

    I use zen cart version: V1.5.4
    my server PHP Version: V5.6.4
    Website URL is https://www.joolrod.com/shop

    Here is the errors when i run the ipncheck.php in the shop directory.

    Code:
    IPNCHECK.php RESULT::
    
    IPNCHECK.PHP - Version 1.3.9
    
    CURL ERROR: Attempted connection on: https://www.paypal.com/cgi-bin/webscr
    (7)
    Trying direct HTTP on port 80 instead ...
    CURL ERROR: Attempted alternate connection on: http://www.paypal.com/cgi-bin/webscr
    (7) 
    ABORTING CURL METHOD ...
    FAILED
    IPN ERROR :: Could not establish fsockopen: 
    Host Details = ssl://www.paypal.com:443 (13) Permission denied
     Trying again with HTTPS over 443 ...
    IPN ERROR :: Could not establish fsockopen: 
    Host Details = https://www.paypal.com:443 (0) Unable to find the socket transport "https" - did you forget to enable it when you configured PHP?
     Trying again directly over 443 ...
    IPN ERROR :: Could not establish fsockopen: 
    Host Details = www.paypal.com:443 (13) Permission denied
     Trying again with HTTP over port 80 ...
    IPN ERROR :: Could not establish fsockopen: 
    Host Details = httpwww.paypal.com:80 (0) php_network_getaddresses: getaddrinfo failed: Name or service not known
     Trying again without any specified protocol, using port 80 ...
    IPN FATAL ERROR :: Could not establish fsockopen. 
    Host Details = www.paypal.com:80 (13) Permission denied
    Any assistance would be appreciated.

    Regards Rodney

  2. #2
    Join Date
    Jul 2012
    Posts
    16,739
    Plugin Contributions
    17

    Default Re: IPN Not Working Properly and No Digital Product Download Link Displayed

    These two issues may or may not be related.

    From the Zen Cart side, does the purchase appear to be complete from within the orders area, or is the money still considered to be waiting receipt?

    Need to also look at the settings along with the order status. The settings in question are in configuration->Attribute Settings and relate to the minimum and maximum values for supporting download.

    Then need to look at the attributes controller for this downloadable product. What are the days and number of downloads initially applied? Are they 7 and 2?

    Then also look at products->download Manager, does this downloadable product have a green light next to the attribute/file? The idea being to verify that the file actually is properly associated with the download identifier.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  3. #3
    Join Date
    May 2019
    Location
    Adelaide
    Posts
    17
    Plugin Contributions
    0

    Default Re: IPN Not Working Properly and No Digital Product Download Link Displayed

    I have now done a new test purchase then rechecked the admin are for the answers to your questions as follows:

    1. The Payment Status shows as 'Completed' in the order details.
    2. Download Lower limit is 2 and the upper value is 4
    3. The 'Expiry Days' is 7 and the 'Max Download' count is 3
    4. The product has a red light so I redid the filename for it and it is now a green light.

    I then did a test purchase and success, the download button was there. But now after clicking the 'Download Button' i get and error screen => Access Forbidden ...... error 403

    Thanks very much so far we are almost there i am sure..

    Look forward to your reply

    Cheers Rodney

  4. #4
    Join Date
    Jul 2012
    Posts
    16,739
    Plugin Contributions
    17

    Default Re: IPN Not Working Properly and No Digital Product Download Link Displayed

    I have a few things that might cause this though I am again throwing out possibilities based on the lack of some information. BTW, you've done a good job explaining the results of doing something, just need to work on explaining how others can independently reproduce the issue. Something you'll get even better at as you use the software.

    In no particular order:
    1. What is the extension of the file and is it supported by the .htaccess in your downloads directory?
    2. If you were to ftp or ssh to your site and look at the permissions of a few of the folders such as the includes folder, the admin folder, and perhaps the logs folder. Are they all 777, 755 or some other permission level?
    3. Even though I don't suspect it to be the issue in Zen Cart 1.5.4 based on how downloads were being done, I need to ask to eliminate the possibility. If you look at (or post) your includes/configure.php up to the point of the database information (or the whole thing but obscure the credentials part), what is the structure of HTTP_SERVER, HTTPS_SERVER, DIR_WS_CATALOG, DIR_WS_HTTPS_CATALOG, and ENABLE_SSL?

    I ask because before Zen Cart 1.5.5 the downloads process seemed to work regardless where the sub-folder was placed, but with some new capability in I think 1.5.5 and definitely in 1.5.6, if the sub-folder were misplaced then the file would not be retrieved from the proper location.

    OK, that's as much as I can think of at the moment as to the basic (likely) reasons a 403 would occur on selection of a download.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  5. #5
    Join Date
    May 2019
    Location
    Adelaide
    Posts
    17
    Plugin Contributions
    0

    Default Re: IPN Not Working Properly and No Digital Product Download Link Displayed

    Thanks again for your hard work, and here are the answers you requested:

    1. The file extension is .zip and yes that is supported in the .htaccess file in the downloads directory.

    2. includes = 0755 admin = 0755 logs = 0755

    3. the complete configure.php follows with modified database credentials:

    <CODE>
    <?php
    /**
    * @package Configuration Settings circa 1.5.3
    * @copyright Copyright 2003-2014 Zen Cart Development Team
    * @copyright Portions Copyright 2003 osCommerce
    * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
    * File Built by zc_install on 2014-07-21 01:29:27
    */


    /*************** NOTE: This file is similar, but DIFFERENT from the "store" version of configure.php. ***********/
    /*************** The 2 files should be kept separate and not used to overwrite each other. ***********/

    /**
    * WE RECOMMEND THAT YOU USE SSL PROTECTION FOR YOUR ENTIRE ADMIN:
    * To do that, make sure you use a "https:" URL for BOTH the HTTP_SERVER and HTTPS_SERVER entries:
    */
    define('HTTP_SERVER', 'http://www.joolrod.com');
    define('HTTPS_SERVER', 'https://www.joolrod.com');
    define('HTTP_CATALOG_SERVER', 'http://www.joolrod.com');
    define('HTTPS_CATALOG_SERVER', 'https://www.joolrod.com');

    // secure webserver for admin? Valid choices are 'true' or 'false' (including quotes).
    define('ENABLE_SSL_ADMIN', 'false');

    // secure webserver for storefront? Valid choices are 'true' or 'false' (including quotes).
    define('ENABLE_SSL_CATALOG', 'false');

    define('DIR_WS_ADMIN', preg_replace('#^' . str_replace('-', '\-', zen_parse_url(HTTP_SERVER, '/path')) . '#', '', dirname($_SERVER['SCRIPT_NAME'])) . '/');
    define('DIR_WS_CATALOG', '/shop/');
    define('DIR_WS_HTTPS_ADMIN', preg_replace('#^' . str_replace('-', '\-', zen_parse_url(HTTPS_SERVER, '/path')) . '#', '', dirname($_SERVER['SCRIPT_NAME'])) . '/');
    define('DIR_WS_HTTPS_CATALOG', '/shop/');

    // NOTE: be sure to leave the trailing '/' at the end of these lines if you make changes!
    // * DIR_WS_* = Webserver directories (virtual/URL)
    // these paths are relative to top of your webspace ... (ie: under the public_html or httpdocs folder)
    define('DIR_WS_IMAGES', 'images/');
    define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');
    define('DIR_WS_CATALOG_IMAGES', HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'images/');
    define('DIR_WS_CATALOG_TEMPLATE', HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'includes/templates/');
    define('DIR_WS_INCLUDES', 'includes/');
    define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');
    define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');
    define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');
    define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');
    define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');
    define('DIR_WS_CATALOG_LANGUAGES', HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'includes/languages/');

    // * DIR_FS_* = Filesystem directories (local/physical)
    define('DIR_FS_ADMIN', preg_replace('#/includes/$#', '/', realpath(dirname(__FILE__) . '/../') . '/'));
    //the following path is a COMPLETE path to your Zen Cart files. eg: /var/www/vhost/accountname/public_html/store/
    define('DIR_FS_CATALOG', '/home/www/joolrod.com/shop/');

    //the following path is a COMPLETE path to the /logs/ folder eg: /var/www/vhost/accountname/public_html/store/logs ... and no trailing slash
    define('DIR_FS_LOGS', '/home/www/joolrod.com/shop/logs');

    define('DIR_FS_CATALOG_LANGUAGES', DIR_FS_CATALOG . 'includes/languages/');
    define('DIR_FS_CATALOG_IMAGES', DIR_FS_CATALOG . 'images/');
    define('DIR_FS_CATALOG_MODULES', DIR_FS_CATALOG . 'includes/modules/');
    define('DIR_FS_CATALOG_TEMPLATES', DIR_FS_CATALOG . 'includes/templates/');
    define('DIR_FS_BACKUP', DIR_FS_ADMIN . 'backups/');
    define('DIR_FS_EMAIL_TEMPLATES', DIR_FS_CATALOG . 'email/');
    define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');

    // define our database connection
    define('DB_TYPE', 'mysql'); // 'mysql');
    define('DB_PREFIX', 'zen_');
    define('DB_CHARSET', 'utf8');
    define('DB_SERVER', 'localhost');
    define('DB_SERVER_USERNAME', 'USENAME');
    define('DB_SERVER_PASSWORD', 'PASSWORD');
    define('DB_DATABASE', 'DATABASE_NAME');

    // The next 2 "defines" are for SQL cache support.
    // For SQL_CACHE_METHOD, you can select from: none, database, or file
    // If you choose "file", then you need to set the DIR_FS_SQL_CACHE to a directory where your apache
    // or webserver user has write privileges (chmod 666 or 777). We recommend using the "cache" folder inside the Zen Cart folder
    // ie: /path/to/your/webspace/public_html/zen/cache -- leave no trailing slash
    define('SQL_CACHE_METHOD', 'database');
    define('DIR_FS_SQL_CACHE', '/home/www/joolrod.com/shop/cache');


    // Define the webserver and path parameters
    // Main webserver: eg-http://www.your_domain.com -
    // HTTP_SERVER is your Main webserver: eg-http://www.your_domain.com
    // HTTPS_SERVER is your Secure webserver: eg-https://www.your_domain.com
    // HTTP_CATALOG_SERVER is your Main webserver: eg-http://www.your_domain.com
    // HTTPS_CATALOG_SERVER is your Secure webserver: eg-https://www.your_domain.com
    /*
    * URLs for your site will be built via:
    * HTTP_SERVER plus DIR_WS_ADMIN or
    * HTTPS_SERVER plus DIR_WS_HTTPS_ADMIN or
    * HTTP_SERVER plus DIR_WS_CATALOG or
    * HTTPS_SERVER plus DIR_WS_HTTPS_CATALOG
    * ...depending on your system configuration settings
    */
    // EOF

    </CODE>

    Well I hope i have covered all the questions for you. Also when i did the test purchase yesterday and as i have debug on the curl etc is still throwing errors as the test script did above.

    Any-way thanks a lot for all your assistance and if you need any other info just let me know.

    Kind Regards
    Rodney

  6. #6
    Join Date
    Jul 2012
    Posts
    16,739
    Plugin Contributions
    17

    Default Re: IPN Not Working Properly and No Digital Product Download Link Displayed

    I forgot to mention/request that all the code be inserted between [CODE][/CODE] tags. Oops.

    Anyways, it would be my guess that the symlink generated to support "anonymous" download is possibly being rejected by the server because it is being created with 0777 permissions.

    For ZC 1.5.3 (sorry you're working with 1.5.4 although your provided admin's configure.php file indicates 1.5.3) is done in: includes/modules/pages/download/header_php.php

    Search for 0777
    Replace with 0755

    I expect the line to look like:
    Code:
    mkdir(DIR_FS_DOWNLOAD_PUBLIC . $tempdir, 0777);
    And then after change to be like:
    Code:
    mkdir(DIR_FS_DOWNLOAD_PUBLIC . $tempdir, 0755);
    Login to the account, go to the recent purchase and attempt to download. Would expect it to work this time. If desired as necessary, make the purchase again and attempt to download.


    Another question to somewhat close the loop on order status, if you go to localization->orders status, are you able to identify the id associated with each of the order statuses? Pending is typically 1... when selecting to edit an order status, there is information that is added to the browser address. That information would help identify which is which...
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  7. #7
    Join Date
    May 2019
    Location
    Adelaide
    Posts
    17
    Plugin Contributions
    0

    Default Re: IPN Not Working Properly and No Digital Product Download Link Displayed

    Hello again and thanks.

    Firstly to clear up some-thing, you mentioned that i provided admins configuration data but that is not the admins as i copied the configuration in the shops root directory. And i also see there is a configure.php in the includes/ sub directory. Both of these say v1.5.3.
    The one in the admin directory is named 'configuration.php' and says it's version V1.5.4.

    I have upgraded so years back to the current version V1.5.4 so has that upgrade left one of these configuration files in the wrong place?

    Which should i remove from the shops scripts that should not be there?

    Now I updated the header_php.php file and tried the download but it still has the same error as below:-

    Code:
    Access forbidden!
    
    You don't have permission to access the requested object. It is either read-protected or not readable by the server.
    
    If you think this is a server error, please contact the webmaster.
    Error 403
    www.joolrod.com
    Apache
    Not sure what you want me to do with the last part being the order status and i did notice that clicking each order status that it added 1 to 4 to the address bar for each status.

    Well hope that helps to solve this and look forward to your reply..

    Kind Regards
    Rodney

  8. #8
    Join Date
    Jul 2012
    Posts
    16,739
    Plugin Contributions
    17

    Default Re: IPN Not Working Properly and No Digital Product Download Link Displayed

    Neither should be removed. And yes, something done during the upgrade probably caused the admin version of the file to be placed in the catalog side. An example of the defines that should be in the file should be locatable in includes/dist-configure.php. Basically there are extra defines declared in the file that are unnecessary and fortunately because of the auto-define nature of the admin information, no admin folder information is actually made available from the catalog side.

    Technically, if the upgrade had been performed by these instructions then the includes/configure.php file would be expected to show version 1.5.4 in the header of the file.http://www.zen-cart.com/entry.php?3-...d-of-upgrading

    As to the download issue. Is this message still the same as before the file permissions change? What are the permissions of the pub folder (if it exists)? What are the contents of the .htaccess in the pub folder? And while I don't recall/haven't gone back to look, is the download method (configuration->attribute settings) set to redirect?

    Oh, and the order status part. Just trying to close the loop on it. Based on the current order status for this download "purchase", what identification number is assigned to that order status?
    (order history claims it as what, completed? When reviewing the list of order status options, what identifier is assigned for order status completed? Is that number within the range of allowing an item to be downloaded?) I am starting to think this is unnecessary information for your issue, but may help someone else.
    Last edited by mc12345678; 22 Jun 2019 at 04:06 PM.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  9. #9
    Join Date
    May 2019
    Location
    Adelaide
    Posts
    17
    Plugin Contributions
    0

    Default Re: IPN Not Working Properly and No Digital Product Download Link Displayed

    Hello again and thanks for helping me its really appreciated.

    Now here is some answers to the above:

    1. The pub folder permissions are 0755

    2. There is no .htaccess file in the pub folder only an index.html file

    3. Download by redirect - true download by streaming = false

    4. The order status for the product purchased is "processing" in the 'customers=>orders' section of admin.


    Hope that helps you pinpoint the problem.

    Kind Regards
    Rodney

  10. #10
    Join Date
    Jul 2012
    Posts
    16,739
    Plugin Contributions
    17

    Default Re: IPN Not Working Properly and No Digital Product Download Link Displayed

    If there is not an .htaccess file, that may be a source of the problem. As seen here: https://github.com/zencart/zencart/tree/v154/pub there are to be at least two files. The htaccess and the index.html. But... it may also be that your file viewer is hiding the .htaccess files because afterall it is hidden... I also say this because a hidden file should have been created when attempting to download the file. And that too should be/have been present. Note that files (and folders) that begin with a period are typically treated as hidden files.

    Now, that said as well, was the server type for this installation identified and that it was windows based?

    As for the order status information, helps to continue putting things together, but still need to tie the minimum number found in configuration->attribute settings and maximum number listed there with the current number value(s) for the actual order statuses.

    So I've gone back to a newly installed store to pull up the browser path for clicking on the order status of delivered and it is this: admin/orders_status.php?page=1&oID=3 which means that the orders status of delivered has a value of 3 as shown with oID=3.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Paypal IPN not working properly after installation on GoDaddy
    By Timbo53 in forum Built-in Shipping and Payment Modules
    Replies: 15
    Last Post: 19 Nov 2010, 09:17 PM
  2. Replies: 0
    Last Post: 2 Jun 2010, 06:14 PM
  3. Paypal IPN and Express not working properly on GoDaddy. why?
    By emmcee in forum Built-in Shipping and Payment Modules
    Replies: 4
    Last Post: 2 Apr 2010, 07:58 AM
  4. Replace the normal digital product download link with a different/external link
    By ballyc27 in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 1 Jul 2009, 05:31 PM
  5. My Paypal IPN is not working properly
    By nick.lardev in forum Built-in Shipping and Payment Modules
    Replies: 5
    Last Post: 15 May 2008, 01:35 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