php-windows Digest 12 Jan 2010 21:22:09 -0000 Issue 3745

Topics (messages 29801 through 29804):

preg interpretation question
        29801 by: Mark Murphy
        29802 by: Ferenc Kovacs
        29803 by: Pierre Joye

PHP Build problems on windows
        29804 by: Justin Dearing

Administrivia:

To subscribe to the digest, e-mail:
        php-windows-digest-subscr...@lists.php.net

To unsubscribe from the digest, e-mail:
        php-windows-digest-unsubscr...@lists.php.net

To post to the list, e-mail:
        php-wind...@lists.php.net


----------------------------------------------------------------------
--- Begin Message ---
Can someone interpret this preg string for me?

/[^a-z0-9\\/\\\\_.:-]/i

Here is what I can decipher. the match is case insensitive, and it excludes all letters, and numbers, and the characters _ . : and - (that is underscore, period, colon, and dash). The part I don't understand is \\/\\\\. Sees to me to say backslash, slash, backslash, backslash. Why the need for so many backslashes?
--- End Message ---
--- Begin Message ---
if its a parameter for some shell code, then you need to douple escape
the escapest.
If I remember correctly, if you need an escape char in a string, you
can put it in with \\, but if you need to put an escape char to a
string which will be executed via exec/system/etc. then you have to
put an escaped escape char, so in the end you need four escape char.

correct me, if Im wrong.

Tyrael

On Mon, Jan 11, 2010 at 2:37 AM, Mark Murphy <mmu...@cinci.rr.com> wrote:
> Can someone interpret this preg string for me?
>
> /[^a-z0-9\\/\\\\_.:-]/i
>
> Here is what I can decipher.  the match is case insensitive, and it excludes
> all letters, and numbers, and the characters _ . : and - (that is
> underscore, period, colon, and dash).  The part I don't understand is
> \\/\\\\.  Sees to me to say backslash, slash, backslash, backslash.  Why the
> need for so many backslashes?
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

--- End Message ---
--- Begin Message ---
On Mon, Jan 11, 2010 at 2:37 AM, Mark Murphy <mmu...@cinci.rr.com> wrote:
> Can someone interpret this preg string for me?
>
> /[^a-z0-9\\/\\\\_.:-]/i
>
> Here is what I can decipher.  the match is case insensitive, and it excludes
> all letters, and numbers, and the characters _ . : and - (that is
> underscore, period, colon, and dash).  The part I don't understand is
> \\/\\\\.  Sees to me to say backslash, slash, backslash, backslash.  Why the
> need for so many backslashes?

Reserved character has to be escaped using \, and \ is a reserved character.

Btw, ereg is deprecated, I would suggest to use PCRE instead,
http://www.php.net/pcre

Cheers,
-- 
Pierre

http://twitter.com/pierrejoye | http://blog.thepimp.net | http://www.libgd.org

--- End Message ---
--- Begin Message ---
Hello,

I've been trying to build PHP on WIndows 7 with the windows platform SDK. In
my first attempt I ran configure.js like this:

C:\src\php-5.3.1>configure --enable-debug --enable-crt-debug
--enable-cli-win32 --with-openssl --enable-soap --with-xsl

I ran make and it ended like this:

stream.c
tar.c
util.c
c:\src\php-5.3.1\ext\phar\util.c(30) : fatal error C1083: Cannot open
include file: 'openssl/evp.h': No such file or director
y
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio
9.0\VC\Bin\cl.exe"' : return code '0x2'
Stop.

Now I think the fact configure didn't fail or disable openssl support should
be configured a bug, but I thought I would confirm that here. Relevant
configure output:

Checking for library ssleay32.lib ... <not found>
Enabling extension ext\pcre
<snip/>
Enabling extension ext\phar
        Native OpenSSL support in Phar enabled

Meanwhile I installed the open ssl MSI, updated my envirorment and retried a
build. This lead to some errors that seem to be zlib related. My new
configure line

configure --disable-zts --enable-debug --enable-crt-debug --enable-cli-win32
--with-openssl --enable-soap --with-xsl
--with-extra-includes=c:\src\win32build\include;c:\OpenSSL\include
--with-extra-libs=c:\src\win32build\lib;c:\OpenSS
L\lib

I reran nmake and got the following complaints related to zlib:

php_xsl.c
xsltprocessor.c
        rc /fo Debug\php5_debug.dll.res /d FILE_DESCRIPTION="\"PHP Script
Interpreter\""  /d FILE_NAME="\"php5_debug.dll\"" /
d PRODUCT_NAME="\"PHP Script Interpreter\""  /IDebug /d
MC_INCLUDE="\"Debug\wsyslog.rc\""  win32\build\template.rc
Microsoft (R) Windows (R) Resource Compiler Version 6.1.7600.16385
Copyright (C) Microsoft Corporation.  All rights reserved.

php5_debug.dll.def : error LNK2001: unresolved external symbol compressBound
php5_debug.dll.def : error LNK2001: unresolved external symbol deflateBound
php5_debug.dll.def : error LNK2001: unresolved external symbol deflatePrime
php5_debug.dll.def : error LNK2001: unresolved external symbol gzclearerr
php5_debug.dll.def : error LNK2001: unresolved external symbol gzungetc
php5_debug.dll.def : error LNK2001: unresolved external symbol inflateBack
php5_debug.dll.def : error LNK2001: unresolved external symbol
inflateBackEnd
php5_debug.dll.def : error LNK2001: unresolved external symbol
inflateBackInit_
php5_debug.dll.def : error LNK2001: unresolved external symbol inflateCopy
php5_debug.dll.def : error LNK2001: unresolved external symbol
zlibCompileFlags
Debug\php5_debug.lib : fatal error LNK1120: 10 unresolved externals
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio
9.0\VC\Bin\cl.exe"' : return code '0x2'
Stop.

Any suggestions?

--- End Message ---

Reply via email to