Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 3065
  • Last Modified:

odbc.defaultlrl 4096 - How to increase the limit on characters

I'm working with MS SQL and PHP. When I make a call to a database for a <Long Text> field the page cuts the text off.

I know it has something to do with "odbc.defaultrl = 4096" in the php.ini file how do I get this to not cut off my text?

Thanks
0
netele
Asked:
netele
  • 3
  • 2
  • 2
2 Solutions
 
minichickenCommented:
if you would like to set a larger value for odbc.defaultlrl, then try something like this at the top of your page.

ini_set ("odbc.defaultlrl", "16384");

Btw, I think you mistyped odbc.defaultrl, it should be odbc.defaultlrl.

regards
0
 
hernst42Commented:
Set that value to 0. So you should get as many characters as the long text contains.
You can do it by changing the php.ini (and reloading the webserver after that) or as minichicken suggested.

; Handling of LONG fields.  Returns number of bytes to variables.  0 means
; passthru.
odbc.defaultlrl = 0

0
 
neteleAuthor Commented:
Minichicken,

You wrote "try something like this at the top of your page." - do you mean the php page?

Thanks
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
hernst42Commented:
Yes, or do it just before you call the odb_exec
0
 
minichickenCommented:
Yep.... Thanks hernst42....
0
 
neteleAuthor Commented:
Just did that and it resolves nothing...
0
 
neteleAuthor Commented:
If I set it to a lower value I see that it works but setting it to a higher (even much higher 32000) doesn't make any difference.

Thanks
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 3
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now