# Apache handler with Multiple PHP versions

- Thread: https://externals.io/message/30886
- Original archive: https://news-web.php.net/php.internals/30886
- Started by Gaetano Giunta on 2007-07-13T09:51:42+00:00
- Messages: 1
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #30886 — Gaetano Giunta — 2007-07-13T09:51:42+00:00

URL: https://externals.io/message/30886#30886

> 
> > […]
>
> My host hasn't a single .htaccess file ;)
> (Using DirectAdmin..)

Not really an excellent option for web hosters, but the easiest way I
set up "alot" of php versions on my dev box (1 as apache module, all
the rest cgi, of course) is using virtual hosts:
every virtual host listens to either a different port or a different
server name, eg: php4server.my.domain, and binds .php and .inc files
to a different cgi app/php version.
This way there is no need to rename files or keep multiple copies
around, and it is pretty useful eg. for heavy unit testing: if the
code does not work in a particular php version, add some hackish ifdef
equivalent and you're done.

Bye
Gaetano
