Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > Beginning PHP
|
Beginning PHP Beginning-level PHP discussions. More advanced coders should post to the Pro PHP forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning PHP section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 8th, 2005, 02:20 PM
Authorized User
 
Join Date: Apr 2005
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default problem in php file

well i am in wwwroot folder i have an html file which code is follow as
***text.html****
<html>
<head><title></title></head>
<body>
<form method=post action="text.php">
Who is your favorite author?
<input name="author" type="text">
<br>
<br>
<input type="submit" value="submit">
</form>
</body>
</html>

in this file u have to enter auther name i will displayed in text.php which have the following code
<html>
<head><title</title></head>
<body>
Your favorite author is:
<?php
echo ($author);
?>
</body>
</html>

the problem is that when i open text.html and click the button the dialong box pop-up and it says that do u want to save file text.php?
why it is so?

help plz

Abdul Wasie
__________________
Abdul Wasie
 
Old May 9th, 2005, 09:37 PM
Friend of Wrox
 
Join Date: Aug 2004
Posts: 117
Thanks: 0
Thanked 2 Times in 2 Posts
Default

Hi
The problem is you have missconfiguration on your php.
try to output phpinfo by creating test.php

test.php
////////////
<?php
  phpinfo();
?>

let me know if it works or not?

 
Old May 10th, 2005, 03:21 AM
Authorized User
 
Join Date: Apr 2005
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default

well here is the output

System Windows NT FAST 5.1 build 2600
Build Date Mar 31 2005 02:44:34
Configure Command cscript /nologo configure.js "--enable-snapshot-build" "--with-gd=shared"
Server API CGI/FastCGI
Virtual Directory Support enabled
Configuration File (php.ini) Path C:\WINDOWS\php.ini
PHP API 20031224
PHP Extension 20041030
Zend Extension 220040412
Debug Build no
Thread Safety enabled
IPv6 Support enabled
Registered PHP Streams php, file, http, ftp, compress.zlib
Registered Stream Socket Transports tcp, udp

now plz tell me wht shld i do now n thanks for helping me


Abdul Wasie
 
Old May 10th, 2005, 06:11 AM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 357
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to anshul
Default

U'ven't mapped .php extension to ISAPI exexutable c:/php/sapi/php4isapi.dll
Do so, then restart IIS.

 
Old May 10th, 2005, 07:19 AM
Authorized User
 
Join Date: Apr 2005
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default

well wht i did when i was Configuring php for the first time i did goes to properties of defualt website in the IIS then on the ISAPI filter than add the dialog box pop up i wrote php in the filter name and in the executable field i browse for the file named php5isapi.dll okay..it is addedd sucessfully n giving the same messages...

help plz

Abdul Wasie
 
Old May 10th, 2005, 11:37 AM
Friend of Wrox
 
Join Date: Aug 2004
Posts: 117
Thanks: 0
Thanked 2 Times in 2 Posts
Default

Did you turn off the cgi.force_redirect on your php.ini?

cgi.force_redirect = 0

 
Old May 10th, 2005, 12:42 PM
Authorized User
 
Join Date: Apr 2005
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default

well in php.ini cgi.force_redirect is in comment so i didnt change well the php scripts are running fine but when i want to transfer what i type from one file to another its not going to work can u tell me the source where should i refer and do configure php again or wht do u think wht shld i do? thanks for ur corporation n helping


Abdul Wasie
 
Old May 11th, 2005, 01:19 AM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 357
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to anshul
Default

>> well the php scripts are running fine..
Then's what's the problem.
Please, also see, if you are using Windows 2003 and you'ven't allowed Web Service Extensions: All Unknown ISAPI, CGI plus added a .php extension. Once you get it working, always keep backup of php.ini

 
Old June 6th, 2005, 06:06 AM
Registered User
 
Join Date: Jun 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

hai abdul_wasie..,
 although there is a small mistake in ur program..,
 you hav to add the following line to ur text.php file.
add this($author=$_REQUEST['author'];) befor(echo ($author);)
i think then it may echo the author name.

bye...






Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with PHP file reading XML file for output rydog65 Beginning PHP 0 March 26th, 2008 05:13 PM
php file mgnishan Beginning PHP 3 January 29th, 2007 07:02 AM
php file name zabsmarty General .NET 0 March 6th, 2006 02:06 AM
PHP File System Wylzn BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 0 July 7th, 2004 07:05 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.