Error on PHP5

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
vinoth
Forum Contributor
Posts: 113
Joined: Thu Aug 02, 2007 3:08 am
Location: India
Contact:

Error on PHP5

Post by vinoth »

Hi all,

If I save the file as filename.php5.

Then, I execute the program in brower like localhost/filename.php5.
It shows the entire php code on browser I don't know what happen,
Did any one face this problem before?

Please provide some solutions regarding this problem.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Choose the Right Board

Post by feyd »

Are you sure .php5 is supposed to be processed by PHP?
[url=http://forums.devnetwork.net/viewtopic.php?t=30037]Forum Rules[/url] Section 1.1 wrote:1. Select the correct board for your query. Take some time to read the guidelines in the sticky topic.
vinoth
Forum Contributor
Posts: 113
Joined: Thu Aug 02, 2007 3:08 am
Location: India
Contact:

Post by vinoth »

I am not sure that .php5 is processed in .php.

I want to confirm its possible or not?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

You're going to have to check your web server's configuration then.. or talk to your host.
vinoth
Forum Contributor
Posts: 113
Joined: Thu Aug 02, 2007 3:08 am
Location: India
Contact:

Post by vinoth »

How I check my webserver configuration?

I check by php_info() & its shows PHP Version 5.1.2

So I have PHP 5 available in my system then where i have to check?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

You'll need to find the configuration settings. Apache uses .htaccess and httpd.conf files for these settings. IIS has a control panel. It's been more than a dozen years since I last touched IIS, I couldn't even begin to tell you where to look on that front.
vinoth
Forum Contributor
Posts: 113
Joined: Thu Aug 02, 2007 3:08 am
Location: India
Contact:

Post by vinoth »

Thanks Feyd for your suggestions

I will check my conf files,
If you find the exact location, then inform me also
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Exact location for what? There's only one place conf files are stored for Apache.

To know what to look for inside the file, read the install instructions text file that comes with PHP (or on the manual site.) Make sure to find the appropriate section for your particular version set of Apache -- there are three version groups.
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

There is an AddHandler declaration that is usually responsible for telling Apache to parse certain file extensions using the PHP module.

Code: Select all

# For PHP 5 do something like this:
LoadModule php5_module "c:/php/php5apache2.dll"
AddType application/x-httpd-php .php

# configure the path to php.ini
PHPIniDir "C:/php"
This is, of course, for a Windows set up. You need to make sure your paths are properly set up in your Apache conf file. Also, in the example, that is how .php files get parsed. To use .php5 files, changes the .php above to .php5.
vinoth
Forum Contributor
Posts: 113
Joined: Thu Aug 02, 2007 3:08 am
Location: India
Contact:

Post by vinoth »

Hi feyd & Everah

thanks for your useful suggestions.

I tried your instructions,
If I find any problem, I will back again
Post Reply