php-general Digest 16 Apr 2001 18:18:43 -0000 Issue 631

Topics (messages 48708 through 48787):

Re: fwrite not writing
        48708 by: Plutarck
        48717 by: CC Zona
        48729 by: Plutarck

Re: Want a Good Book for Ref on PHP
        48709 by: Plutarck
        48710 by: eschmid+sic.s.netic.de
        48719 by: Navid Yar
        48754 by: Christian Reiniger
        48758 by: Ulf Wendel
        48766 by: Plutarck
        48769 by: Phillip Bow

fetching recursive mail parts
        48711 by: Madis Malv

dates
        48712 by: Alvin Tan
        48718 by: CC Zona
        48720 by: Maxim Maletsky

General WebServer Question?
        48713 by: Jason Caldwell
        48730 by: Plutarck
        48756 by: Christian Reiniger

global env variables not working in php-cgi
        48714 by: Franklin Hays
        48733 by: Plutarck
        48762 by: Franklin Hays
        48764 by: Plutarck
        48767 by: Plutarck
        48787 by: Franklin Hays

PHP4.0.4pl1+PdfLib3.03+SCO
        48715 by: Chris Fry

fileupload,suexec,virtualhost
        48716 by: juang

Re: store array in a file?
        48721 by: Keyur Kalaria

What does "url_rewriter.tags" do?
        48722 by: CC Zona
        48723 by: Emil Rasmussen
        48725 by: CC Zona

enabling PHP functions only on specific virtual hosts
        48724 by: indrek siitan
        48728 by: Felix Kronlage
        48778 by: indrek siitan
        48781 by: Felix Kronlage

Re:user info?
        48726 by: Miguel Loureiro

Protecting JavaScripts from being Donwloaded
        48727 by: Steve Haemelinck
        48731 by: John Lim
        48735 by: Plutarck

Re: PCRE vs. POSIX
        48732 by: John Lim
        48734 by: Felix Kronlage

Re: unregister part of array in session
        48736 by: Tobias Talltorp
        48739 by: Yasuo Ohgaki

the search for Ade Smith
        48737 by: alt.music

resource id #2
        48738 by: Greg K
        48742 by: Morgan Curley
        48747 by: Tobias Talltorp
        48749 by: Ulf Wendel
        48750 by: Tobias Talltorp

Mailing list script ?
        48740 by: Toxik - Fabian Rodriguez

PEAR
        48741 by: Boget, Chris
        48743 by: Pavel Jartsev
        48744 by: Ulf Wendel
        48746 by: Boget, Chris
        48748 by: Boget, Chris
        48751 by: Ulf Wendel

include path per script
        48745 by: Martín Marqués
        48755 by: Ulf Wendel

(Absolute beginner)  .PHP3 and  .HTM
        48752 by: ulrichk.debitel.net
        48757 by: Seung-woo Nam

session variable problem
        48753 by: SERKAN BALKANLI (EBÝ Bþk.-Analist Prog.)
        48777 by: Tobias Talltorp

Re: MySQL Results NULL Error
        48759 by: Jason Stechschulte

Wrox - Beginning PHP4 Ch12 example problem
        48760 by: Dave Mateer

php sessions and proxies.
        48761 by: Larry Hotchkiss

Re: php-lib questions
        48763 by: Mark

Re: accepting credit cards
        48765 by: Jeff Pearson

Variables not getting passed when I post info
        48768 by: Brandon Orther
        48770 by: Plutarck
        48771 by: Ulf Wendel

Array problem again.
        48772 by: Martin Skjöldebrand

is it safe to stripslashes() on all form variables?
        48773 by: Noah Spitzer-Williams
        48774 by: Plutarck

ldap_search...no results!
        48775 by: Miguel Carvalho

PEAR_Error
        48776 by: Boget, Chris
        48780 by: Ulf Wendel

True Appreciation
        48779 by: Jason Caldwell

install problem
        48782 by: Michael Geier

Blur some text please
        48783 by: Brandon Orther

Installing PHP Extentions for IIS - W2K - Is it possible?
        48784 by: SED

Link to a html in PHP Code
        48785 by: Johannes Rumpf
        48786 by: Luis

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]


----------------------------------------------------------------------


What is this:

!filesize($filepath)

Add this above your if loop:

$filesize = filesize($filepath);
echo $filesize;


That might be causing your loop not to execute...if not, I'm not sure what's
wrong.


--
Plutarck
Should be working on something...
...but forgot what it was.


"CC Zona" <[EMAIL PROTECTED]> wrote in message
9bdv8u$2la$[EMAIL PROTECTED]">news:9bdv8u$2la$[EMAIL PROTECTED]...
> This function suddenly stopped working, and I just can't seem to figure
out
> why.  The only change made recently is that now the value of $force at
> calltime is sometimes true instead of being undefined or null.
>
> build_file("file_content","/path/to/file.inc","w",TRUE);
>
> function build_file($func_name,$filepath,$mode="w",$force=FALSE)
>    {
>    if($force or !file_exists($filepath) or !filesize($filepath)) //echo
> filesize($filepath) shows '0'
>       {
>       $content=$func_name(); //echo $content shows it's all there
>        $fp=fopen($filepath,$mode);
>        fwrite($fp,$content);
>        rewind($fp); #temp test
>       $read_back=fread($fp,100000); #temp test
>       echo "<p>file content:</p>\n $read_back"; #temp test, displays
nothing
>      fclose($fp);
>       }
>    }
>
> I've tried putting echoes and "or die('Error on __LINE__')" on every line,
> checked all the variable values, and found no answers from that.
> Everything shows exactly as it should be except that the content that
> echoes out so nicely *doesn't ever get written to the file*.  The function
> runs to the end without error and the file's modification date is even
> updated.  But the file remains empty. I'm probably missing something
> ridiculously obvious, but would someone please be kind enough to point out
> what it is?  Thank you!!
>
> --
> CC
>
> --
> 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]
>






> > This function suddenly stopped working, and I just can't seem to figure
> out
> > why.  The only change made recently is that now the value of $force at
> > calltime is sometimes true instead of being undefined or null.
> >
> > build_file("file_content","/path/to/file.inc","w",TRUE);
> >
> > function build_file($func_name,$filepath,$mode="w",$force=FALSE)
> >    {
> >    if($force or !file_exists($filepath) or !filesize($filepath)) //echo
> > filesize($filepath) shows '0'
> >       {
> >       $content=$func_name(); //echo $content shows it's all there
> >        $fp=fopen($filepath,$mode);
> >        fwrite($fp,$content);
> >        rewind($fp); #temp test
> >       $read_back=fread($fp,100000); #temp test
> >       echo "<p>file content:</p>\n $read_back"; #temp test, displays
> nothing
> >      fclose($fp);
> >       }
> >    }
> >
> > I've tried putting echoes and "or die('Error on __LINE__')" on every line,
> > checked all the variable values, and found no answers from that.
> > Everything shows exactly as it should be except that the content that
> > echoes out so nicely *doesn't ever get written to the file*.  The function
> > runs to the end without error and the file's modification date is even
> > updated.  But the file remains empty. I'm probably missing something
> > ridiculously obvious, but would someone please be kind enough to point out
> > what it is?  Thank you!!

> What is this:
> 
> !filesize($filepath)

If filesize is zero (which it is <groan>), then do the rest (which it 
does--except the content it fetches never makes it into the file it writes 
to.  How that can be, I dunno, but that apparently is what it's doing...)

> Add this above your if loop:
> 
> $filesize = filesize($filepath);
> echo $filesize;

Already tried echoing that and all the other values.  Filesize is 0.

> That might be causing your loop not to execute...if not, I'm not sure what's
> wrong.

I don't get it.  It should work.  It did work.  Suddenly it's not.

-- 
CC




Ahhh, I see what's going on now. I had more time to read over the code, so
now I see what you are trying to do.

I'm not sure why it suddenly stopped working, but let's see if you actually
need it to work.

First of all, I take it that you have content which you want to write into a
file. Correct?

If so, why does it matter if the file you want to write it to has data
anyway? If you are just going to add data into it, isn't it ok that it is a
zerolength file?

Or is the problem that the file is _not_ actually zerolength, but PHP says
it's zerolength anyway?

Just try removing the !filesize() part, and then try executing the function.

But maybe I just don't understand what you are trying to write and why.
Could you be a little more specific what data is being saved in the file,
and what is in the file already?


--
Plutarck
Should be working on something...
...but forgot what it was.


"CC Zona" <[EMAIL PROTECTED]> wrote in message
9bebi3$133$[EMAIL PROTECTED]">news:9bebi3$133$[EMAIL PROTECTED]...
> > > This function suddenly stopped working, and I just can't seem to
figure
> > out
> > > why.  The only change made recently is that now the value of $force at
> > > calltime is sometimes true instead of being undefined or null.
> > >
> > > build_file("file_content","/path/to/file.inc","w",TRUE);
> > >
> > > function build_file($func_name,$filepath,$mode="w",$force=FALSE)
> > >    {
> > >    if($force or !file_exists($filepath) or !filesize($filepath))
//echo
> > > filesize($filepath) shows '0'
> > >       {
> > >       $content=$func_name(); //echo $content shows it's all there
> > >        $fp=fopen($filepath,$mode);
> > >        fwrite($fp,$content);
> > >        rewind($fp); #temp test
> > >       $read_back=fread($fp,100000); #temp test
> > >       echo "<p>file content:</p>\n $read_back"; #temp test, displays
> > nothing
> > >      fclose($fp);
> > >       }
> > >    }
> > >
> > > I've tried putting echoes and "or die('Error on __LINE__')" on every
line,
> > > checked all the variable values, and found no answers from that.
> > > Everything shows exactly as it should be except that the content that
> > > echoes out so nicely *doesn't ever get written to the file*.  The
function
> > > runs to the end without error and the file's modification date is even
> > > updated.  But the file remains empty. I'm probably missing something
> > > ridiculously obvious, but would someone please be kind enough to point
out
> > > what it is?  Thank you!!
>
> > What is this:
> >
> > !filesize($filepath)
>
> If filesize is zero (which it is <groan>), then do the rest (which it
> does--except the content it fetches never makes it into the file it writes
> to.  How that can be, I dunno, but that apparently is what it's doing...)
>
> > Add this above your if loop:
> >
> > $filesize = filesize($filepath);
> > echo $filesize;
>
> Already tried echoing that and all the other values.  Filesize is 0.
>
> > That might be causing your loop not to execute...if not, I'm not sure
what's
> > wrong.
>
> I don't get it.  It should work.  It did work.  Suddenly it's not.
>
> --
> CC
>
> --
> 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]
>






Personally, I never even bought a PHP book. I learned from the web
only...hehe.

First, go to zend.com and check out their tutorial and article sections.
Then check out their links section, which just so happens to have links to
17 books, 10 of which are non-english.

Check out phpbuilder.com, devshed.com, and phpbeginner.com. weberdev is also
a good one.


First of course, read the PHP manual. I basically learned everything I
needed to from those sites. The rest comes from just hacking out code.

PHP changed alot during the books writing process, so it's really rather
impossible to get a totally updated book. For instance if you started
writing a book now on PHP v4.0.5, PHP would be nearing version 5 before it
ever hit a bookshelf.


--
Plutarck
Should be working on something...
...but forgot what it was.


"Manisha" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi all,
>
> I am just entering into PHP world. First what I did is, I signed for PHP
> mailing list.
>
> I want to buy a good PHP book for my initial start and may be later on as
a
> reference. I know there are lot in the market. Can anybody suggest a good
> book among them ?
>
> manisha
>
>
> --
> 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]
>






On Mon, Apr 16, 2001 at 01:23:46AM -0500, Plutarck wrote:
 
> First, go to zend.com and check out their tutorial and article sections.
> Then check out their links section, which just so happens to have links to
> 17 books, 10 of which are non-english.

Why don't you visit php.net/books.php? There you can find much more books.

> First of course, read the PHP manual. I basically learned everything I
> needed to from those sites. The rest comes from just hacking out code.

