Re: Re: just another beginner

From: Date: Mon, 10 Nov 2008 14:32:06 +0000
Subject: Re: Re: just another beginner
References: 1 2  Groups: php.pecl.dev 
Request: Send a blank email to pecl-dev+get-5870@lists.php.net to get a copy of this message
Hadi Aminzadeh wrote: > Hi Dear, > I want to write a new extension for jalali date ( a date format that use in > some country) > But I have some problem. > I use CodeGen_PECL. which version of CodeGen_PECL and (more important) CodeGen are you using? > 1 - when I add this lines to my xml > <maintainer> > <user>ha60</user> > <name>Aminzadeh</name> > <email>ha_60@yahoo.com</email> > <role>lead</role> > </maintainer> > I receive this error : > Fatal error: Call to a member function setUser() on a non-object in > /usr/share/php/CodeGen/ExtensionParser.php on line 259 > But when I remove it its work fine. where is my problem? this one i remember having fixed at some point, and i'm pretty sure the fix is in the current release packages (need to double check this though ...) > 2 - when I compile my extension its add to phpinfo() but when I use this > function (hello_word) in my php file a save dialog will appear > my code is: this sounds more like a configuration problem that makes the browser receive a Content-Type: header it doesn't have a display handler for, very unlikely for the generated extension code to be blamed here > PHP_FUNCTION(hello_word) > { > if (ZEND_NUM_ARGS()>0) { > WRONG_PARAM_COUNT; > } > > print("hello Word!"); Are you really calling "print" there? Or is this just a typo and is actually "printf" in your source? Anyway, to create output from within native PHP functions you need to use php_printf(), not just regular printf() as this would completely bypass PHPs output buffering and conversion filter system and might not hit the web browsers output stream either (depending on which SAPI you use) ... > RETURN_FALSE; > } > > tanks for your help. > > Best Regards, > Aminzadeh > -- Hartmut Holzgraefe, MySQL Regional Support Manager EMEA Sun Microsystems GmbH, Sonnenallee 1, 85551 Kirchheim-Heimstetten Amtsgericht Muenchen: HRB161028 Geschaeftsfuehrer: Thomas Schroeder, Wolfgang Engels, Dr. Roland Boemer Vorsitzender des Aufsichtsrates: Martin Haering

« previous php.pecl.dev (#5870) next »