Jump to content

Code not working on different version/setup


calcio22

Recommended Posts

Hello,

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.
Link to comment
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.
**********************************************/
$POVendorName=$HTTP_POST_VARS['POVendorName'];
$PONum=$HTTP_POST_VARS['PONum'];
$POAmount=$HTTP_POST_VARS['POAmount'];
$POVendorPhone=$HTTP_POST_VARS['POVendorPhone'];
$POVendorDesc=$HTTP_POST_VARS['POVendorDesc'];
$POExpDate=$HTTP_POST_VARS['POExpDate'];

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

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

mysql_select_db('PO');
$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.';
}
else
{
echo "Add category did not work properly, please try again later.";
}

require('footer.inc');
?>]
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.