Many thanks! I'havent noticed that some people read this manual.
 
> PHP changed alot during the books writing process, so it's really rather
> impossible to get a totally updated book. For instance if you started
> writing a book now on PHP v4.0.5, PHP would be nearing version 5 before it
> ever hit a bookshelf.

I don't see your point here, PHP version 4 and 5 would be compatible. If
you are interested into the latest features, you have to read journals
instead of books. 

-Egon

-- 
LinuxTag, Stuttgart, Germany: July 5-8 2001: http://www.linuxtag.de/
All known books about PHP and related books: http://php.net/books.php 
Concert Band of the University of Hohenheim: http://www.concert-band.de/
First and second bestselling book in German: http://www.php-buch.de/




You know, I was wondering the same thing. My situation is the same. My
opinion is that the professional version probably strips out most of the
beginner's content and adds more advanced php content and dives into
everything in more detail rather than just trying to get a beginner off
their feet by providing simple tasks

Wrox is a great company, they come out with books that are the most
comprehensive. Both versions might be a good investment for hardcore php
programmers. Best thing to do is to just stop by a barnes and nobles
bookstore and start looking through both books to see which one is best for
you.

Navid



-----Original Message-----
From: Martin Skjoldebrand [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 16, 2001 12:53 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Want a Good Book for Ref on PHP


Kath wrote:

> Professional PHP Programming:
>
http://www.amazon.com/exec/obidos/ASIN/1861002963/qid=987388364/sr=1-12/ref=
> sc_b_13/002-2263539-0333643

I've got Beginning PHP 4 (recommended) on the back cover of which it says
that the next book could be "Professional PHP Programming.".
However from what I saw in the book shop they cover lots of the same
ground. I (and my employer) wouldn't like to pay for the same stuff again.
Is there a significant difference between the two?

Martin S.

--
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]





On Monday 16 April 2001 08:23, you wrote:
> Personally, I never even bought a PHP book. I learned from the web
> only...hehe.

Same here.
Well, actually I *did* buy a book - "Core PHP programming". I started 
reading it, saw that it basically only covers (a) introductory 
programming in general (what is a 'while' loop?) and (b) a PHP3 function 
reference (copied from the online manual), and I immediately went back to 
the web resources.

That doesn't mean you shouldn't buy any book - the cookbook for example 
certainly is very useful both as starter (giving examples) and later on 
(giving more complex examples :).

But (1) never forget to have the online manual at hand and (2) check 
phpbuilder.com etc for new interesting articles from time to time

-- 
Christian Reiniger
LGDC Webmaster (http://sunsite.dk/lgdc/)

(A)bort (R)etry (P)retend this never happened ...






Christian Reiniger schrieb:
> 
> On Monday 16 April 2001 08:23, you wrote:
> > Personally, I never even bought a PHP book. I learned from the web
> > only...hehe.
> 
> Same here.
> Well, actually I *did* buy a book - "Core PHP programming". I started
> reading it, saw that it basically only covers (a) introductory
> programming in general (what is a 'while' loop?) and (b) a PHP3 function
> reference (copied from the online manual), and I immediately went back to
> the web resources.
> 
> That doesn't mean you shouldn't buy any book - the cookbook for example
> certainly is very useful both as starter (giving examples) and later on
> (giving more complex examples :).

Hmm, although Sterlings book is cool, german readers can save the money
an check the german FAQ on http://www.koehntopp.de/php. It covers most
of Sterlings book except the PHP core hacking. The advanced book I like
best is "Web application development with PHP 4.0" written by
Till&Tobel. Don't expect a PHP only book, the authors did very well not
to copy the online reference or the usual tutorials. Till&Tobel wrote a
book for those that have a solid basic programming knowledge but lack
some more advanced skills like API design or certain web development
strategies (CVS, staging server, development process, ...). 

Ulf

-- 
Neu: PEAR Menu 3 - Navigationsstrukturen dynamisch dargestellt
http://www.ulf-wendel.de/projekte/menu/tutorial.php |
http://www.phpdoc.de




Woh, that book looks excellant.

I think I may order it, actually.

It is absolutely _hell_ to find a good advanced programming or internet
technology book.

If the book doesn't expect you to be a moron (how many morons are interested
in the implementation of TCP/IP, anyway?), it expects you to be a complete
wizard (which basically means the book is a 400 page reference manual).

It's hard to find a book on computers that is for an
advanced-but-not-perfect user.

*orders*

I'll give me review to the list once I get it :)


--
Plutarck
Should be working on something...
...but forgot what it was.


"Ulf Wendel" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
>
> Christian Reiniger schrieb:
> >
> > On Monday 16 April 2001 08:23, you wrote:
> > > Personally, I never even bought a PHP book. I learned from the web
> > > only...hehe.
> >
> > Same here.
> > Well, actually I *did* buy a book - "Core PHP programming". I started
> > reading it, saw that it basically only covers (a) introductory
> > programming in general (what is a 'while' loop?) and (b) a PHP3 function
> > reference (copied from the online manual), and I immediately went back
to
> > the web resources.
> >
> > That doesn't mean you shouldn't buy any book - the cookbook for example
> > certainly is very useful both as starter (giving examples) and later on
> > (giving more complex examples :).
>
> Hmm, although Sterlings book is cool, german readers can save the money
> an check the german FAQ on http://www.koehntopp.de/php. It covers most
> of Sterlings book except the PHP core hacking. The advanced book I like
> best is "Web application development with PHP 4.0" written by
> Till&Tobel. Don't expect a PHP only book, the authors did very well not
> to copy the online reference or the usual tutorials. Till&Tobel wrote a
> book for those that have a solid basic programming knowledge but lack
> some more advanced skills like API design or certain web development
> strategies (CVS, staging server, development process, ...).
>
> Ulf
>
> --
> Neu: PEAR Menu 3 - Navigationsstrukturen dynamisch dargestellt
> http://www.ulf-wendel.de/projekte/menu/tutorial.php |
> http://www.phpdoc.de
>
> --
> 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]
>






I started with the Professional PHP Programming book.  It covers all of the
info a beginner would need in good detail.  I haven't taken a look at the
Beginner's book, but I would suggest getting the Professional one as it
provides everything you need to get started, and then jumps right into the
next level stuff(Db development, mail features, etc...).
--
phill

""Navid Yar"" <[EMAIL PROTECTED]> wrote in message
000201c0c657$158b9ee0$[EMAIL PROTECTED]">news:000201c0c657$158b9ee0$[EMAIL PROTECTED]...
> You know, I was wondering the same thing. My situation is the same. My
> opinion is that the professional version probably strips out most of the
> beginner's content and adds more advanced php content and dives into
> everything in more detail rather than just trying to get a beginner off
> their feet by providing simple tasks
>
> Wrox is a great company, they come out with books that are the most
> comprehensive. Both versions might be a good investment for hardcore php
> programmers. Best thing to do is to just stop by a barnes and nobles
> bookstore and start looking through both books to see which one is best
for
> you.
>
> Navid
>
>
>
> -----Original Message-----
> From: Martin Skjoldebrand [mailto:[EMAIL PROTECTED]]
> Sent: Monday, April 16, 2001 12:53 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] Want a Good Book for Ref on PHP
>
>
> Kath wrote:
>
> > Professional PHP Programming:
> >
>
http://www.amazon.com/exec/obidos/ASIN/1861002963/qid=987388364/sr=1-12/ref=
> > sc_b_13/002-2263539-0333643
>
> I've got Beginning PHP 4 (recommended) on the back cover of which it says
> that the next book could be "Professional PHP Programming.".
> However from what I saw in the book shop they cover lots of the same
> ground. I (and my employer) wouldn't like to pay for the same stuff again.
> Is there a significant difference between the two?
>
> Martin S.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
> --
> PHP 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]
>





I have that message (at the end of this message) which has recursive 
parts. First part is a message itself and second is an attachment. 
Message part is divided into two parts (text/plain and text/html). Is 
there any way I can fetch only text/html that is part[0]->part[1] to 
$body variable with imap functions?

Thanks,
Madis

*********************************************************
This is a multi-part message in MIME format.

------=_NextPart_000_0012_01C0C331.9C5F9EE0
Content-Type: multipart/alternative;
boundary="----=_NextPart_001_0013_01C0C331.9C5F9EE0"


------=_NextPart_001_0013_01C0C331.9C5F9EE0
Content-Type: text/plain;
charset="iso-8859-4"
Content-Transfer-Encoding: quoted-printable

see kiri on qp formaadis
vaatame, mis formaadis on attachment

------=_NextPart_001_0013_01C0C331.9C5F9EE0
Content-Type: text/html;
charset="iso-8859-4"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-4">
<META content=3D"MSHTML 5.50.4522.1801" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT size=3D2>see kiri on qp formaadis</FONT></DIV>
<DIV><FONT size=3D2>vaatame, mis formaadis on=20
attachment</FONT></DIV></BODY></HTML>

------=_NextPart_001_0013_01C0C331.9C5F9EE0--

------=_NextPart_000_0012_01C0C331.9C5F9EE0
Content-Type: application/x-msexcel;
name="EXHIBIT_C.xls"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="EXHIBIT_C.xls"

0M8R4KGxGuEAAAAAAAAAAAAAAAAAAAAAPgADAP7/CQAGAAAAAAAAAAAAAAABAAAAGQAAAA
AAAAAA
EAAA/v///wAAAAD+////AAAAABgAAAD///////////////////////////////////////
//////
//////////////////////////////////////////////////////////////////////
//////etc.

------=_NextPart_000_0012_01C0C331.9C5F9EE0--






hi all,

a little stuck here. trying to pull a bunch of unix timestamps out and show
only those that show up today. problem is that when i hit the first match,
the rest of the dates don't show. code follows:

======================

$sql = "SELECT * FROM dates";
$result = mysql_query($sql) or mysql_die();

while ($a = mysql_fetch_array($result))


$showsID = $a[showsID];
$ts = $a[timestamp];
$endTime=(spanDay ($ts)); // function that adds 24hrs to initial stamp to
make the end of day time.
$today = time();
if (($endTime >= $today)&&($ts <= $today))
                {
$sq = "SELECT * FROM shows WHERE id=$showsID";
$result = mysql_query($sq) or mysql_die();
$b = mysql_fetch_array($result);
print "<br><font color=red>$b[name]</font><br>";
                }
        }

======================

thanks in advance,

@lvin







In article <[EMAIL PROTECTED]>,
 [EMAIL PROTECTED] ("Alvin Tan") wrote:

> a little stuck here. trying to pull a bunch of unix timestamps out and show
> only those that show up today. problem is that when i hit the first match,
> the rest of the dates don't show. code follows:
> 
> ======================
> 
> $sql = "SELECT * FROM dates";
> $result = mysql_query($sql) or mysql_die();
> 
> while ($a = mysql_fetch_array($result))
> 
> 
> $showsID = $a[showsID];
> $ts = $a[timestamp];
> $endTime=(spanDay ($ts)); // function that adds 24hrs to initial stamp to
> make the end of day time.
> $today = time();
> if (($endTime >= $today)&&($ts <= $today))
>               {
> $sq = "SELECT * FROM shows WHERE id=$showsID";
> $result = mysql_query($sq) or mysql_die();
> $b = mysql_fetch_array($result);
> print "<br><font color=red>$b[name]</font><br>";
>               }
>       }

Which of the queries are you concerned with, 'cuz on that second query 
you're only fetching array $b once.  Wrap a while() loop around  it like 
you did with array $a if you want more rows.

BTW, you're missing an opening curly brace for the first while().

-- 
CC




Why don't you look into mYSQL documentation and rewrite your queries,

you might be able to end up with one only single query and 3 lines of PHP,
instead of the whole bunch as you're trying to do.

The reason I advise you that is that mySQL plays some really sweet games
with dates, while PHP treats them as simple set of integers...

Hope it helps.


Sincerely,

 Maxim Maletsky
 Founder, Chief Developer

 PHPBeginner.com (Where PHP Begins)
 [EMAIL PROTECTED]
 www.phpbeginner.com



