php-install Digest 30 Dec 2002 09:07:38 -0000 Issue 1178

Topics (messages 9460 through 9465):

Re: PHP 4.3 unable to load php_domxml.dll in WinXP Apache 2.0.43
        9460 by: Dirk Schiefke

Source code being showed...
        9461 by: Lic. Rodolfo Gonzalez Gonzalez

--with-mysql= compile error?
        9462 by: Stephen
        9463 by: Stephen
        9464 by: Stephen

Help needed: php_fopen_wrapper in php 4.3.0
        9465 by: Mike Wossen

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [EMAIL PROTECTED]


----------------------------------------------------------------------
--- Begin Message ---
Same applies here using
XP pro SP1, apache 1.3.27

no dll will load even if the extensions path is set to the correct dir
in this case 
J:\php-4.3.0\extensions - where they reside

dirk


On Sun, 29 Dec 2002 14:38:51 -0000, [EMAIL PROTECTED] (Rui Costa) wrote:
> hi,
> 
> Windows XP, Apache 2.0.43(Win32) with PHP 4.3 can't load DLL
> 'php_domxml.dll'.
> it pops-up: Unknown(): unable to load dll'C:\php\extensions\php_domxml.dll'
> if I use the old 'php_domxml.dll' from PHP 4.2.4, it works fine. I'm using
> libxml2-2.4.30, expat 1.95.4.
> 
> by the way, 'libxml2.dll' is not packed in the PHP 4.3 Windows distribution,
> although it mentions that it does in the PHP documentation.
> 
> thanks in advance
> rui
> 
> 



--- End Message ---
--- Begin Message ---
Hi,

