[PHP] Plotting Data Graphics

2002-12-23 Thread Alexandre Soares
Hi All,

Where I can get more information about a free library to plot 2d and
3d data information,

Thanks


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.427 / Virus Database: 240 - Release Date: 12/6/2002


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




[PHP] ¡¾help¡¿how can I put the pull down menu in a frame and display.....

2002-12-23 Thread dreamyman
1.I want to put my menu in a top frame and when I select a Item ,it can
display it in the frame below.

2.my web has 2 frame ,lefe and right.
but the right has a menu ,so I want to change left frame when select
different menu of left frame.



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




[PHP] Creating Extensions DLL with Delphi

2002-12-23 Thread Andreas Steibl
Don't know if this is the right place to ask this.

I need to write a little extensions DLL in Delphi for PHP where can i find
inforamtion for this ?

thanxs in advance
snoopy


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




Re: [PHP] $_COOKIE and include() or require()

2002-12-23 Thread Chris Wesley
On Mon, 23 Dec 2002, Luke Sneeringer wrote:

 However, then in the script I have a require tag (essentially like
 require('http://www.mydomain.com/common.php')) line. I call this line,
 and within that file (same domain) the $_COOKIE[] array as well as
 variables such as $cookiename are all blank. I cannot figure out for the
 life of me why this is occuring.

The most likely scenario is that common.php is being processed by the web
server  PHP before being included into your code.  This would be causing
a second HTTP request from your web server to your web server for the
included code ... there are no cookies on the HTTP request for the
included code, /and/ the variables available to the parent are not
available to the included code.  You effectivly get the output of
common.php, not included code.

Try this:
- copy common.php to common.inc (or some other extension that your web
  server is not configured to hand off to be parsed by PHP).
- in the parent code, include() the common.inc URL instead of the
  common.php URL.

Let us know if that helps or not.

g.luck,
~Chris



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




Re: [PHP] Plotting Data Graphics

2002-12-23 Thread Chris Wesley
On Mon, 23 Dec 2002, Alexandre Soares wrote:

 Where I can get more information about a free library to plot 2d and
 3d data information,

Check out phpclasses.org.  A quick search for graph returned 10 classes.
Another 3 for plot.  One may work out for you, or lead to something else
more helpful.

g.luck,
~Chris


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




Re: [PHP] ¡¾help¡¿how can I put the pull down menu in a frame and display.....

2002-12-23 Thread Chris Wesley
On Wed, 18 Dec 2002, dreamyman wrote:

 1.I want to put my menu in a top frame and when I select a Item ,it can
 display it in the frame below.
 2.my web has 2 frame ,lefe and right.
 but the right has a menu ,so I want to change left frame when select
 different menu of left frame.

HTML questions.  You'll be interested in the HTML spec, specifically:
Frames: http://www.w3.org/TR/html4/present/frames.html
http://www.w3.org/TR/html4/present/frames.html#adef-target
Links:  http://www.w3.org/TR/html4/struct/links.html

In both of your examples, you need to put a target on your anchors as
specified by the HTML spec in the section about frames.

g.luck,
~Chris


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




Re: [PHP] $_COOKIE and include() or require()

2002-12-23 Thread Luke Sneeringer
  That doesn't seem to work. This might be because my require tags also 
send variables (e.g. common.php?variable=1)--would this make a call to 
a non-PHP extention file fail?
What happens is that the calls seem to produce no output (but they don't 
fail). In other words, require() returns true, but the data that I 
wanted common.php to display doesn't end up being displayed.

As to whether common.inc was able to actually receive the cookies, I 
haven't the foggiest idea, and there's no way to tell if I can't get it 
to output anything.

Thanks,
Luke

Chris Wesley wrote:

On Mon, 23 Dec 2002, Luke Sneeringer wrote:

 

However, then in the script I have a require tag (essentially like
require('http://www.mydomain.com/common.php')) line. I call this line,
and within that file (same domain) the $_COOKIE[] array as well as
variables such as $cookiename are all blank. I cannot figure out for the
life of me why this is occuring.
   


The most likely scenario is that common.php is being processed by the web
server  PHP before being included into your code.  This would be causing
a second HTTP request from your web server to your web server for the
included code ... there are no cookies on the HTTP request for the
included code, /and/ the variables available to the parent are not
available to the included code.  You effectivly get the output of
common.php, not included code.

Try this:
- copy common.php to common.inc (or some other extension that your web
 server is not configured to hand off to be parsed by PHP).
- in the parent code, include() the common.inc URL instead of the
 common.php URL.

Let us know if that helps or not.

	g.luck,
	~Chris






Re: [PHP] How to generate thumbnail ?

2002-12-23 Thread Gil Disatnik
Use convert (a part of ImageMagic), it's almost a standard on any unix 
machine and if not you can always compile it even as a user on a shared server.

At 03:38 AM 12/23/2002 +0800, j wrote:
Hi all ,

i want to generate the thumbnail of an image but I want my php to be
portable. So how can I generate thumbnail without depending on php host
configuration (like --with-gd) ?

Thanks .

Perseus



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



Regards

Gil Disatnik
UNIX system/security administrator.

GibsonLP@EFnet
http://www.disatnik.com
_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
Windows NT has detected mouse movement, you MUST restart
your computer before the new settings will take effect, [ OK ]

Windows is a 32 bit patch to a 16 bit GUI based on a 8 bit operating
system, written for a 4 bit processor by a 2 bit company which can
not stand 1 bit of competition.
-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_- 


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



[PHP] Error loading PHP module in Apache 2

2002-12-23 Thread Andrew Schaefer
I have compiled and installed both the newest versions of Apache and PHP
with support for modules so I can use PHP with Apache.  When I try to start
the Apache server I get an error which reads.

Syntax error on line 230 of /usr/local/apache2/conf/httpd.conf:
Cannot load /usr/local/apache2/modules/libphp4.so into server:
/usr/local/apache2/modules/libphp4.so: undefined symbol: __dn_expand

I have no idea why it is doing this.  Please, any help would be much
appreciated.  Thank you.

Andrew



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




Re: [PHP] $_COOKIE and include() or require()

2002-12-23 Thread Chris Wesley
On Mon, 23 Dec 2002, Luke Sneeringer wrote:

 That doesn't seem to work. This might be because my require tags also
 send variables (e.g. common.php?variable=1)--would this make a call to
 a non-PHP extention file fail?

You've already demonstrated that you know included code inherits the
parent's variables at the scope where require() is called ... so I'll
leave it up to you to determine whether or not the ?variable=1 is
necessary.  I dont' know if it breaks require(), but I doubt it.

Here's the trick:  visit the URL of the require()'d code with a web
browser.  If you don't see /code/, then your require() won't work.  If you
do see the php code ... all of it, including the start  end tags ...  in
plain text, then you're on the right track; your code should be able to be
included into the parent.

You're trying to include /code/ into some parent code, so you don't want
the processed result of the PHP script (unless it's more PHP code).

If this doesn't get you closer, post a simple example of what you're
trying to do.  I routinely include PHP across domains for various reasons
... I know it works, and works well ... it will for you too, I hope!

hth,
~Chris


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




Re: [PHP] Is __FILE__ still current or is there something newer?

2002-12-23 Thread Rick Widmer
At 03:05 PM 12/22/02 +, z z wrote:


__FILE__ is useful to know the current script's path


__FILE__ is a 'constant' defined by the Zend Engine that tells you the name 
of the current file.  If you are in an Include the name of the included 
file is returned, if you are in the main file its name is returned.  This 
is commonly used in creating error messages.

 What is the cleanest and self-contained way to do a
 relative include from an included file which might
 not be in the same directory as its parent?

Put the files in a directory named in the include_path such that you don't 
have to mess with any kind of path information within the programs.  That's 
what it is there for.

If you have to move the include files which would you rather do:

  a) change the include_path in php.ini, httpd.conf, or .htaccess.

  b) edit every file in the project to change the path.


I have a group of common include files most of my sites use, and another 
group of files for each domain.  The include path for each web sites is set 
in the webserver configuration, and looks like this:

VirtualHost www.somedomain.com
...
php_value include_path /web/lib:/web/hosts/www.somedomain.com/lib:.
/VirtualHost


You can group files into directories under the include_path to keep related 
include files together.

  include( 'category/program.inc' );

will search every directory in the include path for a subdirectory named 
'category' containing a file 'program.inc' to include.  Very handy!


Rick


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



Re: [PHP] Plotting Data Graphics

2002-12-23 Thread Rick Widmer
At 03:06 AM 12/23/02 -0200, Alexandre Soares wrote:

Hi All,

Where I can get more information about a free library to plot 2d and
3d data information,


   http://www.aditus.nu/jpgraph/

Rick


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




[PHP] preg_replace question

2002-12-23 Thread electroteque
yet another regex question how could i hange the value within the quotes
with preg_replace

php_value upload_max_filesize 5M



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




[PHP] Preperation for News CMS?

2002-12-23 Thread Steve Jackson
Hi all,

I am about to write a CMS for a news section which I'll also adjust so
that I can use for pages across the entire site. People should be
allowed to edit/add/delete/archive/preview and upload pictures to a
maximum of say five. My 1st question is does anyone know of some Open
Source software which might save me some time? 

Also what would you suggest the best way is to add pictures to an
article? I can upload 1 picture giving it the same ID as the news
article but what if there are 2/3/4 etc? how would you go about this?
Then there is the problem of where to put it in the article, I was
thinking about uploading the picture and then putting the html in the
form text box with the rest of the article for the user to move around
as needed but does anyone have any better ideas? (it might scare some
users so does anyone have something simpler?) Also what's the best way
to set-up a preview function? I was thinking that I should add checkbox
which makes the article live so that the user could preview the page
first from a link but is there any better way to do it?

Thanks for your help.

Steve Jackson
Web Developer
Viola Systems Ltd.
http://www.violasystems.com
[EMAIL PROTECTED]
Mobile +358 50 343 5159


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




Re: [PHP] $_COOKIE and include() or require()

2002-12-23 Thread Jason Wong
On Monday 23 December 2002 15:19, Luke Sneeringer wrote:
 I have a question regarding the use of the $_COOKIE autoglobal and
 include() or require() tags.

 I have a script (index.php) which gets cookie variables. This works
 fine, and the cookies are accessable through both $_COOKIE[cookiename]
 and $cookiename.
 However, then in the script I have a require tag (essentially like
 require('http://www.mydomain.com/common.php')) line. 

Is common.php on the same server as index.php? If so, then (unless you have 
special reasons otherwise), you should NOT be including via URL but via the 
local filesystem:

  include('local/filesystem/path/to/common.php');

What does common.php do anyway? There is a whole world of difference between 
including a file via URL and via filesystem. 

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *

/*
There is never time to do it right, but always time to do it over.
*/


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




Re: [PHP] Plotting Data Graphics

2002-12-23 Thread Jason Wong
On Monday 23 December 2002 13:06, Alexandre Soares wrote:
 Hi All,

 Where I can get more information about a free library to plot 2d
 and 3d data information,

google for jpgraph

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *

