php-windows Digest 17 Jan 2008 19:51:40 -0000 Issue 3403
Topics (messages 28731 through 28737):
Re: Can't get MySQL extensions to load
28731 by: Gustav Wiberg
28732 by: Gustav Wiberg
Warning: eregi() [function.eregi]: REG_ERANGE in ...
28733 by: Dan Stevens (IAmAI)
28734 by: germana
28736 by: Dan Stevens (IAmAI)
mysql not working but very odd
28735 by: Joaquin Grech
28737 by: Jacob Kruger
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 ---
Hi!
If phpinfo points at c:\windows - that's where the php searches for settings in
first place. Try to copy php.ini from c:\php to c:\windows and see the result.
Vänligen/Regards
Gustav Wiberg
Developing Engineer
=====================================
DET SKA VARA LÄTT ATT TA RÄTT BETALT!
Har du råd att inte prova Timeweb.se?
=====================================
-----Original Message-----
From: Bruce Cowin [mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 16, 2008 2:40 AM
To: Patrick Farley; [EMAIL PROTECTED]
Subject: Re: [PHP-WIN] Can't get MySQL extensions to load
I have a similar issue. We copied a PHP installation that was
successful on Windows 2000 to a 2003 server. Although it works fine on
2000, it won't load any of the extensions on 2003. I've checked the
..ini file and the extensions are definitely uncommented, the
extension_dir setting is correct, I've included c:\php in the path. PHP
works (as phpinfo() runs) but extensions don't load. A couple of things
I've noted that are different on this server (in case it's related):
- if I use cgi-win.exe, php pages won't load so have to use
phpisapi5.dll
- in phpinfo, the ini file path shows as C:\Windows instead of c:\php
even though there is no php.ini file in that folder
Can anyone help??
Regards,
Bruce
>>> "Patrick Farley" <[EMAIL PROTECTED]> 9/12/2007 6:11:58 p.m. >>>
Evening.
I've installed the latest PHP using the zip files (not the installer)
to my
Windows 2003 machine with IIS. I have tested the installation with a
phpinfo() and was successful. I installed Roundcube and when trying
to
connect to the site was greeted with an error about being unable to
connect
to the database. I rechecked my connection string and all seemed
well.
Figuring I'd come back to it later, I went to install Joomla and during
the
install process was told that Joomla is unable to connect to MySQL.
I have checked and rechecked my php.ini file (though I may be missing
something not obvious)
PHP in general works.
My system PATH is configured for C:\php and I have restarted several
times
I've even redownloaded the php zip files and compared the md5 to make
sure
it was not corrupt.
MySQL is active and working on localhost for an email server without
any
issue.
Have tried both mysql.dll and mysqli.dll
I have searched Google with out any success.
Is this something with PHP or my MySQL install? I'm out of ideas.
Patrick
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Hi!
Strange. Never heard but Ok - good that you worked it out!
Vänligen/Regards
Gustav Wiberg
Developing Engineer
-----Original Message-----
From: Bruce Cowin [mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 16, 2008 9:54 PM
To: Gustav Wiberg; 'Patrick Farley'; '[EMAIL PROTECTED]'; Bruce Cowin
Subject: RE: [PHP-WIN] Can't get MySQL extensions to load
I got it to work. It turns out you need a registry entry in HKLM\Software\PHP
call IniFilePath set to where your ini file is. Now that it's using the right
ini file, it's loading the extensions.
Regards,
Bruce
>>> "Bruce Cowin" <[EMAIL PROTECTED]> 17/01/2008 8:53:58 a.m. >>>
That was a good idea, but unfortunately it doesn't work. It still doesn't load
any of the extensions.
Regards,
Bruce
>>> Gustav Wiberg <[EMAIL PROTECTED]> 16/01/2008 8:29:00 p.m. >>>
Hi!
If phpinfo points at c:\windows - that's where the php searches for settings in
first place. Try to copy php.ini from c:\php to c:\windows and see the result.
Vänligen/Regards
Gustav Wiberg
Developing Engineer
=====================================
DET SKA VARA LÄTT ATT TA RÄTT BETALT!
Har du råd att inte prova Timeweb.se?
=====================================
-----Original Message-----
From: Bruce Cowin [mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 16, 2008 2:40 AM
To: Patrick Farley; [EMAIL PROTECTED]
Subject: Re: [PHP-WIN] Can't get MySQL extensions to load
I have a similar issue. We copied a PHP installation that was
successful on Windows 2000 to a 2003 server. Although it works fine on
2000, it won't load any of the extensions on 2003. I've checked the
..ini file and the extensions are definitely uncommented, the
extension_dir setting is correct, I've included c:\php in the path. PHP
works (as phpinfo() runs) but extensions don't load. A couple of things
I've noted that are different on this server (in case it's related):
- if I use cgi-win.exe, php pages won't load so have to use
phpisapi5.dll
- in phpinfo, the ini file path shows as C:\Windows instead of c:\php
even though there is no php.ini file in that folder
Can anyone help??
Regards,
Bruce
>>> "Patrick Farley" <[EMAIL PROTECTED]> 9/12/2007 6:11:58 p.m. >>>
Evening.
I've installed the latest PHP using the zip files (not the installer)
to my
Windows 2003 machine with IIS. I have tested the installation with a
phpinfo() and was successful. I installed Roundcube and when trying
to
connect to the site was greeted with an error about being unable to
connect
to the database. I rechecked my connection string and all seemed
well.
Figuring I'd come back to it later, I went to install Joomla and during
the
install process was told that Joomla is unable to connect to MySQL.
I have checked and rechecked my php.ini file (though I may be missing
something not obvious)
PHP in general works.
My system PATH is configured for C:\php and I have restarted several
times
I've even redownloaded the php zip files and compared the md5 to make
sure
it was not corrupt.
MySQL is active and working on localhost for an email server without
any
issue.
Have tried both mysql.dll and mysqli.dll
I have searched Google with out any success.
Is this something with PHP or my MySQL install? I'm out of ideas.
Patrick
--
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 ---
I'm have trouble with some code that I have been following in a book
regarding regular expressions. I'm attempting to validate an email
using a regular expression. Below is a simplified version of the code
which reproduces the problem I'm having:
<?php
define("EMAIL_RE", '[EMAIL PROTECTED]');
$email = trim($_GET['email']);
$result = eregi(EMAIL_RE, $email);
echo $result . "<br />\n";
if ($result) echo "Email valid";
else "Email invalid"
?>
Calling this code with the argument [EMAIL PROTECTED], I'd expect an
interger output something like this
15
Email valid
Yet instead, all get is a warning that I cannot fathom and nothing else:
Warning: eregi() [function.eregi]: REG_ERANGE in C:\Documents and
Settings\daniel.stevens\My
Documents\Workspace\htdocs\tutoring\eregi_test.php on line 4
I've tried searching for this warning to find out what it means, but I
cannot find any reference to it on the web. Is anyone able to tell me
what this warning means and why I am not getting the output I'm
expecting? Can anyone advise how best to find out what a particular
error or warning means so I don't have to ask on this list everytime I
come across one that means nothing? php.net does not appear to have a
list.
Thanks in advance.
--- End Message ---
--- Begin Message ---
i dont know if im gonna be wrong but, here i go:
you want to call to $_GET['email'] so in you URL should appear something
like this,
[EMAIL PROTECTED]
On Thu, 2008-01-17 at 12:29 +0000, Dan Stevens (IAmAI) wrote:
> Calling this code with the argument [EMAIL PROTECTED], I'd expect an
> interger output something like this
>
--- End Message ---
--- Begin Message ---
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?
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.
On 17/01/2008, Dan Stevens (IAmAI) <[EMAIL PROTECTED]> wrote:
> I'm have trouble with some code that I have been following in a book
> regarding regular expressions. I'm attempting to validate an email
> using a regular expression. Below is a simplified version of the code
> which reproduces the problem I'm having:
>
> <?php
> define("EMAIL_RE", '[EMAIL PROTECTED]');
> $email = trim($_GET['email']);
> $result = eregi(EMAIL_RE, $email);
> echo $result . "<br />\n";
> if ($result) echo "Email valid";
> else "Email invalid"
> ?>
>
> Calling this code with the argument [EMAIL PROTECTED], I'd expect an
> interger output something like this
>
> 15
> Email valid
>
> Yet instead, all get is a warning that I cannot fathom and nothing else:
>
> Warning: eregi() [function.eregi]: REG_ERANGE in C:\Documents and
> Settings\daniel.stevens\My
> Documents\Workspace\htdocs\tutoring\eregi_test.php on line 4
>
> I've tried searching for this warning to find out what it means, but I
> cannot find any reference to it on the web. Is anyone able to tell me
> what this warning means and why I am not getting the output I'm
> expecting? Can anyone advise how best to find out what a particular
> error or warning means so I don't have to ask on this list everytime I
> come across one that means nothing? php.net does not appear to have a
> list.
>
> Thanks in advance.
>
--- End Message ---
--- Begin Message ---
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.
--- End Message ---
--- Begin Message ---
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.
--- End Message ---