php-general Digest 23 Dec 2002 15:29:16 -0000 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]


----------------------------------------------------------------------
--- Begin Message ---
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 ---
--- Begin Message ---
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
>

--- End Message ---
--- Begin Message ---
On Sunday 22 December 2002 13:52, Noel Wade wrote:
> Hi All,
>
> Relatively new PHP coder (was in an MS / ASP shop before)...  I'm doing
> some flat-file manipulation (please, spare me the database comments, I'm
> working on it!), and I'm having to read strings out of one file and copy
> them into another until a while() condition is satisfied.
>
> The problem is, I seem to always end up with a blank line at the end of my
> files (which then screws up later file-processing) - I'm assuming because
> of the \n that fwrite() appends to the end of each string...

fwrite() only writes what you tell it to write ...

> Is there a simple way to get rid of this blank line or somehow get fwrite()
> to NOT put a newline on the end of a string?

... so it must be your code which is putting it there? Please post your code.

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

/*
A rock pile ceases to be a rock pile the moment a single 
man contemplates it, bearing within him the image of a cathedral.
                -- Antoine de Saint-Exupery
*/

--- End Message ---
--- Begin Message ---
On Sunday 22 December 2002 22:14, Dave J. Hala Jr. wrote:
> This field contains ONLY the \Z.  Thanks for the suggestion but it
> generates the following error message:
>
> Parse error: parse error, unexpected '\"' in
>
> On Sun, 2002-12-22 at 04:49, Mattia wrote:
> > "Dave J. Hala Jr." <[EMAIL PROTECTED]> ha scritto nel messaggio
> > 1040500684.942.130.camel@badboy">news:1040500684.942.130.camel@badboy...
> >
> > > I've got a bunch of fields in a mysql database that have a \Z character
> > > in them.  I want to search a field for \Z and if it contains that
> > > character, make the field blank.
> > >
> > > In running php 4.x on RH 8.0
> > >
> > > Here is the code:
> > >
> > >         $connection = db_connect("Could not connect  DB");
> > >         $SQL="SELECT id,PVLN from lhpl_side WHERE PVLN =\"\\Z\" ";
> > >         $result= mysql_query($SQL,$connection) or die (mysql_error());
> > >         $num = mysql_numrows($result);
> >
> > You are looking for a field that is a string and consist of a \Z
> > character! not more not less. I don't understand if this is what you want
> > or you want to find all fields that CONTAIN a \Z in any position. In this
> > case the correct query would be
> >
> > select id,PVLN from lhpl_side WHERE PVLN  LIKE \"%\\Z\%"

Try:

  $SQL = "SELECT id,PVLN from lhpl_side WHERE PVLN = '\\Z'";

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

/*
Someone else stole your IP address, call the Internet detectives!
*/

--- End Message ---
--- Begin Message --- Hi all ,

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) ?

Thanks .

Perseus



_________________________________________________________________
The new MSN 8: smart spam protection and 3 months FREE*. http://join.msn.com/?page=features/junkmail&xAPID=42&PS=47575&PI=7324&DI=7474&SU= http://www.hotmail.msn.com/cgi-bin/getmsg&HL=1216hotmailtaglines_smartspamprotection_3mf

--- End Message ---
--- Begin Message ---
You are going to have to depend on something.  If you don't want to use
GD, you are going to need some external mechanism which will have to be
available.

-Rasmus

On Mon, 23 Dec 2002, Centaur zeus wrote:

> Hi all ,
>
>     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) ?
>
>     Thanks .
>
> Perseus
>
>
>
> _________________________________________________________________
> The new MSN 8: smart spam protection and 3 months FREE*.
> http://join.msn.com/?page=features/junkmail&xAPID=42&PS=47575&PI=7324&DI=7474&SU=
> 
>http://www.hotmail.msn.com/cgi-bin/getmsg&HL=1216hotmailtaglines_smartspamprotection_3mf
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

--- End Message ---
--- Begin Message ---
Is there some common utilities recommended ?

From: Rasmus Lerdorf <[EMAIL PROTECTED]>
To: Centaur zeus <[EMAIL PROTECTED]>
CC: [EMAIL PROTECTED]
Subject: Re: [PHP] Thumbnail generation
Date: Sun, 22 Dec 2002 21:07:35 -0800 (PST)

You are going to have to depend on something. If you don't want to use
GD, you are going to need some external mechanism which will have to be
available.

-Rasmus

On Mon, 23 Dec 2002, Centaur zeus wrote:

