Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Other Development environment to use different PHP versions

  • This topic is empty.
Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #246191
    rolandas
    Participant

    Hi all,

    I’m trying to set up an environment so I could use different PHP and probably Apache versions. I’m on Windows and I don’t want to use WAMP or Xamp, I want to use source instead. Has anyone done anything like that?

    Thanks :)

    #246201
    I.m.learning
    Participant

    What do you mean you want to use source? You need a server to process PHP; there’s really only a good handful.

    If you’re running Windows, you can use IIS. Seems more complex than Wamp.
    What I’m conflicted about is, why use other versions? Use the most recent.

    It’s like saying you want to use HTML4.

    #246213
    Beverleyh
    Participant

    What I’m conflicted about is, why use other versions? Use the most recent.

    Unfortunately it’s not that simple. For example, if the OP is developing something that will be available to the public, they need to test for compatibility on many different platforms.

    At the end of the day, we have no idea what server environment the public is using and there’ll be many legacy setups using older versions of PHP. PHP 5.3 is still the most common https://w3techs.com/technologies/details/pl-php/5/all Web hosts don’t just incrementally upgrade PHP versions around established websites every time a new version comes out (things could break and they’d be in a heap of do-do). And even established websites have additional scripts added over time. Heck, one website I first developed way, way back was still on a PHP 4 platform upto the middle of last year, just because the organisation didn’t want to invest in full redevelopment until they absolutely had to, but they still had me writing this and that function to accommodate their existing setup, right up to the date their web host stripped PHP 4 from their servers.

    Having access to different PHP versions is really important.

    #246228
    I.m.learning
    Participant

    Things you won’t learn in school. Do you know what the OP meant by “using source?” I been waiting for their reply for days and saw you (bev) reply with clarification to my post ( the op’s question and I get a free lesson).

    #246232
    Beverleyh
    Participant

    I’ve only briefly dabbled in C/C++ but I imagine the OP means along those lines. Like the source code (base instructions) for programs/operating systems, before they’ve been compiled into executables/software pacakages. If you have the source for programs, you can manipulate, customise and develop them further than the original developer did. That’s only my interpretation though.

    #246670
    rolandas
    Participant

    Sorry, folks, I got caught up in a daily crap :)

    Yes, it not all that simple- I would definitely use PHP7, Nginx and some fancy database, but I have no choice, because company server supports PHP 5.4 only. But then I’d like to use other PHP versions, as there will be another server, with higher PHP version support. That’s why I’m trying to use PHP, Apache and MariaDB from source :)

    Actually all PHP stuff has been written in PHP4! Who’d believe in that?! :) Fortunately it’s been upgraded to PHP 5.4

    That’s for your replies, I’m still struggling with my issue :)

    #246695
    Beverleyh
    Participant

    But then I’d like to use other PHP versions, as there will be another server, with higher PHP version support. That’s why I’m trying to use PHP, Apache and MariaDB from source :)

    I’m not fully understanding your reasoning there, but when I want to test in multiple PHP environments I use WAMP server. You can install multiple versions of PHP alongside each other and switch between them http://www.wampserver.com/en/#download-wrapper

    #247768
    StrategyBeach
    Participant

    I think you don’t need to install different versions of php for different development environment. One way to do this is to have your main version of php set up with mod_php and run all of the others through fast cgi on different ports (i.e. 81, 82, 83 etc). This won’t guarantee totally consistent behavior though.

    #249161
    rolandas
    Participant

    @strategybeach, I think that is exactly what I was looking for :) do you know of any good tutorial how to set PHP with cgi on different ports?

    thanks :)

Viewing 9 posts - 1 through 9 (of 9 total)
  • The forum ‘Other’ is closed to new topics and replies.