Php script no longer works!

Permabanned
Joined
18 Oct 2002
Posts
12,841
Location
Lost!
We have an order lookup system, it simply queries a DB which is updated with a CSV file from time to time.

Sadly its stopped working and i know nothing about php or mysql. The scripts appear to be ok, they haven't changed the only thing that has altered is we moved servers a while back and its got a different version of php and mysql to the last ones, passwords, IP's etc were all updated and working.

I think its a DB problem as i can see the data in the tables using phpmyadmin but when i search for a postcode which i know is in there, it returns nothing!

Any ideas?
 
I doubt it is the data, unless it somehow got transposed when it was moved. A lot of badly written older PHP scripts don't function properly on 5+, a lot of ISP's though will let you run PHP4 either by defining it in your scripts or via your account control panel, might be worth finding out, could save you hours of titting around.
 
Right - discovery made.

It seems the CSV file has "quotes" around each field, seperated by commas. For some reason the import script removes the " " round date fields, but not the text fields.

Removing those quotes before importing the data makes it work, however this needs to be automated, i'm sure it used to be!!!
 
Put the following at the top of your script:

PHP:
ini_set('display_errors',1);
error_reporting(E_ALL|E_STRICT);

And post any error messages you see.
 
Back
Top Bottom