NYCPHP Meetup

NYPHP.org

[nycphp-talk] (no subject)

Tim Gales tgales at tgaconnect.com
Fri Feb 27 16:45:09 EST 2004


Yesterday I was experimenting with PHP installed on 
a drive logically partitioned as 'L:'

I wanted to setup pear so I ran go-pear.bat.
At the end of the batch script I got:

PEAR_Config: bad data in L:\php\pear.ini

that seemed to be coming from config.php 
when calling something named version_compare.

I didn't worry about it to much at the time.
But today I want to run PHP 4.3.3 pear
and it was acting weird.

I decided to run go-pear.bat on the 
j: drive where the 4.3.3 pear stuff is.

Here is an excerpt:

 1. Installation prefix           : J:\php
 2. Binaries directory            : $prefix
 3. PHP code directory ($php_dir) : $prefix\pear
 4. Documentation base directory  : $php_dir\docs
 5. Data base directory           : $php_dir\data
 6. Tests base directory          : $php_dir\tests
 7. php.exe path                  : J:\php\php.exe

PEAR_Config: bad data in J:\php\pear.ini

came up again.

I ran PEAR_ENV.reg
which has the following:
REGEDIT4
[HKEY_CURRENT_USER\Environment]
"PHP_PEAR_SYSCONF_DIR"="J:\\php"
"PHP_PEAR_INSTALL_DIR"="J:\\php\\pear"
"PHP_PEAR_DOC_DIR"="J:\\php\\pear\\docs"
"PHP_PEAR_BIN_DIR"="J:\\php"
"PHP_PEAR_DATA_DIR"="J:\\php\\pear\\data"
"PHP_PEAR_PHP_BIN"="J:\\php\\php.exe"
"PHP_PEAR_TEST_DIR"="J:\\php\\pear\\tests"

Do I have to erase this J:\php\pear directory 
and reinstall (if that's the answer so be it) 

But is there an easier/quicker way?

Thanks in advance for anything on this

T. Gales & Associates
'Helping People Connect with Technology'

http://www.tgaconnect.com


>From hans not junk at nyphp.com  Fri Feb 27 17:04:59 2004
Return-Path: <hans not junk at nyphp.com>
Received: from ehost011-1.exch011.intermedia.net (unknown [64.78.21.3])
	by virtu.nyphp.org (Postfix) with ESMTP id 7B9FFA86CD
	for <talk at lists.nyphp.org>; Fri, 27 Feb 2004 17:04:59 -0500 (EST)
X-MimeOLE: Produced By Microsoft Exchange V6.5.6944.0
Content-class: urn:content-classes:message
MIME-Version: 1.0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Date: Fri, 27 Feb 2004 14:04:57 -0800
Message-ID: <41EE526EC2D3C74286415780D3BA9F87AA665D at ehost011-1.exch011.intermedia.net>
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
Thread-Topic: CSV Regex
Thread-Index: AcP9ffL7mv2wULxtQrin+3biO7vdGA==
From: "Hans Zaunere" <hans not junk at nyphp.com>
To: "NYPHP Talk" <talk at lists.nyphp.org>
Subject: [nycphp-talk] CSV Regex
X-BeenThere: talk at lists.nyphp.org
X-Mailman-Version: 2.1.2
Precedence: list
Reply-To: NYPHP Talk <talk at lists.nyphp.org>
List-Id: NYPHP Talk  <talk.lists.nyphp.org>
List-Unsubscribe: <http://lists.nyphp.org/mailman/listinfo/talk>,
	<mailto:talk-request at lists.nyphp.org?subject=unsubscribe>
List-Archive: <http://lists.nyphp.org/pipermail/talk>
List-Post: <mailto:talk at lists.nyphp.org>
List-Help: <mailto:talk-request at lists.nyphp.org?subject=help>
List-Subscribe: <http://lists.nyphp.org/mailman/listinfo/talk>,
	<mailto:talk-request at lists.nyphp.org?subject=subscribe>
X-List-Received-Date: Fri, 27 Feb 2004 22:04:59 -0000


Hi all,

I'm looking to parse a CSV file and figured there must be a smooth regex
for the job.  I'm of course getting the data line by line.  Google seems
to think this is everyone's favorite regex for the job:

,(?=3D([^"]*"[^"]*")*(?![^"]*"))

And, I must say, it works pretty good, using, for instance, the
following command:

      $columns =3D
preg_split('/,(?=3D([^"]*"[^"]*")*(?![^"]*"))/',fgets($fp));

The only issue is it returns the double quotes with each column.  So, if
a column contains:

"D"

I get "D" back.  I'd prefer just D

Any tips?  Thanks,

H




More information about the talk mailing list