php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #13867 ming module known to not work with PHP
Submitted: 2001-10-30 01:50 UTC Modified: 2001-10-30 03:48 UTC
From: jgwr at home dot com Assigned:
Status: Not a bug Package: Ming related
PHP Version: 4.0CVS-2001-10-30 OS: Debian Woody
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: jgwr at home dot com
New email:
PHP Version: OS:

 

 [2001-10-30 01:50 UTC] jgwr at home dot com
This issue is also listed in the Debian bug tracking sytem- please look under the php4-ming package.

When running a simple script (below- taken from opaque.net) I see the following:

Warning: (null): Unable to initialize module Module compiled with debug=8, thread-safety=79 module API=1146191744 PHP compiled with debug=0, thread-safety=0 module API=20010901 These options need to match in /home/julz/public_html/test.php on line 2

Fatal error: Call to undefined function: ming_setscale() in /home/julz<?
  dl('php_ming.so');
  Ming_setScale(20.0);

  $s = new SWFShape();
  $f1 = $s->addFill(0xff, 0, 0);
  $f2 = $s->addFill(0xff, 0x7f, 0);
  $f3 = $s->addFill(0xff, 0xff, 0);
  $f4 = $s->addFill(0, 0xff, 0);
  $f5 = $s->addFill(0, 0, 0xff);

  $f = new SWFFont('Techno.fdb');

  $s->setRightFill($f1);
  $s->setLine(2, 0x7f, 0, 0);
  $s->drawGlyph($f, '!');
  $s->movePen($f->getWidth('!'), 0);

  $s->setRightFill($f2);
  $s->setLine(2, 0x7f, 0x3f, 0);
  $s->drawGlyph($f, '#');
  $s->movePen($f->getWidth('#'), 0);

  $s->setRightFill($f3);
  $s->setLine(2, 0x7f, 0x7f, 0);
  $s->drawGlyph($f, '%');
  $s->movePen($f->getWidth('%'), 0);

  $s->setRightFill($f4);
  $s->setLine(2, 0, 0x7f, 0);
  $s->drawGlyph($f, '*');
  $s->movePen($f->getWidth('*'), 0);

  $s->setRightFill($f5);
  $s->setLine(2, 0, 0, 0x7f);
  $s->drawGlyph($f, '@');

  $m = new SWFMovie();
  $m->setDimension(320, 240);
  $i = $m->add($s);
  $i->scaleTo(2.0);
  $i->moveTo(160-$f->getWidth("!#%*@"), 120+$f->getAscent());

  header('Content-type: application/x-shockwave-flash');
  $m->output();
?>/public_html/test.php on line 3

Debian (upstream?) versions:
php4           4.0.99-3
php4-ming      0.2a.cvs200109
Script used:
<?
  dl('php_ming.so');
  Ming_setScale(20.0);

  $s = new SWFShape();
  $f1 = $s->addFill(0xff, 0, 0);
  $f2 = $s->addFill(0xff, 0x7f, 0);
  $f3 = $s->addFill(0xff, 0xff, 0);
  $f4 = $s->addFill(0, 0xff, 0);
  $f5 = $s->addFill(0, 0, 0xff);

  $f = new SWFFont('Techno.fdb');

  $s->setRightFill($f1);
  $s->setLine(2, 0x7f, 0, 0);
  $s->drawGlyph($f, '!');
  $s->movePen($f->getWidth('!'), 0);

  $s->setRightFill($f2);
  $s->setLine(2, 0x7f, 0x3f, 0);
  $s->drawGlyph($f, '#');
  $s->movePen($f->getWidth('#'), 0);

  $s->setRightFill($f3);
  $s->setLine(2, 0x7f, 0x7f, 0);
  $s->drawGlyph($f, '%');
  $s->movePen($f->getWidth('%'), 0);

  $s->setRightFill($f4);
  $s->setLine(2, 0, 0x7f, 0);
  $s->drawGlyph($f, '*');
  $s->movePen($f->getWidth('*'), 0);

  $s->setRightFill($f5);
  $s->setLine(2, 0, 0, 0x7f);
  $s->drawGlyph($f, '@');

  $m = new SWFMovie();
  $m->setDimension(320, 240);
  $i = $m->add($s);
  $i->scaleTo(2.0);
  $i->moveTo(160-$f->getWidth("!#%*@"), 120+$f->getAscent());

  header('Content-type: application/x-shockwave-flash');
  $m->output();
?>

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-10-30 02:43 UTC] sniper@php.net
This is definately NOT a bug. The module is compiled
with older PHP version. And latest CVS is definately NOT
backwards compatible with old modules.

--Jani

 [2001-10-30 03:48 UTC] jgwr at home dot com
Cheers- I didn't realise the API had changed enough to cause things to break :-(

I'll use the perl interface to ming (which is working in Debian unstable, as is the python2 module- but it's more work to convert the php examples) and transition my stuff to php-only when things get updated/settle down (<-- comments for anyone else new to this like me :-) )

Thanks for such a quick response.
 [2002-11-18 22:56 UTC] info at experttek dot com
If you come across this problem...

xxx: Unable to initialize module
Module compiled with debug=0, thread-safety=1 module API=xxxxxxxx
PHP compiled with debug=0, thread-safety=1 module API=xxxxxxxx
These options need to match

Then go here to find the fix for it...

http://www.experttek.com/mod.php?mod=userpage&page_id=16
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 21:01:36 2024 UTC