ports/168382: pecl-uploadprogress - compilation failed with php 5.4
Nicolas Raspail
nicolas.raspail at gmail.com
Sun May 27 17:20:07 UTC 2012
>Number: 168382
>Category: ports
>Synopsis: pecl-uploadprogress - compilation failed with php 5.4
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Sun May 27 17:20:05 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator: Nicolas Raspail
>Release: 9.0-RELEASE
>Organization:
>Environment:
FreeBSD dodger.whisperingvault.net 9.0-RELEASE FreeBSD 9.0-RELEASE #0: Tue Jan 3 07:46:30 UTC 2012 root at farrell.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64
>Description:
Hi
When trying to update from php 5.3 to php 5.4, the compilation of pecl-uploadprogress (from 1.0.1 to 1.0.2) has failed with the following error
/usr/ports/devel/pecl-uploadprogress/work/uploadprogress-1.0.2/uploadprogress.c:460: error: 'struct _php_core_globals' has no member named 'magic_quotes_runtime'
*** Error code 1
I have found the following message http://permalink.gmane.org/gmane.comp.php.pecl.cvs/14722 and after having created the patch, the compilation was ok.
>How-To-Repeat:
After having php upgraded to 5.4, try to compile pecl-uploadprogress-1.0.2
>Fix:
Put the attached patch in /usr/ports/devel/pecl-uploadprogress/files (remove the .txt part) and install the port
Patch attached with submission follows:
--- uploadprogress.c.orig 2012-05-27 18:32:23.891923716 +0200
+++ uploadprogress.c 2012-05-27 18:33:33.601926257 +0200
@@ -457,11 +457,12 @@
/* uses mmap if possible */
if ((len = php_stream_copy_to_mem(stream, &contents, maxlen, 0)) > 0) {
+#if PHP_API_VERSION < 20100412
if (PG(magic_quotes_runtime)) {
contents = php_addslashes(contents, len, &newlen, 1 TSRMLS_CC);
len = newlen;
}
-
+#endif
RETVAL_STRINGL(contents, len, 0);
} else if (len == 0) {
RETVAL_EMPTY_STRING();
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list