I'm using CENTOS 5.2 , PHP 5.3 . MySQL Server version: 5.1.38

I try to use mysqlI

bind_result method

The field I'm using have varchar(5000)

The save data in this field is not a problem . I can save as log as i need

but if I fetch data it comes truncated to 256 characters

O can get all data from command line , and do not have problem with PHP 5.1.6

I think that this is a bug in 5.3

Any ideas

    My guess is that the PHP MySQL drivers being used are not MySQL 5.1-compatible, as MySQL 5.0 and older only support a max size of 255 for VARCHAR fields. If that's the case and you cannot update the PHP drivers, you could consider changing the column type to TEXT.

      I would agree with you , but the same code , with the same databse ran fine with PHP 5.1.6 the problem started after upgating to 5.3 , what I like beter by the way.

      How I can check direver version ?

      I ran phpinfo and it shows me Client API version 5.1.38 which suppose to be compatible with long varchat fields.

      PS. I chage code to use mysql functions isted of mysqli and it works.

        Write a Reply...