[PHP] Re: [PHP-DEV] Re: Is it true that short_open_tag is deprecated in PHP 6?

2009-04-14 Thread Glen
Mikko,

I'm not in a speed race. All my answers are well-thought out. I sent
separate e-mails because mailing list discussions are threaded*, and I
was responding to different people regarding different things. Who
should I reply to if I want to respond to more than one person?

I apologize if I've caused anyone any inconvenience.

Glen.

* http://aspn.activestate.com/ASPN/Mail/Message/php-dev/3710073

Mikko Koppanen wrote:
> On Tue, Apr 14, 2009 at 1:26 PM, Glen  <mailto:glen...@gmail.com>> wrote:
>
> I didn't say PHP tags were valid XML. I said short_open_tag conflicts
> with 
> <% is not valid XML either, but it doesn't conflict with processing
> instructions.
>
> Glen.
>
>
>
> Hello Glen,
>
> posting to mailing-lists is not a speed race so think about your
> answer before sending it. There should be no need to send four emails
> in a row as you can easily answer multiple persons / arguments in a
> single post. This discussion belongs to internals list anymore, so
> please move it to php-general mailing list.
>
> CCing the correct list in this mail.
>
> -- 
> Mikko Koppanen

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: [PHP-DEV] Re: Is it true that short_open_tag is deprecated in PHP 6?

2009-04-14 Thread Glen
[moving to general list as per Mikko's request]

short_open_tag is not deprecated.

What if you want to use  in your template?
There is no point removing  Hello everyone.
> I've been writing  for some time now at the
> last project and it really sucks. I understand reason on depricating
> short_open_tag and I agree. But I have a proposal witch can ease templating.
>
> Remove short open tag, but leave . Bacicaly PHP parser
> should look for  1). short_open_tag is gone for good as an option in .ini.
> 2). Making templates doesn't suck
> 3). Backwards compability with old templates is preserved (old templates
> with  4).  
> Everyone is happy, XML and others are safe.
>
> Yes, it's really irritating to write 
>   


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Version Difference

2001-01-16 Thread Glen Scott

At 10:37 16/01/01, Gareth Davies wrote:

>All is well in both the above until the user enters an apostrophe, upon 
>which the development environment nicely adds a backslash prior to it, 
>allowing it to be saved in Mysql with no additional effort. The live 
>environment, however, does not.

Do you have magic_quotes_gpc set in your php.ini file on your RaQ server?

- Glen

-
   Design Solution Limited
   t: +44 (0)1502 513008
   f: +44 (0)1502 588622
   e: [EMAIL PROTECTED]
   w: http://www.designsolution.co.uk
   Nouvotech House, Harbour Road,
   Oulton Broad, Suffolk, NR32 3LZ, UK
-


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Reading specific data from a .txt file into PHP

2001-01-16 Thread Glen Scott

James,

The trouble is, that there are about 3000 cities in the text file.  I'm
>assuming that I fill use fopen(); and fread(); to open and read the files,
>but does anyone know of a way of singling out one line (say:
>
>CYGL 161346Z 34004KT 15SM -SN BKN011 BKN030 RMK SF6SC1
>
>) from the whole text file?  Like if a variable, $city = CYGL, is it
>possible to then go to that one line in the text file and read all the
>information from just one line?  I'm pretty confident I could then split the
>information up into readable variable using the split(); function :)

Assuming the first field (i.e. CYGL) is unique, just read each line and 
check using a regular expression whether it matches the city you 
require.  If it matches, you can stop reading the file and do whatever you 
need to do with the line.

Regards,

Glen

-
   Design Solution Limited
   t: +44 (0)1502 513008
   f: +44 (0)1502 588622
   e: [EMAIL PROTECTED]
   w: http://www.designsolution.co.uk
   Nouvotech House, Harbour Road,
   Oulton Broad, Suffolk, NR32 3LZ, UK
-


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] gethostbyaddr and IPv6

2008-11-21 Thread Glen C

Hello,

Does gethostbyaddr actually work for anyone while looking up an IPv6 
address?  I can't seem to get it to work.  For example:


echo gethostbyaddr ( '2001:470:0:64::2' );

should return "ipv6.he.net" but instead I get the following error:

[21-Nov-2008 22:43:37] PHP Warning:  gethostbyaddr()
 [function.gethostbyaddr]:
 Address is not in a.b.c.d form in C:\www\tests\saved\host.php on line 7

