php-windows Digest 21 Jan 2008 03:18:33 -0000 Issue 3407

Topics (messages 28746 through 28748):

Re: Warning: eregi() [function.eregi]: REG_ERANGE in ...
        28746 by: Niel Archer

Re: mysql not working but very odd
        28747 by: Bruce Cowin

mssql and latin characters
        28748 by: Leticia Larrosa

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 ---
> I think single quotes is right because you don't want PHP to escape
> the characters...the escape is for regex, not PHP

In fact, we're neither correct,  I was thinking of PCRE, but this is
POSIX regexes which I'm not familiar with.
From the POSIX man pages:

"To include a literal `]' in the list, make it the first character
(following a possible `^').  To include a literal `-', make it the first
or last character,  or  the second endpoint of a range.  To use a
literal `-' as the first endpoint of a range, enclose it in `[.'  and  `.]'
to make it  a collating element (see below).  With the exception of
these and some combinations using `[' (see next paragraphs), all  other
special characters, including `\', lose their special significance
within a bracket expression"

Which seems to tell us it can't be (and doesn't need to be) escaped at
all.  I'll stick with PCRE, they're binary safe.

I would try removing the backslash and moving the hyphen to be the last
character in the range (after the full stop).


> On Jan 19, 2008 9:44 AM, Niel Archer <[EMAIL PROTECTED]> wrote:
> > Hi
> >
> > > OK, I don't think I searched the web hard enough. I've not found a
> > > definitive explanation, but I think the warning has something to do
> > > with the dash symbols (\-) within the square brackets. Removing them -
> > > changing them to the regular expression below - removes the warning
> > >
> > > '[EMAIL PROTECTED]'
> >
> > > Question is now, how am I supposed to match dash symbols?
> >
> > The problem is that you included the "\-" within SINGLE quotes. Escaping
> > a character only works within double quotes.  Go back to your original
> > but substitute the ' for " around the expression. Like this:
> >
> > define("EMAIL_RE", "[EMAIL PROTECTED]");
> >
> > >
> > > In one thread I read advised preg functions using the ereg functions.
> > > I had ago with this, putting back in the dashes and changing the
> > > regular expression to a perl RE:
> > >
> > > '/[EMAIL PROTECTED]/'
> > >
> > > No warnings this time and it appears to work. I still welcome any
> > > feedback on ereg if anyone wants to give any.
> >
> > --
> > Niel Archer
> >
> >
> > --
> > PHP Windows Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> 
> 
> 
> -- 
> ts2do
> 
> -- 
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

--
Niel Archer

--- End Message ---
--- Begin Message ---
You need a registry entry in  HKLM\Software\PHP called IniFilePath set
to where your ini file is.  This will get it to load the correct ini
file, so then the extensions should be loaded.  Put the following into a
.reg file and run it and it will create the entry required.

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\PHP]
"IniFilePath"="C:\\PHP"



Regards,

Bruce

>>> "Joaquin Grech" <[EMAIL PROTECTED]> 19/01/2008 5:11:46 a.m. >>>
bruce,
I just upgraded php to make sure all is good and i see this problem,
my php.ini is in c:\php but it's reading it from c:\windows
i copied it over but same problem, any ideas?

On 1/17/08, Bruce Cowin <[EMAIL PROTECTED]> wrote:
> And if it's not pointing to the php.ini file you may need the
registry
> entry as per my previous email.
>
>
>
> Regards,
>
> Bruce
>
> >>> "Jacob Kruger" <[EMAIL PROTECTED]> 18/01/2008 8:50:44 a.m. >>>
> Not sure if this is relevant, but if you run phpinfo(), it should
tell
> you
> which php.ini is being implemented, and in that, maybe just
> double-check
> that the correct paths for the ext's is being implemented to
actually
> load
> those extensions.
>
> HTH
>
> Jacob Kruger
> Blind Biker
> Skype: BlindZA
> '...Fate had broken his body, but not his spirit...'
>
> ----- Original Message -----
> From: "Joaquin Grech" <
> [EMAIL PROTECTED]>
> To: <
> [EMAIL PROTECTED]>
> Sent: Thursday, January 17, 2008 3:02 PM
> Subject: [PHP-WIN] mysql not working but very odd
>
> > Ok,
> >
> > I had php installed on a server with mysql module and I just
copied
> all
> > the
> > files over to a new machine. It didn't work. I tried reinstalling
and
> all,
> > still same issue.
> >
> > I ran php -I output and it seems to be all ok, this is part of the
> output:
> >
> >
> >
> > mysql
> >
> >
> >
> > MySQL Support => enabled
> >
> > Active Persistent Links => 0
> >
> > Active Links => 0
> >
> > Client API version => 5.0.37
> >
> >
> >
> > Directive => Local Value => Master Value
> >
> > mysql.allow_persistent => On => On
> >
> > mysql.connect_timeout => 60 => 60
> >
> > mysql.default_host => localhost => localhost
> >
> > mysql.default_password => no value => no value
> >
> > mysql.default_port => 3306 => 3306
> >
> > mysql.default_socket => no value => no value
> >
> > mysql.default_user => no value => no value
> >
> > mysql.max_links => Unlimited => Unlimited
> >
> > mysql.max_persistent => Unlimited => Unlimited
> >
> > mysql.trace_mode => Off => Off
> >
> >
> >
> >
> >
> >
> >
> > Now, when I try to load a page I get an error:
> >
> > This page cannot be displayed due to an internal error.
> >
> > You can provide the following information to the administrators of
> this
> > site
> > to help them solve the problem:
> >
> > Error: mysql extension not loaded
> >
> >
> >
> > You can see the error in
> http://www.unionlatina.org/ 
> >
> >
> >
> > Any ideas what's going on? I tried putting the files in
> > c:\windows\system32
> > and same thing, I can't think of anything else. I've installed,
> > reinstalled,
> > restarted, removed, downgraded, upgraded, copy the exact files.
> nothing
> > always the same error.
> >
> >
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php 
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php 
>
>

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

I have a MSSql 2000 database that have stored data with the follow special
characters: ó, í, Ñ, á, é, ú. 
When I see the data through any MsSql Client I see exactly those characters.

The Collation of database is: SQL_Latin1_General_CP1_CI_AS
I can’t change the method of insert data in database.

When I get (with MSSQL PHP extension) data that have some of those
characters, I get weird characters instead.

For example: 
A data that in database appears as “Girón” is obtained by PHP as “Gir¢n”

The problem with the encoding of browser is discarded, because wherever I
saw the data appears with weird characters.

The code I use to get the data is:
<?php
mssql_connect('server','user','pass');
mssql_select_db('db');

$r = mssql_query(“select some_column from some_table”);
$d = mssql_fetch_assoc($r);

echo $d['some_column'];
?>

My PHP is 4.4.3, and my OS is XP.

Other people ask the same as I’m and get no answer proper are:
http://www.psicofxp.com/forums/desarrollo-web.264/226703-php-mssql-y-acentos
.html
http://www.bdat.net/cuestiones_php/php3/0702.html 
http://www.forosdelweb.com/f18/problemas-con-caracteres-especiales-acentos-p
hp-mssql-server-364345/ 
http://markmail.org/message/7rksvz44sj2te5sl 
http://www.phpbuilder.com/board/archive/index.php/t-10208269.html


Thanks in advanced.
Leticia Larrosa



__________________________________________

Participe en Universidad 2008.
11 al 15 de febrero del 2008.
Palacio de las Convenciones, Ciudad de la Habana, Cuba
http://www.universidad2008.cu

--- End Message ---

Reply via email to