I have a problem, the stage: redhat-6.2 + apache-1.3.27-rh62 +
php-4.3.2(from PHP's tarball). I have the MIME type correctly defined in
my httpd.conf, and the code sometimes is interpreted and sometimes it
isn't (sometimes it gets passed crude to the browser). I had no problems
before, the only change was an upgrade from perl-5.6 to perl-5.8 (but I
don't think that could be causing the problem). Any hint is apppreciated
:)


Regards.


--- End Message ---
--- Begin Message ---
PHP 4.3.0
Linux 2.2.21
--with-mysql=/usr/local/mysql seems to be generating this compile error:


ext/mysql/php_mysql.o: In function `zif_mysql_client_encoding':
/usr/src/php-4.3.0/ext/mysql/php_mysql.c:1077: undefined reference to 
`mysql_character_set_name'
ext/mysql/php_mysql.o: In function `zif_mysql_real_escape_string':
/usr/src/php-4.3.0/ext/mysql/php_mysql.c:1671: undefined reference to 
`mysql_real_escape_string'
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1


It ./configures fine - but breaks when compiling.
Ideas?
Anyone else run into this?


Regards,
Stephen
--- End Message ---
--- Begin Message ---
Ummm, duh!
To prevent this error use --disable-cli with ./configure


Regards,
Stephen


Quoting Stephen <[EMAIL PROTECTED]>:

> PHP 4.3.0
> Linux 2.2.21
> --with-mysql=/usr/local/mysql seems to be generating this compile
> error:
> 
> 
> ext/mysql/php_mysql.o: In function `zif_mysql_client_encoding':
> /usr/src/php-4.3.0/ext/mysql/php_mysql.c:1077: undefined reference to 
> `mysql_character_set_name'
> ext/mysql/php_mysql.o: In function `zif_mysql_real_escape_string':
> /usr/src/php-4.3.0/ext/mysql/php_mysql.c:1671: undefined reference to 
> `mysql_real_escape_string'
> collect2: ld returned 1 exit status
> make: *** [sapi/cli/php] Error 1
> 
> 
> It ./configures fine - but breaks when compiling.
> Ideas?
> Anyone else run into this?
> 
> 
> Regards,
> Stephen
> 
> -- 
> PHP Install Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
--- End Message ---
--- Begin Message ---
Hrmmmm. This lets php compile but apache still breaks with similar errors.
Anyone else having this prob?


Stephen

Quoting Stephen <[EMAIL PROTECTED]>:

> Ummm, duh!
> To prevent this error use --disable-cli with ./configure
> 
> 
> Regards,
> Stephen
> 
> 
> Quoting Stephen <[EMAIL PROTECTED]>:
> 
> > PHP 4.3.0
> > Linux 2.2.21
> > --with-mysql=/usr/local/mysql seems to be generating this compile
> > error:
> > 
> > 
> > ext/mysql/php_mysql.o: In function `zif_mysql_client_encoding':
> > /usr/src/php-4.3.0/ext/mysql/php_mysql.c:1077: undefined reference to
> 
> > `mysql_character_set_name'
> > ext/mysql/php_mysql.o: In function `zif_mysql_real_escape_string':
> > /usr/src/php-4.3.0/ext/mysql/php_mysql.c:1671: undefined reference to
> 
> > `mysql_real_escape_string'
> > collect2: ld returned 1 exit status
> > make: *** [sapi/cli/php] Error 1
> > 
> > 
> > It ./configures fine - but breaks when compiling.
> > Ideas?
> > Anyone else run into this?
> > 
> > 
> > Regards,
> > Stephen
> > 
> > -- 
> > PHP Install Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> > 
> 
> -- 
> PHP Install Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
--- End Message ---
--- Begin Message ---
I’m migrating from php 4.2.1 to 4.3.0 (rh 7.2).

I've written my own php template extension.



Compilation runs normally (with 3 warning messages on lines where
php_fopen_wrapper function is used).

But when i try starting apache i get error message:

Cannot load /usr/local/apache/libexec/libphp4.so into server:
/usr/local/apache/libexec/libphp4.so: undefined symbol: php_fopen_wrapper


Where can I find documentations about  all changes made to wrappers in php
4.3.0.

Should I need to use new functions like php_stream_open_wrapper_as_file (or
similar) instead?



My piece of code:

-----------------------------------------------



PHP_FUNCTION(temp_load)
{
        zval **tempfile=NULL, **cachefile=NULL;
        int argc;
        char *filename;
        FILE *fp;
        struct stat st;
        template *tp;
//      TEMPLATELS_FETCH();

        argc = ZEND_NUM_ARGS();
        if (argc < 1 || argc > 2 || zend_get_parameters_ex(argc, &tempfile,
&cachefile) == FAILURE){
                WRONG_PARAM_COUNT;
        }

        switch (argc) {
                case 2:
                        convert_to_string_ex(cachefile);
                        /* Fall-through. */
                case 1:
                        convert_to_string_ex(tempfile);
                        break;
        }

        tp = emalloc(sizeof(template));
        tp->bl = emalloc(sizeof(block));
        tp->bl->cont = emalloc(sizeof(mpchain));
        tp->bl->cont->next = NULL;
        tp->bl->lastcont = tp->bl->cont;

        tp->bl->lastcont->mp.ptr = NULL;

        tp->bl->prev = NULL;
        tp->bl->done = 0;

        tp->cf = NULL;
        tp->cached = 0;

        if(cachefile)
               {
                filename = Z_STRVAL_PP(cachefile);



                /*

                LINE WITH WARNING

                */
                if((fp = php_fopen_wrapper(filename,"r",
USE_PATH|ENFORCE_SAFE_MODE|IGNORE_URL, NULL, NULL, NULL)))
                        {
                        if(fstat(fileno(fp),&st))
                                {
                                php_error(E_WARNING,"Can't get stats of
\"%s\" - %s",filename,strerror(errno));
                                RETURN_FALSE;
                                }

                        if(st.st_size > 0)
                                {
                                tp->cached = 1;
                                goto notemp;
                                }
                        }
                else if (errno == ENOENT)               // cachefile not
found
                        {


                /*

                LINE WITH WARNING

                */
                        if(!(tp->cf = php_fopen_wrapper(filename,"w",
USE_PATH|ENFORCE_SAFE_MODE|IGNORE_URL, NULL, NULL, &tp->cachefile)))
                                {
                                php_error(E_WARNING,"Can't open
cachefile(\"%s\") for writing - %s",filename,strerror(errno));
                                RETURN_FALSE;
                                }
                        }
                else    // some other error
                        {
                        php_error(E_WARNING,"Can't open cachefile(\"%s\") -
%s",filename,strerror(errno));
                        RETURN_FALSE;
                        }
                }

        filename = Z_STRVAL_PP(tempfile);




                /*

                LINE WITH WARNING

                */
        if(!(fp = php_fopen_wrapper(filename,"r",
USE_PATH|ENFORCE_SAFE_MODE|IGNORE_URL, NULL, NULL, NULL)))
                {
                php_error(E_WARNING,"Can't open tempfile(\"%s\") -
%s",filename,strerror(errno));
                RETURN_FALSE;
                }
        if(fstat(fileno(fp),&st))
                {
                php_error(E_WARNING,"Can't get stats of \"%s\" -
%s",filename,strerror(errno));
                RETURN_FALSE;
                }

notemp:

        tp->bl->lastcont->mp.ptr = emalloc(tp->bl->lastcont->mp.len =
st.st_size);
        if(fread(tp->bl->lastcont->mp.ptr,st.st_size,1,fp)!=1)
                {
                php_error(E_WARNING,"Can't read file \"%s\" -
%s",filename,strerror(errno));
                RETURN_FALSE;
                }

        /*php_stream_close(fp);*/
        fclose(fp);
        ZEND_REGISTER_RESOURCE(return_value, tp, le_template);
}
/* }}} */




Regards,
Mike


--- End Message ---

Reply via email to