-----Original Message-----
From: Alvin Tan [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 16, 2001 4:21 PM
To: Php-General
Subject: [PHP] dates


hi all,

a little stuck here. trying to pull a bunch of unix timestamps out and show
only those that show up today. problem is that when i hit the first match,
the rest of the dates don't show. code follows:

======================

$sql = "SELECT * FROM dates";
$result = mysql_query($sql) or mysql_die();

while ($a = mysql_fetch_array($result))


$showsID = $a[showsID];
$ts = $a[timestamp];
$endTime=(spanDay ($ts)); // function that adds 24hrs to initial stamp to
make the end of day time.
$today = time();
if (($endTime >= $today)&&($ts <= $today))
                {
$sq = "SELECT * FROM shows WHERE id=$showsID";
$result = mysql_query($sq) or mysql_die();
$b = mysql_fetch_array($result);
print "<br><font color=red>$b[name]</font><br>";
                }
        }

======================

thanks in advance,

@lvin




-- 
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]




Can anyone recommend (or is there) a utility / app that I can use to hit my
webserver (say from another computer outside my subnet) -- any number of
times to get an idea of performance - based on my bandwidth and hardware?

In other words -- I'd like to do some hard core testing of my website and
see how much my pipe and servers (simultaneously) can handle... I would like
to get page return times, etc...

Also -- is there a good add on to IIS or Apache that I can use to monitor
not only how much traffic is hitting my site, but which pages, and from
where the users are coming (ie. which websites they came from)?

Thanks.
Jason







The first thing you need is benchmarking software. Try an internet search
for "webserver performance benchmark". I did it on altavista and got some
good leads.

For instance this one sounds excellant:

http://www.softwareqatest.com/qatweb1.html

It's description is "Listing of 190 web test tools and management tools -
link checking, html validation, load testing, security testing, java
testing, publishing...". Never underestimate the power of the search engine
:)

For the second part, you want a weblog analyzer. I reccommend Analog:

http://www.statslab.cam.ac.uk/~sret1/analog/

It has listing for popularity of particular files, directories, etc. Good
stuff. Insanely fast.


--
Plutarck
Should be working on something...
...but forgot what it was.


""Jason Caldwell"" <[EMAIL PROTECTED]> wrote in message
9be700$b2d$[EMAIL PROTECTED]">news:9be700$b2d$[EMAIL PROTECTED]...
> Can anyone recommend (or is there) a utility / app that I can use to hit
my
> webserver (say from another computer outside my subnet) -- any number of
> times to get an idea of performance - based on my bandwidth and hardware?
>
> In other words -- I'd like to do some hard core testing of my website and
> see how much my pipe and servers (simultaneously) can handle... I would
like
> to get page return times, etc...
>
> Also -- is there a good add on to IIS or Apache that I can use to monitor
> not only how much traffic is hitting my site, but which pages, and from
> where the users are coming (ie. which websites they came from)?
>
> Thanks.
> Jason
>
>
>
>
> --
> 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]
>






On Monday 16 April 2001 09:30, you wrote:
> Can anyone recommend (or is there) a utility / app that I can use to
> hit my webserver (say from another computer outside my subnet) -- any
> number of times to get an idea of performance - based on my bandwidth
> and hardware?

Apache comes with "ab" (ApacheBench).

-- 
Christian Reiniger
LGDC Webmaster (http://sunsite.dk/lgdc/)

(A)bort (R)etry (P)retend this never happened ...





I am migrating a site to a new host (westhost.com) and having some
issues.  PHP was compiled as a cgi instead of a module which is what I
have always used.  This wasn't really an issue until I realized a lot of
my scripts that depended on apaches environment variables ($REQUEST_URI,
$HTTP_USER_AGENT, etc.) weren't working.  I can write a PERL cgi script
and get them from the command line, they also appear in phpinfo(), yet I
simply can't obtain them from any of my php scripts.  Maybe the cgi issue
isn't even related but up to this point it is the only culprit I can
find.  After spending three days going through the docs at apache,
phpbuilder, and php.net I have not ran across anything which offers a
solution.  Thus, I am not looking in the right place or this is a unique
problem.  Can anyone out there help, or provide some
directions/suggestions?  And yes, they are running Apache (note above, I
can obtain the variables but just not through my php scripts).  Do I need
to make an addition to my .htaccess file of some sort?

I need these variables for my site to work properly ( css generation,
hashing URL strings, etc.) so any/all help is greatly appreciated.

If you need more information please let me know and I will get back to you
as soon as possible.  At this point I can't obtain ANY of the env
variables (SERVER_PORT, REMOTE_ADDR, REQUEST_URI, HTTP_USER_AGENT, etc.).

Thanks,
//frank





What version of PHP? I ask because a few test functions aren't available on
older versions of PHP4.

Try this piece of code:

$arr = get_defined_vars();

print_r($arr);

(if that doesn't work, try print_r($GLOBALS), but be sure to hit the Stop
button on your browser, because it will print off an infinite list)

Now, look at the results. In the main listing, does it list any of the ENV
variables you are trying to access?

If not, page down a bit and look in the HTTP_SERVER_VARS array. Are the ENV
variables in there?

My guess is that they probably are. Check phpinfo() again and see what
register_globals is On. That may be your problem...

If none of the variables you seek are in HTTP_SERVER_VARS, then something is
wrong with the installation of PHP itself.



--
Plutarck
Should be working on something...
...but forgot what it was.



"Franklin Hays" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
> I am migrating a site to a new host (westhost.com) and having some
> issues.  PHP was compiled as a cgi instead of a module which is what I
> have always used.  This wasn't really an issue until I realized a lot of
> my scripts that depended on apaches environment variables ($REQUEST_URI,
> $HTTP_USER_AGENT, etc.) weren't working.  I can write a PERL cgi script
> and get them from the command line, they also appear in phpinfo(), yet I
> simply can't obtain them from any of my php scripts.  Maybe the cgi issue
> isn't even related but up to this point it is the only culprit I can
> find.  After spending three days going through the docs at apache,
> phpbuilder, and php.net I have not ran across anything which offers a
> solution.  Thus, I am not looking in the right place or this is a unique
> problem.  Can anyone out there help, or provide some
> directions/suggestions?  And yes, they are running Apache (note above, I
> can obtain the variables but just not through my php scripts).  Do I need
> to make an addition to my .htaccess file of some sort?
>
> I need these variables for my site to work properly ( css generation,
> hashing URL strings, etc.) so any/all help is greatly appreciated.
>
> If you need more information please let me know and I will get back to you
> as soon as possible.  At this point I can't obtain ANY of the env
> variables (SERVER_PORT, REMOTE_ADDR, REQUEST_URI, HTTP_USER_AGENT, etc.).
>
> Thanks,
> //frank
>
>
> --
> 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]
>







Hello.

The version is php-4.02 built on Sep 22, 2000.

|What version of PHP? I ask because a few test functions aren't available on
|older versions of PHP4.
|
|Try this piece of code:
|
|$arr = get_defined_vars();
|
|print_r($arr);

This gave me an error on get_defined_var() so I tried
print_r($GLOBALS) and got a ton of output of the form:

