Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Wed Sep 09, 2009 3:44 am 
Offline
Senior Newbie

Joined: Wed Sep 09, 2009 3:36 am
Posts: 6
WLM: pandya_milan@hotmail.com
Yahoo Messenger: pandya_milan82@yahoo.com
Hi,
I followed the procedure stated over here (http://library.linode.com/lamp-guides/centos-5/).

Now two things have happened.

1) php.ini file is not in etc/php5/apache2/ as mentioned in the link above, instead it is in etc/

2) i created a test file, named index.php in srv/www/mysite.com/public_html , but when i try http://74.207.246.56/index.php it pops up telling me to download the file. Before that, it was just displaying php file as text on screen after I wrote,

AddType application/x-httpd-php .php .foo
AddType application/x-httpd-php-source .phps .phtmls
DirectoryIndex index.php index.htm index.html

it is now displaying a pop-up to download index.php

Any help please.

Thanks in advance

Milan

-------------------
Update:

I restored the original httpd.conf file for apache and removed virtualhosts too.

Hence, now i placed file test.php in var/www/html/

and this is what i get http://74.207.246.56/test.php

php is displayed as text.


Top
   
 Post subject:
PostPosted: Wed Sep 09, 2009 1:25 pm 
Offline
Senior Member

Joined: Fri Sep 12, 2008 3:17 am
Posts: 166
Website: http://independentchaos.com
Have you restarted Apache?

_________________
If it ain't broke, you didn't tweak it enough. If it is broke, use more duct tape.
http://independentchaos.com


Top
   
 Post subject:
PostPosted: Wed Sep 09, 2009 9:23 pm 
Offline
Senior Member

Joined: Sun Aug 02, 2009 1:32 pm
Posts: 222
Website: https://www.barkerjr.net
Location: Connecticut, USA
The instructions are wrong. There is no package named php5. You need to do: yum install php


Top
   
 Post subject:
PostPosted: Thu Sep 10, 2009 1:07 am 
Offline
Senior Newbie

Joined: Wed Sep 09, 2009 3:36 am
Posts: 6
WLM: pandya_milan@hotmail.com
Yahoo Messenger: pandya_milan82@yahoo.com
yes. i restarted apache quite a few times. but no luck.

I found out that command line php works. So i guess php just got installed in wrong path or i need to set path or change few settings in httpd.conf

Maybe i will try yum install php


Top
   
 Post subject:
PostPosted: Thu Sep 10, 2009 1:40 am 
Offline
Senior Newbie

Joined: Wed Sep 09, 2009 3:36 am
Posts: 6
WLM: pandya_milan@hotmail.com
Yahoo Messenger: pandya_milan82@yahoo.com
mikeindia wrote:
yes. i restarted apache quite a few times. but no luck.

I found out that command line php works. So i guess php just got installed in wrong path or i need to set path or change few settings in httpd.conf

Maybe i will try yum install php


I tried yum remove php and then yum install php

still the same problem.


Top
   
 Post subject:
PostPosted: Thu Sep 10, 2009 6:52 am 
Offline
Senior Member

Joined: Sun Aug 02, 2009 1:32 pm
Posts: 222
Website: https://www.barkerjr.net
Location: Connecticut, USA
Please verify that there is a line like this in httpd.conf:

LoadModule php5_module /etc/httpd/modules/libphp5.so


Top
   
 Post subject:
PostPosted: Mon Sep 14, 2009 2:17 am 
Offline
Senior Newbie

Joined: Wed Sep 09, 2009 3:36 am
Posts: 6
WLM: pandya_milan@hotmail.com
Yahoo Messenger: pandya_milan82@yahoo.com
BarkerJr wrote:
Please verify that there is a line like this in httpd.conf:

LoadModule php5_module /etc/httpd/modules/libphp5.so


Hi,
there is no such line in httpd.conf It seems php5 didnt get install correctly. But a day or two, the code now works. Seems like this one had problem with rebooting system.

So now php is working fine.

Thanks to all for help.

Milan


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group