php-general Digest 17 Nov 2001 17:29:19 -0000 Issue 1000
Topics (messages 74965 through 74986):
wunderground and php
74965 by: Scott Atkins
74967 by: Fred
Re: alzheimers and confused
74966 by: Fred
74974 by: Robert Klinkenberg
¹Î¿ø»¡¸®´åÄÄ ÀÔ´Ï´Ù
74968 by: ¹Î¿ø»¡¸®´åÄÄ
Re: Question on variable variables
74969 by: Christopher William Wesley
74975 by: Jason G.
74977 by: Jeff Lewis
Proven linux install for freetype 2/tiff?
74970 by: Joelmon2001.aol.com
working HEADER in PHP
74971 by: mahboobeh khossrojerdi
Advantages of php
74972 by: Adrian D'Costa
74976 by: Jason G.
Re: [PHP-DEV] ldap_search sort extension, patch included
74973 by: Stig Venaas
xslt function documentation
74978 by: Papp Gyozo
74980 by: Papp Gyozo
installing php on apache
74979 by: Douglas McKenzie
74982 by: Fred
Re: Apache 2.0.28
74981 by: Vincent Stoessel
relative paths
74983 by: Mitja Pagon
74986 by: Christopher William Wesley
problem with image
74984 by: wloeffelholz.xh9.net
74985 by: Jeff Lewis
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 ---
I would like to use something like the weather script that came with my
linux on my webserver. However, I do not know where to start with
sockets and such. The actual linux script takes too long to run and
output. Any help would be great
Scott
--- End Message ---
--- Begin Message ---
Try doing a Google search:
http://www.google.com/search?q=weather+php+script
There are plenty of PHP weather scripts already out there. Find one that
does most of what you want and change it to fit your needs.
Scott Atkins <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I would like to use something like the weather script that came with my
> linux on my webserver. However, I do not know where to start with
> sockets and such. The actual linux script takes too long to run and
> output. Any help would be great
> Scott
>
--- End Message ---
--- Begin Message ---
AND seems correct to me. If you want to generate an error when the file is
not a jpeg file then the file name must not contain jpg AND must not contain
jpeg. If either jpg OR jpeg is present then no error should occur. Be
careful when using the !not operator with logical condition operators, the
logic becomes more complex.
Fred
Jtjohnston <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> OK kids, I'm not 19 ... my old brain gets tired easily and my wife is
> complaining that I stay up too late PHPing :)
> Putting the rest aside, why does AND work and not OR. OR was what I
> meant?
> I meant ... if the string doesn't contain .jpg or the string doesn't
> contain .jpeg ... > ERROR!
>
> John
>
> <?php
> $errorfound = 0;
> $yourimage =
>
"http://callisto.si.usherb.ca/~ang96m04/cgi-bin/postcards/e.jpegstrie/sap_bu
cket.jpg";
>
> // if((!strpos($yourimage, ".jpg")) or (!strpos($yourimage, ".jpeg")))
> if((!strpos($yourimage, ".jpg")) and (!strpos($yourimage, ".jpeg")))
> {
> $errorfound++;
> echo"Your image \"<font color=\"000000\">$yourimage</font>\"<br> did
> not contain .jpg or .jpeg</b>";
> }else{
> echo"Your image \"<font color=\"000000\">$yourimage</font>\" contains
> .jpg or .jpeg</b>";
> }
>
> ?>
>
>
--- End Message ---
--- Begin Message ---
It depends on how you exactly formulated the test
// if((!strpos($yourimage, ".jpg")) or (!strpos($yourimage, ".jpeg")))
if((!strpos($yourimage, ".jpg")) and (!strpos($yourimage, ".jpeg")))
THe first is
if !jpg or !jpeg
while the second if statement tests for
if !jpg and !jpeg
another way to test this is
if !(jpg or jpeg)
basicly the first one doesn't work because when the filename is jpg it isn't
jpeg so the code executes and when it's jpeg it isn't jpg, and again the
code will execute. the two other tests will correctly test if it's either
jpg or jpeg.
Robert Klinkenberg
-----Oorspronkelijk bericht-----
Van: jtjohnston [mailto:[EMAIL PROTECTED]]
Verzonden: Saturday, November 17, 2001 3:45 AM
Aan: [EMAIL PROTECTED]
Onderwerp: [PHP] alzheimers and confused
OK kids, I'm not 19 ... my old brain gets tired easily and my wife is
complaining that I stay up too late PHPing :)
Putting the rest aside, why does AND work and not OR. OR was what I
meant?
I meant ... if the string doesn't contain .jpg or the string doesn't
contain .jpeg ... > ERROR!
John
--- End Message ---
--- Begin Message ---
http://minwon82.com
php-general´Ô ¾È³çÇϽʴϱî?
¹Î¿ø»¡¸®´åÄÄ ¿¡¼ ÀÎ»ç µå¸³´Ï´Ù.
À̰÷¿¡¼´Â µî±âºÎµîº», ÅäÁö´ëÀå, Á¹¾÷Áõ¸í¼, ¼ºÀûÁõ¸í¼, °æ·ÂÁõ¸í¼, µî
°¢Á¾ ¹Î¿ø 34Á¾À» ¹Ù»Ú½Å Çö´ëÀεéÀ» ´ë½ÅÇÏ¿© ¹ß±Þ´ëÇà ¼ºñ½º Çϰí ÀÖ½À´Ï´Ù.
½ÅûÀ» ÇϽøé ÀÔ±Ý È®ÀÎÈÄ 2½Ã°£ À̳»¿¡ ÆÑ½º³ª À̸ÞÀÏÀ» ÀÌ¿ë ¿¶÷ °¡´ÉÇÏ¸ç ¿øº»ÀÌ
ÇÊ¿äÇϽŠºÐÀº ¿ìÆíÀ̳ª Åù踦 ÀÌ¿ë ¹è´Þµµ ÇØ µå¸³´Ï´Ù.
¸¹Àº ÀÌ¿ëÀ» ¹Ù¶ø´Ï´Ù.
Çã¶ô‘B´Â ¹æ¹® ¿ë¼ÇØ Áֽʽÿä.
°¡Á¤¿¡ Çà¿îÀÌ ´Ã ÇÔ²² ÇÏ½Ã±æ ¹Ù¶ø´Ï´Ù...
À̸ÞÀÏ ÃßÃâ±â¸¦ ÀÌ¿ëÇÏ¿© º» ¸ÞÀÏÀ»
ãÀº À¥»çÀÌÆ®´Â http://www.hunmin.com/help_file/pds/bigmanual.html ÀÔ´Ï´Ù.
<A
HREF=mailto:[EMAIL PROTECTED]?subject=¼ö½Å°ÅºÎ&body=¸ÞÀϼö½ÅÀ»°ÅºÎÇÕ´Ï´Ù>¼ö½Å°ÅºÎ</A>
--- End Message ---
--- Begin Message ---
You sure can. You can use variable variables wherever you can use regular
variables. They're really no different than regular variables, except you
have to keep track of what the variable will be named while coding :)
~Chris /"\
\ / September 11, 2001
X We Are All New Yorkers
/ \ rm -rf /bin/laden
On Fri, 16 Nov 2001, Jeff Lewis wrote:
> Yes trying to get this to work:
>
> $curline = preg_replace("/<yabb\s+(\w+)>/","$$1",$curline);
>
> So for the current line I am looking for something like <yabb copyright> I
> want to replace that with the contents of $copyright.
>
> Can variable variables be used in regular expressions?
>
> Jeff
> ----- Original Message -----
> From: "Christopher William Wesley" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Cc: "Jeff Lewis" <[EMAIL PROTECTED]>
> Sent: Friday, November 16, 2001 10:38 PM
> Subject: Re: [PHP] Question on variable variables
>
>
> > On Fri, 16 Nov 2001, Jeff Lewis wrote:
> >
> > > What I need to do, however, is append a variable portion to a constant
> prefix. So I have a set of variables that are named $MYdog, $MYcat etc. and
> I need to do
> > >
> > > $a = "dog"
> > > ${"MY$a"} being the same as $MYdog
> > >
> > > Can this be done, and if so - how? I can't get it to work.
> >
> > So what you want is a base name with a vaiably-changing portion
> > concatenated? Gotcha!
> >
> > // you variable base name
> > $myVarBase = "MY";
> >
> > $a = cat;
> > $something1 = "This Var Likes Cats";
> >
> > $b = dog;
> > $something2 = "This Var Likes Dogs";
> >
> > $myVarName1 = $myVarBase . $a;
> > $myVarName2 = $myVarBase . $b;
> >
> > // The same as $Mycat = "This Var Likes Cats";
> > ${$myVarName1} = $something1;
> >
> > // The same as $Mydog = "This Var Likes Dogs";
> > ${$myVarName2} = $something2;
> >
> >
> > g.luck
> > ~Chris /"\
> > \ / September 11, 2001
> > X We Are All New Yorkers
> > / \ rm -rf /bin/laden
> >
> >
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
--- End Message ---
--- Begin Message ---
It seems to me that the use of a temp variable may be the clearest
solution, and I doubt any overhead would matter really.
$a = "dog";
$tmp = "MY".$a; //$tmp = "MYdog";
So the following two would be the same:
$$tmp = "Spot";
$MYdog = "Spot";
Good Luck,
Jason Garber
IonZoft.com
At 09:47 PM 11/16/2001 -0500, Jeff Lewis wrote:
>I've a question regarding variable variable I was hoping someone could
>help me with:
>
>All the examples in the manual have the entire variable name being
>variable e.g.
>$a = "hello" and
>$$a being the same as $hello
>
>What I need to do, however, is append a variable portion to a constant
>prefix. So I have a set of variables that are named $MYdog, $MYcat etc.
>and I need to do
>
>$a = "dog"
>${"MY$a"} being the same as $MYdog
>
>Can this be done, and if so - how? I can't get it to work.
>
>Jeff
--- End Message ---
--- Begin Message ---
Thanks Jason and Christoper for replying, here is the solution I came up
with. It takes into account that there could be multiple instances of what
I'm looking for on the same line - got it working late last night:
while (preg_match ("/<yabb\s+(\w+)>/",$curline,$tags))
$curline = preg_replace("/<yabb\s+$tags[1]>/",${$tags[1]},$curline);
Jeff
----- Original Message -----
From: "Jason G." <[EMAIL PROTECTED]>
To: "Jeff Lewis" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Saturday, November 17, 2001 7:02 AM
Subject: Re: [PHP] Question on variable variables
> It seems to me that the use of a temp variable may be the clearest
> solution, and I doubt any overhead would matter really.
>
> $a = "dog";
> $tmp = "MY".$a; //$tmp = "MYdog";
>
> So the following two would be the same:
> $$tmp = "Spot";
> $MYdog = "Spot";
>
> Good Luck,
>
> Jason Garber
> IonZoft.com
>
> At 09:47 PM 11/16/2001 -0500, Jeff Lewis wrote:
> >I've a question regarding variable variable I was hoping someone could
> >help me with:
> >
> >All the examples in the manual have the entire variable name being
> >variable e.g.
> >$a = "hello" and
> >$$a being the same as $hello
> >
> >What I need to do, however, is append a variable portion to a constant
> >prefix. So I have a set of variables that are named $MYdog, $MYcat etc.
> >and I need to do
> >
> >$a = "dog"
> >${"MY$a"} being the same as $MYdog
> >
> >Can this be done, and if so - how? I can't get it to work.
> >
> >Jeff
>
>
>
--- End Message ---
--- Begin Message ---
What is needed to use gd to full capacity to create/modify images?
I figured freetype and tiff support?
Can I simply untar them
./configure
make
make install
for that software, like freetype? I asked the list, and checked the site. No
help
I don't want to install gd/php and find out "Sorry, you can't create images
as intended. Please bang your head against the wall"
So I figured I'd ask lol
Just looking for proven way to get that free type
installed. Does the gd config file need edit?
Very confusing, I even read admin's recall their horror stories
so I hope this is a good place to ask :)
joel
--- End Message ---
--- Begin Message ---
Hi,
I used
header("content-type:text/html;charset='windows-1256'");
and header("content-language:'fa'");
for showing my Farsi messages, in PHP, on browser
but these could not work.
Please help me!
Thanks.
__________________________________________________
Do You Yahoo!?
Find the one for you at Yahoo! Personals
http://personals.yahoo.com
--- End Message ---
--- Begin Message ---
Hi,
Is there somewhere on the PHP site that give a list of advantages, speed,
etc in comparsion with other similar programs. I have a client that is in
ASP and would like to move to PHP and need this info.
Thanks
Adrian
--- End Message ---
--- Begin Message ---
You could check the list archives... This question flys by every week or
two...
-Jason Garber
IonZoft.com
At 01:41 PM 11/17/2001 +0530, Adrian D'Costa wrote:
>Hi,
>
>Is there somewhere on the PHP site that give a list of advantages, speed,
>etc in comparsion with other similar programs. I have a client that is in
>ASP and would like to move to PHP and need this info.
>
>Thanks
>
>Adrian
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]
--- End Message ---
--- Begin Message ---
On Sat, Nov 17, 2001 at 04:31:26AM +0100, Andre Oppermann wrote:
> Hello all,
>
> This patch enhances PHP4's ldap_search with a call to
> ldap_sort_entries().
In what LDAP APIs are ldap_sort_entries defined? What lib/API are you
using? I wonder how well this works, sorting all kinds of Unicode is
more or less impossible, but if some APIs have this function...
I was also thinking of adding support for server side sorting. I'm
thinking of a different PHP API, so that we don't need to add even
more parameters to ldap_search(). Adding parameters to ldap_search()
that only are valid with some APIs is bad I think. What I have in
mind is something like:
ldap_sort($ld, $sortfilter);
ldap_search($ld,...); (as usual)
where the filter is used for all following searches, until a new filter
is defined. Empty filter could turn it off.
Do people think that this is better? I'm about to commit a patch that
replaces the current link pointer, with a structure that might contain
other state PHP needs per link. The link pointer will then be just a
part of the struct. This is needed for set_rebind_proc() which I'm
working on right now. This won't be visible in PHP land, except that
it makes it easy to have an API like what I suggest for ldap_sort().
Before deciding on ldap_sort() I would like to know a bit about what
APIs support it though.
Stig
--- End Message ---
--- Begin Message ---
Hi,
I'd like to know if someone out there knows a good tutorial or
some simple examples about how to use xslt functions.
The manual says the xslt ext is in experimental phase and so
the documentation lacks of even good examples or description
of the function arguments.
I've already read Sablotron's documentation, but some help
will be appriciated, especially for xslt_transform().
Papp Gyozo
- [EMAIL PROTECTED]
--- End Message ---
--- Begin Message ---
OK, I found some hints in the annotated manual.
BTW, I'm looking for hearing any comments on this ...
----- Original Message -----
From: "Papp Gyozo" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, November 17, 2001 11:19 AM
Subject: [PHP] xslt function documentation
> Hi,
>
> I'd like to know if someone out there knows a good tutorial or
> some simple examples about how to use xslt functions.
>
> The manual says the xslt ext is in experimental phase and so
> the documentation lacks of even good examples or description
> of the function arguments.
>
> I've already read Sablotron's documentation, but some help
> will be appriciated, especially for xslt_transform().
>
> Papp Gyozo
> - [EMAIL PROTECTED]
>
>
--- End Message ---
--- Begin Message ---
Hi,
I'm a newbie to php having been working with coldfusion for years.
Recently decided to test it out and have configured a box with Red Hat
Linux 7.1, kde, apache and mysql. These all seem to be running fine but
I can't seem to get a php page to translate.
Im assuming that the web root is var/www/html and I've placed a file
called index.php under that with a simple <php? echo ?> call. However it
just displays the full file rather than translating the call. What am I
doing wrong?
All help appreciated.
TIA
Doug
--- End Message ---
--- Begin Message ---
There are a number of things that could be wrong. It is difficult to tell
without knowing any details. I am drawn to the fact that you are just
assuming the web root. I don't know if you installed from RPMs or source,
but if var/www/html is not set as Apache's document root when you point
Konqueror at that file it is not using Apache to render it, it is just
treating it as a text file to view. Check Apache's httpd.conf file to see
what the document root is set to and either change it to var/www/html or
move your file to the directory that it is set to.
Fred
Douglas McKenzie <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi,
>
> I'm a newbie to php having been working with coldfusion for years.
>
> Recently decided to test it out and have configured a box with Red Hat
> Linux 7.1, kde, apache and mysql. These all seem to be running fine but
> I can't seem to get a php page to translate.
>
> Im assuming that the web root is var/www/html and I've placed a file
> called index.php under that with a simple <php? echo ?> call. However it
> just displays the full file rather than translating the call. What am I
> doing wrong?
>
> All help appreciated.
>
> TIA
>
> Doug
>
--- End Message ---
--- Begin Message ---
The current php will work with apache 2.x
use: --with-apxs2
when you configure php
Jobarr wrote:
> I need a build of PHP that can be used as a module with Apache 2.0.28 beta.
> Anyone know where I could find one?
>
> thanks
> -Jobarr
>
>
>
>
--
Vincent Stoessel [EMAIL PROTECTED]
Java Linux Apache Mysql Php (JLAMP) Engineer
(301) 362-1750 Mobile (410) 419-8588
AIM, MSN: xaymaca2020 , Yahoo Messenger: vks_jamaica
--- End Message ---
--- Begin Message ---
Hi!
I want to know if there is a way to include(require) a file using a path
relative to web server root.
I'm aware of the fact that you can specify include path, but I believe that
this is not the best solution, since applications written that way aren't
easily portable.
What I'm looking for is something similar to what "/" does in HTML paths and
SSI include directives.
Thanks,
Mitja Pagon
--- End Message ---
--- Begin Message ---
On Sat, 17 Nov 2001, Mitja Pagon wrote:
> I want to know if there is a way to include(require) a file using a path
> relative to web server root.
I think you'll find the $DOCUMENT_ROOT environment variable handy :)
~Chris /"\
\ / September 11, 2001
X We Are All New Yorkers
--- End Message ---
--- Begin Message ---
when i want to put an image like this (echo "<img src='image.gif'>";), my
php is not able to show the image?
is there something wrong with my php.ini??
greetings
wolf.dietrich von loeffelholz
--- End Message ---
--- Begin Message ---
I would think it's an HTML problem, try:
echo "<img src=\"image.gif\">";
or
echo '<img src="image.gif">';
Jeff
----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, November 17, 2001 11:20 AM
Subject: [PHP] problem with image
> when i want to put an image like this (echo "<img src='image.gif'>";), my
> php is not able to show the image?
>
> is there something wrong with my php.ini??
>
> greetings
> wolf.dietrich von loeffelholz
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
>
--- End Message ---