Jump to content


Code not working on different version/setup

  • Please log in to reply
2 replies to this topic

#1 calcio22

  • New Members
  • Pip
  • Newbie
  • 6 posts
  • LocationRTP, NC

Posted 23 May 2006 - 06:18 PM


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.

#2 ryanlwh

  • Staff Alumni
  • Advanced Member
  • 511 posts

Posted 23 May 2006 - 07:27 PM

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?
Please use EDIT * 100...
Please use
or [php] * 1000...


#3 calcio22

  • New Members
  • Pip
  • Newbie
  • 6 posts
  • LocationRTP, NC

Posted 23 May 2006 - 08:00 PM

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.";


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users