Jump to content


This topic is now archived and is closed to further replies.


PHP/mySQL Related help needed.

Recommended Posts

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.

Share this post

Link to post
Share on other sites
First, WAMP stands for
(Instead of the Standard LAMP on the server

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 anyway

There are some differences in functions between php V5 and V4.
The main differences would be down to your php.ini settings

You are saying the form is coming up blank
check that
if you are using the POST method (<form method='post')
You call the variabled as follows
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

If your still having a problem, post some code, for us to look into

Share this post

Link to post
Share on other sites
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.

Share this post

Link to post
Share on other sites


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.