When PHP4 is discontinued . . .

13 replies
Question:

As hosts gradually move to PHP5 would they (in general) keep PHP4
on the system (but not supported), thus allowing customers
to still use it for PHP4 scripts ?


Harvey
#discontinued #php4
  • Profile picture of the author Neil Morgan
    Hello Harvey

    When their web server is asked to server a php script, it can only use one interpreter to do that - likely php5 now.

    So they may leave PHP4 on there but it won't be accessible via the web server, only directly through crons etc, and only then if it's installed as a binary and not as an Apache module.

    Gosh, that sounds techy.

    So to answer your question, in general, no.

    Cheers,

    Neil
    Signature

    Easy email marketing automation without moving your lists.

    {{ DiscussionBoard.errors[344203].message }}
    • Profile picture of the author Harvey Segal
      Neil

      Can you not alter htaccess to run the php version of your
      choice for a particular directory ?


      Harvey
      {{ DiscussionBoard.errors[344228].message }}
    • Profile picture of the author n7 Studios
      Originally Posted by Neil Morgan View Post

      Hello Harvey

      When their web server is asked to server a php script, it can only use one interpreter to do that - likely php5 now.

      So they may leave PHP4 on there but it won't be accessible via the web server, only directly through crons etc, and only then if it's installed as a binary and not as an Apache module.

      Gosh, that sounds techy.

      So to answer your question, in general, no.

      Cheers,

      Neil
      It depends on the host - MediaTemple allow you to run your web site using either PHP4 OR PHP5. There's no need to mess around with changing file extensions, you just select which PHP version you wish to run when configuring the web site through their control panel.

      I'm sure there are countless other hosts who do the same.

      The only other suggestion is to try your scripts on PHP5 - you'd be surprised how much will work in PHP5 (the idea being that, bar some big exceptions, it's backward compatible with PHP4).
      {{ DiscussionBoard.errors[347870].message }}
      • Profile picture of the author Harvey Segal
        Originally Posted by n7 Studios View Post

        you'd be surprised how much will work in PHP5 (the idea being that, bar some big exceptions, it's backward compatible with PHP4).
        Is it possible to know what these exceptions are ?

        I am aware of one (I think)
        - that you need to retrieve an argument via the $_GET command
        e.g $x = $_GET["x"];
        rather than a direct reference to $x

        Harvey
        {{ DiscussionBoard.errors[366860].message }}
  • Profile picture of the author Neil Morgan
    Hi Harvey

    Yes, that can be done, but whether hosts will leave both versions on is a different question.

    All we can say, I guess, is that some will and some won't. I think those that won't will be in the majority.

    Cheers,

    Neil
    Signature

    Easy email marketing automation without moving your lists.

    {{ DiscussionBoard.errors[344240].message }}
  • Profile picture of the author Valdor Kiebach
    I was with a host that needed you to change the extension from php to php4 if you wanted to use version 4, I just update the scripts anyway to use version 5
    {{ DiscussionBoard.errors[344769].message }}
    • Profile picture of the author Harvey Segal
      Originally Posted by Neil Morgan View Post

      I think those that won't will be in the majority.
      I agree that it's best to assume this

      Originally Posted by Valdor Kiebach View Post

      I just update the scripts anyway to use version 5
      That's what I am trying to avoid !
      It's not my own script but a software library.

      Harvey
      {{ DiscussionBoard.errors[345259].message }}
    • Profile picture of the author Darren Mothersele
      Originally Posted by Valdor Kiebach View Post

      I was with a host that needed you to change the extension from php to php4 if you wanted to use version 4
      I remember this is what most hosts did when we upgraded from php3 to php4. You had to rename your scripts to .php3 for them to use the old version of PHP.

      If the hosts allow it you can use htaccess rewrites to hide the change to the outside world.

      IMO it's worth the upgrade - PHP5 is awesome!
      {{ DiscussionBoard.errors[350488].message }}
  • Profile picture of the author 440Music
    Thanks, I would have spent hours find that info

    TBones
    {{ DiscussionBoard.errors[366919].message }}
  • Profile picture of the author improvingtheweb
    Why would you want to continue to use an old and obsolete, not to mention INSECURE version of PHP, risking your servers, your business, and lifelihood, instead of spending some money on making sure your scripts are converted to work correctly with PHP 5/6, without any register_globals stuff going on, etc?

    You could probably find someone at rentacoder to convert those scripts for you.

    And if you're using bought scripts that don't work in PHP5, complain to them and make them update it.
    {{ DiscussionBoard.errors[377626].message }}
    • Profile picture of the author Harvey Segal
      Originally Posted by improvingtheweb View Post

      Why would you want to continue to use an old and obsolete, not to mention INSECURE version of PHP, risking your servers, your business, and lifelihood, instead of spending some money on making sure your scripts are converted to work correctly with PHP 5/6, without any register_globals stuff going on, etc?
      It's not a question of not "spending some money".

      The point of my post is to understand the situation
      regarding php support.

      If the case was, for supposition, that every host would
      maintain php4 for ever then it would not make sense to
      convert, in fact it could be a bad idea because errors
      might be introduced in the conversion


      Originally Posted by improvingtheweb View Post

      You could probably find someone at rentacoder to convert those scripts for you.

      And if you're using bought scripts that don't work in PHP5, complain to them and make them update it.
      It's a free software library - and I am paying a programmer to do the conversion

      Harvey
      {{ DiscussionBoard.errors[378388].message }}

Trending Topics