I'm finally biting the bullet and upgrading my PHP/MySQL installations to version 5 (I've had too many dependencies on Apache 1.3, sites using MySQL 4.x and PHP 4.x, and a bunch of other problems). It's sort of working, but only if I explicitly specify <?php xxx ?>
but not if they don't, i.e., <? xxx ?>
.
For example, the typical script to test if your PHP and Apache installations are working together is:
<? phpinfo(); ?>
This does not run. But if I change it to this:
<?php phpinfo(); ?>
...then it runs just fine, which shows that both Apache and PHP are properly installed. MySQL is working, too, but I want to manage it with phpMyAdmin, but all the PHP scripts in it use <?
instead of <?php
, so it won't do anything.
For what it's worth, I've got these lines in my Apache httpd.conf:
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
...which I would expect to take care of the problem (i.e., running all files with the php extension through the PHP module's processor).
Any ideas?
Or do I really have to search and replace everything to explicitly specify php in these scripts (including ones I didn't write)? I'm running on Windows (WinXP SP3), if that makes any difference in the answer.
EDIT:
OK, I was wrong about phpMyAdmin using the short tag. Setting short_open_tag = On does not fix the problem. However, making this change does cause other pages to load that didn't before. I'll rewrite the code to use the long tag, since the short tag is deprecated, but I'm still trying to figure out why phpMyAdmin isn't working.