Google has not been my friend in this matter...

Any insight?
Thanks,
Glen

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] gethostbyaddr and IPv6

2008-11-22 Thread Glen C

On 11/22/2008 02:17 AM, Lars Torben Wilson wrote:

2008/11/21 Glen Carreras<[EMAIL PROTECTED]>:


On 11/22/2008 12:10 AM, Lars Torben Wilson wrote:

Hi Glen,

Works for me. IPv6 support was added in 2001. You didn't say what
version of PHP you are having this problem with, so it's hard to say
why yours doesn't have support for it. Perhaps it was configured with
--disable-ipv6 for some reason, or compiled on a system without the
necessary libraries installed (which would be somewhat surprising).


Torben



Thanks for the confirmation that it works Torben,

This is version 5.2 (Windows binaries) and according to phpinfo ipv6 is
enabled.
Hmmm well, at least I now know for sure that it works for someone else
and
I can start exploring other avenues.  I'm starting to think this is another
problem
resulting from Microsofts poor implementation of IPv6 on XP.

Glen


Hi Glen,

I suspect that you may be correct--I generally don't run Windows
(certainly not as a server) so I can't be sure; someone with more
knowledge of Windows internals will have to field that one for you.
With any luck you might find something in the user notes which leads
you to a way to solve your problem using some other function or idea.

Just for future reference, if you're having problems it will help
people to answer your questions if you specify your PHP version and OS
etc (where 'etc' means 'and all other relevant information, which of
course won't be obvious--hehe) when writing the original question. I
ain't tryin' to be some kind of netiquette freak here--just trying to
help out. :)

Anyway, good luck on your quest.


Regards,

Torben


Torben.. Indeed, after re-reading my initial post I can see I was 
lacking a little in the information department.  I appreciate your help.


Just to follow-up on this.  I installed PHP 5.3alpha as a test and the 
function does work as expected. (although there are other issues which 
preclude me from using that version at this time) I then tried 5.2.7RC4 
and the function no longer worked. So it looks like a problem with that 
version series. I suppose I should raise a bug report and see if 
anything can be done while it's still in the RC phase.


Thanks again,
Glen

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] floored by floor()

2010-10-14 Thread Glen Fuller

On 10/13/2010 10:48 PM, Mattias Thorslund wrote:

Hi List,

I'm having a problem with the behavior of the floor() function:

echo floor(327.03 * 100)."\n"; //prints "32702" and not "32703"!!

Sanity check:
var_dump(327.03 * 100); //prints "float(32703)" as expected

Any ideas why this happens, and how to work around it?

Thanks,

Mattias




Wouldn't that be equivalent to floor(32703), and since 32703 is the 
nearest integer to 32703 it returns it?


Glen Fuller


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] floored by floor()

2010-10-14 Thread Glen Fuller

On 10/14/2010 7:49 AM, chris h wrote:

floor(32703) is different then floor(327.03 * 100).  The former is an int,
while the later is a float.  Read those links that were sent :)


Chris.


On Thu, Oct 14, 2010 at 2:14 AM, Glen Fuller  wrote:


On 10/13/2010 10:48 PM, Mattias Thorslund wrote:


Hi List,

I'm having a problem with the behavior of the floor() function:

echo floor(327.03 * 100)."\n"; //prints "32702" and not "32703"!!

Sanity check:
var_dump(327.03 * 100); //prints "float(32703)" as expected

Any ideas why this happens, and how to work around it?

Thanks,

Mattias




Wouldn't that be equivalent to floor(32703), and since 32703 is the nearest
integer to 32703 it returns it?

Glen Fuller



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php







I, see - makes sense now, thank you!


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] mysql error

2005-04-01 Thread Glen Beamson
Hi,
 
I have suddenly started getting an 'unknown host' error when trying to connect 
via php (see below). 
 
Unknown MySQL Server Host 'mysql.timerescue.co.uk' (0)2005
 

I have not changed any of my hostname/username/password code in the last 6 
months and I can still connect to mysql.timerescue.co.uk via the command line 
interface.
 
