Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 24
  1. #11
    Join Date
    Aug 2004
    Location
    Fountain Hills, AZ
    Posts
    515
    Plugin Contributions
    1

    Default Re: Need Advice on Php Version

    Quote Originally Posted by kobra View Post
    I see back where this is a dedicated server...
    You didn't poat any of the server details
    Specifically the server Linux OS

    There are thousands of installs and most run trouble free for the most part and do not have the issues your are experiencing with ZenCart out-of-the-box/patched for security
    Kobra, until now I would have totally agreed with you, but with the advent of Php3.X there are huge changes and Zen-Cart is not compatible. I spoke with another friend of mine today that is a high level individual with credit card security. He reminded me that he had warned these changes were coming awhile back, but at the time I wasn't sure what he meant.

    Visa and MasterCard are requiring their merchant providers to have all their eCommerce customer's sites scanned. They do this quarterly so the requirements often change with each scan. They are now insisting on Php 3.2 - or the site fails. I've had this site for five years... so trust me this is a brand new requirement.

    Here is the exact response from the scan -
    Synopsis : The remote web server uses a version of PHP that is affected by multiple flaws. Description : According to its banner, the version of PHP installed on the remote host is older than 5.3.2

    In speaking with them directly, I was informed I need to recompile the server to the latest release - Php5.3.2 (I just did a successful recompile taking the site to 5.2.12 as originally they indicated this would solve their issues;however once I ran the scan again, this new requirement popped up)


    In my local test environment so far I've patched the following files in addition to adding the patched files provided in the d/l here:

    classes\db\mysql\query_factory.php
    includes\functions\functions_lookups.php
    init_sanitize.php
    template_functions.php

    I still have issues with the following files I'm trying to work through.

    functions_email.php
    includes\classes\class.smtp.php
    includes\init_includes\init_templates.php

    It seems that once I solve one set of errors and work further through the site's checkout process more arise, so I'm sure these are not the end of it. Nor am I sure I can solve all the issues. I'm not a strong coder.

    Ruth
    Last edited by rwoody; 12 Mar 2010 at 04:40 AM.

  2. #12
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: Need Advice on Php Version

    Have you tried compiling to php 5.3.2 and patching with this
    http://www.zen-cart.com/forum/showthread.php?t=140960
    Zen-Venom Get Bitten

  3. #13
    Join Date
    Aug 2004
    Location
    Fountain Hills, AZ
    Posts
    515
    Plugin Contributions
    1

    Default Re: Need Advice on Php Version

    Quote Originally Posted by kobra View Post
    Have you tried compiling to php 5.3.2 and patching with this
    http://www.zen-cart.com/forum/showthread.php?t=140960
    That was the first thing that I did, but it does not go far enough to correct all the issues.

    Basic Example: query_factory.php (which was not in that patch)

    Line 139 - if (!ereg('^[0-9]', $key))

    Correct to: if (!preg_match('/^[0-9]/', $key))

    the reference in line 139 is found several times within the file and had to be edited. The other files that I listed had similar changes that were required and have been done.

    Now I'm finding issues with functions_email.php and also in sessions.php- so I'm off to research those as they are not so obvious to me.

    I'm doing this all in a test environment I set up locally as I did not want to recompile the production server until I knew I'd solved all the issues. I did the same thing before I recompiled to Php 5.2.12 -

  4. #14
    Join Date
    Aug 2004
    Location
    Fountain Hills, AZ
    Posts
    515
    Plugin Contributions
    1

    Default Re: Need Advice on Php Version

    The session file is really confusing me as to what the issue is there. I've made the correction needed on line 223

    PHP Code:
    if (preg_replace('/[a-zA-Z0-9]/'''session_id()) != ''session_regenerate_id(); 
    This took care of the first error regard ereg_replace, but it's also throwing a "headers already sent" error and there are no white spaces and the opening <?php is at the very top of the page. The exact error is:

    PHP Warning: session_start() [<a href='function.session-start'>function.session-start</a>]: Cannot send session cache limiter - headers already sent (output started at includes\functions\sessions.php on line 215

    That error was present "before" I edited the file.

    Any ideas anyone?

  5. #15
    Join Date
    Apr 2007
    Location
    Herts. UK
    Posts
    890
    Plugin Contributions
    4

    Default Re: Need Advice on Php Version

    Quote Originally Posted by rwoody View Post
    Here is the exact response from the scan -
    Synopsis : The remote web server uses a version of PHP that is affected by multiple flaws. Description : According to its banner, the version of PHP installed on the remote host is older than 5.3.2
    The Apache banner should be switched off so that the scan cannot determine the PHP version.

    Regards,
    Christian.

  6. #16
    Join Date
    Apr 2007
    Location
    Herts. UK
    Posts
    890
    Plugin Contributions
    4

    Default Re: Need Advice on Php Version

    Quote Originally Posted by rwoody View Post
    That was the first thing that I did, but it does not go far enough to correct all the issues.
    Once the PHP 5.3 patch has been applied the cart should run fine without any errors. Technically you can still use ereg() you just have to switch of the warning message which is what the patch does.

    Regards,
    Christian.

  7. #17
    Join Date
    Aug 2004
    Location
    Fountain Hills, AZ
    Posts
    515
    Plugin Contributions
    1

    Default Re: Need Advice on Php Version

    Quote Originally Posted by CJPinder View Post
    The Apache banner should be switched off so that the scan cannot determine the PHP version.

    Regards,
    Christian.
    Where can I turn that off?

  8. #18
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: Need Advice on Php Version

    If you have the 5.3 patch installed correctly, that is what turns off the deprecation warning. I've been reading back over this thread and rather suspect that your problem is that you don't have the patch installed corrected, and are then trying to deal with each warning as though it was an error.
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  9. #19
    Join Date
    Apr 2007
    Location
    Herts. UK
    Posts
    890
    Plugin Contributions
    4

    Default Re: Need Advice on Php Version

    Quote Originally Posted by rwoody View Post
    Where can I turn that off?
    In the httpd.conf you need to add (or edit if they are already there) the following directives...
    Code:
    [FONT=monospace]
    [/FONT]ServerSignature Off[FONT=monospace]
    [/FONT]ServerTokens Prod
    ...You will need to restart Apache (httpd) after making the changes.
    Your also need to edit your php.ini file and set the following...
    Code:
    expose_php = Off
    With those settings the scans will not able to determine what version of PHP you are using and they'll stop moaning about old versions.

    Regards,
    Christian.

  10. #20
    Join Date
    Aug 2004
    Location
    Fountain Hills, AZ
    Posts
    515
    Plugin Contributions
    1

    Default Re: Need Advice on Php Version

    Currently the settings in my http.conf are

    ServerSignature Off
    ServerTokens ProductOnly

    So you are saying change the second line to:

    ServerTokens Prod ?

 

 
Page 2 of 3 FirstFirst 123 LastLast

Similar Threads

  1. Replies: 4
    Last Post: 4 Sep 2012, 05:56 PM
  2. need php code advice
    By finlander in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 8 Nov 2010, 08:13 AM
  3. Php error need advice?
    By Treasuresbycaz in forum Basic Configuration
    Replies: 3
    Last Post: 8 Aug 2009, 07:03 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