Zen Cart Logo
Forums / Installing on a Linux/Unix Server / Input Anomoly in fresh install

Input Anomoly in fresh install

Locked

Views: 1,387

Results 1 to 8 of 8
This thread is locked. New replies are disabled.
7 Nov 2007, 7:50 AM
#1
mroland avatar

mroland

New Zenner

Join Date:
Nov 2007
Posts:
3
Plugin Contributions:
0

Input Anomoly in fresh install

After an initial install on an Apache server all went well until I began to actually configure the store. A number of input boxes refuse to accept input or are limited to 1 or two characters (i.e. the Telephone field that allows only 3 characters). If this has been discussed before I apologize but I did look around for anything related without any luck.

Been running OSC for a couple of years but Zen looks to have some features that make it a better fit for us.

7 Nov 2007, 8:25 AM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Input Anomoly in fresh install

What version of MySQL is your server running?
What version of PHP?

Usually when all fields are displayed with 1-character limits it means that the MySQL client installed in PHP doesn't match the MySQL engine running the database and thus the table metadata cannot be accurately read, and field lengths default to 1 instead of the real values.

Your hosting company will have to fix that problem.

9 Nov 2007, 4:04 AM
#3
mroland avatar

mroland

New Zenner

Join Date:
Nov 2007
Posts:
3
Plugin Contributions:
0

Re: Input Anomoly in fresh install

After some looking around at what was happening here's another fact. If I go to edit a customer, one of the places I have a problem, the following html is generated.

Can't enter a phone number because;

name="customers_telephone" value="12345" size = "6" maxlength = "5"

Same with the city

name="entry_city" value="Here" size = "5" maxlength = "4"

So it seems not to be a mismatch of MySql and PHP....

Looked at customers.php for a clue but the code is generated elsewhere. Anybody got a clue that I could buy.

9 Nov 2007, 4:20 AM
#4
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Input Anomoly in fresh install

This occures when there is an error on the server and MySQL cannot report back properly the width of the database fields ...

I forget the exact setting that is wrong on the server but there have been other posts on this in the past ...

9 Nov 2007, 9:09 AM
#5
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Input Anomoly in fresh install

I'll state it again so it's clear:

The size and maxlength values are determined by the length of the corresponding data fields in the database.

If the database doesn't report back the right field lengths, then your input fields will show up odd.

Hence the instructions telling you that the problem is with the communication back from your database engine. Usually we've found that these symptoms are a result of mismatched Connector/Client vs Engine.

10 Nov 2007, 8:16 AM
#6
mroland avatar

mroland

New Zenner

Join Date:
Nov 2007
Posts:
3
Plugin Contributions:
0

Re: Input Anomoly in fresh install

And to make myself clear:

I am running MySQL 4.0.20 Clent and Server, PHP Version: 4.3.10 (Zend: 1.3.0)

Talked to the hosting providers NOC and they seem to think that the versions are correct. Any other thoughts?

10 Nov 2007, 8:57 AM
#7
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Input Anomoly in fresh install

It's the mysql_field_len() function in your server's PHP that is giving bad results back to the program.

"Why" it's giving bad data ... is uncertain. As I said, we've seen it before -- in about 1 in 300,000 to 500,000 downloads of Zen Cart where these symptoms are reported. And in those cases the problem has been something wrong with the handshaking between the database engine and how it hands data back to PHP.

There are four steps involved:

  1. Zen Cart asks PHP to run the mysql_field_len() function with the appropriate parameters (ie: the established connection and the name of the field to return data about).
  2. PHP invokes the PHP Connector for MySQL (aka the MySQL Client)
  3. The MySQL database responds to the request (or doesn't)
  4. PHP sends back the received response to Zen Cart
    ...
    and then of course Zen Cart reacts according to the data received. Whatever it receives is what it bases its decisions on. Bad responses will cause unexpected results.

Who's the hosting company?

10 Nov 2007, 12:22 PM
#8
website_rob avatar

website_rob

Inactive

Join Date:
Oct 2006
Location:
Alberta, Canada
Posts:
4,572
Plugin Contributions:
0

Re: Input Anomoly in fresh install

I am running MySQL 4.0.20 Clent and Server, PHP Version: 4.3.10

Those versions are very old, especially the mysQL version. I would hazard an educated guess that if mySQL is upgraded to 4.1.x your problems would disappear.