/*
We warn the reader in advance that the proof presented here depends on a
clever but highly unmotivated trick.
-- Howard Anton, Elementary Linear Algebra
*/


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




Re: [PHP] preg_replace question

2002-12-23 Thread Jason Wong
On Monday 23 December 2002 18:34, electroteque wrote:
 yet another regex question how could i hange the value within the quotes
 with preg_replace

 php_value upload_max_filesize 5M

If php_value upload_max_filesize  is fixed then there is no need to use 
preg_replace. Just use a simple substr_replace() or similar.

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *

/*
She ran the gamut of emotions from 'A' to 'B'.
-- Dorothy Parker, on a Kate Hepburn performance
*/


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




Re: [PHP] Flushing image from database to browser - how to get itcached??

2002-12-23 Thread Dries Verachtert
Hello,

I think you have two possibilities:

* use session_cache_limiter() : you can find the explanation at
http://www.php.net/manual/en/function.session-cache-limiter.php 
I guess you need the 'public' setting.

* Add the headers yourself: for example at
http://www.php.net/manual/en/function.header.php you can find the
headers which are sent to not cache the page. You can add the headers
which tell the browser to cache the page.

To be honest: it doesn't always work here.. for some reason, IE
sometimes still refuses to cache certain pages.

Kind regards,
Dries Verachtert

On Mon, 2002-12-23 at 08:35, Tim Molendijk wrote:
 Hi all,
 
 I'm storing a bunch of images in a MySQL database. I use a small PHP script
 to load the appropriate image from database and flush it to the browser.
 Because this script flushes in content-type image/jpeg (or similar) it can
 be used as IMG SRC. So images can be shown on a webpage using the following
 HTML: IMG SRC=image.php?id=2
 
 This works perfectly fine but the browser (IE) does not cache these images.
 On one hand I do understand why -- the image source is a script, not a
 static image file, so the browser qualifies the resulting content as
 dynamic. On the other hand though: in my setup image.php?id=1 is (as good
 as) eternally the same image and for image.php?id=2, image.php?id=3, etc.
 the same thing. So it would be no problem if the browser would cache f.e.
 image.php?id=1 as if it is a static image. It would even be desirable
 because it saves bandwidth.
 
 So actually the issue is: how can I get browser to cache image.php?id=1 (...
 etc.) just as it caches image1.jpg (... etc.)?? The only thing I've thought
 of is using mod_rewrite to rewrite URI's like image1.jpg into image.php?id=1
 but I haven't tried it yet -- don't know if it's a logical idea.
 
 Thanks in advance,
 Tim Molendijk
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



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




[PHP] LDAP support...

2002-12-23 Thread Peter Lavender
Hi everyone

Quick question:

I'm running debian and have apt-get php and openldap.  openldap works,
as does php.  I'm now working with the ldap functions and here is where
I'm stuck.

I can see from phpinfo() that ldap has been compiled in:

'--with-ldap=shared,/usr'

My problem is the following error on ldap_connect();

undefined function: ldap_connect()

So where do I look now?  

Will I need to get the source and compile it?

Thanks,

Pete



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




Re: [PHP] LDAP support...

2002-12-23 Thread Peter Lavender
OK this is lame, but I'm posting a reply straight after the message hits
my box...

 I'm running debian and have apt-get php and openldap.  openldap works,
 as does php.  I'm now working with the ldap functions and here is where
 I'm stuck.


apt-cache search php4

what turns up?

php4-ldap

I've installed the package, restarted apache but still not joy.. :(

Pete



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




[PHP] PHP scripts use/get passed root's environment?

2002-12-23 Thread Terrence Koeman
PHP 4.2.3 on Apache 1.3.27 on FreeBSD 4.7-STABLE; 
Apache runs with uid/gid 80/80 and php is loaded as module.

For some reason all PHP scripts on my box run in root's environment
instead of one created by apache. 

This is the environment section from phpinfo:
http://ra.phid.ae/phpinfo.html 

And I guess it should look like this: http://ra.phid.ae/phpinfo2.html 

The issue remains if I rename the php.ini to something else to get the
default values and restart apache.

CGI scripts (perl) have the right environment, so i'm pretty sure it's
a PHP thing. 

Any ideas? Thanks in advance.

-- 
Regards,

Terrence Koeman

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




RE: [PHP] Re: fgets() question?

2002-12-23 Thread Ford, Mike [LSS]
 -Original Message-
 From: Noel Wade [mailto:[EMAIL PROTECTED]]
 Sent: 22 December 2002 09:44
 
  A blank line should return the newline (\n or \r\n), 
 according to
  http://www.php.net/manual/en/function.fgets.php. Also try 
 using '===' (3 =
  signs) as the operator, which enforces type checking on a 
 comparison).
 
 Yes or no:
 
 $foo == FALSE === 0;

Erm -- no, I think.  At any rate, FALSE===0 is false!  Is that what you meant?

 
 Right now I'm just doing
 
 if($foo)
 
 And \n seems to equate to FALSE with this sort of conditional /
 comparison...

Well, it shouldn't, so I'm beginning to suspect that your $foo doesn't contain what 
you think it does.  According to the PHP manual, 'the following values are considered 
FALSE: the boolean FALSE itself; the integer 0 (zero); the float 0.0 (zero); the empty 
string, and the string 0; an array with zero elements; an object with zero member 
variables; the special type NULL (including unset variables)'.

As \n is none of those, it should be ==TRUE (but, of course, !==TRUE).

Cheers!

Mike

-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning  Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211 

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




Re: [PHP] Flushing image from database to browser - how to get itcached??

2002-12-23 Thread Justin French
image.php needs to send appropriate headers for caching... of course, i have
no idea what they are, because i've never done dynamic images :)  don't
*think* mod rewrite will affect/help anything here.

Justin


on 23/12/02 6:35 PM, Tim Molendijk ([EMAIL PROTECTED]) wrote:

 Hi all,
 
 I'm storing a bunch of images in a MySQL database. I use a small PHP script
 to load the appropriate image from database and flush it to the browser.
 Because this script flushes in content-type image/jpeg (or similar) it can
 be used as IMG SRC. So images can be shown on a webpage using the following
 HTML: IMG SRC=image.php?id=2
 
 This works perfectly fine but the browser (IE) does not cache these images.
 On one hand I do understand why -- the image source is a script, not a
 static image file, so the browser qualifies the resulting content as
 dynamic. On the other hand though: in my setup image.php?id=1 is (as good
 as) eternally the same image and for image.php?id=2, image.php?id=3, etc.
 the same thing. So it would be no problem if the browser would cache f.e.
 image.php?id=1 as if it is a static image. It would even be desirable
 because it saves bandwidth.
 
 So actually the issue is: how can I get browser to cache image.php?id=1 (...
 etc.) just as it caches image1.jpg (... etc.)?? The only thing I've thought
 of is using mod_rewrite to rewrite URI's like image1.jpg into image.php?id=1
 but I haven't tried it yet -- don't know if it's a logical idea.
 
 Thanks in advance,
 Tim Molendijk
 
 


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




RE: [PHP] upload_max_filesize + ini_set

2002-12-23 Thread Ford, Mike [LSS]
 -Original Message-
 From: electroteque [mailto:[EMAIL PROTECTED]]
 Sent: 20 December 2002 19:34
 
 and i just tested the script and it let me upload a 2.5M 
 file.

Well, I was just quoting from the manual, so that sounds worthy of a bug
report in itself -- either the manual is wrong, or the behaviour of PHP is!

   so there must
 be a way to put it in the page aswell

No, there mustn't -- this I am sure about.  As I said before:

 As all file upload activity takes place before 
 your script even *starts* executing, you can't use
 ini_set on this [upload_max_filesize].

Cheers!

Mike

-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning  Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211 


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




Re: [PHP] Thumbnail generation

2002-12-23 Thread 1LT John W. Holmes
 i want to generate the thumbnail of an image but I want my php to be
 portable. How can I generate thumbnail without depending on php host
 configuration (like --with-gd) ?

Along with the othe suggestions, Netpbm is something that you can package up
with your application so that you are always sure it's available to it.

http://netpbm.sourceforge.net/

Better yet, take the time to write an Image Abstraction Layer that'll
function just like a Database Abstraction Layer. You use the same functions
no matter what and depending on the config, either GD, Imagemagik, Netpbm,
or whatever is used to do the dirty work.

Does anyone know of such a project or want to write one?

---John Holmes...


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




[PHP] calendar solution for workgroups ???

2002-12-23 Thread Tariq Murtaza
Hi all,
I am looking for a good calendar system for a group of people. (PHP /Mysql)
any idea??

Help/Comments will be appreciated.

Tariq Murtaza



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




[PHP] php-java formatting

2002-12-23 Thread Edward Peloke
Hello all,

I am using a javascript alert box in one of my php pages to tell the user
they didn't fill out all the required fields.  As I check each field, if it
is blank I am adding to the alert string:

$alertstring=Missing Mandatory Fields;
 if ($fname==''){
  $alertstring=$alertstring.First Name;
}

  etc

I am then out putting the code with prints.

?  Print script alert('$alertstring') /script;

This all works fine except I want each empty field of the alert box to be on
it's own line.  I try adding \n to the lines of the alert string but it
prints out the \n.  How can I format this string so that it shows correctly
in the alert box?

Thanks,
Eddie


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




[PHP] md5()

2002-12-23 Thread Edward Peloke
I don't want to store my users passwords in the db as clear text so I know I
can use md5().  But, what do I do when a user has forgotten his/her password
and I need to send it to them?  Can I reverse md5()?

Thanks,
Eddie


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




Re: [PHP] md5()

2002-12-23 Thread Justin French
You reset the password to something new... either manually (a person) or
with a self-help script.

md5 is one way encryption.


Justin


on 24/12/02 12:38 AM, Edward Peloke ([EMAIL PROTECTED]) wrote:

 I don't want to store my users passwords in the db as clear text so I know I
 can use md5().  But, what do I do when a user has forgotten his/her password
 and I need to send it to them?  Can I reverse md5()?
 
 Thanks,
 Eddie
 


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




Re: [PHP] php-java formatting

2002-12-23 Thread 1LT John W. Holmes
 I am using a javascript alert box in one of my php pages to tell the user
 they didn't fill out all the required fields.  As I check each field, if
it
 is blank I am adding to the alert string:

 $alertstring=Missing Mandatory Fields;
  if ($fname==''){
   $alertstring=$alertstring.First Name;
 }

   etc

 I am then out putting the code with prints.

 ?  Print script alert('$alertstring') /script;

 This all works fine except I want each empty field of the alert box to be
on
 it's own line.  I try adding \n to the lines of the alert string but it
 prints out the \n.  How can I format this string so that it shows
correctly
 in the alert box?

Try using br, maybe, or ask on a Javascript list.

---John Holmes...


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




Re: [PHP] LDAP support...

2002-12-23 Thread michael kimsal
Peter Lavender wrote:

OK this is lame, but I'm posting a reply straight after the message hits
my box...



I'm running debian and have apt-get php and openldap.  openldap works,
as does php.  I'm now working with the ldap functions and here is where
I'm stuck.




