Re: Re: just another beginner
| From: | Hadi Aminzadeh | Date: | Mon, 10 Nov 2008 18:34:33 +0000 |
| Subject: | Re: Re: just another beginner | ||
| References: | 1 2 3 | Groups: | php.pecl.dev |
| Request: | Send a blank email to pecl-dev+get-5871@lists.php.net to get a copy of this message | ||
On Mon, Nov 10, 2008 at 6:02 PM, Hartmut Holzgraefe
<Hartmut.Holzgraefe@sun.com> wrote:
>
> 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?
>
$ pecl-gen --version
pecl-gen 1.1.2, Copyright (c) 2003-2006 Hartmut Holzgraefe
> > 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?
>
Ohh :D
> 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) ...
>
tanks for help
where can I find this function such as "php_printf" and tips in
writing PHP extension?
and can I use other extension (mysql, regular expression or ...) in my
extension?
> > 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