Jump to content


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


Code not working on different version/setup

Recommended Posts


I have an application that I have written and it works fine on PHP 4.3.10 and MySQL 4.0.25 standard running on Linux, however, I have recently moved the application to a different server, with the latest stable builds of PHP MySQL, and PHPMyAdmin, using the database export in PHPMyAdmin and literally copying and pasting the php files, and the application is not working correctly. The following things are occuring:

- Pages that feed directly from the DB work, but pages that pass values to a processing page do not display the information that I want queried, however, the values are being passed to the processing page.
- Queries to the database for INSERT and coming back as failed on SOME pages.
- All pages transfer information to a processing page via a POST

I have a standard setup for PHP and MySQL. Is there an extension or change I have to make in the PHP.ini file? I do not have access to the previous servers php.ini file.

Thank you.

Share this post

Link to post
Share on other sites
what's the version of php and mysql?
can you post the error messages, if any, that you get from the queries? can you also post the queries?

Share this post

Link to post
Share on other sites
I am currently running PHP 5.1.2. PHP is not throwing any errors, rather it is defaulting my error checking in the PHP telling me the query was not successful. Here is an example of a page that will not submit (this is the processing page). It is the 'else' statement that is being displayed with nothing entered into the database. Note that the echo of all the values are displaying on the page.

Sets passed values to local variables to be used.

Insert new category information into the category table.
Checks for errors during the insert.

echo"$POVendorName $PONum $ POAmount $POVendorPhone POVendorDesc POExpDate";

$query = "INSERT INTO PO (POVendorName, PONum, POAmount, POVendorPhone, POVendorDesc, POExpDate) VALUES ('$POVendorName', '$PONum', '$POAmount', '$POVendorPhone', '$POVendorDesc', '$POExpDate')";
$result = mysql_query($query);
if ($result)
echo "<span class='headtitle'>Add Blanket PO Results <br /><br /></span>";
echo mysql_affected_rows(). ' category sucessfully inserted into the database.';
echo "Add category did not work properly, please try again later.";


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.