apt-cache search php4

what turns up?

php4-ldap

I've installed the package, restarted apache but still not joy.. :(

Pete




I'd suggest posting this to a debian group as well - perhaps first
next time if there's another problem.  They don't like people
dispelling the 'apt-get install solves it all' myth in non-debian
circles.  :)



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




Re: [PHP] cookies

2002-12-23 Thread Krzysztof Dziekiewicz
 The only problem is once the cookie is set, it never seems to go away.  This
 one should have expired in 30 minutes right?  I can still go in and get to
 the other pages without it telling me to log in.  What did I do wrong?

Mayby your pages are cached.
Do you send no-cache headers ?


-- 
Krzysztof Dziekiewicz


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




Re: [PHP] md5()

2002-12-23 Thread Chris Hewitt
Edward Peloke wrote:


I don't want to store my users passwords in the db as clear text so I know I
can use md5().  But, what do I do when a user has forgotten his/her password
and I need to send it to them?  Can I reverse md5()?


No. You send them a new password. Ideally, the only person who should 
know the unencrypted user's password is the user themselves.

HTH
Chris



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



Re: [PHP] md5()

2002-12-23 Thread Johannes Schlueter
On Monday 23 December 2002 14:38, Edward Peloke wrote:
 [...]  Can I reverse md5()?

No. You could only send the user a new password wich must be activated.

johannes

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




RE: [PHP] md5()

2002-12-23 Thread Edward Peloke
Thanks Johannes and Chris!  That is what I will do.

Eddie 

