Page 1 of 1

Error on PHP5

Posted: Fri Oct 26, 2007 12:22 am
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.

Choose the Right Board

Posted: Fri Oct 26, 2007 12:34 am
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.

Posted: Fri Oct 26, 2007 12:37 am
by vinoth
I am not sure that .php5 is processed in .php.

I want to confirm its possible or not?

Posted: Fri Oct 26, 2007 12:40 am
by feyd
You're going to have to check your web server's configuration then.. or talk to your host.

Posted: Fri Oct 26, 2007 12:51 am
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?

Posted: Fri Oct 26, 2007 12:59 am
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.

Posted: Fri Oct 26, 2007 3:40 am
by vinoth
Thanks Feyd for your suggestions

I will check my conf files,
If you find the exact location, then inform me also

Posted: Fri Oct 26, 2007 9:41 am
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.

Posted: Fri Oct 26, 2007 3:40 pm
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.

Posted: Sun Oct 28, 2007 11:58 pm
by vinoth
Hi feyd & Everah

thanks for your useful suggestions.

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