View Full Version : phtml file problem
teet
July 4th, 2006, 04:30 PM
I'm running Ubuntu 6.06 Dapper Drake.
I followed the installation instructions here: https://hive.bountysource.com/wiki/Installation
Everything seemed to install okay, but whenever I go to localhost/center, firefox tries to open a *.phtml file instead of giving me the login screen. I know I am not the only person to have this problem.
I think part of the problem is php4 is installed too, but php-auth depends on php4-pear and php4-common.
Here's a snippet:
alex@htpc:/var/www$ sudo apt-get install apache2 mysql-server php5 php5-gd php5-mysql id3v2 imagemagick libgd2-dev libgd2 php-auth
Password:
Reading package lists... Done
Building dependency tree... Done
apache2 is already the newest version.
mysql-server is already the newest version.
php5 is already the newest version.
php5-gd is already the newest version.
php5-mysql is already the newest version.
id3v2 is already the newest version.
imagemagick is already the newest version.
libgd2-dev is already the newest version.
libgd2 is already the newest version.
The following extra packages will be installed:
php4-common php4-pear
The following NEW packages will be installed:
php-auth php4-common php4-pear
0 upgraded, 3 newly installed, 0 to remove and 5 not upgraded.
Need to get 0B/200kB of archives.
After unpacking 668kB of additional disk space will be used.
Do you want to continue [Y/n]? Y
Selecting previously deselected package php4-common.
(Reading database ... 130660 files and directories currently installed.)
Unpacking php4-common (from .../php4-common_4%3a4.4.2-1build1_i386.deb) ...
Selecting previously deselected package php4-pear.
Unpacking php4-pear (from .../php4-pear_4%3a4.4.2-1build1_all.deb) ...
Selecting previously deselected package php-auth.
Unpacking php-auth (from .../php-auth_1.2.3-2_all.deb) ...
Setting up php4-common (4.4.2-1build1) ...
Setting up php4-pear (4.4.2-1build1) ...
Setting up php-auth (1.2.3-2) ...
Any suggestions?
-teet
QuacoreZX
July 6th, 2006, 10:47 PM
I was just about to make the same post about the same problem. I've been trying to get some support over here (http://www.torrentflux.com/forum/index.php/topic,1706.msg12688.html#msg12688), but so far to no avail, though the denizens there are rather helpful.
Anyone with a solution?
QuacoreZX
July 6th, 2006, 11:16 PM
mere moments after the problem, I have found the solution!
1) OK, first, uninstall php4, php5, apache, and apache2 and all directly related packages.
2) reinstall php5 and apache2 related packages as well as php5-mysql
3) in /etc/apache2/apache2.conf, uncheck the lines related to AddType
4) CLEAR FIREFOX'S CACHE! HERE IS WHERE MY ERROR WAS!
5) should work now :D
Stereotypical Rage
July 7th, 2006, 05:21 PM
--Clear Browser Cache.
--sudo apache2ctl restart
Works like a charm.:D
teet
July 7th, 2006, 06:44 PM
An update on my problem:
I did manage to get the PHTML probelm solved. Here are the steps I took that seemed to work.
1. sudo apt-get remove php4-common php-pear php-auth
2. Then I forced the ubuntu center deb to install
sudo dpkg -i --force-all ubuntu*.deb
I have an account setup with no-ip.com. When I tried accessing ubuntu center (hive) via my no-ip domain name (http://domainname.zapto.org/center) it worked.
Since then, I have reinstalled php-auth php4-common and php4-pear and things are still working fine. Whatever.
-teet
mbradlcu
July 25th, 2006, 06:44 PM
the resolve for me was a little different,
I used the following info from this url:
http://en.wikibooks.org/wiki/Linux_Guide/Installing_SugarCRM_On_Linux
for that I did:
ln -s /etc/apache2/mods-available/php5.conf /etc/apache2/mods-enabled/php5.conf
ln -s /etc/apache2/mods-available/php5.load /etc/apache2/mods-enabled/php5.load
then vi'ed /etc/apache2/apache2.conf and added:
AddType application/x-httpd-php .php .phtml
not sure if it matters but I also added:
DirectoryIndex index.php index.html index.html.var
then I did the php test mentioned in the url, check it out, it's pretty cool.
gertmul
August 31st, 2006, 05:47 AM
And if you don't have the php5.xxxx files in the mods-available folder the following should put them there:
apt-get --purge remove php5-common
apt-get install php5 phpmyadmin
SanHolo
October 13th, 2006, 09:15 AM
And if you don't have the php5.xxxx files in the mods-available folder the following should put them there:
apt-get --purge remove php5-common
apt-get install php5 phpmyadmin
Thanks, that worked for me. 8)
jobano
October 25th, 2006, 02:49 PM
And if you don't have the php5.xxxx files in the mods-available folder the following should put them there:
apt-get --purge remove php5-common
apt-get install php5 phpmyadmin
the same for me
thanks
jessecollins
December 19th, 2006, 02:39 PM
Sweet! Got this working. Thanks guys. :)
aws910
February 6th, 2007, 11:40 PM
And if you don't have the php5.xxxx files in the mods-available folder the following should put them there:
apt-get --purge remove php5-common
apt-get install php5 phpmyadmin
Worked for me too!
*opens a cold one in honor of gertmul*
jonathan_c
February 16th, 2007, 11:39 PM
I just cleared firefox's cache and it worked. I'm thinking that's all you'd need to do anyway.
jackhsu978
March 3rd, 2007, 06:47 AM
yeah. clearing the cache on firefox solved this problem for me :)
maddog39
March 4th, 2007, 08:41 PM
The easiest way to solve this problem is to add a type for it in a .htaccess file in the root of your webpage directory. However, *.phtml is the same exact thing as a *.php, so whats the problem with just renaming the files to .php files. I am a PHP developer of two years and had this problem on occasion. It normally revolved around the .htaccess. But the easiest fix is to just rename all the files to plain .php files.
gheorghe.iuga
May 20th, 2007, 05:25 PM
I had the same problem. On my pc, accesing "mydomain/~myaccount" from firefox prompted me to download the phtml file. When opening the same url form another pc with firefox everything went fine. Went back on my PC and tryed with Epiphany, worked. Cleared cache in Firefox -> all went ok.
djgrant
May 25th, 2007, 02:16 AM
clearing firefox's cache worked for me too
thetorst
July 17th, 2007, 11:04 PM
Everything seemed to install okay, but whenever I go to localhost/center, firefox tries to open a *.phtml file instead of giving me the login screen. I know I am not the only person to have this problem.
It took me two hours to solve this .phtml problem. I found my answer at Ubuntu Geek's forum (http://www.ubuntugeek.com/apache2-web-server-installation-with-php4-and-php5-support-in-ubuntu.html). I had to clear Firefox's cache (Tools->Clear Private Data) to get things working.
-Dan
JoeJaz2
December 5th, 2007, 01:51 PM
Clearing Firefox cache worked for me. Thank you for the post.
enopepsoo
May 14th, 2008, 06:33 PM
--Clear Browser Cache.
--sudo apache2ctl restart
Works like a charm.:D
Thanks matey!:popcorn:
jerunamuck
July 5th, 2008, 12:16 PM
And if you don't have the php5.xxxx files in the mods-available folder the following should put them there:
apt-get --purge remove php5-common
apt-get install php5 phpmyadmin
Worked for me too.
Side Note: php5.* was in both mods-available and mods-enabled before I did this. I could open localhost/index.php but not localhost/ and yes I tried every combination of
AddType application/x-httpd-php .php .phtml
DirectoryIndex index.php index.html
in httpd.conf
It worked before upgrading to hardy but not after so it may be an update script error. Unfortunately, I don't have the time or spare server on which to try and recreate the error.
I had saved all the delta file reports from the update and went through each but found noting of interest. or at least nothing that when restored resolved the error.
vBulletin® v3.7.2, Copyright ©2000-2008, Jelsoft Enterprises Ltd.