hi
in my project inside Cpanel server PHP MING Extension is ok BUT
in Plesk have Problem by GIF and PNG file and this file must be change to dbl to work
version of Extension MING in plesk is 0.4.2

i need a script to convert online png/gif file to dbl in (Linux server)

thanks :)

Dani AI

Generated

Short answer: Ming’s PHP bindings historically accept JPEG and Ming’s internal “DBL” bitmap format only — PNG/GIF must be converted with the small utilities that ship with Ming (png2dbl / gif2dbl). That’s why the same script can work on one server and break on another: the Plesk/packaged PHP-Ming you have was likely built without PNG/GIF handling (or the libming-util converters aren’t installed). (monitor.csail.mit.edu)

How to fix (practical steps you can do on a Linux host)

  • Install the Ming utilities package (or build Ming from source and enable the util programs). On distros that package it those utilities are named png2dbl / gif2dbl.
  • Convert images once (at upload or as a batch) and keep the .dbl files for SWFBitmap. Example conversions:
png2dbl input.png    # creates input.dbl
gif2dbl input.gif    # creates input.dbl

The utilities write a .dbl file that Ming reads natively; gif2mask is also available if you need MSK alpha masks. (manpages.org)

Troubleshooting pointers tied to this thread

  • As suggested, compare the two servers — look for the presence of the png2dbl/gif2dbl binaries or for differences in how Ming was packaged. If Ming was compiled without libpng, you’ll see link/build omissions (undefined png symbols) or no PNG handling in the Ming section; in that case install the util package or rebuild Ming with libpng/zlib available. A common symptom during builds is “undefined reference to png_create_read_struct”. (stackoverflow.com)

Workflow tip (to avoid runtime exec overhead)

  • Convert on upload or as a background job and serve the .dbl to Ming. Keep originals so you can re-generate if you later install a Ming build with native PNG support. If you control the server, installing the libming-util package (or a distro libming package that includes utilities) is the simplest, fastest fix. (launchpad.net)

(References above point to the Ming/SWFBitmap docs and the distro util package pages for png2dbl/gif2dbl.)

Recommended Answers

All 3 Replies

You will need some script in your server. Check if imagemagik is available for example. Don't know of any script (alone) that can do that for you. You will need a program and in the worst case the permissions for PHP to execute it (using exec() / system() ) if it doesn't have a module for PHP.

You will need some script in your server. Check if imagemagik is available for example. Don't know of any script (alone) that can do that for you. You will need a program and in the worst case the permissions for PHP to execute it (using exec() / system() ) if it doesn't have a module for PHP.

thanks. ok , now working by POPEN and exec()
but this no problem in CPanel and only on Plesk Not Support PNG , GIF (in php Ming Extension) !!
why??

Weird, I've never used Ming before but could it be (guessing) that it has something to do with patents and the Ming module?

Check your phpinfo(); output in both servers and see if there is anything different in the Ming part. Maybe it is the version or something related to the version. The problem must be there or even with the version of PHP with that module. Check for known issues also. If versions are too different / obsolete maybe a little upgrade will help solve this issue.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.