PHP, mySQL, and pre-switch testing


After an aborted attempt to switch hosting of my site last weekend (from and to other providers than Dreamhost), I’d like to know about a few things that bit me last time before I try Dreamhost…

  1. Is PHP installed as an Apache mod or as a CGI module? I care because if it’s a CGI module, my wiki URL’s will change to the ‘ugly’ ones, which I don’t want. I see the dreamhost wiki has pretty url’s , so if it’s on a dreamhost server, I’m okay :slight_smile:

  2. If I have my MySQL databases in the form of raw database files (.MYI, .frm, etc), is there a way for me to get them installed in a mysql data directory, or must I have a .sql file and try to use phpMyAdmin? One is 100MB and I’ve not always succeeded with phpMyAdmin.

  3. Can I test my website completely on a temporary URL before I throw the switch on the DNSs? In other words, will the php code be allowed to be active?

I think that’s it. Thanks for any info.


  1. Until recently you could choose between PHP4 Apache-module, PHP4 CGI and PHP5 CGI. DreamHost removed the PHP4 Apache option from the Control Panel, but you can still switch to the Apache-module from your .htaccess.
    See End of PHP as an Apache Module? for info.

Anyway, since mod_rewrite works both when PHP runs as an Apache-module and as a CGI in DreamHost’s setup, you might be able to get pretty urls even with PHP-CGI.

  1. I’m not sure if you can use .myi files, but if you can get a dump of your database as an .sql file you can import it to MySQL via the shell.
    See Migrate SQL for info.

  2. Yes. You can get a subdomain like for testing.

[color=#000000]DreamHost Promo Code[/color]: [color=#CC0000]Save $50[/color] with the promo code DREAMTEAM


mod_rewrite has nothing to do with PHP, so you can use MediaWiki’s URL rewriting when using PHP-CGI just the same as you would under mod_php. I’m doing it on one of my DH-hosted sites. I’ve even toggled back and forth between CGI and mod_php without breaking anything.

If you want useful replies, ask smart questions.