20i Reseller Hosting

Anyone with vast php experience (wanted)

Discussion in 'Scripts and Coding' started by ian, Apr 8, 2014.

Thread Status:
Not open for further replies.
  1. ian

    ian Well-Known Member

    Joined:
    Jan 2008
    Posts:
    3,824
    Likes Received:
    264
    I need someone with vast php experience that may be able to help me out with some php errors on my ecommerce website. They need to know the differences between different versions to then change the script to suit; especially centred around time adjustments which work on one version, but not on another.

    Willing to pay for the service.

    Any recommendations?
     
  2. Domain Forum

    Acorn Domains Elite Member

    Joined:
    1999
    Messages:
    Many
    Likes Received:
    Lots
    articles.co.uk
     
  3. Skinner

    Skinner Well-Known Member

    Joined:
    Jul 2008
    Posts:
    4,658
    Likes Received:
    136
    Martin-S springs to mind.
     
  4. monaghan United Kingdom

    monaghan Moderator Staff Member

    Joined:
    May 2007
    Posts:
    2,103
    Likes Received:
    70
    Do you need someone now? If it's not urgent, then I can fit you in shortly, if you need something this week, sorry I have too many jobs on at once.
     
  5. ian

    ian Well-Known Member

    Joined:
    Jan 2008
    Posts:
    3,824
    Likes Received:
    264
    No immediate rush. My ecommerce site throws up quite a few errors when I try to use a newer version of php than 5.2.17. Most are centred around the time/date, which cannot seem to set order times correctly, presumably because the command set within my ecommerce script isn't pointing to it.

    At the moment I think this is the script:

    define('TIME', time());

    When I think it should be more like:

    date.timezone = "Europe/London"

    The current way around it is to stick with an old version of php, but ideally I want to be on 5.4 or 5.5. I just don't know what to enter where.

    It is quite messy as the ecommerce script is around 7 or 8 years old and I've not updated it much.
     
  6. monaghan United Kingdom

    monaghan Moderator Staff Member

    Joined:
    May 2007
    Posts:
    2,103
    Likes Received:
    70
    They did make a number of changes to the date handling a few version ago. You should take a read of the PHP date functions at www.php.net, if you get no joy, then drop me all the details in a PM and we can explore further. Just off to debug a Magento module :)
     
  7. ian

    ian Well-Known Member

    Joined:
    Jan 2008
    Posts:
    3,824
    Likes Received:
    264
    I'll drop you a PM because none of this makes sense, I've been through it before.

    The server I'm on use to use a php.ini file which stipulated:

    date.timezone = "Europe/London"

    That seemed to work and I didn't have many time issues, but then the server host changed to a cloud based system so each individual could change certain aspects of the host and protect each user from hacking elsewhere the server. It meant no more php.ini file which is when I had to go back to an older php version.
     
  8. martin-s United Kingdom

    martin-s Well-Known Member

    Joined:
    Jul 2012
    Posts:
    3,347
    Likes Received:
    226
    Kind of you, but actually I barely touch PHP. Just happy to help with the easy stuff on that side of things :)

    .Net and SQL is where my strengths lay.
     
  9. mrt United Kingdom

    mrt Member

    Joined:
    May 2013
    Posts:
    19
    Likes Received:
    5
    If you take a look in your app/Mage.php file you should find a line similar to:

    HTML:
    date_default_timezone_set('UTC');
    It may be worth either commenting that out (by adding a # in front of it) or trying to set it to 'Europe/London'

    Does that help?
     
  10. ian

    ian Well-Known Member

    Joined:
    Jan 2008
    Posts:
    3,824
    Likes Received:
    264
    Thanks but my cpanel account doesn't appear to have that folder, not even in the server root.
     
  11. mrt United Kingdom

    mrt Member

    Joined:
    May 2013
    Posts:
    19
    Likes Received:
    5
    Are you using Magento? Rereading the thread I appear to have assumed Magento based on what monaghan said, not you!

    If you'd like me to take a look I'd be happy to - I have a low post count but I'm sure admin would vouch for me, I've hosted these forums for him for some time now.
     
  12. monaghan United Kingdom

    monaghan Moderator Staff Member

    Joined:
    May 2007
    Posts:
    2,103
    Likes Received:
    70
    No idea what Ian's using, mentioned I was going to be updating a Magento module for a customer today, perhaps that's the confusion.
     
  13. ian

    ian Well-Known Member

    Joined:
    Jan 2008
    Posts:
    3,824
    Likes Received:
    264
    Cs-cart, but a very old version which I never updated in the early days and site is now so customised (apart from key back-end functions) that I can't upgrade it, merely patch issues.

    Does php generally have a lot of vulnerabilities or does that tend to come from other forms of code. I'm just conscious how important the site is to my business and I see quite a lot of error logs in cpanel of random page checks by a few IP addresses.
     
  14. mrt United Kingdom

    mrt Member

    Joined:
    May 2013
    Posts:
    19
    Likes Received:
    5
    Generally vulnerabilities tend to come from script code rather than PHP itself. PHP has had a number of vulnerabilities in its time, but script vulnerabilities are far, far more common.

    Depending on the age of your cs-cart installation it may have some insecurities - there were some SQL injection vulnerabilities found in 2008/2009. I dare say, assuming you are vulnerable, you may not been attacked as cs-cart is not terribly popular - but that won't save you from a targeted attack.

    That's somewhat tangenital to your initial timezone issue, but still important to resolve. If you'd like me to have a look feel free to send a PM.
     
Thread Status:
Not open for further replies.