Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8492173
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T22:38:34+00:00 2026-06-10T22:38:34+00:00

I have recently taken over a project in PHP/CakePHP . Now I wanted to

  • 0

I have recently taken over a project in PHP/CakePHP . Now I wanted to update the framework from CakePHP 1.3 to CakePHP 2.2. The DB-server is MS SQL Server (Version 10.50). I have also tried to connect to an SQL Sever Version 9.0 SP1. Same problem. The Application connects to the DB-server and can read text data quite nicely.

The Problem occurs if I want to read a blob/binary/image column. It seems to be a decoding problem, but I have no idea where it could occure. In the CakePHP 1.3 Version I see something like

\x2 \x0\x1xÚmŽÁN„0\x10†_¥öN...

and in the CakePHP 2.2 Version I get

0220000178DA6D8EC14E8430 ... 

The stored item is a compressed XHTML File with some description tag attached. It is written by another application.

I have set the Application encoding to UTF-8, have tried to set the encoding=’utf8′ string in the Database configuration (even if it should just work for MySQL). I have updated the Native SQL Client from Microsoft. I am using a XAMPP 1.7.7 installation with a PHP 5.3.8. I have tried also a different installation with XAMPP 1.8 and new SQL-PDO Driver from Microsoft. Nothing helped.

I have no clue where this problem is coming from, even if I suspect the PDO Layer/ Driver for PHP.

The Application has worked fine with CakePHP 1.3.

Thank you for your help/time.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T22:38:36+00:00Added an answer on June 10, 2026 at 10:38 pm

    I figured it already out. The Problem is a known bug in PDO Layer from MS. It can be fixed with the litte function

    function hextostr($x) 
    {
      $s='';
      foreach(explode("\n",trim(chunk_split($x,2))) as $h) $s.=chr(hexdec($h));
      return($s);
    }
    

    from the comment of Marko Kozjak at http://jeremycook.ca/2010/02/21/handling-binary-data-with-pdo/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have recently had a linux server compromised from bots uploading .php scripts and
We have taken over a .NET project recently and upon looking at the db
I've recently taken over a project, and the original developer has gone. I'm now
I have recently taken on a project in which I need to integrate with
I have recently taken over an application that uses the Peter Blum Date and
I have a good sized hobby project, around 66K LOC, over at http://www.wheelmud.net Recently,
Recently, i have been handed over with an ash report from DBA. To me
I have recently taken over a linux box running subversion. The folder where the
I have recently taken over a new website but when I get the source
I've recently started a new job where I have taken over developing an existing

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.