Has anyone seen this before - any ideas at all - just started happening today! 
:o( 
 
My code says this:
 
// Connecting, selecting database
$link = mysql_connect("mysql.timerescue.co.uk", "username", "password")
or die('Could not connect: ' . mysql_error().mysql_errno());

Many thanks,
Glen.

Send instant messages to your online friends http://uk.messenger.yahoo.com 

[PHP] PHP MySql Extension No Loading

2005-08-26 Thread Glen Zimmerman



I am setting up Apache 2.0.54 with PHP 5.0.4 on a Windows 2000 work station 
running MySQL 4.1.12a-nt.  
When I start Apache, I receive the error message, 
"PHP Startup:  Unable to load dynamic library 
'C:\PHP\ext\php_mysql.dll'.
 

I have C:\PHP set in the environment variable path.
 
In the php.ini file I have the following set(I have tried it with both the 
final "\" included and excluded):
extension_dir = "C:\PHP\ext\"
 
I do not get an error when I try to load the php_oci8.dll.  Just for 
php_mysql.dll.
 
What am I missing?
 
 
 


RE: [PHP] PHP MySql Extension No Loading

2005-08-27 Thread Glen Zimmerman



Yes, I have the dll in the right place (C:\php\ext), and PHPIniDir is set 
to C:\php where php.ini is located.  I know that php.ini is being picked 
up, because the changes I make to the file take affect when I restart 
Apache.  PHP is loading properly as the php function, phpinfo, does display 
the proper information page when I run a test.  I just cannot get 
php_mysql.dll to load.
 
I have gone through the PHP installation documentation several times, but 
it has not made a difference.
 
I just don't know what I have over looked.  
 
 


RE: [PHP] PHP MySql Extension No Loading

2005-08-29 Thread Glen Zimmerman
No, according to the documentation, it goes into the directory pointed
to by PHPIniDir.  My php.ini file is being read properly when Apache
loads.  Its just when I have the line, extension=php_mysql.dll ,
uncommented that I receive the error.

>>> "Shaw, Chris - Accenture" <[EMAIL PROTECTED]> 08/29/2005 2:36:34 AM
>>>
I thought you had to put the php.ini in the c:\windows directory?
-----Original Message-
From: Glen Zimmerman [mailto:[EMAIL PROTECTED] 
Sent: 27 August 2005 22:39
To: php-general@lists.php.net 
Subject: RE: [PHP] PHP MySql Extension No Loading


*

This e-mail has been received by the Revenue Internet e-mail service.

*
Yes, I have the dll in the right place (C:\php\ext), and PHPIniDir is
set to C:\php where php.ini is located.  I know that php.ini is being
picked up, because the changes I make to the file take affect when I
restart Apache.  PHP is loading properly as the php function, phpinfo,
does display the proper information page when I run a test.  I just
cannot get php_mysql.dll to load.
 
I have gone through the PHP installation documentation several times,
but it has not made a difference.
 
I just don't know what I have over looked.  
 
 


This message has been delivered to the Internet by the Revenue Internet
e-mail service

*



Re: [PHP] PHP MySql Extension No Loading

2005-08-29 Thread Glen Zimmerman
Thanks, Jasper, that seems to have done the trick.  I'm not sure I
understand why it is necessary to put the dll in system32, since there is an
environment variable for the path that is pointing to c:\php.  I would seem
that it would pick up the dll through this env variable.

>>> Jasper Bryant-Greene<[EMAIL PROTECTED]> 08/29/2005 2:56:05 AM
>>>
Shaw, Chris - Accenture wrote:
> I thought you had to put the php.ini in the c:\windows directory?

Please don't top-post. He said that when he changes the php.ini file the 
changes take effect after restarting Apache, so that's not the problem. 
See my other comments below.

> -Original Message-
> From: Glen Zimmerman [mailto:[EMAIL PROTECTED] 
> Sent: 27 August 2005 22:39
> To: php-general@lists.php.net 
> Subject: RE: [PHP] PHP MySql Extension No Loading
> 
> Yes, I have the dll in the right place (C:\php\ext), and PHPIniDir is set
to
> C:\php where php.ini is located.  I know that php.ini is being picked up,
> because the changes I make to the file take affect when I restart Apache.
> PHP is loading properly as the php function, phpinfo, does display the
proper
> information page when I run a test.  I just cannot get php_mysql.dll to
load.

Have you placed the MySQL client library (libmysql.dll or something 
similar) into c:\windows\system32 ?

-- 
Jasper Bryant-Greene
Freelance web developer
http://jasper.bryant-greene.name/ 

If you find my advice useful, please consider donating to a poor
student! You can choose whatever amount you think my advice was
worth to you. http://tinyurl.com/7oa5s 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php