#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2013
    Posts
    3
    Rep Power
    0

    Exclamation PHP Oracle8 Linux long varchar


    I have a web-based tool programmed in PHP using Oracle8. One of the tables for this app includes a varchar column with a maximum of 2000 characters. This has worked for years on a Solaris server. Recently we moved to a Linux server and this no longer works. The user provides data for this long varchar column in a text box which is then added to the table with an INSERT command. On the Linux server, when the the text size is greater than 245 characters one of a few things happen:

    - the text of the next column in the database is appended to the large text field.
    - IE throws a server not found error.
    - the query silently fails and stops the PHP script at that point.

    I have no error message. Anyone have any clue?
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Jul 2003
    Posts
    3,500
    Rep Power
    594
    There is no limit on string length per se regardless of the OS. However, there is a limit on total memory for PHP. While 2000 characters does not seem like a lot, it could push you over the limit depending on how big the rest of your script is, memory wise. Look at php.ini for memory_limit. If it is not there then I think the default is 128MB. You could try increasing it to see if that solves your problem.
    There are 10 kinds of people in the world. Those that understand binary and those that don't.
  4. #3
  5. Sarcky
    Devshed Supreme Being (6500+ posts)

    Join Date
    Oct 2006
    Location
    Pennsylvania, USA
    Posts
    10,908
    Rep Power
    6351
    Did you move the database server as well? This isn't making much sense.

    Also, you not getting error messages is most likely the fault of your code, put error-handling in there.
    HEY! YOU! Read the New User Guide and Forum Rules

    "They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." -Benjamin Franklin

    "The greatest tragedy of this changing society is that people who never knew what it was like before will simply assume that this is the way things are supposed to be." -2600 Magazine, Fall 2002

    Think we're being rude? Maybe you asked a bad question or you're a Help Vampire. Trying to argue intelligently? Please read this.
  6. #4
  7. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2013
    Posts
    3
    Rep Power
    0

    Question response to commentors


    The database server was not moved. And in most instances, the error I see is a server not found message. The PHP gets killed earlier without any message. Can't figure out how to get ahead of this.

    The maximum data is fairly massive - in the 2Gb range - due to other query requirements. These large queries are still working.
  8. #5
  9. Sarcky
    Devshed Supreme Being (6500+ posts)

    Join Date
    Oct 2006
    Location
    Pennsylvania, USA
    Posts
    10,908
    Rep Power
    6351
    So you get "server not found"? that's an error message.

    Is there a NUMBER with this error message? For instance, is it actually "503 Service Unavailable"? In that case, check the PHP/Apache logs.
    HEY! YOU! Read the New User Guide and Forum Rules

    "They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." -Benjamin Franklin

    "The greatest tragedy of this changing society is that people who never knew what it was like before will simply assume that this is the way things are supposed to be." -2600 Magazine, Fall 2002

    Think we're being rude? Maybe you asked a bad question or you're a Help Vampire. Trying to argue intelligently? Please read this.
  10. #6
  11. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2013
    Posts
    3
    Rep Power
    0

    Problem Found


    The problem was with the Linux Oracle Client. We upgraded to 11g and things are now working. The reason I could not get ahead of the problem was that the script had a segmentation fault in the PHP Oracle library or Oracle client and silently died. I found the problem by recreating the problem using a perl script which showed the core dump values following the segmentation fault.

    Comments on this post

    • ManiacDan agrees : For coming back with a solution

IMN logo majestic logo threadwatch logo seochat tools logo