|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
None of my scripts work all of a sudden!
I have just upgraded my Win2K server from IIS5 to Apache 2, and now my scripts don't work correctly. The pages display ok, but when I click submit, the forms just reload rather than sending the email like it should and then displaying the confirmation page.
Any ideas? |
|
#2
|
|||
|
|||
|
RE: None of my scripts work all of a sudden!
Did you also upgrade PHP? Sounds like a classic case of register_globals being off. Check that setting in your php.ini
|
|
#3
|
|||
|
|||
|
RE: None of my scripts work all of a sudden!
No it's on...
register_globals = On |
|
#4
|
|||
|
|||
|
RE: None of my scripts work all of a sudden!
Can you give an example of something that doesn't work? No need to post a big long script..just a simple example that doesn't work...
|
|
#5
|
|||
|
|||
|
RE: None of my scripts work all of a sudden!
The above just reloads the form without processing it. Also, I am using but have just realised that none of the variables set in that file are being display. For example, I have , but in my HTML code that is not being displayed, it's just blank. Before I upgraded to Apache, all this worked, I have not changed any of my scripts. |
|
#6
|
|||
|
|||
|
RE: None of my scripts work all of a sudden!
Can you give an example of what it not working? An actual script? None of the examples your gave will do anything on their own.
|
|
#7
|
|||
|
|||
|
RE: None of my scripts work all of a sudden!
|
|
#8
|
|||
|
|||
|
RE: None of my scripts work all of a sudden!
I couldn't tell you why it used to work, but I can tell you why it doesn't work now. When you declare a variable outside of a function, it might be declared at the top of the function as a global in order to be used in that function...
|
|
#9
|
|||||
|
|||||
|
RE: None of my scripts work all of a sudden!
Mmm ok not a good example, sorry about that!
I have just quickly written the following 2 files. test.htm php Code:
and test.php Rather than test.php echoing out Hello (whatever name is inputted into the text box), I just get Hello Maybe a better example? |
|
#10
|
|||
|
|||
|
RE: None of my scripts work all of a sudden!
That really sounds like a register_globals problem. Check phpinfo() and make sure that the ini specified there is the one that you are looking at...
|
|
#11
|
|||
|
|||
|
RE: None of my scripts work all of a sudden!
Yes, the PHP.INI I am using is c:Winntphp.ini
register_globals=on |
|
#12
|
|||
|
|||
|
RE: None of my scripts work all of a sudden!
in test.php try:
<p>Hello <?php echo $_POST['name'] ?></p> just to see if the variable is even getting set. Are you sure there isn't a php.ini in the same directory as php? It could be overriding the one in the c:winnt directory... |
|
#13
|
|||
|
|||
|
RE: None of my scripts work all of a sudden!
Would you believe...It didn't work.
I have searched for a 2nd php.ini, but there isn't one. When I press F5 to refresh, it doesn't even come up with the box where you have to press the "Retry" button, it just comes up with "Hello" again. Any other ideas? As you can imagine, this is becoming a huge problem, I have about 10 big scripts that I run from this server. |
|
#14
|
|||
|
|||