Re: [PHP] Strange Numeric Conversion...

2004-04-02 Thread Red Wingate
trim will not work, try something like: $id = preg_replace(/^0+(.*)$/,//1,$id); instead Monty wrote: I tried removing the zeros, but, I get the same result: $id = 11; $id = ltrim($id, '0'); echo $id; // Displays: 9 instead of 11 ??? This didn't work either:

Re: [PHP] Strange Numeric Conversion...

2004-04-02 Thread Red Wingate
sry... it's \\1 instead of //1 ... guess i had one to many beers :) Red Wingate wrote: trim will not work, try something like: $id = preg_replace(/^0+(.*)$/,//1,$id); instead Monty wrote: I tried removing the zeros, but, I get the same result: $id = 11; $id = ltrim($id, '0');

RE: [PHP] Image output (Newb question)

2004-04-02 Thread Matt Matijevich
you should have script, call it image.php or something like that, the only thing that should be in that script is this: ?php $link = mysql_connect(localhost, root, ); if ($link){ header(Content-type: image/png); $im = imagecreatefrompng(images/map/map-15x9.png);

RE: [PHP] Image output (Newb question)

2004-04-02 Thread Fidencio Monroy
This way works fine!! Thank you very much. -Original Message- From: Matt Matijevich [mailto:[EMAIL PROTECTED] Sent: Friday, April 02, 2004 2:10 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: RE: [PHP] Image output (Newb question) you should have script, call it image.php or

[PHP] Session hell: register_globals off

2004-04-02 Thread Randall Perry
Had a previous thread on this issue. Started working on it again and am running into new bugs, so thought I'd start a new thread. Read thoroughly through session examples in docs and here's how I tried to pass an object from one page to another: page 1 __ // include class definition file

Re: [PHP] Strange Numeric Conversion...

2004-04-02 Thread Monty
Thanks Red, but, still the same problem: $id = 11; $id2 = preg_replace(/^0+(.*)$/,\\1,$id); echo $id2; // Displays 9 echo $id; // Displays 9 as well. If the number begins with a zero, there seems to be no way to tell PHP this is an integer, not an octal. The

Re: [PHP] Strange Numeric Conversion...

2004-04-02 Thread Daniel Clark
Doesn't putting and x11 tell PHP it's a decimal format? $id = 11; $id2 = preg_replace(/^0+(.*)$/,\\1,$id); echo $id2; // Displays 9 echo $id; // Displays 9 as well. If the number begins with a zero, there seems to be no way to tell PHP this is an

Re: [PHP] Strange Numeric Conversion...

2004-04-02 Thread Red Wingate
hm ever tryed telling PHP to display the variable as an integer? echo (integer) $id ; -- red Daniel Clark wrote: Doesn't putting and x11 tell PHP it's a decimal format? $id = 11; $id2 = preg_replace(/^0+(.*)$/,\\1,$id); echo $id2; // Displays 9 echo $id;

Re: [PHP] Strange Numeric Conversion...

2004-04-02 Thread Daniel Clark
Found this: $a = 1234; # decimal number $a = -123; # a negative number $a = 0123; # octal number (equivalent to 83 decimal) $a = 0x1A; # hexadecimal number (equivalent to 26 decimal) http://www.phpbuilder.com/manual/language.types.integer.php#language.types.integer.casting hm ever tryed

Re: [PHP] Strange Numeric Conversion...

2004-04-02 Thread Curt Zirzow
* Thus wrote Daniel Clark ([EMAIL PROTECTED]): Found this: $a = 1234; # decimal number $a = -123; # a negative number $a = 0123; # octal number (equivalent to 83 decimal) $a = 0x1A; # hexadecimal number (equivalent to 26 decimal) $a is integer in all these cases, the only difference is the

Re: [PHP] Strange Numeric Conversion...

2004-04-02 Thread Curt Zirzow
* Thus wrote Monty ([EMAIL PROTECTED]): I tried removing the zeros, but, I get the same result: $id = 11; $id = ltrim($id, '0'); echo $id; // Displays: 9 instead of 11 ??? This didn't work either: $id = 11; settype($id, 'string'); $id

Re: [PHP] Strange Numeric Conversion...

2004-04-02 Thread John Holmes
Red Wingate wrote: ever tryed telling PHP to display the variable as an integer? echo (integer) $id ; Ever tryed realizing 0x09, 011, and 9 are all integers (just different bases)? ;) ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] Strange Numeric Conversion...

2004-04-02 Thread John Holmes
Monty wrote: Thanks Red, but, still the same problem: $id = 11; $id2 = preg_replace(/^0+(.*)$/,\\1,$id); echo $id2; // Displays 9 echo $id; // Displays 9 as well. If the number begins with a zero, there seems to be no way to tell PHP this is an integer, not an

[PHP] $this variable reference question

2004-04-02 Thread Adam Reiswig
I was trying to bend my mind around the concept of the reference operator () today and came across an article at http://www.onlamp.com/pub/a/php/2002/09/12/php_foundations.html where the author gave the following example: ?php class test { function test($val) { global

[PHP] Directories function opendir() - how to open an URL

2004-04-02 Thread Dave
The Directories function opendir(string path) As of PHP 4.3.0 path can also be any URL which supports directory listing This returns false eventhough the URL supports directory listing? opendir (http://www.fu.bar/images/); -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

Re: [PHP] Directories function opendir() - how to open an URL

2004-04-02 Thread Curt Zirzow
* Thus wrote Dave ([EMAIL PROTECTED]): The Directories function opendir(string path) As of PHP 4.3.0 path can also be any URL which supports directory listing , however only the file:// URL wrapper supports this in PHP 4.3. As of PHP 5.0.0, support for the ftp:// URL wrapper is included as

[PHP] Re: problem about php

2004-04-02 Thread Jason Barnett
the browser always shows like this: brbFatal error/b: Call to undefined function: domxml_open_mem() in bc:\apache\htdocs\svg_dom_xml_php_bsp.php/b on line b76/bbr. What is wrong here? In php 4 the dom xml extension is NOT loaded by default. So you can't just call these functions until you

Re: [PHP] Directories function opendir() - how to open an URL

2004-04-02 Thread Dave
Is http:// URL wrapper support included in PHP 4.3.4 ? or is this included in PHP 5.0.0? Curt Zirzow [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] * Thus wrote Dave ([EMAIL PROTECTED]): The Directories function opendir(string path) As of PHP 4.3.0 path can also be any URL which

[PHP] opening cash register drawer

2004-04-02 Thread Leonard B Burton
Greetings, I am working on a Point of Sale Program for PHP. I need to find out how to open a cash register drawer. Could anyone give me any info? Do I need to do this with a javascript section? Thanks, Leonard Burton -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

Re: [PHP] Directories function opendir() - how to open an URL

2004-04-02 Thread Curt Zirzow
* Thus wrote Dave ([EMAIL PROTECTED]): Is http:// URL wrapper support included in PHP 4.3.4 ? or is this included in PHP 5.0.0? I wouldn't expect the http wrapper to ever support opendir functionality. Its virtually impossilble to read directoy listings from a web server. Curt Zirzow

[PHP] Re: $this variable reference question

2004-04-02 Thread Jason Barnett
It's not the same thing. When an variable references an object then you can change either the original object or the new variable and you will be changing the *same* object, not a new one. Maybe this example helps? ?php class test { function test($val) { global

[PHP] Re: $this variable reference question

2004-04-02 Thread Jason Barnett
My question is actually regarding the line $myref = $this;. The author states that this is a reference to the class/object itself. Isn't this like saying outside the class $myref = new test;? What would be the point of referring to itself inside the class in this manner? Thanks for your

[PHP] Re: Session hell: register_globals off

2004-04-02 Thread Jason Barnett
page 1 __ // include class definition file include_once order_classes.php; // start session session_start(); // create instance of class Order $order = New Order(); // assign class instance to $SESSION[] $_SESSION['order'] = $order; page 2 __ // include class definition file include_once

[PHP] Re: Why does session ID sometimes show appeneded to url and sometimes not?

2004-04-02 Thread Jason Barnett
Boot wrote: Thanks to those who helped with my last post on session vars. My question now is why does my server seem to randomly choose whether or not to show the session ID appended to the browser URL? Sometimes it is there, sometimes not. All pages session_start();. Thanks! Check your

[PHP] Re: opening cash register drawer

2004-04-02 Thread Jason Barnett
You probably need to check out OPOS, but I haven't looked at it in a while and can't really tell you what to do. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] opening cash register drawer

2004-04-02 Thread Raditha Dissanayake
Leonard B Burton wrote: Greetings, I am working on a Point of Sale Program for PHP. I need to find out how to open a cash register drawer. Could anyone give me any info? Do I need to do this with a javascript section? You will be hard pressed to do anything like this with php. the reason

Re: [PHP] Re: Session hell: register_globals off

2004-04-02 Thread Randall Perry
on 4/2/04 8:24 PM, Jason Barnett at [EMAIL PROTECTED] wrote: Are you passing the session id between the pages? E.g. are you setting session cookies, or passing the session id as part of the url? Doesn't php default to using cookies? I'm not doing anything other than using the code I showed.

Re: [PHP] opening cash register drawer

2004-04-02 Thread John Holmes
Leonard B Burton wrote: I am working on a Point of Sale Program for PHP. I need to find out how to open a cash register drawer. Could anyone give me any info? Do I need to do this with a javascript section? Uhmm... I to am interested in PHP scripts that open cash register drawers. Yeah...

Re: [PHP] opening cash register drawer

2004-04-02 Thread Robert Cummings
On Fri, 2004-04-02 at 20:40, Raditha Dissanayake wrote: Leonard B Burton wrote: Greetings, I am working on a Point of Sale Program for PHP. I need to find out how to open a cash register drawer. Could anyone give me any info? Do I need to do this with a javascript section? You

[PHP] Re: How to retrieve dir file list from an internet server folder?

2004-04-02 Thread Aidan Lister
Yes, you'll need to parse the output of the page. Dave [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Is it possible to retrieve dir file list from an internet server folder from within a php program? In the browser, the http:// page displays Index of and a list of files. -- PHP

Re: [PHP] Re: Session hell: register_globals off

2004-04-02 Thread Jason Barnett
Randall Perry wrote: on 4/2/04 8:24 PM, Jason Barnett at [EMAIL PROTECTED] wrote: Are you passing the session id between the pages? E.g. are you setting session cookies, or passing the session id as part of the url? Doesn't php default to using cookies? I'm not doing anything other than using

Re: [PHP] Re: $this variable reference question

2004-04-02 Thread Adam Reiswig
Jason, thanks. Yes, I understand your example here very well. My question actually had more to do with understanding what value was added to the class by $myref = $this;. Perhaps it is some misunderstanding I have of classes but, since a class is just a pattern and not an actual, usable

Re: [PHP] Global $_FILEs

2004-04-02 Thread Jason Wong
On Saturday 03 April 2004 05:50, Bruno Santos wrote: i've tried to pass the global array $_FILES to a function $_FILES is a superglobal and hence available everywhere (including the inside of functions) without any work on your part. but still no sucess... Please elaborate. can someone

Re: [PHP] Problem sending with mail()

2004-04-02 Thread Jason Wong
On Saturday 03 April 2004 03:35, Matt MacLeod wrote: I'm stumped. I have a script to send a simple email using the mail() function in PHP. For some reason I can only receive the email if I send it to my hotmail account. If I send to my regular email ([EMAIL PROTECTED]) I can't get it. I've

Re: [PHP] php email functionality

2004-04-02 Thread Jason Wong
On Saturday 03 April 2004 00:59, Shawn Beard wrote: I just tried downgrading to version 4.3.4 and it still does not work. And presumably it had worked before you did the upgrade? The tone of your original post suggested that the upgrade broke the mail functionality? Again: Are you positive

Re: [PHP] I can't view files uploaded with PHP

2004-04-02 Thread Jason Wong
On Saturday 03 April 2004 03:04, Linux Zero wrote: I write some PHP scripts for a system's module that allows the user to upload a file from his computer to the host. It works fine in a server with Linux Apache MySQL PHP (LAMP) environment. I based on the examples of this page:

Re: [PHP] Apache version... 1.3.29 vs 2.0.

2004-04-02 Thread Jason Wong
On Saturday 03 April 2004 01:28, Chris Shiflett wrote: --- Frano ILICIC [EMAIL PROTECTED] wrote: I just wonder what is the best apache version to run PHP 4.35? Just wondering if there is an obvious choice? Maybe not obvious, but I think the best choice is the latest Apache 1.3.x. But

[PHP] Re: Relative Url

2004-04-02 Thread K.Bogac Bokeer
I'm using this on Apache. You need to include 'inc/globals.php' in your script. inc/globals.php ? require_once('functions.php'); define('RELPATH', GetRelativePath()); ? inc/functions.php function GetRelativePath() { $RELPATH = str_replace(UpDirectory(__FILE__), '',

Re: [PHP] Configuration Variable user_agent

2004-04-02 Thread Burhan Khalid
Bernhard Kraft wrote: Hallo ! I run PHP 4.1.2. I want to set the user_agent which gets sent along when fetching file via the fopen(...) call. Normally this is PHP/VERISON in my case PHP/4.1.2 I want to set a different user_agent. I *believe* you can set this via header(), but its still early

Re: [PHP] php email functionality

2004-04-02 Thread Burhan Khalid
Shawn Beard wrote: I just upgraded to PHP 4.3.5 and now my email functionality does not work. I do have the SMTP setting in the php.ini set up and did restart Apache. We are running a Windows 2000 server and Apache 2.0.49. Any ideas? A few ideas/suggestions : Does your smtp server require

<    1   2