Chesso Posted September 21, 2006 Share Posted September 21, 2006 I run WAMP5 (PHP 5 something and mySQL 5 something and Apache 2 something) locally on my Windows XP machine for building and testing my site.It works flawlessly but I am not seeing the same results on my web host. They use as far as I know: PHP version 4.4.2, Apache version 1.3.36 (Unix), MySQL version 4.0.27-standard.The problems I am having at this moment is news posting (when sometimes adding or modifying it fails and the query is not forfilled, but it's random when it happens).I also get errors for trying to use mysql_close(); even though it may be possible it wasn't used or already closed (in my footer) but I use mysql_close() or die();, I don't know any other way to stop it from trying if a connection isn't open, so it outputs the darn error anyway.Mostly what I am looking for is any advice on any differences between V5 of PHP/mySQL and V2 of apache compared to the V4 PHP/mySQL and V1 apache that might cause such problems. Quote Link to comment Share on other sites More sharing options...
onlyican Posted September 21, 2006 Share Posted September 21, 2006 First, WAMP stands forWindowsApacheMySQLPHP(Instead of the Standard LAMP on the serverLinuxApacheMySQLPHP)Second:I have been involved in a discussion somewhere, saying that most people dont use mysql_close() as the connection closes when the page finishes loading anywayThere are some differences in functions between php V5 and V4.The main differences would be down to your php.ini settingsYou are saying the form is coming up blankcheck thatif you are using the POST method (<form method='post')You call the variabled as follows$_POST["fieldname"];where field name is the name you have the field<input type='text' name='THIS IS THE FIELD NAME' />if your using the GET method (<form method='get'>You do the same as above, but you use GET not POST$_GET["fieldname"];If your still having a problem, post some code, for us to look into Quote Link to comment Share on other sites More sharing options...
Chesso Posted September 21, 2006 Author Share Posted September 21, 2006 It's not the form that seems to be the problem, it is the sql.As I said works locally, but on the web host it randomly does not put the sql in, or when I do a news post edit, it makes it completely blank, so it in effect deletes the content but does not update it :S.I use $_REQUEST which handles both $_GET and $_POST. Iv'e heard using this isn't so great security wise, but functionality wise it hasn't caused a problem before.All I really did from the original that worked both for local and web host is use a new design, so not much if any of the php and sql was really touched at all besides some mysql_close(); statements and such being removed. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.