Webmaster Key - Discussion Forums


Welcome, Guest. Please login or register.
Did you miss your activation email?
February 08, 2012, 06:46:24 PM

Login with username, password and session length
Welceome to Forums!

Important information for guests and new members:

In order to understand the full benefits of becoming an active member of this forum, please review the following information on guest and new member restrictions. These forum changes have been prompted by an overwhelming and unreasonable amount of bot postings and incoherent guest spam messages. We wish to prevent these events from happening in the future and make our community a more comfortable place for all of our members.

For guests:

Guests are not allowed to open new topics, polls, or posts attachments.
If you wish to open up new discussions on this forum, we encourage you to register.

For new members:

New members with less than five posts are not allowed to modify additional profile information such as avatars, contact information, biographies, and signatures. However, new members are encouraged to post their own topics or reply to topics initiated by other members. Become active on the forums and 5 posts should be an easy task!

We are a diverse community with members from all over the world. We encourage new ideas and interesting conversation. Do not be afraid to post webmaster/computer-related questions or problems, as our active members are always willing to help when they are able. Interested? Join us.

+ Webmaster Key Forums
|-+ Webmaster Corner
| |-+ Site Design and Web Authoring
| | |-+ Coding Talk
| | | |-+ I am not able to open .php , .php3 files but can open.html file with php scripts
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Go Down Stumble Upon! Digg It! del.icio.us! Add to Technorati! ReddIt!  Send this topic Print
Author Topic: I am not able to open .php , .php3 files but can open.html file with php scripts  (Read 4601 times)
Aji
Key Keeper
Member
**
Posts: 64



« on: March 15, 2004, 11:55:30 AM »

Hi all,

When I run localhost/info.html with the code
Quote
<?
phpinfp();
?>

This is running perfect but when I do the same with localhost/info.php or /info.php3 , it says the file is not found. I have checked all the possible mistakes. My apache config file has these lines

Quote
ScriptAlias /php/ "c:/php/"
AddType application/x-httpd-php .php
AddType application/x-httpd-php .php3
AddType application/x-httpd-php .html
Action application/x-httpd-php "/php/php.exe"

Where am I making a mistake?

Thanks
Aji
Report to moderator   Logged

Hedir.com - Human Edited Directory of 2006 - Submit your site
Nigritude Ultramarine - Nigritude Ultramarine competitions, Nigritude Ultramarine logo
SensoVision
Administrator
Veteran
*****
Posts: 5 857


I'm proud user of Debian GNU/Linux OS


WWW
« Reply #1 on: March 15, 2004, 01:00:37 PM »

you mean that you got 404 because it couldn't find info.php ? if so are you sure that you named it correctly or you don't have some letter in UPPER or lower register? as on *nix based servers register does matter.
Report to moderator   Logged

Denis
Andy
Administrator
Veteran
*****
Posts: 5 752



« Reply #2 on: March 28, 2004, 10:29:26 PM »

Aji,

your code doesn't make any sense to me.

php scripts are surrounded by code like this:

<?php

code

?>
Report to moderator   Logged

SensoVision
Administrator
Veteran
*****
Posts: 5 857


I'm proud user of Debian GNU/Linux OS


WWW
« Reply #3 on: March 29, 2004, 08:01:31 PM »

not necessarily Andy, it could be <? ?>  as well and some other ways are possible, it depends from configuration of the server
Report to moderator   Logged

Denis
islanding
Key Keeper
Sr. Member
****
Posts: 313


I see, But why?


WWW
« Reply #4 on: March 30, 2004, 04:10:44 PM »

Hay, The code he is showing is not PHP and it is not supposed to be. It is from Apache's config file and uses the same format as htaccess file.
Report to moderator   Logged

The Box said: "Install Win95 or better ..." So I installed Linux.
SensoVision
Administrator
Veteran
*****
Posts: 5 857


I'm proud user of Debian GNU/Linux OS


WWW
« Reply #5 on: March 30, 2004, 07:07:52 PM »

yeah, Mark, I know but I guess Andy has commented this code
"<?
phpinfp();
?>"
which is listed above .htaccess
Report to moderator   Logged

Denis
Andy
Administrator
Veteran
*****
Posts: 5 752



« Reply #6 on: March 31, 2004, 09:08:34 PM »

Hi guys,

the standard code file to investigate your server config is:

phpinfo.php

which has to be uploaded to a .php page and run to get the result.

I never came across phpinfp(); so be aware of any security risk before running it.

We have to consider security issues here and not be too open on this subject.

Actually, I can't remember where I originally obtained my phpinfo.php file from, possibly http://php.org ?
Report to moderator   Logged

islanding
Key Keeper
Sr. Member
****
Posts: 313


I see, But why?


WWW
« Reply #7 on: April 01, 2004, 01:11:01 AM »

Andy,
I have a couple of phpinfo.php files from different authors. I also have never seen phpinfo called as a function.  This doesn't mean that we couldn't write a function called phpinfo as part of a script that would show the same information. I can not think of any reason for doing it this way or advantage to it. Why reinvent the wheel when you can buy one.
Report to moderator   Logged

The Box said: "Install Win95 or better ..." So I installed Linux.
Iader
Guest
« Reply #8 on: April 04, 2004, 01:33:15 AM »

I have the same problem.  I am not able to open php or php3 files but i can open html/htm and others. I put the php code into html and it worked.
Report to moderator   Logged
Andy
Administrator
Veteran
*****
Posts: 5 752



« Reply #9 on: May 09, 2004, 08:18:30 PM »

If you think you should be able to run scripts and cannot, I suggest you post a help email to your web host asking for an example "hello world" script that they know runs OK on your hosting. And state which scripting language you are implementing. They shouldn't charge for this since it's like helping you to get your account up and running.
Report to moderator   Logged

Pages: [1] Go Up Stumble Upon! Digg It! del.icio.us! Add to Technorati! ReddIt!  Send this topic Print 
+ Webmaster Key Forums
|-+ Webmaster Corner
| |-+ Site Design and Web Authoring
| | |-+ Coding Talk
| | | |-+ I am not able to open .php , .php3 files but can open.html file with php scripts

Jump to:  
« previous next »


Our Partners
RelmaxTOP Ranking System Web Hosting RelmaxTOP Ranking System
Staff Sites
12Noon[12Noon Gallery] Andy[Urgentclick]
Tamuril[Tamuril's Digital Art Exhibit] Sensovision
Powered by MySQL Powered by PHP We are hosted by Relmax Inc. |Our Privacy Policy | Sitemap
Powered by SMF 1.1.9 | SMF © 2006-2009, Simple Machines LLC
Forum design by Tamuril © 2005.
Valid XHTML 1.0! Valid CSS!