Hi,
I'm building a site at the moment. I'm building it locally, testing, and ftp'ing working files to the server. All has been well and good 'til recently. Now I find that the remote site is working fine, but although I've DOWNloaded all the remote files to the local server, there's a difference! Global variables for db values etc. have been replaced so there's no problem there. The symptoms are:
There's a form page which posts to an update/edit page. The update page edits the specific record based on an id variable being posted over. Simple as that. Works fine on the remote live server, but locally the fields are not being updated. I don't get an error either! I know the fields are not being updated 'though because when I check the db manually the records have not been changed and also the page which shows the user what they've updated, has blanks where the updated field info should be.
It's a long shot, but I'm hoping someone else knows exactly what this is because it's happend them.
FYI,
The remote server uses:
Apache 1.3.2.7
PHP4.3.0
MySQL 3.23.54
UNIX box
My local server uses
Apache V.2
PHP4.3.3
MySQL 3.23.49
W2K box
Incidentally (in case it has a bearing), The entry form has a textarea in html and locally I cannot do carriage returns when entering information but I can remotely. Sorry, my questions are always epic. If this is against rules please let me know! Code snippets available on request - just thought my question was long enough for the moment,
Mike
Differences between Local build versus Remote build
Moderator: General Moderators
-
Cruzado_Mainfrm
- Forum Contributor
- Posts: 346
- Joined: Sun Jun 15, 2003 11:22 pm
- Location: Miami, FL
check this out buddy
viewtopic.php?t=511
viewtopic.php?t=511
or spend some time to set up a much more powerful debugger
http://www.php.net/manual/en/debugger.php
All hail to the debuggers
http://www.php.net/manual/en/debugger.php
All hail to the debuggers
This is one of the big questions for developers. If you use phpinfo() at home and on your host, you likely will see difference (not talking about the obvious $_SERVER ones and such).
An example from the manual...
If you magic_quotes_gpc setting is different at home vs. your host, you would get different results if you are not using the if-else-clause...
This is just one example as there are alot more settings that just might fubar your script. Not even telling that this is the case for you, but it might be worth looking into.
An example from the manual...
Code: Select all
<?php
echo get_magic_quotes_gpc(); // 1
echo $_POST['lastname']; // O''reilly
echo addslashes($_POST['lastname']); // O\\''reilly
if (!get_magic_quotes_gpc()) {
$lastname = addslashes($_POST['lastname']);
} else {
$lastname = $_POST['lastname'];
}
echo $lastname; // O''reilly
$sql = "INSERT INTO lastnames (lastname) VALUES ('$lastname')";
?>This is just one example as there are alot more settings that just might fubar your script. Not even telling that this is the case for you, but it might be worth looking into.
Thank's to all who replied. I feel like such a donkey! Cruzado_Mainfrm, Mia Culpa, you were right all along
. I don't know how I got caught with it 'cause I already know about the issues with posting. I suppose I just assumed that I was using the $_POST form of passing the variables, and y'know how you can look at a page and see what SHOULD be there rather than what IS? Anyhow that's working now, thanks again,
(if ever somebody's signature was a noose to hang themselves with!!)
Mike
(if ever somebody's signature was a noose to hang themselves with!!)
Mike
-
Cruzado_Mainfrm
- Forum Contributor
- Posts: 346
- Joined: Sun Jun 15, 2003 11:22 pm
- Location: Miami, FL