December 7th, 2000, 07:01 PM
Solution to the "nothing works" problem
for those of you that had the problem where nothing was working with the .php4 extension using PWS.
goto -> HKEY_LOCAL_MACHINE -> SYSTEM -> CURRENTCONTROLSET -> SERVICES -> W3SVC -> PARAMETERS -> SCRIPT MAP
there you should see the '.php' string.
right-click add a new string called '.php4'.
Double click on it and add in the value data 'C:\PHP\php.exe' or wherever you installed PHP to.
also add the key '.php4' with the value data being 'phpfile' into the HKEY_CLASSES_ROOT.
It says to do this in the online manual...my problem was forgetting to install .php4 into the LOCAL MACHINE thingy...
hope this helps.
December 9th, 2000, 07:21 PM
Undefined variable: submit
Everytime "if (!$submit)" is used i get this msg: "Warning: Undefined variable: submit in C:/XITAMI/webpages/today.php on line 3"
What haven't I understood?
December 14th, 2000, 04:13 PM
After checking and double checking, whenever I upload the cookie page the info shows up, with the extra line at the bottom on "Here is your fortune for " - but whenever I select a day and hit the submit key, I get referred back to the same page and the fortune never shows up.
December 15th, 2000, 12:10 PM
Re: hmm, nothing is working :(
I had the same problem. In my case, I forgot that php was case sensitive. While in the form I was using "Name" with a capital N, the receiving script was looking for $name with a lower case n.
December 18th, 2000, 07:44 PM
Re: This is great stuff!
I haven't read any books, all i knew about php was that it's a server-side scripting language. these tutorials are exactly what people need! very easy to understand and get right to the point. now all i need is to find a good web host that supports php and isn't down all the time like the one i'm using (www.f2s.com)
December 22nd, 2000, 03:38 AM
Great Job guys..
A few things that could be done better is highlighting certain things, such as the file is assuming it is named "cookie.php4" etc.. but otherwise EXCELLENT!!!!
December 28th, 2000, 03:20 PM
Re: Undefined variable: submit
Yeah me too, i'm running IIS 5 and w2k.
It's weird, shoundl't $submit default to false when not initialised ?
December 28th, 2000, 03:23 PM
I got around this problem : just put a @ before the !submit, like this :
// if $submit doesn't exist, it implies that the form
// has not yet been submitted
// so display the first page
The error message doesn't display that way. Sure, it's a patch, but hey.... :)
January 14th, 2001, 10:23 PM
Re: Won't process
i faced a similar problem however, I had juss forgot to put name="Submit" and i faced the same thing as urself...u may wanna look out for that...
January 18th, 2001, 12:09 AM
Fix for login.php4 and form.html
open up your httpd.conf file and search for AddType ... after
AddType application/x-httpd-php .php
AddType application/x-httpd-php .phtml
add this line:
AddType application/x-httpd-php .php4
now it'll work!!!
email me if you cant get it to work.
February 5th, 2001, 05:12 PM
POST does not work
I changed the the METHOD="get" to METHOD="post" and I get this:
There is a problem with the page you are trying to reach and it cannot be displayed.
HTTP 500 - Internal server error
What would be casuing this?
Using PWS & WinNT
February 26th, 2001, 04:43 PM
This works as intended and is very clean :)
March 11th, 2001, 12:50 AM
Re: fix-undefined variable
What could be making this problem. I am getting the same thing... Maybe there is something in php.ini that could change this. why did the author wrote it like this if it was giving errors???? I've seen this thing in some other examples and they all (!$variable) and it gives an error.... ???????????????????? but thanks for this tip..
March 21st, 2001, 01:26 PM
.php4 and .php - the difference
The examples about include and require functions have *.php4 as extensions and work fine, why then does login.php4 not work.
I works when you change it to login.php.
Confusing or what????
Please clarify, Thanks
April 3rd, 2001, 10:50 PM
Beautiful fix! Worked right away. Thanks! And I was about to go, "geez another great looking set of code that doesn't work!"