-Original Message-
From: Johannes Schlueter [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 23, 2002 8:36 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: [PHP] md5()


On Monday 23 December 2002 14:38, Edward Peloke wrote:
 [...]  Can I reverse md5()?

No. You could only send the user a new password wich must be activated.

johannes

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




[PHP] Re: calendar solution for workgroups ???

2002-12-23 Thread Jan Schneider
Tariq Murtaza wrote:

Hi all,
I am looking for a good calendar system for a group of people. (PHP /Mysql)
any idea??

Help/Comments will be appreciated.


Try http://www.horde.org/kronolith/

The newest version from CVS supports shared calendars and a fine 
granulated permission system based on users/groups.

Jan.


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



Re: [PHP] php-java formatting

2002-12-23 Thread Krzysztof Dziekiewicz
 This all works fine except I want each empty field of the alert box to be on
 it's own line.  I try adding \n to the lines of the alert string but it
 prints out the \n.  How can I format this string so that it shows correctly
 in the alert box?

Just you use '\n' but you have to do something wrong. Look this:

$x = 'Fill fields:\nfirstname\nsurname\nfirm';
echo script alert('$x'); /script;

On the screen you get:
Fill fields:
firstname
surname
firm


It works in Netscape and Internet Explorer.

-- 
Krzysztof Dziekiewicz


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




Re: [PHP] Thumbnail generation

2002-12-23 Thread Mika Tuupola
On Mon, 23 Dec 2002, 1LT John W. Holmes wrote:

 Better yet, take the time to write an Image Abstraction Layer that'll
 function just like a Database Abstraction Layer. You use the same functions
 no matter what and depending on the config, either GD, Imagemagik, Netpbm,
 or whatever is used to do the dirty work.
 
 Does anyone know of such a project or want to write one?

Image_Transform in PEAR:

http://pear.php.net/package-info.php?pacid=83

-- 
Mika Tuupola  http://www.appelsiini.net/~tuupola/


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




[PHP] php.exe without console window

2002-12-23 Thread Alexander Kuznetsov
Hello All,

I know that in PHP-GTK development there is gtk-launcher php_gtk wich
runs php-gtk scripts without terminal window. Is something like it for
usually php.exe?

I mean I was to execute php.exe from other application and don't want
to see that ugly terminal window...

-- 
Best regards,
Alexander Kuznetsov



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




[PHP] how to specify dimensions of opened window?

2002-12-23 Thread Jody Cleveland
Hello,

I'm wondering, without the use of javascript, how to specify browser
parameters for pop up windows. Such as window size and whether there's a
toolbar. This would be for a popup when users would click on a link.

Is this possible?

-Jody Cleveland

Winnefox Library System
Computer Support Specialist
[EMAIL PROTECTED]

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




Re: [PHP] how to specify dimensions of opened window?

2002-12-23 Thread Rick Emery
Can't do this with PHP, which is server-side.  You can, however, use PHP to generate
JavaScript that will set the window parameters when executed.

- Original Message -
From: Jody Cleveland [EMAIL PROTECTED]
To: Php-General (E-mail) [EMAIL PROTECTED]
Sent: Monday, December 23, 2002 8:19 AM
Subject: [PHP] how to specify dimensions of opened window?


 Hello,

 I'm wondering, without the use of javascript, how to specify browser
 parameters for pop up windows. Such as window size and whether there's a
 toolbar. This would be for a popup when users would click on a link.

 Is this possible?

 -Jody Cleveland

 Winnefox Library System
 Computer Support Specialist
 [EMAIL PROTECTED]

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




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




RE: [PHP] how to specify dimensions of opened window?

2002-12-23 Thread Jody Cleveland
 You can, however, use PHP to generate
 JavaScript that will set the window parameters when executed.

How would I do that?

Jody

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




Re: [PHP] how to specify dimensions of opened window?

2002-12-23 Thread Rick Emery
Use PHP print/echo statements to create the JavaScript code, just as you would HTML 
code.

- Original Message -
From: Jody Cleveland [EMAIL PROTECTED]
To: 'Rick Emery' [EMAIL PROTECTED]; Php-General (E-mail)
[EMAIL PROTECTED]
Sent: Monday, December 23, 2002 8:41 AM
Subject: RE: [PHP] how to specify dimensions of opened window?


  You can, however, use PHP to generate
  JavaScript that will set the window parameters when executed.

 How would I do that?

 Jody



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




[PHP] Configuring printer output for a POS printer -- Admin Configuring Printer Drivers or a Select Driver Menu

2002-12-23 Thread Axis Computers
Hi,

I'm developing a Pizza delivery application which uses printer output, and I
want to know which is the better way to format the output to the printer,
and how can I design a select printer menu (communicate with printer
drivers), so the user can select from a number of POS printers (45 columns
?).
Any ideas are welcome:

Thank you and Merry Xmas

__ Omni
ICQ#: 37031810 Current ICQ status: + More ways to contact me
__


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




RE: [PHP] how to specify dimensions of opened window?

2002-12-23 Thread Jody Cleveland
 Use PHP print/echo statements to create the JavaScript code, 
 just as you would HTML code.

Um... How would you go about doing that?

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




[PHP] MySQL vs PostgreSQL

2002-12-23 Thread Miro Kralovic
Hi,

I'm just deciding which DB to use for my projects and I'm not clear with one
thing... When considering a database for web, is MySQL good enough? I read
it only supports table locking, which is not very satisfying in such a
multiuser environment as the internet..

Based on your experience, what are pros and cons of MySQL and why most of
you prefer to use MySQL to PostgreSQL, which is aparently more powerful..

Thanks for your opinions..
Miro..



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




Re: [PHP] how to specify dimensions of opened window?

2002-12-23 Thread Rick Emery
Do you know JavaScript?  If not, start there.

print open(\url\,\window_name\,\width=400,height=300menubar=no,status=no\);
- Original Message -
From: Jody Cleveland [EMAIL PROTECTED]
To: 'Rick Emery' [EMAIL PROTECTED]; Php-General (E-mail)
[EMAIL PROTECTED]
Sent: Monday, December 23, 2002 9:02 AM
Subject: RE: [PHP] how to specify dimensions of opened window?


  Use PHP print/echo statements to create the JavaScript code,
  just as you would HTML code.

 Um... How would you go about doing that?

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




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




Re: [PHP] MySQL vs PostgreSQL

2002-12-23 Thread Rick Emery
You accidentally published this to the wrong email list.  I assume you meant to send 
this
to the MySQL email list.

- Original Message -
From: Miro Kralovic [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, December 23, 2002 9:10 AM
Subject: [PHP] MySQL vs PostgreSQL


 Hi,

 I'm just deciding which DB to use for my projects and I'm not clear with one
 thing... When considering a database for web, is MySQL good enough? I read
 it only supports table locking, which is not very satisfying in such a
 multiuser environment as the internet..

 Based on your experience, what are pros and cons of MySQL and why most of
 you prefer to use MySQL to PostgreSQL, which is aparently more powerful..

 Thanks for your opinions..
 Miro..



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




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




[PHP] Direct IO functions

2002-12-23 Thread Slobodan Miljkovic
Can anyone suggest how to detect is there a device connected on serial port,
using Direct IO functions? Can a timeout be set on dio_open() ?



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




php-general Digest 23 Dec 2002 15:29:16 -0000 Issue 1780

2002-12-23 Thread php-general-digest-help

php-general Digest 23 Dec 2002 15:29:16 - Issue 1780

Topics (messages 129136 through 129197):

Undefined Functions
129136 by: Beauford.2002
129137 by: Rasmus Lerdorf

Re: fwrite() blank-line  Quirk?
129138 by: Jason Wong

Re: \Z characters
129139 by: Jason Wong

Thumbnail generation
129140 by: Centaur zeus
129142 by: Rasmus Lerdorf
129144 by: Centaur zeus
129145 by: Jason Wong
129172 by: 1LT John W. Holmes
129185 by: Mika Tuupola

Thumbnail
129141 by: Centaur zeus

How to generate thumbnail ?
129143 by: Centaur zeus
129155 by: Gil Disatnik

$_COOKIE and include() or require()
129146 by: Luke Sneeringer
129151 by: Chris Wesley
129154 by: Luke Sneeringer
129157 by: Chris Wesley
129162 by: Jason Wong

Flushing image from database to browser - how to get it cached??
129147 by: Tim Molendijk
129165 by: Dries Verachtert
129170 by: Justin French

Plotting Data Graphics
129148 by: Alexandre Soares
129152 by: Chris Wesley
129159 by: Rick Widmer
129163 by: Jason Wong

¡¾help¡¿how can I put the pull down menu in a frame and display.
129149 by: dreamyman
129153 by: Chris Wesley

Creating Extensions DLL with Delphi
129150 by: Andreas Steibl

Error loading PHP module in Apache 2
129156 by: Andrew Schaefer

Re: Is __FILE__ still current or is there something newer?
129158 by: Rick Widmer

preg_replace question
129160 by: electroteque
129164 by: Jason Wong

Preperation for News CMS?
129161 by: Steve Jackson

LDAP support...
129166 by: Peter Lavender
129167 by: Peter Lavender
129178 by: michael kimsal

PHP scripts use/get passed root's environment?
129168 by: Terrence Koeman

Re: fgets() question?
129169 by: Ford, Mike   [LSS]

Re: upload_max_filesize + ini_set
129171 by: Ford, Mike   [LSS]

calendar solution for workgroups ???
129173 by: Tariq Murtaza
129183 by: Jan Schneider
129196 by: Brent Baisley

php-java formatting
129174 by: Edward Peloke
129177 by: 1LT John W. Holmes
129184 by: Krzysztof Dziekiewicz

md5()
129175 by: Edward Peloke
129176 by: Justin French
129180 by: Chris Hewitt
129181 by: Johannes Schlueter
129182 by: Edward Peloke

Re: cookies
129179 by: Krzysztof Dziekiewicz

php.exe without console window
129186 by: Alexander Kuznetsov

how to specify dimensions of opened window?
129187 by: Jody Cleveland
129188 by: Rick Emery
129189 by: Jody Cleveland
129190 by: Rick Emery
129192 by: Jody Cleveland
129194 by: Rick Emery

Configuring printer output for a POS printer -- Admin Configuring Printer Drivers or 
a Select Driver Menu
129191 by: Axis Computers

MySQL vs PostgreSQL
129193 by: Miro Kralovic
129195 by: Rick Emery

Direct IO functions
129197 by: Slobodan Miljkovic

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]


--

---BeginMessage---
Hi,

I previously asked a question about getting undefined function errors in my
script and someone mentioned that it may be that I am calling it from within
an if or else statement. This turned out to be the case. Now the question -
is there a way around this? What I need to do resolves around many different
conditions, and depending on the what's what I call the necessary function.
I have looked my script over and over and can not see any other way of doing
this. I am fairly new to PHP and maybe there is a better way, and I'm open
to suggestions.

TIA

Example:

if ($a == $b) call function one;

elseif ($a   $b) call function two;
elseif ($a  == $c) call function two;
elseif ($a   $b) call function two;
elseif ($c   $b) call function two;
elseif ($d == $e) call function two;



---End Message---
---BeginMessage---
An undefined function error has nothing to do with where you are calling
the function from.  It has to do with whether or not you have defined the
function you are calling.

-Rasmus

On Sun, 22 Dec 2002, Beauford.2002 wrote:

 Hi,

 I previously asked a question about getting undefined function errors in my
 script and someone mentioned that it may be that I am calling it from within
 an if or else statement. This turned out to be the case. Now the question -
 is there a way around this? What I need to do resolves around many different
 conditions, and depending on the what's what I call the necessary function.
 I have looked my script over and over and can not see any other way of doing
 this. I am fairly new to PHP and 

[PHP] Richiesta collaborazioni

2002-12-23 Thread Armando
Salve,

A chiunque possa interessare, cerco persone su Napoli con cui avere scambi
di pareri e info  circa PHP/MySQL, eventualmente ci sarebbero opportunità
lavorative.

Saluti

--
Armando Alario

ICQ# 172677921



--
Armando Alario

ICQ# 172677921



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




Re: [PHP] calendar solution for workgroups ???

2002-12-23 Thread Brent Baisley
If you are looking for a complete solution (calendar, contact, to do, 
webmail, etc.), there is a nice open source project at:
http://www.moregroupware.org/

I downloaded it and started playing with it about 2 weeks and like what 
I see. Totally overkill if you just want a Calendar.

On Monday, December 23, 2002, at 06:09 AM, Tariq Murtaza wrote:

Hi all,
I am looking for a good calendar system for a group of people. (PHP 
/Mysql)
any idea??

Help/Comments will be appreciated.

Tariq Murtaza



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


--
Brent Baisley
Systems Architect
Landover Associates, Inc.
Search  Advisory Services for Advanced Technology Environments
p: 212.759.6400/800.759.0577


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




Re: [PHP] Configuring printer output for a POS printer -- Admin Configuring Printer Drivers or a Select Driver Menu

2002-12-23 Thread Chris Hewitt
Axis Computers wrote:



I'm developing a Pizza delivery application which uses printer output, and I
want to know which is the better way to format the output to the printer,
and how can I design a select printer menu (communicate with printer
drivers), so the user can select from a number of POS printers (45 columns
?).


I assume that you mean a printer connected to the client computer, not 
the server? As php is all executed on the server, like other server-side 
languages, it has no access to the client computer (for security reasons).

HTH
Chris


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



Re: [PHP] Undefined Functions

2002-12-23 Thread Beauford.2002
I have a function at the bottom of my script which is called from withing an
if/else statement. If I take it out of the if/else and just call the
function it works fine (except I don't get the results I want). So it
appears where you are calling it from does matter. See the examples below.
This isn't the first time either, I have had to redo several scripts for
this project because of it.  If I'm doing this wrong based on the examples
below, please let me know. Thanks.

i.e.

This doesn't work.This does.

some code .. some code


If ($bob) { gotofunction($bob); }  gotofunction($bob);
elseif ($sally) { gotonextfunction($sally); }
gotonextfunction($sally)
   else { gotolastfunction(); }
gotolastfunction()
some other code . some other
code

function gotofunction($bob)   function
gotofunction($bob)
function gotonextfunction() function
gotonextfunction()
function gotolastfunction()  function
gotolastfunction()


- Original Message -
From: Rasmus Lerdorf [EMAIL PROTECTED]
To: Beauford.2002 [EMAIL PROTECTED]
Cc: PHP General [EMAIL PROTECTED]
Sent: Sunday, December 22, 2002 11:16 PM
Subject: Re: [PHP] Undefined Functions


 An undefined function error has nothing to do with where you are calling
 the function from.  It has to do with whether or not you have defined the
 function you are calling.

 -Rasmus

 On Sun, 22 Dec 2002, Beauford.2002 wrote:

  Hi,
 
  I previously asked a question about getting undefined function errors in
my
  script and someone mentioned that it may be that I am calling it from
within
  an if or else statement. This turned out to be the case. Now the
question -
  is there a way around this? What I need to do resolves around many
different
  conditions, and depending on the what's what I call the necessary
function.
  I have looked my script over and over and can not see any other way of
doing
  this. I am fairly new to PHP and maybe there is a better way, and I'm
open
  to suggestions.
 
  TIA
 
  Example:
 
  if ($a == $b) call function one;
 
  elseif ($a   $b) call function two;
  elseif ($a  == $c) call function two;
  elseif ($a   $b) call function two;
  elseif ($c   $b) call function two;
  elseif ($d == $e) call function two;
 
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 


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





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




Re: [PHP] MySQL vs PostgreSQL

2002-12-23 Thread David T-G
Miro, et al --

...and then Miro Kralovic said...
% 
% Hi,

Hello!


% 
% I'm just deciding which DB to use for my projects and I'm not clear with one
% thing... When considering a database for web, is MySQL good enough? I read
% it only supports table locking, which is not very satisfying in such a
% multiuser environment as the internet..

You will probably find mysql, just like postgresql, quite sufficient for
your needs; it works for many people in many situations -- very much
including the web.


% 
% Based on your experience, what are pros and cons of MySQL and why most of
% you prefer to use MySQL to PostgreSQL, which is aparently more powerful..

Your best bet is probably to check out the mysql and postgresql docs
and see for yourself, as well as check the mailing list archives for
each for posts about the other or comparisons.  I do know that asking
this question on the mysql list will generally return lots of it really
depends on what you're doing responses, with a number of here's my
[often truly staggering] example of how I'm using mysql; are you planning
anything [bigger than, faster than, different from] this today? and the
occasional MySQL R00LZ, d00d!!! frothing :-)


% 
% Thanks for your opinions..
% Miro..


HTH  HAND  Happy Holidays

:-D
-- 
David T-G  * There is too much animal courage in 
(play) [EMAIL PROTECTED] * society and not sufficient moral courage.
(work) [EMAIL PROTECTED]  -- Mary Baker Eddy, Science and Health
http://www.justpickone.org/davidtg/Shpx gur Pbzzhavpngvbaf Qrprapl Npg!




msg90530/pgp0.pgp
Description: PGP signature


Re: [PHP] Undefined Functions

2002-12-23 Thread Rasmus Lerdorf
Like I said, where you define your function is important, not where you
call it.  If you are defining and calling it all in the same place, then
yes, obviously it makes a difference.

-Rasmus

On Mon, 23 Dec 2002, Beauford.2002 wrote:

 I have a function at the bottom of my script which is called from withing an
 if/else statement. If I take it out of the if/else and just call the
 function it works fine (except I don't get the results I want). So it
 appears where you are calling it from does matter. See the examples below.
 This isn't the first time either, I have had to redo several scripts for
 this project because of it.  If I'm doing this wrong based on the examples
 below, please let me know. Thanks.

 i.e.

 This doesn't work.This does.

 some code .. some code
 .

 If ($bob) { gotofunction($bob); }  gotofunction($bob);
 elseif ($sally) { gotonextfunction($sally); }
 gotonextfunction($sally)
else { gotolastfunction(); }
 gotolastfunction()
 some other code . some other
 code

 function gotofunction($bob)   function
 gotofunction($bob)
 function gotonextfunction() function
 gotonextfunction()
 function gotolastfunction()  function
 gotolastfunction()


 - Original Message -
 From: Rasmus Lerdorf [EMAIL PROTECTED]
 To: Beauford.2002 [EMAIL PROTECTED]
 Cc: PHP General [EMAIL PROTECTED]
 Sent: Sunday, December 22, 2002 11:16 PM
 Subject: Re: [PHP] Undefined Functions


  An undefined function error has nothing to do with where you are calling
  the function from.  It has to do with whether or not you have defined the
  function you are calling.
 
  -Rasmus
 
  On Sun, 22 Dec 2002, Beauford.2002 wrote:
 
   Hi,
  
   I previously asked a question about getting undefined function errors in
 my
   script and someone mentioned that it may be that I am calling it from
 within
   an if or else statement. This turned out to be the case. Now the
 question -
   is there a way around this? What I need to do resolves around many
 different
   conditions, and depending on the what's what I call the necessary
 function.
   I have looked my script over and over and can not see any other way of
 doing
   this. I am fairly new to PHP and maybe there is a better way, and I'm
 open
   to suggestions.
  
   TIA
  
   Example:
  
   if ($a == $b) call function one;
  
   elseif ($a   $b) call function two;
   elseif ($a  == $c) call function two;
   elseif ($a   $b) call function two;
   elseif ($c   $b) call function two;
   elseif ($d == $e) call function two;
  
  
  
   --
   PHP General Mailing List (http://www.php.net/)
   To unsubscribe, visit: http://www.php.net/unsub.php
  
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 




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




[PHP] Forms

2002-12-23 Thread Vicente Valero
I'm having problems using variables from a html form. I've been reading, and it seems 
that I have register_globlas=off in php.ini. But I've tried to find this file in my 
Linux, but I haven't been able to locate it. Could someone tell me where is it?

Thank you


Re: [PHP] Forms

2002-12-23 Thread John Nichel
How did you install php?  RPM, from source?  Check in /etc, or do a...

find / -name php.ini

as root.

Vicente Valero wrote:

I'm having problems using variables from a html form. I've been reading, and it seems that I have register_globlas=off in php.ini. But I've tried to find this file in my Linux, but I haven't been able to locate it. Could someone tell me where is it?

Thank you



--
By-Tor.com
It's all about the Rush
http://www.by-tor.com


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




Re: [PHP] Configuring printer output for a POS printer -- Admin Configuring Printer Drivers or a Select Driver Menu

2002-12-23 Thread Chris Hewitt
Axis Computers wrote:


Yes, but in my application's case the server and the client are on the same
computer, because the server will act as localhost, so you are saying there
is no way to dump any printer output ?


Ah, you do mean the server. OS dependent. If linux then probably call 
lpr via an exec call in php. If windows then possibly COM. I've not had 
to do this so I'm not going to be the best person to advise here. Any 
printing gurus please chip in.

HTH
Chris


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



Re: [PHP] Forms

2002-12-23 Thread Rick Emery
For my Linux (RedHat 7.1), it's at /etc/php.ini

- Original Message -
From: Vicente Valero [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, December 23, 2002 10:25 AM
Subject: [PHP] Forms


I'm having problems using variables from a html form. I've been reading, and it seems 
that
I have register_globlas=off in php.ini. But I've tried to find this file in my Linux, 
but
I haven't been able to locate it. Could someone tell me where is it?

Thank you


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




Re: [PHP] Forms

2002-12-23 Thread Chris Hewitt
Rick Emery wrote:


For my Linux (RedHat 7.1), it's at /etc/php.ini


If its not there, check phpinfo(), this will specifiy where that 
particular installation of php requires it to be.

HTH
Chris


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



Re: [PHP] calendar solution for workgroups ???

2002-12-23 Thread Rick Emery
Another good PHP/mySQL calendar application.  Group scheduling, etc.  Does not have
extraneous things such as web-mail.  Cost is $35

http://abledesign.com/demo/calendar/

rick
People will forget what you said. People will forget what you did.
But people will never forget how you made them feel.
- Original Message -
 On Monday, December 23, 2002, at 06:09 AM, Tariq Murtaza wrote:

  Hi all,
  I am looking for a good calendar system for a group of people. (PHP
  /Mysql)
  any idea??
 
  Help/Comments will be appreciated.
 
  Tariq Murtaza
 
 
 
  -- PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 --
 Brent Baisley
 Systems Architect
 Landover Associates, Inc.
 Search  Advisory Services for Advanced Technology Environments
 p: 212.759.6400/800.759.0577


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




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




Re: [PHP] Forms

2002-12-23 Thread Johannes Schlueter
On Monday 23 December 2002 17:30, John Nichel wrote:
 How did you install php?  RPM, from source?  Check in /etc, or do a...

 find / -name php.ini

Or run a script

?php
  phpinfo();
?

and look what Configuration File (php.ini) Path tells you. On the output ob 
this comamnd you can see the settin of register_globals, too.

johannes

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




Re: [PHP] Forms

2002-12-23 Thread Jason Reid
And remember that if you alter the php.ini file once you have found it, that
you MUST restart apache in order for the changes to take place.

Jason Reid
[EMAIL PROTECTED]
--
AC Host Canada
www.achost.ca

- Original Message -
From: Johannes Schlueter [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, December 23, 2002 10:07 AM
Subject: Re: [PHP] Forms


 On Monday 23 December 2002 17:30, John Nichel wrote:
  How did you install php?  RPM, from source?  Check in /etc, or do a...
 
  find / -name php.ini

 Or run a script

 ?php
   phpinfo();
 ?

 and look what Configuration File (php.ini) Path tells you. On the output
ob
 this comamnd you can see the settin of register_globals, too.

 johannes

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




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




[PHP] Are there macros in PHP?

2002-12-23 Thread Don
Hi,

I need to search a MySQL table based on a condition that can change at
runtime.

Example
==
$condition = CustCode = $HTTP_SESSION_VARS['logoncustcode'];
other code
$queryID = mysql_query(SELECT * FROM CustTariff WHERE  . $condition . 
ORDER BY CustCode);

Will the above work?

Thanks,
Don



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




Re: [PHP] Are there macros in PHP?

2002-12-23 Thread Rick Emery
What happened when you experimented with this code?  You did try, right?

- Original Message - 
From: Don [EMAIL PROTECTED]
To: php list [EMAIL PROTECTED]
Sent: Monday, December 23, 2002 11:57 AM
Subject: [PHP] Are there macros in PHP?


 Hi,
 
 I need to search a MySQL table based on a condition that can change at
 runtime.
 
 Example
 ==
 $condition = CustCode = $HTTP_SESSION_VARS['logoncustcode'];
 other code
 $queryID = mysql_query(SELECT * FROM CustTariff WHERE  . $condition . 
 ORDER BY CustCode);
 
 Will the above work?
 
 Thanks,
 Don
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 


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




[PHP] Suggestions on how I should handle this

2002-12-23 Thread Sarah Heffron
I have an application I've written for a pet sitting service. So someone
calls and says they need a pet sit and we take their info and pick a sitter.
We call that sitter to see if they can take the job, but if they say no,
then we have to change it to a new sitter who can take the job. I want to
keep track of who says yes and who says no and make sure we know who the
active sitter is for each job.

Does anyone have suggestions of a good way to handle this with the database
and such?


Any thoughts appreciated,
Sarah


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




RE: [PHP] Suggestions on how I should handle this

2002-12-23 Thread Edward Peloke
Not usre how your db is designed but I would probably just add a table that
links to the sitter and job tables.  As people are called a row is put into
this table with the sitter and job ids and an 'accepted' column is set to 0,
or 1 or Y or N.  Then you can query the job table and join the sitter and
this new table to get all the info you need.

Eddie
-Original Message-
From: Sarah Heffron [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 23, 2002 1:33 PM
To: php list
Subject: [PHP] Suggestions on how I should handle this


I have an application I've written for a pet sitting service. So someone
calls and says they need a pet sit and we take their info and pick a sitter.
We call that sitter to see if they can take the job, but if they say no,
then we have to change it to a new sitter who can take the job. I want to
keep track of who says yes and who says no and make sure we know who the
active sitter is for each job.

Does anyone have suggestions of a good way to handle this with the database
and such?


Any thoughts appreciated,
Sarah


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



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




RE: [PHP] Suggestions on how I should handle this

2002-12-23 Thread John W. Holmes
 I have an application I've written for a pet sitting service. So
someone
 calls and says they need a pet sit and we take their info and pick a
 sitter.
 We call that sitter to see if they can take the job, but if they say
no,
 then we have to change it to a new sitter who can take the job. I want
to
 keep track of who says yes and who says no and make sure we know who
the
 active sitter is for each job.
 
 Does anyone have suggestions of a good way to handle this with the
 database
 and such?

Well, I assume you have a 'sitter' table and a 'job' table. Each sitter
would have an ID and each job would have an ID. You could then add
another table that keeps track of who accepts and declines jobs. It
would simply store the sitter ID, job ID, and decline/accept. Throw in a
little logic to make sure two sitters can't accept the same job and you
should be good to go. 

Hope that helps. 

---John W. Holmes...

PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/



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




[PHP] socket_select() on STDIN

2002-12-23 Thread Geir Torstein Kristiansen
Is it possible to use socket_select() on STDIN with the socket extension?

If not, consider this a feature request.

I know about fopen('php://stdin', 'r') and this is not what I want unless I 
can socket_select() on that socket (which I cant).

Please cc as I am not subscribed to this list.

-- 
Geir Torstein Kristiansen

web: http://projects.gtk.mine.nu


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




Re: [PHP] Are there macros in PHP?

2002-12-23 Thread Chris Hewitt
Don wrote:


$condition = CustCode = $HTTP_SESSION_VARS['logoncustcode'];
other code
$queryID = mysql_query(SELECT * FROM CustTariff WHERE  . $condition . 
ORDER BY CustCode);


Not sure about the multiple assignment (I have not looked it up in the 
manual), but otherwise the principle is right, yes. Doing things at 
run-time is what web server-side languages are all about.

HTH
Chris


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



[PHP] mbstring and iconv status and conversion problems

2002-12-23 Thread Jan Schneider
Hi,

I'm currently playing a bit with the iconv and mbstring extensions and 
have some problems.

First question: Is there any place where I can find information about 
the current status of these extensions and their functions?

Second question: Since iconv's output buffering charset conversions 
doesn't seem to work quite well, I tried to use mbstring's one. But 
afaics it doesn't support converting into utf-8. Is there any other 
preferred method to convert to utf-8?

Jan.


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



Re: [PHP] Undefined Functions

2002-12-23 Thread Beauford.2002
Then based on the one below that doesn't work, what is the problem with it?
As I said, the functions are at the bottom of the script. The only thing
after them is the closing ?. I also said that they work if I don't call
them from within an if/else. This tells me it is not where it is defined but
where it is being called from. Your saying this doesn't matter, but have not
given any reasons for my problems.  If you could elaborate on this it would
be appreciated.

Beauford

- Original Message -
From: Rasmus Lerdorf [EMAIL PROTECTED]
To: Beauford.2002 [EMAIL PROTECTED]
Cc: PHP General [EMAIL PROTECTED]
Sent: Monday, December 23, 2002 11:14 AM
Subject: Re: [PHP] Undefined Functions


 Like I said, where you define your function is important, not where you
 call it.  If you are defining and calling it all in the same place, then
 yes, obviously it makes a difference.

 -Rasmus

 On Mon, 23 Dec 2002, Beauford.2002 wrote:

  I have a function at the bottom of my script which is called from
withing an
  if/else statement. If I take it out of the if/else and just call the
  function it works fine (except I don't get the results I want). So it
  appears where you are calling it from does matter. See the examples
below.
  This isn't the first time either, I have had to redo several scripts for
  this project because of it.  If I'm doing this wrong based on the
examples
  below, please let me know. Thanks.
 
  i.e.
 
  This doesn't work.This does.
 
  some code .. some
code
  .
 
  If ($bob) { gotofunction($bob); }
gotofunction($bob);
  elseif ($sally) { gotonextfunction($sally); }
  gotonextfunction($sally)
 else { gotolastfunction(); }
  gotolastfunction()
  some other code . some other
  code
 
  function gotofunction($bob)   function
  gotofunction($bob)
  function gotonextfunction() function
  gotonextfunction()
  function gotolastfunction()  function
  gotolastfunction()
 
 
  - Original Message -
  From: Rasmus Lerdorf [EMAIL PROTECTED]
  To: Beauford.2002 [EMAIL PROTECTED]
  Cc: PHP General [EMAIL PROTECTED]
  Sent: Sunday, December 22, 2002 11:16 PM
  Subject: Re: [PHP] Undefined Functions
 
 
   An undefined function error has nothing to do with where you are
calling
   the function from.  It has to do with whether or not you have defined
the
   function you are calling.
  
   -Rasmus
  
   On Sun, 22 Dec 2002, Beauford.2002 wrote:
  
Hi,
   
I previously asked a question about getting undefined function
errors in
  my
script and someone mentioned that it may be that I am calling it
from
  within
an if or else statement. This turned out to be the case. Now the
  question -
is there a way around this? What I need to do resolves around many
  different
conditions, and depending on the what's what I call the necessary
  function.
I have looked my script over and over and can not see any other way
of
  doing
this. I am fairly new to PHP and maybe there is a better way, and
I'm
  open
to suggestions.
   
TIA
   
Example:
   
if ($a == $b) call function one;
   
elseif ($a   $b) call function two;
elseif ($a  == $c) call function two;
elseif ($a   $b) call function two;
elseif ($c   $b) call function two;
elseif ($d == $e) call function two;
   
   
   
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
   
  
  
   --
   PHP General Mailing List (http://www.php.net/)
   To unsubscribe, visit: http://www.php.net/unsub.php
  
  
 
 


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





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




[PHP] Re: mbstring and iconv status and conversion problems

2002-12-23 Thread Jan Schneider
Jan Schneider wrote:

Second question: Since iconv's output buffering charset conversions 
doesn't seem to work quite well, I tried to use mbstring's one. But 
afaics it doesn't support converting into utf-8. Is there any other 
preferred method to convert to utf-8?

Sorry, not converting _to_ uft-8 but _from_ gb2312 was the problem. 
Looking at the manual I found that this charset is not supported. I 
guess the best solution would be to fall back to iconv() if 
mb_convert_encoding() fails. But how do I know if mb_... failed?

Btw, this problem didn't happen with output buffering but manual 
converting from gb2312 to utf-8.

Jan.


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



Re: [PHP] Undefined Functions

2002-12-23 Thread Gerald Timothy Quimpo
On Monday 23 December 2002 11:11 am, Beauford.2002 wrote:
 Then based on the one below that doesn't work, what is the problem with it?

your example wasn't runnable (since parts of it were is the
attached a fair example of what you're trying to do?  i don't
have any problem with it.  it works as expected with no
undefined function problems.  now, if i were to have an 
elseif ($b==9) b9(); in there, then i'd expect that error.

can you distill the problem to a runnable example which
demonstrates the problem for you and post the example?

tiger

-- 
Gerald Timothy Quimpo  tiger*quimpo*org gquimpo*sni-inc.com tiger*sni*ph
Public Key: gpg --keyserver pgp.mit.edu --recv-keys 672F4C78
   Veritas liberabit vos.
   Doveryai no proveryai.



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


Re: [PHP] Undefined Functions

2002-12-23 Thread Leif K-Brooks
Try defining them at the top instead...

Beauford.2002 wrote:


Then based on the one below that doesn't work, what is the problem with it?
As I said, the functions are at the bottom of the script. The only thing
after them is the closing ?. I also said that they work if I don't call
them from within an if/else. This tells me it is not where it is defined but
where it is being called from. Your saying this doesn't matter, but have not
given any reasons for my problems.  If you could elaborate on this it would
be appreciated.

Beauford

- Original Message -
From: Rasmus Lerdorf [EMAIL PROTECTED]
To: Beauford.2002 [EMAIL PROTECTED]
Cc: PHP General [EMAIL PROTECTED]
Sent: Monday, December 23, 2002 11:14 AM
Subject: Re: [PHP] Undefined Functions


 

Like I said, where you define your function is important, not where you
call it.  If you are defining and calling it all in the same place, then
yes, obviously it makes a difference.

-Rasmus

On Mon, 23 Dec 2002, Beauford.2002 wrote:

   

I have a function at the bottom of my script which is called from
 

withing an
 

if/else statement. If I take it out of the if/else and just call the
function it works fine (except I don't get the results I want). So it
appears where you are calling it from does matter. See the examples
 

below.
 

This isn't the first time either, I have had to redo several scripts for
this project because of it.  If I'm doing this wrong based on the
 

examples
 

below, please let me know. Thanks.

i.e.

This doesn't work.This does.

some code .. some
 

code
 

.

If ($bob) { gotofunction($bob); }
 

gotofunction($bob);
 

   elseif ($sally) { gotonextfunction($sally); }
gotonextfunction($sally)
  else { gotolastfunction(); }
gotolastfunction()
some other code . some other
code

function gotofunction($bob)   function
gotofunction($bob)
function gotonextfunction() function
gotonextfunction()
function gotolastfunction()  function
gotolastfunction()


- Original Message -
From: Rasmus Lerdorf [EMAIL PROTECTED]
To: Beauford.2002 [EMAIL PROTECTED]
Cc: PHP General [EMAIL PROTECTED]
Sent: Sunday, December 22, 2002 11:16 PM
Subject: Re: [PHP] Undefined Functions


 

An undefined function error has nothing to do with where you are
   

calling
 

the function from.  It has to do with whether or not you have defined
   

the
 

function you are calling.

-Rasmus

On Sun, 22 Dec 2002, Beauford.2002 wrote:

   

Hi,

I previously asked a question about getting undefined function
 

errors in
 

my
 

script and someone mentioned that it may be that I am calling it
 

from
 

within
 

an if or else statement. This turned out to be the case. Now the
 

question -
 

is there a way around this? What I need to do resolves around many
 

different
 

conditions, and depending on the what's what I call the necessary
 

function.
 

I have looked my script over and over and can not see any other way
 

of
 

doing
 

this. I am fairly new to PHP and maybe there is a better way, and
 

I'm
 

open
 

to suggestions.

TIA

Example:

if ($a == $b) call function one;

elseif ($a   $b) call function two;
elseif ($a  == $c) call function two;
elseif ($a   $b) call function two;
elseif ($c   $b) call function two;
elseif ($d == $e) call function two;



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

 

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


   

 

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


   




 


--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law.





Re: [PHP] Undefined Functions

2002-12-23 Thread Rasmus Lerdorf
I have no idea what you have done wrong.  I am simply telling you how it
works.  Create a small test script that reproduces the problem and we can
help you.  What you have provided so far does not give us anything to work
with.

Try this, for example:

?
if(true) func1();
else func2();

function func1() { echo 1; }
function func2() { echo 2; }
?

When you run this you will see that it prints out 1 which should satisfy
you that you can safely call functions inside conditionals and have them
be defined at the bottom of your script.

Your job now is to tell us how your script differs from the above test
script, because as far as I have understood this is the exact situation
you say isn't working.

-Rasmus

On Mon, 23 Dec 2002, Beauford.2002 wrote:

 Then based on the one below that doesn't work, what is the problem with it?
 As I said, the functions are at the bottom of the script. The only thing
 after them is the closing ?. I also said that they work if I don't call
 them from within an if/else. This tells me it is not where it is defined but
 where it is being called from. Your saying this doesn't matter, but have not
 given any reasons for my problems.  If you could elaborate on this it would
 be appreciated.

 Beauford

 - Original Message -
 From: Rasmus Lerdorf [EMAIL PROTECTED]
 To: Beauford.2002 [EMAIL PROTECTED]
 Cc: PHP General [EMAIL PROTECTED]
 Sent: Monday, December 23, 2002 11:14 AM
 Subject: Re: [PHP] Undefined Functions


  Like I said, where you define your function is important, not where you
  call it.  If you are defining and calling it all in the same place, then
  yes, obviously it makes a difference.
 
  -Rasmus
 
  On Mon, 23 Dec 2002, Beauford.2002 wrote:
 
   I have a function at the bottom of my script which is called from
 withing an
   if/else statement. If I take it out of the if/else and just call the
   function it works fine (except I don't get the results I want). So it
   appears where you are calling it from does matter. See the examples
 below.
   This isn't the first time either, I have had to redo several scripts for
   this project because of it.  If I'm doing this wrong based on the
 examples
   below, please let me know. Thanks.
  
   i.e.
  
   This doesn't work.This does.
  
   some code .. some
 code
   .
  
   If ($bob) { gotofunction($bob); }
 gotofunction($bob);
   elseif ($sally) { gotonextfunction($sally); }
   gotonextfunction($sally)
  else { gotolastfunction(); }
   gotolastfunction()
   some other code . some other
   code
  
   function gotofunction($bob)   function
   gotofunction($bob)
   function gotonextfunction() function
   gotonextfunction()
   function gotolastfunction()  function
   gotolastfunction()
  
  
   - Original Message -
   From: Rasmus Lerdorf [EMAIL PROTECTED]
   To: Beauford.2002 [EMAIL PROTECTED]
   Cc: PHP General [EMAIL PROTECTED]
   Sent: Sunday, December 22, 2002 11:16 PM
   Subject: Re: [PHP] Undefined Functions
  
  
An undefined function error has nothing to do with where you are
 calling
the function from.  It has to do with whether or not you have defined
 the
function you are calling.
   
-Rasmus
   
On Sun, 22 Dec 2002, Beauford.2002 wrote:
   
 Hi,

 I previously asked a question about getting undefined function
 errors in
   my
 script and someone mentioned that it may be that I am calling it
 from
   within
 an if or else statement. This turned out to be the case. Now the
   question -
 is there a way around this? What I need to do resolves around many
   different
 conditions, and depending on the what's what I call the necessary
   function.
 I have looked my script over and over and can not see any other way
 of
   doing
 this. I am fairly new to PHP and maybe there is a better way, and
 I'm
   open
 to suggestions.

 TIA

 Example:

 if ($a == $b) call function one;

 elseif ($a   $b) call function two;
 elseif ($a  == $c) call function two;
 elseif ($a   $b) call function two;
 elseif ($c   $b) call function two;
 elseif ($d == $e) call function two;



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

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




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




Re: [PHP] Forms

2002-12-23 Thread Jason Sheets
php.ini can be in several different locations, the best way to identify
its location is to ask PHP where it is at (I have seen it in
/usr/local/etc, /etc, /usr/local/lib, /usr/local/conf, among others).

Construct a php file with phpinfo() like:

?php
phpinfo();
?

Then visit the page in your browser, now look for: Configuration File
(php.ini) Path section, it is in the top 1/5 of the page, this will give
you the directory PHP is looking for php.ini at.

You can also use filesystem utils such as locate php.ini or find / -name
php.ini

Jason


On Mon, 2002-12-23 at 09:53, Rick Emery wrote:
 For my Linux (RedHat 7.1), it's at /etc/php.ini
 
 - Original Message -
 From: Vicente Valero [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Monday, December 23, 2002 10:25 AM
 Subject: [PHP] Forms
 
 
 I'm having problems using variables from a html form. I've been reading, and it 
seems that
 I have register_globlas=off in php.ini. But I've tried to find this file in my 
Linux, but
 I haven't been able to locate it. Could someone tell me where is it?
 
 Thank you
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php


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




[PHP] Unable to match dollar sign in preg_match

2002-12-23 Thread Randall Perry
Here's my expression:

$data = xyz_%split%_$10.21;
preg_match (/^.*_\%split\%_$(\d*\.\d*)/, $data, $match);

Returns nothing (escaping the $ with a \ does the same), but this returns
10.21:
preg_match (/^.*_\%split\%_\D*(\d*\.\d*)/, $data, $match);

How is it done?

-- 
Randall Perry
sysTame

Xserve Web Hosting/Co-location
Website Development/Promotion
Mac Consulting/Sales

http://www.systame.com/



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




RE: [PHP] upload_max_filesize + ini_set

2002-12-23 Thread Dan Rossi
maybe someone would like to report it , my reports either get ignored or are
false alarms , i am creating a function to get the line upload_max_filesize
and change its value in .htaccess its the only way , and this is everytime i
load the uploader page

-Original Message-
From: Ford, Mike [LSS] [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 23, 2002 11:40 PM
To: 'electroteque'; [EMAIL PROTECTED]
Subject: RE: [PHP] upload_max_filesize + ini_set


 -Original Message-
 From: electroteque [mailto:[EMAIL PROTECTED]]
 Sent: 20 December 2002 19:34

 and i just tested the script and it let me upload a 2.5M
 file.

Well, I was just quoting from the manual, so that sounds worthy of a bug
report in itself -- either the manual is wrong, or the behaviour of PHP is!

   so there must
 be a way to put it in the page aswell

No, there mustn't -- this I am sure about.  As I said before:

 As all file upload activity takes place before
 your script even *starts* executing, you can't use
 ini_set on this [upload_max_filesize].

Cheers!

Mike

-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning  Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211


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




RE: [PHP] Unable to match dollar sign in preg_match

2002-12-23 Thread John W. Holmes
 preg_match (/^.*_\%split\%_$(\d*\.\d*)/, $data, $match);

Should be

preg_match (/^.*_\%split\%_\\\$(\d*\.\d*)/, $data, $match);

---John W. Holmes...

PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/



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




Re: [PHP] Unable to match dollar sign in preg_match

2002-12-23 Thread Randall Perry
Hokay, that works, but what's with the triple backslashes?


 preg_match (/^.*_\%split\%_$(\d*\.\d*)/, $data, $match);
 
 Should be
 
 preg_match (/^.*_\%split\%_\\\$(\d*\.\d*)/, $data, $match);
 
 ---John W. Holmes...
 
 PHP Architect - A monthly magazine for PHP Professionals. Get your copy
 today. http://www.phparch.com/
 
 

-- 
Randall Perry
sysTame

Xserve Web Hosting/Co-location
Website Development/Promotion
Mac Consulting/Sales

http://www.systame.com/



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




[PHP] Date Subtraction

2002-12-23 Thread Christopher J. Crane
I have two periods in time from a Cisco router that I would like to find the
difference in seconds. I am not sure the best way to do this since it is not
a date, but rather an amount of time since last reset.

Here is the numbers

181 days, 7:11:06.66
//stands for 181 days, 7 hours, 11 minutes, 6.66 seconds.

The next is

181 days, 7:16:6.75
//stands for 181 days, 7 hours, 16 minutes, 7.75 seconds.

I would probably shave off the .66 and .75 seconds while it was still a
string. It may be faster to round when it's in seconds, I really don't know.
Then what do I do?

I was thinking of using strtotime(); but because it's not really a date, I
am at a loss for what to do.

Any help with this would be great.



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




Re: [PHP] Date Subtraction

2002-12-23 Thread Marco Tabini
I don't think you can use strtotime in that case. However, assuming that
your data is properly formatted every time, you can use a simple
function like this (I'm doing it from memory, so it might not actually
work):

?php

function conv_time ($s)
{
preg_match (/^([0-9]*) days,
([0-9]*)\:([0-9]*)\:([0-9]*)(\.[0-9]*)$/, $s, $res);
return $res[1] * 86400 + $res[2] * 3600 + $res[3] * 60 + $res[4] +
$res[5];
}

echo number_format (conv_time (181 days, 7:16:6.75) - conv_time (181
days, 7:11:06.66), 2);

?

Hope this helps.

Cheers,


Marco
-- 

php|architect - The Magazine for PHP Professionals
The monthly magazine dedicated to the world of PHP programming

Check us out on the web at http://www.phparch.com!

---BeginMessage---
I have two periods in time from a Cisco router that I would like to find the
difference in seconds. I am not sure the best way to do this since it is not
a date, but rather an amount of time since last reset.

Here is the numbers

181 days, 7:11:06.66
//stands for 181 days, 7 hours, 11 minutes, 6.66 seconds.

The next is

181 days, 7:16:6.75
//stands for 181 days, 7 hours, 16 minutes, 7.75 seconds.

I would probably shave off the .66 and .75 seconds while it was still a
string. It may be faster to round when it's in seconds, I really don't know.
Then what do I do?

I was thinking of using strtotime(); but because it's not really a date, I
am at a loss for what to do.

Any help with this would be great.



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



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


[PHP] Re: [PHP-WIN] Tutorials on OOP

2002-12-23 Thread Davy Obdam
Hi people,

Thanks for all the reply`s. I found the tuturials very usefull and much 
better then the most tutorials i have found so far, usualy with an 
example class car or something not very usefull

Thanks,

Davy Obdam
mailto:[EMAIL PROTECTED]

Davy Obdam wrote:

Hi people,.

I have to build several classes for a project i am doing, but i am 
quite new to OOP programming. I need to make a database abstraction 
layer class and a user login class.. Does anyone know some good 
tutorials about these things and OOP in general. Thanks in advance..

Best regards,

Davy Obdam
mailto:[EMAIL PROTECTED]







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




[PHP] php+gif problems take 2

2002-12-23 Thread cj
Hi would any one know what the following error's are for/mean
I am using gd 2.0.7 with gif support and php4.2.3.
I am using the exact same gd version and php version as I used on another
machine and it compiled with only minor problems, but these errors are
different to the errors I got on the other machine.

Thanks

gcc -I. -I/usr/local/src/php-4.2.3/ext/gd -I/usr/local/src/php-4.2.3/main -I
/usr/local/src/php-4.2.3 -I/usr/local/src/apache_1.3.26/src/include -I/usr/l
ocal/src/apache_1.3.26/src/os/unix -I/usr/local/src/php-4.2.3/Zend -I/usr/lo
cal/include -I/usr/local/src/gd-2.0.7gif/ -I/usr/local/src/php-4.2.3/ext/mys
ql/libmysql -I/usr/local/pgsql/include -I/usr/local/src/php-4.2.3/ext/xml/ex
pat  -I/usr/local/src/php-4.2.3/TSRM -g -O2  -c gd.c  touch gd.lo
gd.c: In function `zm_startup_gd':
gd.c:303: `gdArc' undeclared (first use in this function)
gd.c:303: (Each undeclared identifier is reported only once
gd.c:303: for each function it appears in.)
gd.c:304: `gdPie' undeclared (first use in this function)
gd.c:305: `gdChord' undeclared (first use in this function)
gd.c:306: `gdNoFill' undeclared (first use in this function)
gd.c:307: `gdEdged' undeclared (first use in this function)
gd.c: In function `zif_imagecreatetruecolor':
gd.c:588: warning: assignment makes pointer from integer without a cast
gd.c: In function `zif_imagecreatefromstring':
gd.c:1093: `gdImageCreateFromGifCtx' undeclared (first use in this function)
gd.c: In function `zif_imagecreatefromgif':
gd.c:1235: `gdImageCreateFromGif' undeclared (first use in this function)
gd.c:1235: `gdImageCreateFromGifCtx' undeclared (first use in this function)
gd.c: In function `zif_imagegif':
gd.c:1462: `gdImageGifCtx' undeclared (first use in this function)
gd.c: In function `zif_imagecolorat':
gd.c:1626: structure has no member named `tpixels'
gd.c: In function `_php_image_convert':
gd.c:3521: `gdImageCreateFromGif' used prior to declaration
gd.c:3521: warning: assignment makes pointer from integer without a cast
make[3]: *** [gd.lo] Error 1
make[3]: Leaving directory `/usr/local/src/php-4.2.3/ext/gd'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/usr/local/src/php-4.2.3/ext/gd'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/src/php-4.2.3/ext'
make: *** [all-recursive] Error 1


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




[PHP] mcrypt

2002-12-23 Thread Ysrael Guzmán
Hi, my server is win 2000 server and IIS 5.0 
i wnat to work to MCRYPT, but i don't know...
 
help me please.
 
Por favor yo estoy trabajando con windows 2000 server, y mi servidor web
es un Internet Information Service, trabajo con PHP y Mysql...
deseo encriptar con MCRYPT, pero no viene instalado como hago...
es dificil
 
alguien sabe o a trabajado con esto en windows...
 
AYUDA!
 

Ysrael Guzmán Meza

 

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




Re: [PHP] mcrypt

2002-12-23 Thread Alex Piaz
As far as I know, there is no mcrypt windows version. You´ll have to try to 
compile it yourself. And don´t ask me how because I don´t know:-)

A sugestion: If you can, change to linux. It´s better and it´s Free.

Regards

Alex


At 18:33 23/12/2002 -0500, Ysrael Guzmán wrote:
Hi, my server is win 2000 server and IIS 5.0
i wnat to work to MCRYPT, but i don't know...

help me please.

Por favor yo estoy trabajando con windows 2000 server, y mi servidor web
es un Internet Information Service, trabajo con PHP y Mysql...
deseo encriptar con MCRYPT, pero no viene instalado como hago...
es dificil

alguien sabe o a trabajado con esto en windows...

AYUDA!


Ysrael Guzmán Meza



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




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




Re: [PHP] Date Subtraction

2002-12-23 Thread Justin French
okay, this is just me thinking out loud... none of this is tested...

?
function something($time)
{
$time = substr($time, 0, -3);
list($days,$theRest) = explode(' days, ', $time);
list($h,$m,$s) = explode(':', $theRest);
$days = $days * 86400;
$h = $h * 360;
$m = $m * 60;
$seconds = $days+$h+$m+$s;
return $seconds;
}

$t1 = something('181 days, 7:16:6.75');
$t2 = something('181 days, 7:11:06.66');

echo $t1 - $t2;
?


basically,
- take the string
- get rid of the last 3 chars (eg .75)
- split on ' days, '
- split the 2nd half on ':'
- multiply each bit (days, hrs, mins) by the appropriate no of seconds
- add it all together to get a number in seconds



Cheers,

Justin




on 24/12/02 8:29 AM, Christopher J. Crane ([EMAIL PROTECTED]) wrote:

 I have two periods in time from a Cisco router that I would like to find the
 difference in seconds. I am not sure the best way to do this since it is not
 a date, but rather an amount of time since last reset.
 
 Here is the numbers
 
 181 days, 7:11:06.66
 //stands for 181 days, 7 hours, 11 minutes, 6.66 seconds.
 
 The next is
 
 181 days, 7:16:6.75
 //stands for 181 days, 7 hours, 16 minutes, 7.75 seconds.
 
 I would probably shave off the .66 and .75 seconds while it was still a
 string. It may be faster to round when it's in seconds, I really don't know.
 Then what do I do?
 
 I was thinking of using strtotime(); but because it's not really a date, I
 am at a loss for what to do.
 
 Any help with this would be great.
 
 


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




Re: [PHP] $_COOKIE and include() or require()

2002-12-23 Thread Luke Sneeringer
That worked perfectly! The problem is fixed. Thank you so much.
Luke

Chris Wesley wrote:


On Mon, 23 Dec 2002, Luke Sneeringer wrote:

 

That doesn't seem to work. This might be because my require tags also
send variables (e.g. common.php?variable=1)--would this make a call to
a non-PHP extention file fail?
   


You've already demonstrated that you know included code inherits the
parent's variables at the scope where require() is called ... so I'll
leave it up to you to determine whether or not the ?variable=1 is
necessary.  I dont' know if it breaks require(), but I doubt it.

Here's the trick:  visit the URL of the require()'d code with a web
browser.  If you don't see /code/, then your require() won't work.  If you
do see the php code ... all of it, including the start  end tags ...  in
plain text, then you're on the right track; your code should be able to be
included into the parent.

You're trying to include /code/ into some parent code, so you don't want
the processed result of the PHP script (unless it's more PHP code).

If this doesn't get you closer, post a simple example of what you're
trying to do.  I routinely include PHP across domains for various reasons
... I know it works, and works well ... it will for you too, I hope!

	hth,
	~Chris


 


--
God and sinners reconciled (!!!)

Luke Sneeringer
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
http://www.aggieruf.org/




RE: [PHP] Unable to match dollar sign in preg_match

2002-12-23 Thread John W. Holmes
I don't know. I just got that from reading the manual. The very first
user comment on the preg_match page.


chrisbolt at home dot com
12-Mar-2000 03:23 
 
If you want to use some of PHP's special characters in your expression,
such as $, you must escape it twice. For example: 

$matchme = \$example; 
if (preg_match(/\$example/, $matchme)) { 

will not be matched because PHP interprets the \$ and passes it as $.
Instead, you must do this: 

if (preg_match(/\\\$example/, $matchme)) {
---

Don't forget to check the manual.

---John W. Holmes...

PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/

 -Original Message-
 From: Randall Perry [mailto:[EMAIL PROTECTED]]
 Sent: Monday, December 23, 2002 4:07 PM
 To: [EMAIL PROTECTED]
 Subject: Re: [PHP] Unable to match dollar sign in preg_match
 
 Hokay, that works, but what's with the triple backslashes?
 
 
  preg_match (/^.*_\%split\%_$(\d*\.\d*)/, $data, $match);
 
  Should be
 
  preg_match (/^.*_\%split\%_\\\$(\d*\.\d*)/, $data, $match);
 
  ---John W. Holmes...
 
  PHP Architect - A monthly magazine for PHP Professionals. Get your
copy
  today. http://www.phparch.com/
 
 
 
 --
 Randall Perry
 sysTame
 
 Xserve Web Hosting/Co-location
 Website Development/Promotion
 Mac Consulting/Sales
 
 http://www.systame.com/
 
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




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




[PHP] Problem with Include

2002-12-23 Thread sport4ever
Hello,
my problem is that I can't use more than one SSI INCLUDE in a page

Please access this test page to check the problem yourself:
http://www.sport4ever.com/test/hello.shtml

The first INCLUDE will appear correctly and prints HELLO World, include #1 which is 
the output of hello.php

Whereas the second INCLUDE won't appear, and instead, it will print the content (code) 
of hello2.php, which is the follwoing:
? echo HELLO World, include #1; ?

So, it always executes the first include statement perfectly, and doesn't execute the 
rest!

note: the problem appears only if I include a PHP file, it will execute it correctly 
if it's a SHTML or HTML file.

PLEASE is there any solution for this strange problem!




[PHP] Beginner examples?

2002-12-23 Thread Chris Rehm
I have a friend who has asked me about some sites she's working on. She 
maintains multiple sites on different servers. Each of these sites runs 
a different contest, currently handled by formmail.pl and then some hand 
entry by her part.

I've suggested she use MySQL, her own host allows it, and modify 
formmail.php to add the records to her SQL database in addition to 
sending her an email (just as backup). Then using an SQL front end to 
retrieve the information when the winners need to be drawn.

Now, she is not a programmer other than the HTML she's been hand coding. 
I'd like to find a site I can refer her to where she might be able to 
see some example of what she wants to do.

Any recommendations? Did I make a valid suggestion?

--
Chris Rehm
[EMAIL PROTECTED]

For all the law is fulfilled in one word, even in this; Thou shalt love 
thy neighbour as thyself.
Gal. 5: 14




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



php-general Digest 24 Dec 2002 04:01:39 -0000 Issue 1781

2002-12-23 Thread php-general-digest-help

php-general Digest 24 Dec 2002 04:01:39 - Issue 1781

Topics (messages 129198 through 129239):

Richiesta collaborazioni
129198 by: Armando

Re: Configuring printer output for a POS printer -- Admin Configuring Printer Drivers 
or a Select Driver Menu
129199 by: Chris Hewitt
129206 by: Chris Hewitt

Re: Undefined Functions
129200 by: Beauford.2002
129203 by: Rasmus Lerdorf
129219 by: Beauford.2002
129221 by: Gerald Timothy Quimpo
129222 by: Leif K-Brooks
129223 by: Rasmus Lerdorf

Re: calendar solution for workgroups ???
129201 by: Rick Emery

Re: MySQL vs PostgreSQL
129202 by: David T-G

Forms
129204 by: Vicente Valero
129205 by: John Nichel
129207 by: Rick Emery
129208 by: Chris Hewitt
129209 by: Johannes Schlueter
129210 by: Jason Reid
129224 by: Jason Sheets

Are there macros in PHP?
129211 by: Don
129212 by: Rick Emery
129217 by: Chris Hewitt

Suggestions on how I should handle this
129213 by: Sarah Heffron
129214 by: Edward Peloke
129215 by: John W. Holmes

socket_select() on STDIN
129216 by: Geir Torstein Kristiansen

mbstring and iconv status and conversion problems
129218 by: Jan Schneider
129220 by: Jan Schneider

Unable to match dollar sign in preg_match
129225 by: Randall Perry
129227 by: John W. Holmes
129228 by: Randall Perry
129237 by: John W. Holmes

Re: upload_max_filesize + ini_set
129226 by: Dan Rossi

Date Subtraction
129229 by: Christopher J. Crane
129231 by: Marco Tabini
129235 by: Justin French

Re: [PHP-WIN] Tutorials on OOP
129230 by: Davy Obdam

php+gif problems take 2
129232 by: cj

mcrypt
129233 by: Ysrael Guzmán
129234 by: Alex Piaz

Re: $_COOKIE and include() or require()
129236 by: Luke Sneeringer

Problem with Include
129238 by: sport4ever

Beginner examples?
129239 by: Chris Rehm

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]


--

---BeginMessage---
Salve,

A chiunque possa interessare, cerco persone su Napoli con cui avere scambi
di pareri e info  circa PHP/MySQL, eventualmente ci sarebbero opportunità
lavorative.

Saluti

--
Armando Alario

ICQ# 172677921



--
Armando Alario

ICQ# 172677921



---End Message---
---BeginMessage---
Axis Computers wrote:



I'm developing a Pizza delivery application which uses printer output, and I
want to know which is the better way to format the output to the printer,
and how can I design a select printer menu (communicate with printer
drivers), so the user can select from a number of POS printers (45 columns
?).


I assume that you mean a printer connected to the client computer, not 
the server? As php is all executed on the server, like other server-side 
languages, it has no access to the client computer (for security reasons).

HTH
Chris

---End Message---
---BeginMessage---
Axis Computers wrote:


Yes, but in my application's case the server and the client are on the same
computer, because the server will act as localhost, so you are saying there
is no way to dump any printer output ?


Ah, you do mean the server. OS dependent. If linux then probably call 
lpr via an exec call in php. If windows then possibly COM. I've not had 
to do this so I'm not going to be the best person to advise here. Any 
printing gurus please chip in.

HTH
Chris

---End Message---
---BeginMessage---
I have a function at the bottom of my script which is called from withing an
if/else statement. If I take it out of the if/else and just call the
function it works fine (except I don't get the results I want). So it
appears where you are calling it from does matter. See the examples below.
This isn't the first time either, I have had to redo several scripts for
this project because of it.  If I'm doing this wrong based on the examples
below, please let me know. Thanks.

i.e.

This doesn't work.This does.

some code .. some code


If ($bob) { gotofunction($bob); }  gotofunction($bob);
elseif ($sally) { gotonextfunction($sally); }
gotonextfunction($sally)
   else { gotolastfunction(); }
gotolastfunction()
some other code . some other
code

function gotofunction($bob)   function
gotofunction($bob)
function gotonextfunction() function
gotonextfunction()
function gotolastfunction()  function
gotolastfunction()


- Original Message -
From: 

[PHP] REMOTE_HOST

2002-12-23 Thread John Taylor-Johnston
I think this is perl? REMOTE_HOST

How can I do this? I want to check the referer. If A do Aa, else Bb
I can't find a variable in phpinfo()

?php
$appareil = getenv('REMOTE_HOST');

if(strpos($appareil, www.foo.ca))
{
echo found $appareil;
}else{
echo did not find $appareil;
}
?


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




[PHP] Re: REMOTE_HOST

2002-12-23 Thread John Taylor-Johnston
The deal is my ISP does a redirect from www.delete.compcanlit.ca to 
www.delete.compcanlit.usherbrooke.ca. I'm trying to if statement the redirect. Again, 
I find no variable in phpinfo().
John


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




RE: [PHP] REMOTE_HOST

2002-12-23 Thread John W. Holmes
 I think this is perl? REMOTE_HOST
 
 How can I do this? I want to check the referer. If A do Aa, else Bb
 I can't find a variable in phpinfo()
 
 ?php
 $appareil = getenv('REMOTE_HOST');
 
 if(strpos($appareil, www.foo.ca))
 {
 echo found $appareil;
 }else{
 echo did not find $appareil;
 }
 ?

What happened when you tried that?

---John W. Holmes...

PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/



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




RE: [PHP] Beginner examples?

2002-12-23 Thread John W. Holmes
 I have a friend who has asked me about some sites she's working on.
She
 maintains multiple sites on different servers. Each of these sites
runs
 a different contest, currently handled by formmail.pl and then some
hand
 entry by her part.
 
 I've suggested she use MySQL, her own host allows it, and modify
 formmail.php to add the records to her SQL database in addition to
 sending her an email (just as backup). Then using an SQL front end to
 retrieve the information when the winners need to be drawn.
 
 Now, she is not a programmer other than the HTML she's been hand
coding.
 I'd like to find a site I can refer her to where she might be able to
 see some example of what she wants to do.
 
 Any recommendations? Did I make a valid suggestion?

http://www.google.com/search?sourceid=navclientie=UTF-8oe=UTF-8q=php+
mysql+tutorial

---John W. Holmes...

PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/



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




[PHP] Timing mySQL query time.

2002-12-23 Thread Noodle Snacks
Is there a built in php function for mysql that I can use to time the last
query?

or do I have to take the microtime before and after then substract the first
from the last?

I want to time how long my queries take



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




Re: [PHP] Timing mySQL query time.

2002-12-23 Thread Rasmus Lerdorf
Why not just get the query times from the mysql general query log?

On Tue, 24 Dec 2002, Noodle Snacks wrote:

 Is there a built in php function for mysql that I can use to time the last
 query?

 or do I have to take the microtime before and after then substract the first
 from the last?

 I want to time how long my queries take



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



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




  1   2   >