Array ( [PHP_SELF] => /test.php [HTTP_GET_VARS] => Array ( )
[HTTP_COOKIE_VARS] => Array ( ) [HTTP_SERVER_VARS] => Array ( [PHP_SELF]
=> /test.php ) [GLOBALS] => Array ( [PHP_SELF] => /test.php
[HTTP_GET_VARS] => Array ( ) [HTTP_COOKIE_VARS] => Array ( )
[HTTP_SERVER_VARS] => Array ( [PHP_SELF] => | /test.php ) [GLOBALS] =>
Array ( [PHP_SELF] => /test.php [HTTP_GET_VARS] => Array ( )
[HTTP_COOKIE_VARS] => Array ( ) [HTTP_SERVER_VARS] => Array (|(if that
doesn't work, try print_r($GLOBALS), but be sure to hit the Stop
[PHP_SELF] => /test.php ) [GLOBALS] => Array ( [PHP_SELF] => /test.php
[HTTP_GET_VARS] => Array ( ) [HTTP_COOKIE_VARS] => Array ( )
[HTTP_SERVER_VARS]|button on your browser, because it will print off an
infinite list) | => Array ( [PHP_SELF] => /test.php ) [GLOBALS] => Array (
[PHP_SELF] => /test.php [HTTP_GET_VARS] => Array ( ) [HTTP_COOKIE_VARS] =>
Array ( )|Now, look at the results. In the main listing, does it list any
of the ENV [HTTP_SERVER_VARS] => Array ( [PHP_SELF] => /test.php )
[GLOBALS] => Array ( [PHP_SELF] => /test.php [HTTP_GET_VARS] => Array ( )
[HTTP_COOKIE_VARS]|variables you are trying to access? | => Array ( )
[HTTP_SERVER_VARS] => Array ( [PHP_SELF] => /test.php ) [GLOBALS] => Array
( [PHP_SELF] => /test.php [HTTP_GET_VARS] => Array ( )|If not, page down a
bit and look in the HTTP_SERVER_VARS array. Are the ENV [HTTP_COOKIE_VARS]
=> Array ( ) [HTTP_SERVER_VARS] => Array ( [PHP_SELF] => /test.php )
[GLOBALS] => Array ( [PHP_SELF] => /test.php [HTTP_GET_VARS]|variables in
there? | => Array ( ) [HTTP_COOKIE_VARS] => Array ( ) [HTTP_SERVER_VARS]
=> Array ( [PHP_SELF] => /test.php ) [GLOBALS] => Array ( [PHP_SELF] =>
/test.php|My guess is that they probably are. Check phpinfo() again and
see what |register_globals is On. That may be your problem...
[HTTP_GET_VARS] => Array ( ) [HTTP_COOKIE_VARS] => Array ( )
[HTTP_SERVER_VARS] => Array ( [PHP_SELF] => /test.php ) [GLOBALS] => Array
( [PHP_SELF]| => /test.php [HTTP_GET_VARS] => Array ( ) [HTTP_COOKIE_VARS]
=> Array ( ) [HTTP_SERVER_VARS] => Array ( [PHP_SELF] => /test.php )
[GLOBALS] => Array (|If none of the variables you seek are in
HTTP_SERVER_VARS, then something is [PHP_SELF] => /test.php
[HTTP_GET_VARS] => Array ( ) [HTTP_COOKIE_VARS] => Array ( )
[HTTP_SERVER_VARS] => Array ( [PHP_SELF] => /test.php ) [GLOBALS]|wrong
with the installation of PHP itself. | | => Array ( [PHP_SELF] =>
/test.php [HTTP_GET_VARS] => Array ( ) [HTTP_COOKIE_VARS] => Array ( )
[HTTP_SERVER_VARS] => Array ( [PHP_SELF] => /test.php )| |-- [GLOBALS] =>
Array ( [PHP_SELF] => /test.php [HTTP_GET_VARS] => Array ( )
[HTTP_COOKIE_VARS] => Array ( ) [HTTP_SERVER_VARS] => Array ( [PHP_SELF]
=>|Plutarck |Should be working on something... /test.php ) [GLOBALS] =>
Array ( [PHP_SELF] => /test.php [HTTP_GET_VARS] => Array ( )
[HTTP_COOKIE_VARS] => Array ( ) [HTTP_SERVER_VARS] => Array (|...but
forgot what it was. | [PHP_SELF] => /test.php ) [GLOBALS] => Array (
[PHP_SELF] => /test.php [HTTP_GET_VARS] => Array ( ) [HTTP_COOKIE_VARS] =>
Array ( ) [HTTP_SERVER_VARS]| | => Array ( [PHP_SELF] => /test.php )
[GLOBALS] => Array ( [PHP_SELF] => /test.php [HTTP_GET_VARS] => Array ( )
[HTTP_SERVER_VARS] => Array ( [PHP_SELF] => /test.php ) [GLOBALS] => Array
( [PHP_SELF] => /test.php [HTTP_GET_VARS] => Array ( )
[HTTP_COOKIE_VARS]|> => Array ( ) [HTTP_SERVER_VARS] => Array ( [PHP_SELF]
=> /test.php ) [GLOBALS] => Array ( [PHP_SELF] => /test.php
[HTTP_GET_VARS] => Array ( )|> I am migrating a site to a new host
(westhost.com) and having some [HTTP_COOKIE_VARS] => Array ( )
[HTTP_SERVER_VARS] => Array ( [PHP_SELF] => /test.php ) [GLOBALS] => Array
( [PHP_SELF] => /test.php [HTTP_GET_VARS]|> issues.  PHP was compiled as a
cgi instead of a module which is what I => Array ( ) [HTTP_COOKIE_VARS] =>
Array ( ) [HTTP_SERVER_VARS] => Array ( [PHP_SELF] => /test.php )
[GLOBALS] => Array ( [PHP_SELF] => /test.php|> have always used.  This
wasn't really an issue until I realized a lot of [HTTP_GET_VARS] => Array
( ) [HTTP_COOKIE_VARS] => Array ( ) [HTTP_SERVER_VARS] => Array (
[PHP_SELF] => /test.php ) [GLOBALS] => Array ( [PHP_SELF]|> my scripts
that depended on apaches environment variables ($REQUEST_URI, => /test.php
[HTTP_GET_VARS] => Array ( ) [HTTP_COOKIE_VARS] => Array ( )
[HTTP_SERVER_VARS] => Array ( [PHP_SELF] => /test.php ) [GLOBALS] => Array
(|> $HTTP_USER_AGENT, etc.) weren't working.  I can write a PERL cgi
script
[PHP_SELF] => /test.php [HTTP_GET_VARS] => Array ( ) [HTTP_COOKIE_VARS]
=> Array ( ) [HTTP_SERVER_VARS] => Array ( [PHP_SELF] => /test.php
) [GLOBALS]


Something may be amiss with my hosts setup yet I have no idea what that
may be.  Any suggestions?  I have never configured PHP to run as a cgi and
have never had trouble getting global server variables.  Combine those two
and I have no idea how to track this problem down.  

Many thanks for any/all help.

//frank





Btw, the reason you got all the output is why I said to hit the browser Stop
button. Technically it will run forever.

The GLOBALS array contains an a array called GLOBALS, which contains
GLOBALS, endlessly. It will never ever end ;) It's fixed in 4.0.2.

get_defined_vars isn't available till 4.0.4, so that's why you got the
error.


But from looking at your output, there is definately something screwy with
their setup.

In phpinfo, what are the settings for track_vars (if listed) and
global_vars?


"Franklin Hays" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
> Hello.
>
> The version is php-4.02 built on Sep 22, 2000.
>
> |What version of PHP? I ask because a few test functions aren't available
on
> |older versions of PHP4.
> |
> |Try this piece of code:
> |
> |$arr = get_defined_vars();
> |
> |print_r($arr);
>
> This gave me an error on get_defined_var() so I tried
> print_r($GLOBALS) and got a ton of output of the form:
>
> Array ( [PHP_SELF] => /test.php [HTTP_GET_VARS] => Array ( )
> [HTTP_COOKIE_VARS] => Array ( ) [HTTP_SERVER_VARS] => Array ( [PHP_SELF]
> => /test.php ) [GLOBALS] => Array ( [PHP_SELF] => /test.php
> [HTTP_GET_VARS] => Array ( ) [HTTP_COOKIE_VARS] => Array ( )
> [HTTP_SERVER_VARS] => Array ( [PHP_SELF] => | /test.php ) [GLOBALS] =>
> Array ( [PHP_SELF] => /test.php [HTTP_GET_VARS] => Array ( )
> [HTTP_COOKIE_VARS] => Array ( ) [HTTP_SERVER_VARS] => Array (|(if that
> doesn't work, try print_r($GLOBALS), but be sure to hit the Stop
> [PHP_SELF] => /test.php ) [GLOBALS] => Array ( [PHP_SELF] => /test.php
> [HTTP_GET_VARS] => Array ( ) [HTTP_COOKIE_VARS] => Array ( )
> [HTTP_SERVER_VARS]|button on your browser, because it will print off an
> infinite list) | => Array ( [PHP_SELF] => /test.php ) [GLOBALS] => Array (
> [PHP_SELF] => /test.php [HTTP_GET_VARS] => Array ( ) [HTTP_COOKIE_VARS] =>
> Array ( )|Now, look at the results. In the main listing, does it list any
> of the ENV [HTTP_SERVER_VARS] => Array ( [PHP_SELF] => /test.php )
> [GLOBALS] => Array ( [PHP_SELF] => /test.php [HTTP_GET_VARS] => Array ( )
> [HTTP_COOKIE_VARS]|variables you are trying to access? | => Array ( )
> [HTTP_SERVER_VARS] => Array ( [PHP_SELF] => /test.php ) [GLOBALS] => Array
> ( [PHP_SELF] => /test.php [HTTP_GET_VARS] => Array ( )|If not, page down a
> bit and look in the HTTP_SERVER_VARS array. Are the ENV [HTTP_COOKIE_VARS]
> => Array ( ) [HTTP_SERVER_VARS] => Array ( [PHP_SELF] => /test.php )
> [GLOBALS] => Array ( [PHP_SELF] => /test.php [HTTP_GET_VARS]|variables in
> there? | => Array ( ) [HTTP_COOKIE_VARS] => Array ( ) [HTTP_SERVER_VARS]
> => Array ( [PHP_SELF] => /test.php ) [GLOBALS] => Array ( [PHP_SELF] =>
> /test.php|My guess is that they probably are. Check phpinfo() again and
> see what |register_globals is On. That may be your problem...
> [HTTP_GET_VARS] => Array ( ) [HTTP_COOKIE_VARS] => Array ( )
> [HTTP_SERVER_VARS] => Array ( [PHP_SELF] => /test.php ) [GLOBALS] => Array
> ( [PHP_SELF]| => /test.php [HTTP_GET_VARS] => Array ( ) [HTTP_COOKIE_VARS]
> => Array ( ) [HTTP_SERVER_VARS] => Array ( [PHP_SELF] => /test.php )
> [GLOBALS] => Array (|If none of the variables you seek are in
> HTTP_SERVER_VARS, then something is [PHP_SELF] => /test.php
> [HTTP_GET_VARS] => Array ( ) [HTTP_COOKIE_VARS] => Array ( )
> [HTTP_SERVER_VARS] => Array ( [PHP_SELF] => /test.php ) [GLOBALS]|wrong
> with the installation of PHP itself. | | => Array ( [PHP_SELF] =>
> /test.php [HTTP_GET_VARS] => Array ( ) [HTTP_COOKIE_VARS] => Array ( )
> [HTTP_SERVER_VARS] => Array ( [PHP_SELF] => /test.php )| |-- [GLOBALS] =>
> Array ( [PHP_SELF] => /test.php [HTTP_GET_VARS] => Array ( )
> [HTTP_COOKIE_VARS] => Array ( ) [HTTP_SERVER_VARS] => Array ( [PHP_SELF]
> =>|Plutarck |Should be working on something... /test.php ) [GLOBALS] =>
> Array ( [PHP_SELF] => /test.php [HTTP_GET_VARS] => Array ( )
> [HTTP_COOKIE_VARS] => Array ( ) [HTTP_SERVER_VARS] => Array (|...but
> forgot what it was. | [PHP_SELF] => /test.php ) [GLOBALS] => Array (
> [PHP_SELF] => /test.php [HTTP_GET_VARS] => Array ( ) [HTTP_COOKIE_VARS] =>
> Array ( ) [HTTP_SERVER_VARS]| | => Array ( [PHP_SELF] => /test.php )
> [GLOBALS] => Array ( [PHP_SELF] => /test.php [HTTP_GET_VARS] => Array ( )
> [HTTP_SERVER_VARS] => Array ( [PHP_SELF] => /test.php ) [GLOBALS] => Array
> ( [PHP_SELF] => /test.php [HTTP_GET_VARS] => Array ( )
> [HTTP_COOKIE_VARS]|> => Array ( ) [HTTP_SERVER_VARS] => Array ( [PHP_SELF]
> => /test.php ) [GLOBALS] => Array ( [PHP_SELF] => /test.php
> [HTTP_GET_VARS] => Array ( )|> I am migrating a site to a new host
> (westhost.com) and having some [HTTP_COOKIE_VARS] => Array ( )
> [HTTP_SERVER_VARS] => Array ( [PHP_SELF] => /test.php ) [GLOBALS] => Array
> ( [PHP_SELF] => /test.php [HTTP_GET_VARS]|> issues.  PHP was compiled as a
> cgi instead of a module which is what I => Array ( ) [HTTP_COOKIE_VARS] =>
> Array ( ) [HTTP_SERVER_VARS] => Array ( [PHP_SELF] => /test.php )
> [GLOBALS] => Array ( [PHP_SELF] => /test.php|> have always used.  This
> wasn't really an issue until I realized a lot of [HTTP_GET_VARS] => Array
> ( ) [HTTP_COOKIE_VARS] => Array ( ) [HTTP_SERVER_VARS] => Array (
> [PHP_SELF] => /test.php ) [GLOBALS] => Array ( [PHP_SELF]|> my scripts
> that depended on apaches environment variables ($REQUEST_URI, => /test.php
> [HTTP_GET_VARS] => Array ( ) [HTTP_COOKIE_VARS] => Array ( )
> [HTTP_SERVER_VARS] => Array ( [PHP_SELF] => /test.php ) [GLOBALS] => Array
> (|> $HTTP_USER_AGENT, etc.) weren't working.  I can write a PERL cgi
> script
> [PHP_SELF] => /test.php [HTTP_GET_VARS] => Array ( ) [HTTP_COOKIE_VARS]
> => Array ( ) [HTTP_SERVER_VARS] => Array ( [PHP_SELF] => /test.php
> ) [GLOBALS]
>
>
> Something may be amiss with my hosts setup yet I have no idea what that
> may be.  Any suggestions?  I have never configured PHP to run as a cgi and
> have never had trouble getting global server variables.  Combine those two
> and I have no idea how to track this problem down.
>
> Many thanks for any/all help.
>
> //frank
>
>
> --
> 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]
>






> The GLOBALS array contains an a array called GLOBALS, which contains
> GLOBALS, endlessly. It will never ever end ;) It's fixed in 4.0.2.

That was a typo. What I mean to say is that it's fixed in 4.0._4_, not _2_.


--
Plutarck
Should be working on something...
...but forgot what it was.


""Plutarck"" <[EMAIL PROTECTED]> wrote in message
9bf39j$j2c$[EMAIL PROTECTED]">news:9bf39j$j2c$[EMAIL PROTECTED]...
> Btw, the reason you got all the output is why I said to hit the browser
Stop
> button. Technically it will run forever.
>
> The GLOBALS array contains an a array called GLOBALS, which contains
> GLOBALS, endlessly. It will never ever end ;) It's fixed in 4.0.2.
>
> get_defined_vars isn't available till 4.0.4, so that's why you got the
> error.
>
>
> But from looking at your output, there is definately something screwy with
> their setup.
>
> In phpinfo, what are the settings for track_vars (if listed) and
> global_vars?
>
>
> "Franklin Hays" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> >
> > Hello.
> >
> > The version is php-4.02 built on Sep 22, 2000.
> >
> > |What version of PHP? I ask because a few test functions aren't
available
> on
> > |older versions of PHP4.
> > |
> > |Try this piece of code:
> > |
> > |$arr = get_defined_vars();
> > |
> > |print_r($arr);
> >
> > This gave me an error on get_defined_var() so I tried
> > print_r($GLOBALS) and got a ton of output of the form:
> >
> > Array ( [PHP_SELF] => /test.php [HTTP_GET_VARS] => Array ( )
> > [HTTP_COOKIE_VARS] => Array ( ) [HTTP_SERVER_VARS] => Array ( [PHP_SELF]
> > => /test.php ) [GLOBALS] => Array ( [PHP_SELF] => /test.php
> > [HTTP_GET_VARS] => Array ( ) [HTTP_COOKIE_VARS] => Array ( )
> > [HTTP_SERVER_VARS] => Array ( [PHP_SELF] => | /test.php ) [GLOBALS] =>
> > Array ( [PHP_SELF] => /test.php [HTTP_GET_VARS] => Array ( )
> > [HTTP_COOKIE_VARS] => Array ( ) [HTTP_SERVER_VARS] => Array (|(if that
> > doesn't work, try print_r($GLOBALS), but be sure to hit the Stop
> > [PHP_SELF] => /test.php ) [GLOBALS] => Array ( [PHP_SELF] => /test.php
> > [HTTP_GET_VARS] => Array ( ) [HTTP_COOKIE_VARS] => Array ( )
> > [HTTP_SERVER_VARS]|button on your browser, because it will print off an
> > infinite list) | => Array ( [PHP_SELF] => /test.php ) [GLOBALS] => Array
(
> > [PHP_SELF] => /test.php [HTTP_GET_VARS] => Array ( ) [HTTP_COOKIE_VARS]
=>
> > Array ( )|Now, look at the results. In the main listing, does it list
any
> > of the ENV [HTTP_SERVER_VARS] => Array ( [PHP_SELF] => /test.php )
> > [GLOBALS] => Array ( [PHP_SELF] => /test.php [HTTP_GET_VARS] => Array
( )
> > [HTTP_COOKIE_VARS]|variables you are trying to access? | => Array ( )
> > [HTTP_SERVER_VARS] => Array ( [PHP_SELF] => /test.php ) [GLOBALS] =>
Array
> > ( [PHP_SELF] => /test.php [HTTP_GET_VARS] => Array ( )|If not, page down
a
> > bit and look in the HTTP_SERVER_VARS array. Are the ENV
[HTTP_COOKIE_VARS]
> > => Array ( ) [HTTP_SERVER_VARS] => Array ( [PHP_SELF] => /test.php )
> > [GLOBALS] => Array ( [PHP_SELF] => /test.php [HTTP_GET_VARS]|variables
in
> > there? | => Array ( ) [HTTP_COOKIE_VARS] => Array ( ) [HTTP_SERVER_VARS]
> > => Array ( [PHP_SELF] => /test.php ) [GLOBALS] => Array ( [PHP_SELF] =>
> > /test.php|My guess is that they probably are. Check phpinfo() again and
> > see what |register_globals is On. That may be your problem...
> > [HTTP_GET_VARS] => Array ( ) [HTTP_COOKIE_VARS] => Array ( )
> > [HTTP_SERVER_VARS] => Array ( [PHP_SELF] => /test.php ) [GLOBALS] =>
Array
> > ( [PHP_SELF]| => /test.php [HTTP_GET_VARS] => Array ( )
[HTTP_COOKIE_VARS]
> > => Array ( ) [HTTP_SERVER_VARS] => Array ( [PHP_SELF] => /test.php )
> > [GLOBALS] => Array (|If none of the variables you seek are in
> > HTTP_SERVER_VARS, then something is [PHP_SELF] => /test.php
> > [HTTP_GET_VARS] => Array ( ) [HTTP_COOKIE_VARS] => Array ( )
> > [HTTP_SERVER_VARS] => Array ( [PHP_SELF] => /test.php ) [GLOBALS]|wrong
> > with the installation of PHP itself. | | => Array ( [PHP_SELF] =>
> > /test.php [HTTP_GET_VARS] => Array ( ) [HTTP_COOKIE_VARS] => Array ( )
> > [HTTP_SERVER_VARS] => Array ( [PHP_SELF] => /test.php )| |-- [GLOBALS]
=>
> > Array ( [PHP_SELF] => /test.php [HTTP_GET_VARS] => Array ( )
> > [HTTP_COOKIE_VARS] => Array ( ) [HTTP_SERVER_VARS] => Array ( [PHP_SELF]
> > =>|Plutarck |Should be working on something... /test.php ) [GLOBALS] =>
> > Array ( [PHP_SELF] => /test.php [HTTP_GET_VARS] => Array ( )
> > [HTTP_COOKIE_VARS] => Array ( ) [HTTP_SERVER_VARS] => Array (|...but
> > forgot what it was. | [PHP_SELF] => /test.php ) [GLOBALS] => Array (
> > [PHP_SELF] => /test.php [HTTP_GET_VARS] => Array ( ) [HTTP_COOKIE_VARS]
=>
> > Array ( ) [HTTP_SERVER_VARS]| | => Array ( [PHP_SELF] => /test.php )
> > [GLOBALS] => Array ( [PHP_SELF] => /test.php [HTTP_GET_VARS] => Array
( )
> > [HTTP_SERVER_VARS] => Array ( [PHP_SELF] => /test.php ) [GLOBALS] =>
Array
> > ( [PHP_SELF] => /test.php [HTTP_GET_VARS] => Array ( )
> > [HTTP_COOKIE_VARS]|> => Array ( ) [HTTP_SERVER_VARS] => Array (
[PHP_SELF]
> > => /test.php ) [GLOBALS] => Array ( [PHP_SELF] => /test.php
> > [HTTP_GET_VARS] => Array ( )|> I am migrating a site to a new host
> > (westhost.com) and having some [HTTP_COOKIE_VARS] => Array ( )
> > [HTTP_SERVER_VARS] => Array ( [PHP_SELF] => /test.php ) [GLOBALS] =>
Array
> > ( [PHP_SELF] => /test.php [HTTP_GET_VARS]|> issues.  PHP was compiled as
a
> > cgi instead of a module which is what I => Array ( ) [HTTP_COOKIE_VARS]
=>
> > Array ( ) [HTTP_SERVER_VARS] => Array ( [PHP_SELF] => /test.php )
> > [GLOBALS] => Array ( [PHP_SELF] => /test.php|> have always used.  This
> > wasn't really an issue until I realized a lot of [HTTP_GET_VARS] =>
Array
> > ( ) [HTTP_COOKIE_VARS] => Array ( ) [HTTP_SERVER_VARS] => Array (
> > [PHP_SELF] => /test.php ) [GLOBALS] => Array ( [PHP_SELF]|> my scripts
> > that depended on apaches environment variables ($REQUEST_URI, =>
/test.php
> > [HTTP_GET_VARS] => Array ( ) [HTTP_COOKIE_VARS] => Array ( )
> > [HTTP_SERVER_VARS] => Array ( [PHP_SELF] => /test.php ) [GLOBALS] =>
Array
> > (|> $HTTP_USER_AGENT, etc.) weren't working.  I can write a PERL cgi
> > script
> > [PHP_SELF] => /test.php [HTTP_GET_VARS] => Array ( ) [HTTP_COOKIE_VARS]
> > => Array ( ) [HTTP_SERVER_VARS] => Array ( [PHP_SELF] => /test.php
> > ) [GLOBALS]
> >
> >
> > Something may be amiss with my hosts setup yet I have no idea what that
> > may be.  Any suggestions?  I have never configured PHP to run as a cgi
and
> > have never had trouble getting global server variables.  Combine those
two
> > and I have no idea how to track this problem down.
> >
> > Many thanks for any/all help.
> >
> > //frank
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
>
>
>
> --
> PHP 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]
>







|But from looking at your output, there is definately something screwy with
|their setup.
|
|In phpinfo, what are the settings for track_vars (if listed) and
|global_vars?

track_vars is set to ON for local and master.
register_globals is set to ON for local and master.

there isn't a listing for global_vars.  should there be?

Is there something I can set witn ini_set that will enable these
variables?

Thanks,
//frank





Pdflib 3.03 compiles OK and builds a static library -
/usr/local/lib/libpdf.a.

PHP fails to configure - cannot find PDF_show_boxed in the library -
pdflib extension requires pdflib 3.x.

This command is in the library and the header file. Configure finds my
tiff & jpeg library (--with-tiff-dir=/usr/local
--with-jpeg-dir=/usr/local) but is either not finding the library
(--with-pdflib=/usr/local) or is not able to find PDF_show_boxed in the
library.

Can anyone help??

Chris

--
Chris Fry
Quillsoft Pty Ltd
Specialists in Secure Internet Services and E-Commerce Solutions
10 Gray Street
Kogarah
NSW  2217
Australia

Phone: +61 2 9553 1691
Fax: +61 2 9553 1692
Mobile: 0419 414 323
eMail: [EMAIL PROTECTED]
http://www.quillsoft.com.au

You can download our Public CA Certificate from:-
https://ca.secureanywhere.com/htdocs/cacert.crt

**********************************************************************

This information contains confidential information intended only for
the use of the authorised recipient.  If you are not an authorised
recipient of this e-mail, please contact Quillsoft Pty Ltd by return
e-mail.
In this case, you should not read, print, re-transmit, store or act
in reliance on this e-mail or any attachments, and should destroy all
copies of them.
This e-mail and any attachments may also contain copyright material
belonging to Quillsoft Pty Ltd.
The views expressed in this e-mail or attachments are the views of
the author and not the views of Quillsoft Pty Ltd.
You should only deal with the material contained in this e-mail if
you are authorised to do so.

This notice should not be removed.






hi.................
i have a project to build a free hosting where its support php,perl & mysql for free.

i would like to make a file manager like geocities.com, i used php for file manager. 
if i use file upload to directory in my server, it shlould 777 mode, is in't? 
if yes, i think it's not secure 'couse every body can write to that directory. Does 
suEXEC can solve my problem?

every user will get their domain such as user1.myfreeserver.com. how to set the 
directory(homedir of each user) with access write mode for each user?

any idea to make file management where every user have domain(these should be my 
virtualhost), homedir(access write only the owner) ?

-JUANG-




Hello Jaxon,

use serialize() & unserialize() as follows:

$store_in_file=serialize(your_array);
//and store the details of $store_in_file in your file/database.

//while retrieving read the data from file/database into store_in_file and
then use the following.
$retrieve_from_file=unserialize($store_in_file);

$retrieve_from_file will be similar to "your_array"

read the php4.0 & greater manual you will find these functions to be very
helpful..


hope this serves your purpose.

regards

Keyur
$$$$$$$




----- Original Message -----
From: "jaxon" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, April 16, 2001 5:02 AM
Subject: [PHP] store array in a file?


>
> Hey all, can someone make a recommendation here?
>
> I want to keep site structural info pulled from a database in an array,
and
> store it in a flat file that can eliminate the database hit.
>
> Then I'll just delete the file when structure changes, and regenerate it
> with a call to a recreation script that does the necessary sql once.
>
> So
>  - does this make sense?
>  - how to sore the array in a flat file
>  - any way to make the array global once loaded?
>
> Thanks for any pointers!
>
> cheers,
> jaxon
>
>
> --
> 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]
>
>






>From v4.0.4 change log
"Added url_rewriter.tags configuration directive (Sascha)"

The option shows up in my phpinfo with default settings 
"a=href,area=href,frame=src,form=fakeentry", but I can't find any info on 
what this setting does.  The change log entry seems to be the only 
reference to it in the PHP.net docs.  What does it do?

-- 
CC




> Subject: [PHP] What does "url_rewriter.tags" do?

> What does it do?


url_rewriter.tags is a list of HTML elements that will get the PHPSESSID
added to them. Its all about sessions:
http://www.php.net/manual/en/ref.session.php.

Emil

-- 
Emil Rasmussen
http://www.noget.net




In article <[EMAIL PROTECTED]>,
 [EMAIL PROTECTED] (Emil Rasmussen) wrote:

> > Subject: [PHP] What does "url_rewriter.tags" do?
> 
> > What does it do?
> 
> 
> url_rewriter.tags is a list of HTML elements that will get the PHPSESSID
> added to them. Its all about sessions:
> http://www.php.net/manual/en/ref.session.php.

Thanks.  The url_rewriter.tags config option isn't mentioned on that page, 
but now that you relate it to sessions it does make more sense.  Though 
setting "form" to value "fakeentry" seems odd since PHPSESSID does also get 
added to forms as a hidden input. <shrug>  Anyway, at least now I have a 
general idea of its purpose.

-- 
CC




Hi,

I'm running a small web hosting server on my machine and offering
PHP+MySQL to virtual hosting clients.

I've coded an additional PHP module, which I want to be a paid
add-on feature to the clients. Is there a way to disable the 
module or functions (it contains 2 functions) globally and then 
specifically enable them to certain virtual hosts?


Rgds,
  Tfr

  --==< [EMAIL PROTECTED] >==< http://tfr.cafe.ee/ >==< +372-50-17621 >==-- 




On Mon, Apr 16, 2001 at 12:42:50PM +0200, indrek siitan wrote:

> I've coded an additional PHP module, which I want to be a paid
> add-on feature to the clients. Is there a way to disable the 
> module or functions (it contains 2 functions) globally and then 
> specifically enable them to certain virtual hosts?

you can globally disable function with:

| disable_functions       = 

in php.ini.
For the vhosts, which are allowed to use the functions you can
create a special php.ini, which is loadad (afaik) via .htaccess
then (I'm not sure on this...remember to have read something like
that on this list -> you might want to check the archieve)

-fkr
-- 
gpg-fingerprint: 076E 1E87 3E05 1C7F B1A0  8A48 0D31 9BD3 D9AC 74D0 
  |http://www.hazardous.org/ | whois -h whois.ripe.de FKR-RIPE  |
  |all your base are belong to us  |  shame on me  | fkr@IRCnet | 





Hi,

> you can globally disable function with:
> 
> | disable_functions       = 

ok, got to that point, too.

but is there an enable_functions keyword to explicitly enable
those functions in httpd.conf (this should be possible with
the php_value keyword, as far as I understood from the manual).


Rgds,
  Tfr

  --==< [EMAIL PROTECTED] >==< http://tfr.cafe.ee/ >==< +372-50-17621 >==-- 




On Mon, Apr 16, 2001 at 07:17:24PM +0200, indrek siitan wrote:

> but is there an enable_functions keyword to explicitly enable
> those functions in httpd.conf (this should be possible with
> the php_value keyword, as far as I understood from the manual).

no. But you can put a .htaccess in the directory of the vhost, which
you want to enable these functipns for, in which you define a different
php.ini to be used (in which you don't disable these functions).
wow, lot's of 'whiches' in this sentence.

At least, I belive this can be done (but I'm not sure of it).
-fkr
-- 
gpg-fingerprint: 076E 1E87 3E05 1C7F B1A0  8A48 0D31 9BD3 D9AC 74D0 
  |http://www.hazardous.org/ | whois -h whois.ripe.de FKR-RIPE  |
  |all your base are belong to us  |  shame on me  | fkr@IRCnet | 





Hello,
have you saw the result of phpinfo(); try and see in Apache Environment, if make a 
login use a sessions...
Good luck and good code

Best Regards
Miguel Loureiro <[EMAIL PROTECTED]>




Hi all is it possible to protect your javascripts from being downloaded by
visitors ?





A funny question! I presume you mean you want to protect your javascripts
from being read by users, eg compiled. Internet explorer has a script
encoder that scrambles your scripts that you can get from microsoft.com.
Doesn't work with netscape.

Regards, John

""Steve Haemelinck"" <[EMAIL PROTECTED]> wrote in message
000001c0c663$59401dd0$0200a8c0@shaemeli">news:000001c0c663$59401dd0$0200a8c0@shaemeli...
> Hi all is it possible to protect your javascripts from being downloaded by
> visitors ?
>
>
> --
> 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]
>






If you mean Javascript that is in your HTML code, it is both practically and
theoretically impossible to do so. HTML source is wide-open to anyone who
wants to look at it, and there is little/nothing you can "really" do about
it. Some sites try and hide their HTML source, but it servers only to annoy
the crap out of users. If I right-click a page and don't get the right-click
menu I expect, I tend to become highly irritated.

JavaScript is a "scripting language", which was designed for the exact
purpose of being easily read by humans.

Now, if you are speaking of a JavaApplet or client-side java bean, that's a
little different. But in reality you can't really stop people from
downloading those to their hard-drive either.

There are methods to keep people from easily decompiling them, but I'm
betting you aren't talking about Java stuff anyway :)


--
Plutarck
Should be working on something...
...but forgot what it was.


""Steve Haemelinck"" <[EMAIL PROTECTED]> wrote in message
000001c0c663$59401dd0$0200a8c0@shaemeli">news:000001c0c663$59401dd0$0200a8c0@shaemeli...
> Hi all is it possible to protect your javascripts from being downloaded by
> visitors ?
>
>
> --
> 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]
>






Rasmus Lerdorf (inventor of PHP) has said that PCRE is generally faster, but
i haven't benchmarked myself. Of course strpos( ) is the fastest.

"bill" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> hi everyone,
>
> i have been using perl for quite some time, but after getting used to
> php4, i think it rocks.
>
> i am wondering which is better, performance-wise, when trying to match the
> same text: PCRE or POSIX extended in php4?
>
> cheers,
> Bill
>
>
>
> --
> 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]
>






On Mon, Apr 16, 2001 at 07:16:06PM +0800, John Lim wrote:

> Rasmus Lerdorf (inventor of PHP) has said that PCRE is generally faster, but
> i haven't benchmarked myself. Of course strpos( ) is the fastest.

Joerg Krause has posted an URL for a webpage for benchmarking reg-expressions.
Sorry, I don't have the URL anymore, maybe someone (who still has/knows it) could
repost it to the list?

-fkr
-- 
gpg-fingerprint: 076E 1E87 3E05 1C7F B1A0  8A48 0D31 9BD3 D9AC 74D0 
  |http://www.hazardous.org/ | whois -h whois.ripe.de FKR-RIPE  |
  |all your base are belong to us  |  shame on me  | fkr@IRCnet | 





I did it!
Too much work for something as simple as this though IMO. I think I will
write a function for this...

<?
session_start();
$newarray = $HTTP_SESSION_VARS["array"];
unset ($newarray["one"]);
$array = $newarray;
session_register("array");
?>

Thanks,
// Tobias


""Yasuo Ohgaki"" <[EMAIL PROTECTED]> wrote in message
9bdeag$88r$[EMAIL PROTECTED]">news:9bdeag$88r$[EMAIL PROTECTED]...
> You are registered $array as session,
> You need to unset() element. I think it should work.
>
> Regards,
> --
> Yasuo Ohgaki
>
>
> ""Tobias Talltorp"" <[EMAIL PROTECTED]> wrote in message
> 9bd8un$kqt$[EMAIL PROTECTED]">news:9bd8un$kqt$[EMAIL PROTECTED]...
> > I know how to unset a specific value in an ordinary array:
> > unset ($array["one"]);
> > How do I do this if my array is in a session?
> >
> > Here is my code:
> > <?
> > session_start();
> > $array = array(one=> "number one", two=> "Number two", three=> "Number
> > three");
> > session_register("array");
> > ?>
> >
> > I tried this... Didn't work:
> > <?
> > session_start();
> > session_unregister("array[one]");
> > ?>
> >
> > Thanks,
> > // Tobias Talltorp
> >
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
>
>
> --
> PHP 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]
>






PHP4 session may not work as it should, unless you use it consistent way. i.e. Use session_(un)register() and only use globals, OR enable track_vars and disable register_globals and only use $HTTP_SESSION_VARS w/o session_(un)register(). It may work even if register_globals is on. I didn't test session module with this configuration enough. Following code works as expected on my systems (PHP4.0.4-PHP4.0.5RC1/Apache SAPI/W2K and PHP4.0.4-PHP4.0.4RC6/Apache SAPI/Linux at least) === code begin === <?php require_once('lib/session.inc'); // Define my custom session handlers and start session ?> <html> <head> <title>Session Test</title> </head> <body bgcolor="#FFFFFF"> <pre> <?php if (isset($HTTP_GET_VARS['a'])) { $HTTP_SESSION_VARS['a'] = array( 'a'=>1, 'b'=>2 ); print_r($HTTP_SESSION_VARS); } elseif (isset($HTTP_GET_VARS['b'])) { unset($HTTP_SESSION_VARS['a']['a']); print_r($HTTP_SESSION_VARS); } else { print_r($HTTP_SESSION_VARS); } ?> </pre> </body> </html> ==== code end ==== It should work as expected when you enable track_vars AND disable register_globals in your php.ini. The reason why there is session_register()/unregister() is there is no way for session module to know which variables are session variables. With $HTTP_SESSION_VARS, session module knows all variable in $HTTP_SESSION_VARS are session variables. So programmer does not have to use session_(un)register(). There is also known problem that $HTTP_SESSION_VARS does not work like other $HTTP_*_VARS. You will see what I mean if you write some test codes with register_globals = on. I don't know why many people use register_globals = on track_vars = off magic_quote = on Life would be much easier with register_globals = off track_vars = on magic_quote = off Hope this helps, -- Yasuo Ohgaki ""Tobias Talltorp"" <[EMAIL PROTECTED]> wrote in message 9bempj$a77$[EMAIL PROTECTED]">news:9bempj$a77$[EMAIL PROTECTED]... > I did it! > Too much work for something as simple as this though IMO. I think I will > write a function for this... > > <? > session_start(); > $newarray = $HTTP_SESSION_VARS["array"]; > unset ($newarray["one"]); > $array = $newarray; > session_register("array"); > ?> > > Thanks, > // Tobias > > > ""Yasuo Ohgaki"" <[EMAIL PROTECTED]> wrote in message > 9bdeag$88r$[EMAIL PROTECTED]">news:9bdeag$88r$[EMAIL PROTECTED]... > > You are registered $array as session, > > You need to unset() element. I think it should work. > > > > Regards, > > -- > > Yasuo Ohgaki > > > > > > ""Tobias Talltorp"" <[EMAIL PROTECTED]> wrote in message > > 9bd8un$kqt$[EMAIL PROTECTED]">news:9bd8un$kqt$[EMAIL PROTECTED]... > > > I know how to unset a specific value in an ordinary array: > > > unset ($array["one"]); > > > How do I do this if my array is in a session? > > > > > > Here is my code: > > > <? > > > session_start(); > > > $array = array(one=> "number one", two=> "Number two", three=> "Number > > > three"); > > > session_register("array"); > > > ?> > > > > > > I tried this... Didn't work: > > > <? > > > session_start(); > > > session_unregister("array[one]"); > > > ?> > > > > > > Thanks, > > > // Tobias Talltorp > > > > > > > > > > > > > > > -- > > > PHP General Mailing List (http://www.php.net/) > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > > > > > -- > PHP 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] >



hello;

This may be a long shot but I'll give it a go. I'm trying to track down an Ade Smith 
from the UK that I used to know. he would be a bout 30 now and originally came from 
Bath. he also used to work for a company called "More Balls Than Most". Is this you? 
If so get in touch. If not, sorry to take up your time.

Thanks


Jamie




I am trying to run a query and in my log I am  getting a message the message
resource id #2.

$query=mysql_query("Select pass from members where uname='$username'");
$result = mysql_query($query)
or die("You are not authorized to be here.");


Can someone tell me what I am doing wrong and guide me in the right
direction






try
$query="Select pass from members where uname='$username'";
$result = mysql_query($query) or die("You are not authorized to be here.");

the mysql_query command is executing the statement

morgan


At 10:40 AM 4/16/2001, Greg K wrote:
>I am trying to run a query and in my log I am  getting a message the message
>resource id #2.
>
>$query=mysql_query("Select pass from members where uname='$username'");
>$result = mysql_query($query)
>or die("You are not authorized to be here.");
>
>
>Can someone tell me what I am doing wrong and guide me in the right
>direction
>
>
>
>--
>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]




> $query=mysql_query("Select pass from members where uname='$username'");
> $result = mysql_query($query)
> or die("You are not authorized to be here.");

<?
$query=mysql_query("Select pass from members where uname='$username'");
$result = mysql_query($query);

// If the number of rows is less than one (meaning zero) then die()
if ($mysql_num_rows($result) < 1)) {
    die("You are not authorized to be here.");
}
?>

What you are doing is checking if the query is valid. Your die() would print
only if you had a faulty query (try changing pass to pass2), but if the
username is wrong, it returns an empty set.
The mysql_query() returns the "resource id #2" that you can use with the
mysql_fetch_array, mysql_num_rows etc to get printable information.

// Tobias








Greg K schrieb:
> I am trying to run a query and in my log I am  getting a message the message
> resource id #2.
> 
> $query=mysql_query("Select pass from members where uname='$username'");
> $result = mysql_query($query)
> or die("You are not authorized to be here.");
> 
> Can someone tell me what I am doing wrong and guide me in the right
> direction

Please check the docs http://www.php.net/manual/en/ref.mysql.php /
http://www.php.net/manual/en/function.mysql-fetch-row.php (don't forget
to read the user comments!) and the usual sites for tutorials e.g.
http://www.phpbuilder.com .

Ulf

-- 
Neu: PEAR Menu 3 - Navigationsstrukturen dynamisch dargestellt
http://www.ulf-wendel.de/projekte/menu/tutorial.php |
http://www.phpdoc.de




Sorry...
Read morgans topic aswell...
Didn´t see the duplicate mysql_query(). :)

// Tobias

""Tobias Talltorp"" <[EMAIL PROTECTED]> wrote in message
9betpl$nb0$[EMAIL PROTECTED]">news:9betpl$nb0$[EMAIL PROTECTED]...
> > $query=mysql_query("Select pass from members where uname='$username'");
> > $result = mysql_query($query)
> > or die("You are not authorized to be here.");
>
> <?
> $query=mysql_query("Select pass from members where uname='$username'");
> $result = mysql_query($query);
>
> // If the number of rows is less than one (meaning zero) then die()
> if ($mysql_num_rows($result) < 1)) {
>     die("You are not authorized to be here.");
> }
> ?>
>
> What you are doing is checking if the query is valid. Your die() would
print
> only if you had a faulty query (try changing pass to pass2), but if the
> username is wrong, it returns an empty set.
> The mysql_query() returns the "resource id #2" that you can use with the
> mysql_fetch_array, mysql_num_rows etc to get printable information.
>
> // Tobias
>
>
>
> --
> 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]
>






Hello,

I'd like to know if there is a script with the same (or more) functionality as
SubscribePro at:
http://cgi.elitehost.com/subpro/

... in PHP of course :)

Thanks for any info,

Fabian Rodriguez - Associate Dir., Outsourcing and Business development
Toxik Technologies Inc. - www.Toxik.com - (514)528-6945 x1
"Stop worrying about your Internet services.
It has never been easier."





Unless I'm missing something, I've looked all over the
PHP site for a link to PEAR but have been unable to find
one (including in the PEAR section of the manual, where
you would think it would be...).
Could someone please provide a link?

Chris




"Boget, Chris" wrote:
> 
> Unless I'm missing something, I've looked all over the
> PHP site for a link to PEAR but have been unable to find
> one (including in the PEAR section of the manual, where
> you would think it would be...).
> Could someone please provide a link?
> 
> Chris

http://www.php.net/manual/en/pear.php

-- 
Pavel a.k.a. Papi




Boget, Chris" schrieb:
> Unless I'm missing something, I've looked all over the
> PHP site for a link to PEAR but have been unable to find
> one (including in the PEAR section of the manual, where
> you would think it would be...).
> Could someone please provide a link?

http://pear.php.net/

Don't be too disappointed about the website, some work on it is in
progress and I'm sure there will soon be a website. For the moment
you're requested to subscribe to the mailinglists listed on php.net top
get help.

Ulf

-- 
Neu: PEAR Menu 3 - Navigationsstrukturen dynamisch dargestellt
http://www.ulf-wendel.de/projekte/menu/tutorial.php |
http://www.phpdoc.de




> > Unless I'm missing something, I've looked all over the
> > PHP site for a link to PEAR but have been unable to find
> > one (including in the PEAR section of the manual, where
> > you would think it would be...).
> > Could someone please provide a link?
> http://www.php.net/manual/en/pear.php

Ok, where on the above page is a link to the actual code?
The PEAR base class that is references all over that section
of the manual?  I read through that section of the manual
and learned some pretty cool things about how one should
code when adding to the PEAR, but not where the class
resides.

Chris




> > Could someone please provide a link?
> http://pear.php.net/
> Don't be too disappointed about the website, some work on it is in
> progress 

I can tell. :p  There is an error when you access that page.

Chris






"Boget, Chris" schrieb:
> 
> > > Unless I'm missing something, I've looked all over the
> > > PHP site for a link to PEAR but have been unable to find
> > > one (including in the PEAR section of the manual, where
> > > you would think it would be...).
> > > Could someone please provide a link?
> > http://www.php.net/manual/en/pear.php
> 
> Ok, where on the above page is a link to the actual code?
> The PEAR base class that is references all over that section
> of the manual?  I read through that section of the manual

http://cvs.php.net/viewcvs.cgi/php4/pear/, every PHP 4 source
distribution contains the PEAR sources in the directory pear/. Check the
README for install notes.

Ulf

-- 
Neu: PEAR Menu 3 - Navigationsstrukturen dynamisch dargestellt
http://www.ulf-wendel.de/projekte/menu/tutorial.php |
http://www.phpdoc.de




I think I saw this, but can't remember when or where.

Is it posible to change the value of include_path in a php script without 
changing it in php.ini?

Saludos... :-)

-- 
El mejor sistema operativo es aquel que te da de comer.
Cuida tu dieta.
-----------------------------------------------------------------
Martin Marques                  |        [EMAIL PROTECTED]
Programador, Administrador      |       Centro de Telematica
                       Universidad Nacional
                            del Litoral
-----------------------------------------------------------------






Martín Marqués schrieb:
> Is it posible to change the value of include_path in a php script without
> changing it in php.ini?

Try ini_set() & friends,
http://www.php.net/manual/en/function.ini-set.php . 

Ulf

-- 
Neu: PEAR Menu 3 - Navigationsstrukturen dynamisch dargestellt
http://www.ulf-wendel.de/projekte/menu/tutorial.php |
http://www.phpdoc.de




My configuration: Win98 / Xitami / PHP3 / MySQL
PHP is installed in the path of Xitami.

path xitami\cgi-bin\HELLO2.PHP3
"http://localhost/cgi-bin/hello2.php3" It works!

My bloody newbie question:
Where must I put HELLO3.HTM so that it can be run from the localhost
"http://localhost/hello3.htm" doesn't work!


HELLO2.PHP3
<?php
print"<html>\n<body>\n";
echo "hello2";
print"<body>\n<html>\n";
?>

HELLO3.HTM
<html><head><title>PHP Test</title></head>
<body>
<?php echo "Hello World3<P>"; ?>
</body></html>






Change the extension of hello3.htm to php3. The second one doesn't work
because the web server only runs the php enginge when the file has a php
extension (it depends on the server setting but usually just .php should
work fine). PHP code can be embedded within HTML so basically you don't
have to do everything in PHP like in your first script. 

Seung-woo Nam

[EMAIL PROTECTED] wrote:
> 
> My configuration: Win98 / Xitami / PHP3 / MySQL
> PHP is installed in the path of Xitami.
> 
> path xitami\cgi-bin\HELLO2.PHP3
> "http://localhost/cgi-bin/hello2.php3" It works!
> 
> My bloody newbie question:
> Where must I put HELLO3.HTM so that it can be run from the localhost
> "http://localhost/hello3.htm" doesn't work!
> 
> HELLO2.PHP3
> <?php
> print"<html>\n<body>\n";
> echo "hello2";
> print"<body>\n<html>\n";
> ?>
> 
> HELLO3.HTM
> <html><head><title>PHP Test</title></head>
> <body>
> <?php echo "Hello World3<P>"; ?>
> </body></html>
>




 i am starting and registering session variable succesfully  that i can see
the file on the server ,  but when it comes to use or display i can not ,
the variable has no value ... the "session.save_handler      = files"  is in
php.ini , i tried to change it to user but that occured a fatal error etc..
So shortly what is the thing that i am missing 
thanks alot




The reason for the fatal error is that you can only store the sessions in
three (or four) ways, files, in a database or in the memory.

What variable has no value?
Have you started the session before you try to access the values?
session_start();
echo $your_value;
(Or preferably)
echo $HTTP_SESSION_VARS["your_value"];

Here is a little code for you to test if you can read the session variables:

session_start();
while(list($key, $val) = each($HTTP_SESSION_VARS))

    echo "Variables name: $key - The value: $val";
}


"SERKAN BALKANLI (EBÝ Bþk.-Analist Prog.)" <[EMAIL PROTECTED]> wrote in
message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> i am starting and registering session variable succesfully  that i can see
> the file on the server ,  but when it comes to use or display i can not ,
> the variable has no value ... the "session.save_handler      = files"  is
in
> php.ini , i tried to change it to user but that occured a fatal error
etc..
> So shortly what is the thing that i am missing
> thanks alot
>
> --
> 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]
>






On Thu, Apr 12, 2001 at 10:20:28PM -0400, Chris Anderson wrote:
> If I grab values from fields and they contain nothing, and I retrieve
> them using mysql_field_array, it will give an index out of range. Is
> there a way to prevent the error or do I have to keep putting a @ in
> front of the variable declaration?

Why not just check how many rows are returned?
mysql_num_rows()

-- 
Jason Stechschulte
[EMAIL PROTECTED]
--
I wouldn't ever write the full sentence myself, but then, I never use
goto either.
             -- Larry Wall in <[EMAIL PROTECTED]>




Happy Easter to all!

In the user viewer example at the end of Chapter 12 - has anyone had
problems with the source downloaded from their website?

The story so far with my trials of this example:

downloaded source
created table in mysql and populated it (with the SQL script provided)

First page ie function list_records() works 'fine'.  Except a javascript
error at the foot of the page - page done, with errors.  Sorting hyperlinks
all work, as does all the forward, reverse paging.

What doesn't work is the function view_record() hyperlinks.

I believe things are going awry in javascript (of which I know nothing, and
have the dummies guide in front of me) as it doesn't get to opening a new
window.

I've tried calling the function as follows:

<a href="javascript:open_window('www.google.com');">Google</a>

No joy at all - javascript error.

<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
   <!--
   function open_window(url) {
      var NEW_WIN = null;
      NEW_WIN = window.open ("", "RecordViewer",
                             "toolbar=no,width="+
                             <?php echo $new_win_width ?>+
                             ",height="+<?php echo $new_win_height?>+
                             ",directories=no,status=no,
                             scrollbars=yes,resize=no,menubar=no");
      NEW_WIN.location.href = url;
   }
   //-->
   </SCRIPT>

Any help greatly received.  Grrrrrrr  I'm trying to learn php, not hack
javascript...


David Mateer.
[EMAIL PROTECTED]







        Here is the scenario. I have a pure html form where a user login and
pass is gathered and sent to a php script via the post method. The php
script authenticates against a DB starts a session and uses the header
function to send a header with the sessionid back to the browser.
Everything works fine and as expected with one catch. While testing, I
have accessed the site through a few different proxies. Through an
AS/400 proxie, everything is fine. Through another NT proxie everything
is fine, but when I try and access it through a novel proxy something
falls apart. I am assuming that the data is reaching the script fine
since other forms can be posted through the proxie. I am thinking the
proxie is screwing up the returned header with the session id attached.
Has anyone else encountered this phenomenon before?


-- 
Larry H




Here is the script

"request.php" 62 lines, 1585 characters
<?
include ("layout.php");

page_open(array("sess" => "Repository_Session"));

  if (!isset($s)) { $s=0; };
  $sess->register("s");



site_header("Request a Document - Document Cart");

echo '<P align=left><font face="Arial, Helvetica, sans-serif" size="2"
color="#000066">Below
  is your <b><i><font color="#FF0000">Document Cart</font></i></b>.<br>
  <br>
  </font><font face="Arial, Helvetica, sans-serif" size="2"
color="#000066">Any
  time you request a document we will store it here. You may <a
href="http://starbase.msfc.nasa.gov/rs-bin/show_files.pl?search='.$s
earch.'">
 return to your search
  results</a> at any time and choose another document<br>
  or you may perform a <a href="search.php">New Search</a>.<br>
  <br>
  </font><font face="Arial, Helvetica, sans-serif" size="2">You may also
Increase
  or Decrease the Number of copies you wish to request by using the <font
color="#FF0000">Add/Remove
  </font>links, or completly empty the cart with the <font
color="#FF0000">Clear
  cart</font> link.<br>
  <br>
  </font><font face="Arial, Helvetica, sans-serif" size="2"
color="#000066">Whenever
  you are done selecting documents click the <i><font
color="#FF0000">Checkout</font></i><font color="#FF0000">
  </font>link to process your request.</font></P>
<BR>';
global $scart;
global $obj_id;
$scart->start();



switch($action)
{
        case add:
        $scart->add_item($obj_id,1);
        break;
        case remove:
        $scart->remove_item($obj_id,1);
        break;
        case clearcart:
        $scart->reset();
        break;
}
$scart->show_all();
page_close();

site_footer();

?>


I'm not familiar with the ob* functions, is this phplib or just php, I'll
look for some docs on it and give it a try though thanks.

-Mark

""Plutarck"" <[EMAIL PROTECTED]> wrote in message
9b4bb7$1tf$[EMAIL PROTECTED]">news:9b4bb7$1tf$[EMAIL PROTECTED]...
> That sounds like a problem with the way you handle sessions.
>
> What happens is your program tries to start a session, but the page isn't
> sent if a session isn't started. It still shouldn't reply with a 404
> though...search your script for header and see if you send any.
>
> Once someone has the session, then the page will load correctly.
>
> Muck through your php code and see if there are any conditions or loops
> which require a session to be running.
>
>
> Still, that shouldn't happen and it's probably one of those bugs that you
> can't figure out why they happen, or what causes them, but after tinkering
> around suddenly everything works.
>
>
> One thing to try, if it's available, is use the ob_* functions as a
> debugger. Stick an obstart at the begining and a ob_end_flush at the end,
> and see if the problem disappears magically.
>
> Odd what sometimes fixes things...
>
>
> --
> Plutarck
> Should be working on something...
> ...but forgot what it was.
>
>
> ""Mark"" <[EMAIL PROTECTED]> wrote in message
> 9b4ar1$t6i$[EMAIL PROTECTED]">news:9b4ar1$t6i$[EMAIL PROTECTED]...
> > I have a php script which is like a modified shopping cart.
> >
> > It starts with a search that calls a perl script ( I know, but it's the
> only
> > way I can include certain proprietary functionality I need).  This
returns
> a
> > results set of documents that can be either downloaded or requested
> > depending on permissions.
> >
> > If you click to request a document a php script request.php is called it
> is
> > sort of like a cart script, and uses phplib sessions and db_oci8.
> >
> > The strange problem I am having is this:
> >
> > If it is the first time you have reqeusted this script since last
opening
> > your browser, you will get a 404, if you hit back/forward or refresh the
> > script works fine as if nothing ever happened.  You will not get this
> error
> > again as long as you do not close and reopen your browser.  Any ideas?
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
>
>
>
> --
> PHP 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]
>






Tyler,

There are MANY ways you can do this. At some point htough, they will have to
leave your site but it can be set up so it is invisible to the user. I work
for a credit card processing company writing web based software for
processing payments. If you have any questions, feel free to shoot them off
to me.

Jeff Pearson

PS: If anyone needs a Merchant Account to process payments, let me know and
I can get you set up. Also, if anyone already has a Merchant Account and
wants cheaper rates, give me a shout.

> -----Original Message-----
> From: Tyler Longren [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, April 15, 2001 2:02 PM
> To: PHP-General
> Subject: [PHP] accepting credit cards
>
>
> Hello everyone,
>
> I know this has been discussed many times before.  I even read the past
> threads in the list archives.  I've written a shopping cart/catalog that
> uses mysql on the backend.  I need to be able to accept cc orders.  Is
> Paypal a good choice?  I've never really use any service like this before.
> When the user orders an item, will they have to leave my website?
>
> Thanks,
> Tyler
>
>
> --
> 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]
>





Hello,

I made a GD script that made an image with the name of whatever page I was
in in my web site.  I would post info to it like this:
http://www.domain.com/jpeg-out.php?title=FrontPage  what ever I put for
title it would make the image.  After reinstalling php4 on my win2000 box
with apache it doesn't seem to get the $title variable.  Does anyone know
what might be going wrong?

Thanks,
Brandon





Check your settings for track_vars and register_globals and ensure they are
both enabled.

Furthermore, check for the existance of $HTTP_GET_VARS["title"]. If it isn't
there either and both of your ini settings are set correctly, then you can
basically ignore this advice because you are having a different problem
entirely.


--
Plutarck
Should be working on something...
...but forgot what it was.


"Brandon Orther" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hello,
>
> I made a GD script that made an image with the name of whatever page I was
> in in my web site.  I would post info to it like this:
> http://www.domain.com/jpeg-out.php?title=FrontPage  what ever I put for
> title it would make the image.  After reinstalling php4 on my win2000 box
> with apache it doesn't seem to get the $title variable.  Does anyone know
> what might be going wrong?
>
> Thanks,
> Brandon
>
>
> --
> 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]
>








Brandon Orther schrieb:
> I made a GD script that made an image with the name of whatever page I was
> in in my web site.  I would post info to it like this:
> http://www.domain.com/jpeg-out.php?title=FrontPage  what ever I put for
> title it would make the image.  After reinstalling php4 on my win2000 box
> with apache it doesn't seem to get the $title variable.  Does anyone know
> what might be going wrong?

Check register_globals,
http://www.php.net/manual/en/html/configuration.html#ini.register-globals
and make sure you're not trying to access a global variable from within
a function.

BTW, does your script contain <img src="button.php?label=whatever"> ? If
you you've written a perfect killer application. The webserver has to
handle your script ( 1st request => 1 process on the webserver) and all
the <img src="button.php...> (another request => 2. process on the
webserver). In case you embed 10 images that way, you'll get 10 + 1
processes on the webserver for 1 request done by the user. Image
creation should be done in the skript, never use button.php - throw away
all books and tutorials that tell you to do so.

Ulf

-- 
Neu: PEAR Menu 3 - Navigationsstrukturen dynamisch dargestellt
http://www.ulf-wendel.de/projekte/menu/tutorial.php |
http://www.phpdoc.de




I'm trying to edit the specific item for each row found in the snippet 
below. Each item gets a row in a table and I want to pass the item Id (s_id 
below) to $item. It seems however that the array *item * is not 
incrementing. For all rows I get the value of the first row. 
Any ideas of what wrong? 

M.

<? 
/*
  Get isstock value and if there is stock registered add a table row for 
each item.
*/
if ($isstock >0) {
  for ($i = 0; $i <= $isstock -1; $i++) {
    $item[$i] = $row['s_id'];
    print "<input type='hidden' name='what' value=$item[$i]>";
    $row = mysql_fetch_array($query_res);
    print "<tr>";
    print "     <td>".$row['s_id']."</td>";
    print "     <td>".$row['s_description']."</td>";
    print "     <td>".$row['s_price']."</td>";
    print "     <td>".$row['s_stock_quantity']."</td>";
    print "     <td>N/I</td>";
    print "     <td>N/I</td>";
    print "     <td><input name='action' value='Edit' type='submit'><input 
name='action' value='Delete' type='submit'></td>";
    print "</tr>";
  }
}
?>





would there be any problems caused if i used the stripslashes() function on
all posted variables from a form to eliminate sql query errors?

 - Noah






As long as you don't need to ever store a forward slash :)

Beyond that, nope. stripslash() away.


--
Plutarck
Should be working on something...
...but forgot what it was.


""Noah Spitzer-Williams"" <[EMAIL PROTECTED]> wrote in message
9bf7ec$m1m$[EMAIL PROTECTED]">news:9bf7ec$m1m$[EMAIL PROTECTED]...
> would there be any problems caused if i used the stripslashes() function
on
> all posted variables from a form to eliminate sql query errors?
>
>  - Noah
>
>
>
> --
> 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]
>






if a do
    ldapsearch -o ",o=xyz" "ent=entry1,uid=ldap,ou=People,o=xyz", it
works just fine.

How can i access the entry  "ent=entry1,uid=ldap,ou=People,o=xyz" using
ldap_search/ldap_list or ldap_read?

I have tried ldap_search... but i can not find how to write the filter.

Can any one, please help me. I have wasted 5 days with this.

Thanks
Miguel





Is there any sample code for the above PEAR
class around anywhere?

Chris






"Boget, Chris" schrieb:
> 
> Is there any sample code for the above PEAR
> class around anywhere?

You should ask this on the dedicated pear-general list. Examples are all
over in the PEAR source. I preferr to use a simple wrapper for it like
http://cvs.php.net/viewcvs.cgi/php4/pear/Cache/Error.php as I don't need
all of the features for simple code. Stig's DB classes make more
intensive use of it's features. 

Well, have a look at the source and keep on asking on the pear-general
and/or pear-dev lists. 

Ulf

-- 
Neu: PEAR Menu 3 - Navigationsstrukturen dynamisch dargestellt
http://www.ulf-wendel.de/projekte/menu/tutorial.php |
http://www.phpdoc.de




Many THANKS!

I find this newsgroup to be one of the *best* I've come across!  Responses
are quick, usually detailed and always right on target...

You guys and gals rock!

Jason







I have not run into this problem before...so here goes.

[root@bfarm1 php-4.0.4pl1]# make
Making all in Zend
make[1]: Entering directory `/root/php-4.0.4pl1/Zend'
/bin/sh ../libtool --silent --mode=compile
gcc -DHAVE_CONFIG_H -I. -I. -I../main   -DXML_BYTE_ORDER=12  -g -O2 -c
zend_language_scanner.c
zend_language_scanner.c: In function `zend_fatal_scanner_error':
zend_language_scanner.c:2707: Internal error: Segmentation fault.

RedHat 7.0 (beta)
--with-esoob
--enable-ftp
--enable-track-vars
--enable-force-cgi-redirect

I have installed on this beta OS before with no problems.  any ideas?

Michael Geier
 EMail: [EMAIL PROTECTED]





Hello,

Does anyone know of an image library that plugs right into php that has a
blur function so I can create a drop shadow effect for text?

Thanks
Brandon





Hi,

I was downloading the latest version of PHP (Win32 Binaries) for IIS server,
but no external extensions are included. Why? Is it not supported for IIS
server?

I'm having great difficulty adding those extensions manually (editing the
PHP.ini), I always get errors like following example shows (the file sure is
there):

        Unable to load dynamic library 'C:\PHP\extensions\php_gd.dll'
        - The specified procedure could not be found.

This happens for other extensions also (which I copied from Apache
PHP_4.0.4pl1.zip download).

Has anyone experienced the problem I'm having - and if so, how did you
overcome it?

Regards,
Sumarlidi Einar Dadason

SED - Graphic Design

------------------------------------------
Phone:       (+354) 4615501
Mobile:      (+354) 8960376
Fax:         (+354) 4615503
E-mail:      [EMAIL PROTECTED]
Homepage:    www.sed.is <- New Homepage!
------------------------------------------





Hi!
I'm a pretty newby, so I have a question: How can I make a link to html 
or php or any other page in the internet in my PHP code? should be like  
Command ( "Http://www.xyz.com") Just like a link in a html site would be 
clicked.
Thanx, greetings from austria,
             Johannes Rumpf





Johannes Rumpf wrote:

> Hi!
> I'm a pretty newby, so I have a question: How can I make a link to html
> or php or any other page in the internet in my PHP code? should be like
> Command ( "Http://www.xyz.com") Just like a link in a html site would be
> clicked.
> Thanx, greetings from austria,
>              Johannes Rumpf
>
> --
> 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]

I believe the code should be the same as html ....


Luis



Reply via email to