Like webbiedave mentioned php is a language and Rails is a framework of Ruby. However, you could insert "break-points" into your php Script - and either execute from the browser - or if you have php-cli installed execute the script from CLI (Which isn't exactly the same as the browser, but may also provide more helpful information).
A few other tips - dump the environment settings for each machine, devel and production (with a simple script that has
<?php phpinfo(); ?>
And compare the differences - this may help highlight why certain portions are failing between environments.
Lastly you can run php interactively with php -a much like you can with irb and ruby though it may not be as helpful in this situation.