PHP, mySQL, and pre-switch testing

PHP, mySQL, and pre-switch testing

Posted by: Anonymous
Posted on: 2006-04-28 20:16:00

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 :)

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.

Michelle


Re: PHP, mySQL, and pre-switch testing

Posted by: doeleman
Posted on: 2006-04-29 03:34:00

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.

2. 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.

3. Yes. You can get a dreamhosters.com subdomain like yoursite.dreamhosters.com for testing.


Re: PHP, mySQL, and pre-switch testing

Posted by: kchrist
Posted on: 2006-04-29 12:41:00

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.

Tags: php mysqlmysql databasesdreamhostcgi modulemysql dataphp codeurlphpmyadminwikimyidata directorydatabase filesfrmuglymodsql