Prompted to Open/Save php files
Attempting, for the first time, to setup apache2, php5 and mysql/mysqli. I can load my index.html and I can load phpinfo.php ( contains <?php phpinfo(); ?> ) and it works. I see the php info displayed in the browser ( the latest firefox ) as expected.
When I load http://localhost/phpMyAdmin/index.php I get prompted to load/save the file. For grins I saved it and gets saved as <CRYPTICNAME>.phtml - where <CRYPTICNAME> looks like some random meaningless text. It gets a different name everytime. In an editor I see that <CRYPTICNAME>.phtml just a copy of the index.php file. Any ideas on why some php files are interpreted and others are not? |
Quote:
|
Quote:
|
Quote:
Test again with both when you get home, and test with some simple php pages as well (ie: <?php echo "this shoul work"; ?>) and try to narrow down the causes of failure. |
it gets weirder
I made a backup of my index.php file and then deleted everything from the original and put only <?php echo "Hello!" ?> and it prompted for a load/save. I copied a php counter script into my phpmyadmin page and it worked. I renamed it index.php and was again prompted to load/save!
I renamed my phpmyadmin directory to phpMyAdmin and it seemed to work. I got other errors; "Fatal error: Call to undefined function PMA_getenv() in /var/www/phpMyAdmin/index.php on line 50" I'm sure that's some normal config issues so I consider this issue resolved. Thanks for the help. |
My guess is that your mime-types are wrong/missing:
Have you checked if you have this file: /etc/apache2/modules.d/70_mod_phpX.conf? (or something similar) If not try creating it, but call it 70_mod_php5.conf (if you are using php5): Code:
<IfDefine PHP5> There's also a possibility you might have to fill this in your httpd.conf if the modules folder isn't present. If, on the other hand, the file is there, AND the content is the same as above then you have to make sure you've got APACHE_OPTS set with "-D PHP5" (or -D PHP4 if you're using php4). Although if OPTS is wrong, it's very strange that .html files with php content works. Hope this helps. But if not, please post your version of Apache and PHP? |
All times are GMT -5. The time now is 06:47 PM. |