> Hi all ,
>
> 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) ?
>
> Thanks .
>
> Perseus
>
>
>
> _________________________________________________________________
> The new MSN 8: smart spam protection and 3 months FREE*.
> http://join.msn.com/?page=features/junkmail&xAPID=42&PS=47575&PI=7324&DI=7474&SU=
> http://www.hotmail.msn.com/cgi-bin/getmsg&HL=1216hotmailtaglines_smartspamprotection_3mf
>
>
> --
> 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

_________________________________________________________________
Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963

--- End Message ---
--- Begin Message ---
On Monday 23 December 2002 14:26, Centaur zeus wrote:
> Is there some common utilities recommended ?

ImageMagick

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

/*
It's not easy, being green.
                -- Kermit the Frog
*/

--- End Message ---
--- Begin Message ---
>     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...

--- End Message ---
--- Begin Message ---
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/

--- End Message ---
--- Begin Message ---
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



--- End Message ---
--- Begin Message ---
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


--- End Message ---
--- Begin Message --- 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.
-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-
--- End Message ---
--- Begin Message --- 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. 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 cookies are set with a path of "/", and if I access common.php directly, the variables are there and accessable. They just don't go through an include() or require(). I don't understand why this is, since the PHP documentation says that all variables available to the parent file at the time of an include() or require() tag are available to the included file also.

Does anyone know of a solution to this problem? Any help would be appreciated.

--
Luke Sneeringer
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
http://www.aggieruf.org/
--- End Message ---
--- Begin Message ---
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


--- End Message ---
--- Begin Message --- 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


--- End Message ---
--- Begin Message ---
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

--- End Message ---
--- Begin Message ---
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.
*/

--- End Message ---
--- Begin Message ---
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


--- End Message ---
--- Begin Message ---
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


--- End Message ---
--- Begin Message ---
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
> 
> 

--- End Message ---
--- Begin Message ---
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

--- End Message ---
--- Begin Message ---
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

--- End Message ---
--- Begin Message ---
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

--- End Message ---
--- Begin Message ---
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"
*/

--- End Message ---
--- Begin Message ---
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.


--- End Message ---
--- Begin Message ---
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

--- End Message ---
--- Begin Message ---
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

--- End Message ---
--- Begin Message ---
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


--- End Message ---
--- Begin Message ---
At 03:05 PM 12/22/02 +0000, 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

--- End Message ---
--- Begin Message ---
yet another regex question how could i hange the value within the quotes
with preg_replace

php_value upload_max_filesize "5M"


--- End Message ---
--- Begin Message ---
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
*/

--- End Message ---
--- Begin Message ---
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

--- End Message ---
--- Begin Message ---
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


--- End Message ---
--- Begin Message ---
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


--- End Message ---
--- Begin Message ---
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.  :)


--- End Message ---
--- Begin Message ---
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
--- End Message ---
--- Begin Message ---
> -----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 
--- End Message ---
--- Begin Message ---
> -----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 

--- End Message ---
--- Begin Message ---
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


--- End Message ---
--- Begin Message ---
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.

--- End Message ---
--- Begin Message --- 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

--- End Message ---
--- Begin Message ---
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

--- End Message ---
--- Begin Message ---
> 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...

--- End Message ---
--- Begin Message ---
> 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

--- End Message ---
--- Begin Message ---
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

--- End Message ---
--- Begin Message ---
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
> 

--- End Message ---
--- Begin Message ---
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


--- End Message ---
--- Begin Message ---
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
--- End Message ---
--- Begin Message ---
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
--- End Message ---
--- Begin Message ---
> 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

--- End Message ---
--- Begin Message ---
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


--- End Message ---
--- Begin Message ---
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]
--- End Message ---
--- Begin Message ---
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
>
>

--- End Message ---
--- Begin Message ---
> You can, however, use PHP to generate
> JavaScript that will set the window parameters when executed.

How would I do that?

Jody
--- End Message ---
--- Begin Message ---
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
>

--- End Message ---
--- Begin Message ---
> Use PHP print/echo statements to create the JavaScript code, 
> just as you would HTML code.

Um... How would you go about doing that?
--- End Message ---
--- Begin Message ---
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
>
>

--- End Message ---
--- Begin Message ---
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
__________________________________________________________________

--- End Message ---
--- Begin Message ---
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..


--- End Message ---
--- Begin Message ---
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
>
>

--- End Message ---
--- Begin Message ---
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() ?


--- End Message ---

Reply via email to