[PHP] Need some help with this idea!

2001-07-24 Thread Chris Cocuzzo

hey-

I want to select the oldest show from a database to display on my main page,
since the oldest show is also the show happening closest to any current
time(if that makes sense...). I included a timestamp field in my table of
shows in anticipation of checking that to find out what was the oldest.
however, I'm wondering how I should go about doing that exactly. my idea was
the scan through just that column of timestamps, find the lowest one, and
then make a selection from the db based on the timestamp. Can any give me
some examples of code to scan through a column like i mentioned, or give me
better ideas on how to do this??

thanks
chris


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




Re: [PHP] Capitalize Function ??

2001-07-24 Thread Alexander Skwar

So sprach »PHP Junkie« am 2001-07-23 um 21:39:07 -0400 :
 I'm taking in first name and last name data into a MySQL db through a
 form. Users sometimes don't capitalize their first and last names when
 entering the data.  Is there a function to clean this up for
 consistency?  If so, what is the name of the function that performs
 this?

Yep, ucwords.

But this is not a good idea!  There are Names (like Hans vom Bach or
somesuch) which do NOT have to be captialized.  Actually, capitalizing
the vom would be wrong.  Although this was just a German example, I'd
bet there are names in French, Dutch, Spanish, Italian as well which
should not be capitalized.  Hmm, how about English?  Sometimes there are
suffixes like the 3rd, no?  Would it be right to capitalize this?


Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.digitalprojects.com   |   http://www.iso-top.de
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
Uptime: 1 day 7 hours 12 minutes

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




Re: [PHP] Need some help with this idea!

2001-07-24 Thread David Robley

On Tue, 24 Jul 2001 15:57, Chris Cocuzzo wrote:
 hey-

 I want to select the oldest show from a database to display on my main
 page, since the oldest show is also the show happening closest to any
 current time(if that makes sense...). I included a timestamp field in
 my table of shows in anticipation of checking that to find out what was
 the oldest. however, I'm wondering how I should go about doing that
 exactly. my idea was the scan through just that column of timestamps,
 find the lowest one, and then make a selection from the db based on the
 timestamp. Can any give me some examples of code to scan through a
 column like i mentioned, or give me better ideas on how to do this??

 thanks
 chris

I'm not exactly sure what you want here, but it seems like you could do a 
select where timestamp (= or = ) NOW() and then ORDER the result ASC or 
DESC according to your needs.

Frinstance, to get the first show on or after today you could select 
where timestamp is greater than or equal to NOW(), ORDER by timestamp and 
LIMIT 1 to get the earliest in the future. Which might be today! You can 
do some fancy formatting of the timestamp in Mysql, if that helps.

-- 
David Robley  Techno-JoaT, Web Maintainer, Mail List Admin, etc
CENTRE FOR INJURY STUDIES  Flinders University, SOUTH AUSTRALIA  

   Only cosmetologists give make-up exams.

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




RE: [PHP] Need some help with this idea!

2001-07-24 Thread Don Read


On 24-Jul-2001 Chris Cocuzzo wrote:
 hey-
 
 I want to select the oldest show from a database to display on my main page,
 since the oldest show is also the show happening closest to any current
 time(if that makes sense...). I included a timestamp field in my table of
 shows in anticipation of checking that to find out what was the oldest.
 however, I'm wondering how I should go about doing that exactly. my idea was
 the scan through just that column of timestamps, find the lowest one, and
 then make a selection from the db based on the timestamp. Can any give me
 some examples of code to scan through a column like i mentioned, or give me
 better ideas on how to do this??
 
 thanks
 chris
 


'Old'-est - order by your_timestamp asc 
'New'-est - order by your_timestamp desc 

   ... limit x;

Regards,
-- 
Don Read   [EMAIL PROTECTED]
-- It's always darkest before the dawn. So if you are going to 
   steal the neighbor's newspaper, that's the time to do it.

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

2001-07-24 Thread Aarmel

A urgent question does, the follow work on sun solaris.  php + 
postgresql + expat + saboltron


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

2001-07-24 Thread Justin French

Hi,

On my local test server (PHP4.0.1, FreeBSD, MySQL), when I 
get a general error (bad code) it reports error type on 
file/script on line 1.

It allways says line 1, even if it's line 4028.

I've had experience with this happening if there is a 
structure problem with { brackets } missing (on any server), 
but never for general syntax-kinda errors.


But on my live server (a couple of different ISPs), the 
error reports the correct line, as you would expect.


Since it's only on my test server, I assume it's a problem 
with the config file, or something like that, but don't know 
where to start any ideas?


Maybe I can switch on an errors function at the start of each
script?


Justin French

-- 
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] declaring variables in PHP???

2001-07-24 Thread René Moonen

Hi,

I'm using PHP for a few weeks now, so you can imagine that I'm making a
lot of typing errors...

Often I make a typing error in one of the variable names ($helo instead
of $hello or worse still $Hello instead of $hello). Since PHP does not
care about declaring variables before using them, it is very easy to
overlook such  small typing error in a large PHP script.

In the old days of ANSI C, there where things like LINT that would help
you with these problems. Of course in ANSI C these things were easier,
because of the fact that variables need to be declared before they could
be used.

My questions:
1. can you configure PHP in such away that variables need to be
declared?
2. are there source code checking tools that could help me locate
problems like described above?


Thanks for your help

René



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




Re: [PHP] When did this become the advertising Mailing List

2001-07-24 Thread Brian White

It happens alot. Just sigh a little and delete it.

I always think of it as a very quick email to deal with out of the 180
I get each day


At 17:33 23/07/2001 +1000, ReDucTor wrote:
When?!?


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

-
Brian White
Step Two Designs Pty Ltd - SGML, XML  HTML Consultancy
Phone: +612-93197901
Web:   http://www.steptwo.com.au/
Email: [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] Re: declaring variables in PHP???

2001-07-24 Thread Henrik Hansen

[EMAIL PROTECTED] (René Moonen) wrote:

  Hi,
  
  I'm using PHP for a few weeks now, so you can imagine that I'm making a
  lot of typing errors...
  
  Often I make a typing error in one of the variable names ($helo instead
  of $hello or worse still $Hello instead of $hello). Since PHP does not
  care about declaring variables before using them, it is very easy to
  overlook such  small typing error in a large PHP script.
  
  In the old days of ANSI C, there where things like LINT that would help
  you with these problems. Of course in ANSI C these things were easier,
  because of the fact that variables need to be declared before they could
  be used.
  
  My questions:
  1. can you configure PHP in such away that variables need to be
  declared?

you can change your warning level to E_ALL to give you a warning when
variables aren't defined, but it still does not NEED to be defined.

  2. are there source code checking tools that could help me locate
  problems like described above?

dont know.

-- 
Henrik Hansen

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




RE: [PHP]MySQL error, what's wrong here..

2001-07-24 Thread Tim Ward

my guess would be that sgid is a character field. if this isn't the case
then try hardcoding a known id into the query and seeing what happens. It
could also be that the connection has failed, try something like:

if ($connection = mysql_connect())
{
...
$id = rand(1,2);
$query = SELECT songname FROM mp3 WHERE sgid =  .$id;
if ($result = mysql_query($query,$connection))
{   $mp3d = mysql_fetch_array($result);
...
} else echo(query failed);
...
} else echo(connection failed);

this'll give you an idea of where it's going wrong

Tim Ward
Senior Systems Engineer

Please refer to the following disclaimer in respect of this message:
http://www.stivesdirect.com/e-mail-disclaimer.html


 -Original Message-
 From: Chris Cocuzzo [mailto:[EMAIL PROTECTED]]
 Sent: 23 July 2001 23:57
 To: [EMAIL PROTECTED]
 Subject: [PHP]MySQL error, what's wrong here..
 
 
 ?php
   $id = rand(1,2);
   $query = SELECT songname FROM mp3 WHERE sgid =  .$id;
   $result = mysql_query($query,$connection);
   $mp3d = mysql_fetch_array($result);
   ?
 
 the server is telling me line 43(which starts with $mp3d) is 
 not a valid
 mysql result resource. what am i doing wrong??
 
 chris
 
 

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




Re: [PHP] mailing in batches

2001-07-24 Thread Mirek Novak

Hi,

I had to solve very similar problem - solution was to store prepared
e-mails in
database and send them with an external program using cron to run it.
I'm
sending about 40,000 announces per day with my system with no problems.

Mirek Novak
---
Matthew Delmarter pe:

 I want to set up a script that sends a bunch of emails - pauses - and
 resumes until all messages are sent.

 The way this will happen is that a person will create the newsletter, check
 it, and then press the "Send" button which will start the process of sending
 the mail in bunches. How do I get a script to run in the background? I am
 only familiar with processing script within an html page that is returned to
 a client. Will a script like this keep running even if a browser window is
 closed?

 Also is there any examples of this kind of app?

 Regards,

-- 
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] Copy Array.

2001-07-24 Thread Nick Davies


Anyone know how to copy an array to another name?

I'm assumming that $array1 = $array2; doesn't work (at least it
doesn't seem too :( ).

Thanks.

Nick.


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




Re: [PHP] Copy Array.

2001-07-24 Thread ReDucTor

hows about $array2 = $array1; :D
- Original Message - 
From: Nick Davies [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, July 24, 2001 6:39 PM
Subject: [PHP] Copy Array.


 
 Anyone know how to copy an array to another name?
 
 I'm assumming that $array1 = $array2; doesn't work (at least it
 doesn't seem too :( ).
 
 Thanks.
 
 Nick.
 
 
 -- 
 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] Re: declaring variables in PHP???

2001-07-24 Thread Steve Brett

the zend ide @ www.zend.com is a pretty cool debugging env.

Steve

René Moonen [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Hi,

I'm using PHP for a few weeks now, so you can imagine that I'm making a
lot of typing errors...

Often I make a typing error in one of the variable names ($helo instead
of $hello or worse still $Hello instead of $hello). Since PHP does not
care about declaring variables before using them, it is very easy to
overlook such  small typing error in a large PHP script.

In the old days of ANSI C, there where things like LINT that would help
you with these problems. Of course in ANSI C these things were easier,
because of the fact that variables need to be declared before they could
be used.

My questions:
1. can you configure PHP in such away that variables need to be
declared?
2. are there source code checking tools that could help me locate
problems like described above?


Thanks for your help

René





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




Re: [PHP] IMAP and Attachments

2001-07-24 Thread Jome

 How can I check to see if a email has an attachment?  Then download it if the 
 user clicks on it?

I've been working on a webmail for POP3 but I guess the idea is about the same.

To check if a an email has attachments you use the function imap_fetchstructure() and 
then you can do something like this:

$struc = imap_fetchstructure();
count($struc-parts);
if ($no_of_parts  0) {
echo the message has attachments.;
}

This is my way of doing it, the 'bad' thing with this kind of code is that it also 
includes HTML-messages. This can be prevented with some extra code though.

For downloading you use the same kind of thing, I guess it slightly more advanced and 
you have to do some decoding of the message.

Best regards,

Jome

(looking for php-jobs, coding for $15/hour)


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

2001-07-24 Thread Denis Croombs

Hi
I am transfering a NT IIS website with forms to APACHE and PHP, but need
examples of how the forms work, can you please guide as to where I can find
some and any other data to asist me as this is the first time I have used
PHP.

Many thanks

Denis Croombs


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




Re: [PHP]MySQL error, what's wrong here..

2001-07-24 Thread Wagner Tomy

try this:

  $query = SELECT songname FROM mp3 WHERE sgid = \$id\;
  (or a little cleaner: $query = sprintf(SELECT songname FROM mp3 WHERE
sgid = \%d\, $id); )
instead of:

  $query = SELECT songname FROM mp3 WHERE sgid =  .$id;

- Original Message -
From: James Holloway [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, July 24, 2001 11:05 AM
Subject: Re: [PHP]MySQL error, what's wrong here..


 Hi Chris,

 If you're using MySQL 3.23+, you might want to consider using something
 like:

 SELECT songname FROM mp3 ORDER BY RAND() LIMIT 1

 Not that this answers your original problem, but it seems to make more
sense
 than manually coding a random number (which is, perhaps, impractical
 especiallyif you plan to add / take away entries to your table on a
regular
 basis).

 James

 Chris Cocuzzo [EMAIL PROTECTED] wrote in message
 014d01c113ca$dd3bf460$[EMAIL PROTECTED]">news:014d01c113ca$dd3bf460$[EMAIL PROTECTED]...
  ?php
$id = rand(1,2);
$query = SELECT songname FROM mp3 WHERE sgid =  .$id;
$result = mysql_query($query,$connection);
$mp3d = mysql_fetch_array($result);
?
 
  the server is telling me line 43(which starts with $mp3d) is not a valid
  mysql result resource. what am i doing wrong??
 
  chris
 



 --
 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] Re: Example forms

2001-07-24 Thread Adrian Ciutureanu

--- example.php ---
?=$myText?
form method=post action=./example.php
 input type=text name=myText value=?=$myText?br
 input type=submit
/form

Denis Croombs [EMAIL PROTECTED] wrote in message
004701c11426$b94b7f10$[EMAIL PROTECTED]">news:004701c11426$b94b7f10$[EMAIL PROTECTED]...
 Hi
 I am transfering a NT IIS website with forms to APACHE and PHP, but need
 examples of how the forms work, can you please guide as to where I can
find
 some and any other data to asist me as this is the first time I have used
 PHP.

 Many thanks

 Denis Croombs




-- 
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] Re: value submit button

2001-07-24 Thread Micha

hi,
example:

 html file 

form action=form_send.php method=post
Your username: input type=text name=user
input type=submit name=login value=Login
input type=submit name=remove value=Delete Account
/form

 php file 

if (isset($login)) {
  // Do login...
} else if (isset($remove)) {
  // Remove user...
}

Florian SchäFer wrote:

 Hallo out there,

 i hava an document, with one form and two Submit buttons.
 How can i check in the target document wich button is pressed?
 tried something like   if ($submit == 'xxx') .
 anyone has a hint?

--
Linux...
Because it works.



-- 
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] Re: Can't add PHP4 module to Apache (win32)

2001-07-24 Thread Arnaud

try to move the php4ts.dll library in C:\winnt\system32


Andrew Kirilenko [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hi All!

 Just installed PHP4  Apache.
 Apache has started well.
 Then I've added two strings from install.txt to the httpd.conf:
 LoadModule php4_module c:/php/sapi/php4apache.dll
 AddType application/x-httpd-php .php4
 (I've PHP installed in c:\apps\PHP\)

 After Apache restart, I've got following message:
 Syntax error on line 203 of c:/apps/apache/conf/httpd.conf:
 Cannot load c:/apps/php/sapi/php4apache.dll into server: (126) The
specified
 module could not be found:

 Any suggestions?

 Best regards,
 Andrew Kirilenko.




-- 
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] monitoring more than two sockets (multitask ?)

2001-07-24 Thread Keith Ng

Hello,

I have a simple question.
How do I monitor two or more sockets in PHP?

Someone told me about register_tick_function() for multi tasking but I
played with it and nothing seems to come out of it.

I monitored the first opened socket using a while() loop containing a
fgets() function.


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




Re: [PHP] The Program!

2001-07-24 Thread Brad Hubbard

On Tue, 24 Jul 2001 11:00, Marty wrote:
 Several months ago, I made a conscious decision not to
 delete what I figured was just another junk e-mail.

Several seconds ago, I made a conscious decision to delete what I KNEW was 
just another peice of F%$#ING SPAM. Then I got it out of the trash and 
deleted it again all the time mumbling I'm glad you're dead.

Brad


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




Re: [PHP] Capitalize Function ??

2001-07-24 Thread Ryan Fischer

You wrote:
 So sprach »PHP Junkie« am 2001-07-23 um 21:39:07 -0400 :
  I'm taking in first name and last name data into a MySQL db through
a
  form. Users sometimes don't capitalize their first and last names
when
  entering the data.  Is there a function to clean this up for
  consistency?  If so, what is the name of the function that performs
  this?

 Yep, ucwords.

 But this is not a good idea!  There are Names (like Hans vom Bach or
 somesuch) which do NOT have to be captialized.  Actually, capitalizing
 the vom would be wrong.  Although this was just a German example,
I'd
 bet there are names in French, Dutch, Spanish, Italian as well which
 should not be capitalized.  Hmm, how about English?  Sometimes there
are
 suffixes like the 3rd, no?  Would it be right to capitalize this?

Usually, the 3rd is written as John Doe, III, AFAIK, so that's not
really an issue.

--
 -Ryan :: ICQ - 595003 :: GigaBoard - http://www.gigaboard.net/



-- 
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] php stand alone

2001-07-24 Thread Adrian D'Costa

Hi,

How do I compile php to work as a stand alone.  Right now it is working
thru the web but need to run it from a cron job.

TIA

Adrian


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Document root

2001-07-24 Thread Roman

Please help me !

In phpinfo() i find my document root but existing some PHP variable which 
had document_root inside.

Thankx

roman

for example : Document root : x:\php

maybe echo $Document_root show x:\php


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




RE: [PHP] php stand alone

2001-07-24 Thread Tyler Longren

when you configure php, don't specify a web server to use.

./configure --with-mysql
would do the trick.

./configure --with-apxs=/path/to/apxs --with-mysql
would not do the trick

Tyler


 -Original Message-
 From: Adrian D'Costa [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, July 24, 2001 7:14 AM
 To: php general list
 Subject: [PHP] php stand alone
 
 
 Hi,
 
 How do I compile php to work as a stand alone.  Right now it is working
 thru the web but need to run it from a cron job.
 
 TIA
 
 Adrian
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 

-- 
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] PHP_GD PNG Format

2001-07-24 Thread Bernie Kruger

Hi,

What is the default viewer for this file format.  I create graphs for users
and many of them cannot open the page with the embedded .png picture.

Tx
Bernie



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




Re: [PHP] php stand alone

2001-07-24 Thread Gunther E. Biernat

How do I compile php to work as a stand alone.  Right now it is working
thru the web but need to run it from a cron job.

Have a look at http://www.php.net/manual/en/install.commandline.php

The easiest thing of course would be to just call lynx (or any other command line 
browser taht is able to do a HTTP request and exit (that's why the -dump)) within 
your cron table, e.g.:

0 23 * * * lynx -dump localhost/path/to/some/php/robot.php  /dev/null



mit freundlichen Gruessen / yours sincerely


Gunther E. Biernat
Web Application Engineer
__

RealNetworks GmbH   Tel.: +49-40-415204-24
Weidestraße 128 Fax.: +49-40-415204-11
22083 Hamburg   Mail: [EMAIL PROTECTED]
Germany URL : http://de.real.com
__



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

2001-07-24 Thread Robert Covell

I have been trying to add snmp support into PHP 4.0.4pl1 and 4.0.6 without
success.  The box currently has ucd-snmp-4.2.1 on it and is working fine
with our mod_perl installation.  When we configure it with --with-snmp
and --enable-ucd-snmp-hack it configures fine and lists the it has found
SNMP.  The compile goes smoothly but when I try to run it returns:

Fatal error:  Call to undefined function:  snmpget() in ./snmpmonitor.
php on line 2

It is like snmp is not even compiled in.  Our configure options are:
./configure  --with-gd=/usr/local/gd1.3 --with-mysql=/usr/local/mysql
--enable-debug=no --enable-track-vars=yes --with-msql=/usr/local/Hughes
--enable-ftp --enable-snmp --with-snmp=shared --enable-ucd-snmp-hack

We did notice that configure stated that in order to use the shared libs
elsewhere we should use libtool or 1 or 3 other options.  Not sure how to do
this part.

When we do it without the shared option for --with-snmp or replace it with
/usr/local it returns:

++
|   *** ATTENTION ***|
||
| Something is likely to be messed up here, because the configure|
| script was not able to detect a simple feature on your platform.   |
| This is often caused by incorrect configuration parameters. Please |
| see the file debug.log for error messages. |
||
| If you are unable to fix this, send the file debug.log to the  |
| [EMAIL PROTECTED] mailing list and include appropiate  |
| information about your setup.  |
++


Debug.log has:
/usr/local/lib/libsnmp.so: undefined reference to `EVP_DigestInit'
/usr/local/lib/libsnmp.so: undefined reference to `EVP_DigestFinal'
/usr/local/lib/libsnmp.so: undefined reference to `EVP_md5'
/usr/local/lib/libsnmp.so: undefined reference to `HMAC'
/usr/local/lib/libsnmp.so: undefined reference to `EVP_sha1'
/usr/local/lib/libsnmp.so: undefined reference to `des_cbc_encrypt'
/usr/local/lib/libsnmp.so: undefined reference to `des_key_sched'
/usr/local/lib/libsnmp.so: undefined reference to `EVP_DigestUpdate'
/usr/local/lib/libsnmp.so: undefined reference to `RAND_bytes'
/usr/local/lib/libsnmp.so: undefined reference to `des_ncbc_encrypt'


Any suggestions would be great...

-Bob


-- 
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] Session Register Problem

2001-07-24 Thread Curts

This code was working 4 weeks ago, i swear.

When i attempt a login, it goes through this script all the way to the
Header once a successful login as happened.  Everything in this code
block works correctly, except that the variables don't exist in the
session.  It's almost as if the session_register() function doesn't
work anymore.  Can anyone see what i'm doing wrong:




?php
require_once 'dvd/common.php';

session_start();

if ($goahead) {
if (!strlen($v_username))
$loginError = Please enter your username;
else if (!strlen($v_password))
$loginError = Please enter your password;
else { // ok to go
$dbh = mysql_connect(DB_HOST, DB_USER, DB_PASS);
mysql_select_db(DB_NAME);
$username = strtolower($v_username);
$query = select password, access_level, first_name, last_name, email,
user_id from users where lower(login) = '$username';
$stmt = mysql_query($query, $dbh);
$result = mysql_fetch_row($stmt);

if (strcmp(md5($v_password),$result[0]) == 0) { // do passwords match?
$dvd_login = $v_username;
$dvd_access_level = $result[1];
$dvd_first_name = $result[2];
$dvd_last_name = $result[3];
$dvd_email = $result[4];
$dvd_id = $result[5];

if (session_register('dvd_login')) print 'Registered 
$dvd_loginbr'; 
else print 'Registration of $dvd_login Failurebr';

if (session_register('dvd_access_level')) print 'Registered
$dvd_access_levelbr'; 
else print 'Registration of $dvd_access_level Failurebr';

if (session_register('dvd_first_name')) print 'Registered
$dvd_first_namebr'; 
else print 'Registration of $dvd_first_name Failurebr';

if (session_register('dvd_last_name')) print 'Registered
$dvd_last_namebr'; 
else print 'Registration of $dvd_last_name Failurebr';

if (session_register('dvd_email')) print 'Registered 
$dvd_emailbr';
else print 'Registration of $dvd_email Failurebr';

if (session_register('dvd_id')) print 'Registered 
$dvd_idbr'; 
else print 'Registration of $dvd_id Failurebr';

print $dvd_login, $dvd_access_level, $dvd_first_name,
$dvd_last_name, $dvd_email, $dvd_id ;
print Br $query;

if (isset($redirect))
print 'Header(Location:  . 
base64_decode($redirect));';
else
print 'Header(Location: /loggedIn.php);';

die;
} else 
$loginError = Unable to authenticate.brPlease try again.;
  
}
}
?

To test the session i use this script:  (nothing is showing up though).

?php
session_start();

print 'Table border=1';
print 'TrTd colspan=2bSession/b/Td/Tr';
while (list($key,$val) = each($HTTP_SESSION_VARS)) {
print TrTd align=right$key/TdTd align=left$val/Td/Tr\n;
}
print '/Table';

?

-- 
robin curts
senior programmer
[EMAIL PROTECTED]
/**/
thoughtbubble productions, inc.
http://www.thoughtbubble.com

-- 
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] Re: php stand alone

2001-07-24 Thread Steve Brett

i don't think the last post was right, there is some stuff at phpbuilder
about using php with shell access, i guess you could write a shell script
that is called from cron ...

here you go ... http://www.phpbuilder.com/columns/darrell2319.php3

Steve

Adrian D'Costa [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hi,

 How do I compile php to work as a stand alone.  Right now it is working
 thru the web but need to run it from a cron job.

 TIA

 Adrian




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] php newbie - browser email address

2001-07-24 Thread Scott Dudley


i there a way in php to obtain the email address set in the client's
browser?  i have no intention of spamming those who visit my site but
thought it a novel approach to keeping track of hits.

thanks.


-- 
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] Execute an invisble URL ?

2001-07-24 Thread mail

Hi

I have a little scripting problem with php.I want to execute an extern URL with my php 
file.But this url must be execute invisible.So how should i make this ?
Here is an example.

Any User opens sms.php. This file(sms.php) execute an URL like 
www.xyz.com/scripts/sending.php and put out a text like Thank you.

Thank you very much !!
chris  



[PHP] Re: php newbie - browser email address

2001-07-24 Thread Henrik Hansen

[EMAIL PROTECTED] (Scott Dudley) wrote:

  i there a way in php to obtain the email address set in the client's
  browser?  i have no intention of spamming those who visit my site but
  thought it a novel approach to keeping track of hits.

not possible, why not use their ip address to keep track of visits?

-- 
Henrik Hansen

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




Re: [PHP] Execute an invisble URL ?

2001-07-24 Thread Curts

simply call it using file:

?php

file('http://www.xyz.com/scripts/sending.php');

?

[EMAIL PROTECTED] wrote:
 
 Hi
 
 I have a little scripting problem with php.I want to execute an extern URL with my 
php file.But this url must be execute invisible.So how should i make this ?
 Here is an example.
 
 Any User opens sms.php. This file(sms.php) execute an URL like 
www.xyz.com/scripts/sending.php and put out a text like Thank you.
 
 Thank you very much !!
 chris

-- 
robin curts
senior programmer
[EMAIL PROTECTED]
/**/
thoughtbubble productions, inc.
http://www.thoughtbubble.com

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




Re: [PHP] Document root

2001-07-24 Thread pierre-yves

You seem to be on windows, check with phpinfo() for this var. (I use this on
unix
and assume it would be the same for win)

? echo $HTTP_SERVER_VARS["SCRIPT_FILENAME"]; ?

py

- Original Message -
From: "Roman" [EMAIL PROTECTED]
To: "Php-General" [EMAIL PROTECTED]
Sent: Tuesday, July 24, 2001 8:20 AM
Subject: [PHP] Document root


 Please help me !

 In phpinfo() i find my document root but existing some PHP variable which
 had document_root inside.

 Thankx

 roman

 for example : Document root : x:\php

 maybe echo $Document_root show x:\php


 --
 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] Re: Can't add PHP4 module to Apache (win32)

2001-07-24 Thread Micha

hi,

If you've installed PHP in c:\apps\PHP\ you must use
LoadModule php4_module c:\apps\PHP\sapi\php4apache.dll
(LoadModule php4_module c:/php/sapi/php4apache.dll won't work !)


Arnaud wrote:

 try to move the php4ts.dll library in C:\winnt\system32

 Andrew Kirilenko [EMAIL PROTECTED] wrote in message
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  Hi All!
 
  Just installed PHP4  Apache.
  Apache has started well.
  Then I've added two strings from install.txt to the httpd.conf:
  LoadModule php4_module c:/php/sapi/php4apache.dll
  AddType application/x-httpd-php .php4
  (I've PHP installed in c:\apps\PHP\)
 
  After Apache restart, I've got following message:
  Syntax error on line 203 of c:/apps/apache/conf/httpd.conf:
  Cannot load c:/apps/php/sapi/php4apache.dll into server: (126) The
 specified
  module could not be found:
 
  Any suggestions?
 
  Best regards,
  Andrew Kirilenko.
 

--
Linux...
Because it works.



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

2001-07-24 Thread Bernie Kruger

Hi,

Are there any Freeware/Opensource PDF dll's?

Tx
BK



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




Re: [PHP] PDF dll

2001-07-24 Thread Daniel Rezny

Hello Bernie,

Tuesday, July 24, 2001, 3:33:53 PM, you wrote:

BK Hi,

BK Are there any Freeware/Opensource PDF dll's?

BK Tx
BK BK

You should have one in your distribution

-- 
Best regards,
 Danielmailto:[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] Re: SNMP

2001-07-24 Thread Bopolissimus Platypus

On Tue, 24 Jul 2001 07:32:37 -0500, [EMAIL PROTECTED] (Robert Covell)
Debug.log has:
/usr/local/lib/libsnmp.so: undefined reference to `EVP_DigestInit'
/usr/local/lib/libsnmp.so: undefined reference to `EVP_DigestFinal'
/usr/local/lib/libsnmp.so: undefined reference to `EVP_md5'
/usr/local/lib/libsnmp.so: undefined reference to `HMAC'
/usr/local/lib/libsnmp.so: undefined reference to `EVP_sha1'
/usr/local/lib/libsnmp.so: undefined reference to `des_cbc_encrypt'
/usr/local/lib/libsnmp.so: undefined reference to `des_key_sched'
/usr/local/lib/libsnmp.so: undefined reference to `EVP_DigestUpdate'
/usr/local/lib/libsnmp.so: undefined reference to `RAND_bytes'
/usr/local/lib/libsnmp.so: undefined reference to `des_ncbc_encrypt'

i've had that happen.  i found that php as configured by ./configure
thought the crypto functions were in one library but actually they
were in another library.  the exact solution depends on your
OS and probably on the OS version.  It might also depend on 
encryption/password hashing options you chose when installing
the OS.

in my case (FreeBSD 4.2-Release using md5 password hashing), 
i found that php was using libcrypt.so.  i also found that
libcrypto.so had the functions listed above and libcrypt.so didn't.

i didn't really want to mess with the configure script since
i don't understand the syntax, after running the basic configure, 
i went and edited config_vars.mk.  in EXTRA_LIBS i just added
-lcrypto and when i next compiled it all worked..

the right library to use in your case may vary.

actually, i still have problems.  when PHP runs it whines that it
can't find the MIB modules, e.g., 

...
Cannot find module (SNMP-MPD-MIB): At line 0 in (none)
Cannot find module (SNMP-USER-BASED-SM-MIB): At line 0 in (none)
Cannot find module (SNMP-NOTIFICATION-MIB): At line 0 in (none)
Cannot find module (SNMP-TARGET-MIB): At line 0 in (none)
Cannot find module (SNMPv2-TM): At line 0 in (none)

that does no harm for me though (since i don't use those modules)
so i haven't gotten around to fixing that.

tiger.

-- 
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] Classes and sessions

2001-07-24 Thread Andrew Sterling Hanenkamp

I am having some trouble with storing a class in a session variable. 
According to the information in the manual, an object will be serialized 
at the end of each request and then unserialized at the beginning 
automatically. However, with this code:

?php

session_register(objectvar, stringvar);

if(isset($stringvar)) {
echo stringvar is set\n;
} else {
$stringvar = something;
echo stringvar is not set\n;
}

if(isset($objectvar)) {
echo objectvar is set\n;
} else {
$objectvar = new MyObject;
echo objectvar is not set\n;
}

?

For the first page I will get:

stringvar is not set
objectvar is not set

And for each subsequent page:

stringvar is set
objectvar is not set

Is there something wrong with the way my code works? Is this a possible 
bug? I have had this problem with both 4.0.4pl1 (came with RH7.1) and 
with 4.0.6 (compiled myself). I've been struggling with this for 3 or 4 
days now and some help would be much appreciated.

Thanks,
Sterling


-- 
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] working with remote images

2001-07-24 Thread Matt Greer

It looks like my attempt to send this bounced. Which is fine, since I've now
got a slightly different question.

I'm working on a network for my site and others related to it. We want to
keep track of which sites are the most popular by having everyone place on
their site something to the effect of img
src=http://www.mywebsite.com/image.php?somevariables=here;

I want to then have image.php make note of which site requested it and add
to their tally in the database. Then feed them the image requested. But my
concern is if that image is on my server I'll be getting a lot more
bandwidth. So I'm wondering if its possible to then have image.php tell the
requesting server to grab their own copy of the image and load it up? I have
a feeling php will grab the image from the other site's server, download it
to my server and then upload it back to them. Even worse :)

Thanks,
Matt


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




RE: [PHP] Capitalize Function ??

2001-07-24 Thread Brian Dunworth

On Tuesday, July 24, 2001 2:32 AM, Alexander Skwar said:

 But this is not a good idea!  There are Names (like Hans vom Bach or
 somesuch) which do NOT have to be captialized.  Actually, capitalizing
 the vom would be wrong.  Although this was just a German
 example, I'd bet there are names in French, Dutch, Spanish, Italian as
 well which should not be capitalized.

 ..or, at least not capitalized in the simple fashion of ucwords().

  Leonardo da Vinci
  Otto von Bismarck

 Hmm, how about English?

 ..or Scottish, or Irish?

  Elle MacPherson
  Angus MacGyver
  Ronald McDonald

 Sometimes there are suffixes like the 3rd, no?  Would it be right
 to capitalize this?

  Well, usually that'd be III.  Of course, John Smith, Iii would be
wrong...

 - Brian


 ---
  Brian S. Dunworth
  Sr. Software Development Engineer
  Oracle Database Administrator
  The Printing House, Ltd.
  (850) 875-1500 x225
 ---


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




Re: [PHP] PDF dll

2001-07-24 Thread Bernie Kruger

Yes I have,  but it says it has expired and I must get a new one from
www.pdflib.com.  When I download one there it prints www.pdflib.com as a
background image on all my pages.  I don't want to use it commercially and I
dont want to have that background image.


Daniel Rezny [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hello Bernie,

 Tuesday, July 24, 2001, 3:33:53 PM, you wrote:

 BK Hi,

 BK Are there any Freeware/Opensource PDF dll's?

 BK Tx
 BK BK

 You should have one in your distribution

 --
 Best regards,
  Danielmailto:[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] how to handle LDAP referrals

2001-07-24 Thread Derek

I have 2 machines running OpenLDAP, one as a master directory and the other
as a slave.  I have the master directory replicating to the slave machine
and the slave machine is set up to refer the master url back to the client
when the client attepts to update the slave.

The machines seem to be doing their bit, but how do I get my PHP scripts to
follow the referral sent back from the slave?

The ldap_errno returned is 9 and I could, perhaps, get the script to take
action based in that, but how would I grab the referred URL.  I could, of
course, just make sure that the script points to the master directory, but I
wondered if there are any other choices avaiable to me.

Thanks in advance for any help offered.

Derek



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

2001-07-24 Thread jon


If I have a directory protected with an .htaccess file that requires users to
log in, is there anyway to determine what username they used in my PHP scripts?


--Jon

-- 
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] array from mysql help?

2001-07-24 Thread Jaxon

Hi,

I want to create an array like this:

$tree = array (
first  = array (stuff1, stuff2, stuff3),
second = array (stuff1, stuff2)
);


based on tree of information, stored in a database table:

level parent_cat child_cat
--
1   first   first
1   second  second
2   first   stuff1
2   first   stuff2
2   first   stuff3
2   second  stuff1
2   second  stuff2


That translates to a structure like this:


   firstsecond
 | |
 |-||  |---|
stuff1  stuff2  stuff3  stuff1  stuff2


Can someone point me towards an SQL example that would help me structure the
query, and an example of how to reference information in it once I have it?
e.g. a while list/each but for a multidimensional array?

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]




[PHP] Re: .htaccess

2001-07-24 Thread Jeremy Maziarz

Jon,

Try $REMOTE_USER

-Jeremy
Email: [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] php3 extension

2001-07-24 Thread Phil Spitler

Can anyone tell me how to turn on .php3 extensions in PHP on Win2000?  I've
looked in the php.ini file and can't seem to find it.

Thanks!

Phil


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




Re: [PHP] php3 extension

2001-07-24 Thread Phil Driscoll

On Tuesday 24 July 2001 15:53, Phil Spitler wrote:
 Can anyone tell me how to turn on .php3 extensions in PHP on Win2000?  I've
 looked in the php.ini file and can't seem to find it.

In the internet services manager (or whatever it's called in W2K) add a 
script mapping for .php3 which is the same as the entry you currently have 
for .php. 

Cheers
-- 
Phil Driscoll

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




RE: [PHP] php stand alone

2001-07-24 Thread scott [gts]

but remember, if you put your cron/admin scripts into
a directory on a publicly accessable webserver, you
run the risk of having anonymous websurfers run your
scripts at inopportune moments.

 -Original Message-
 From: Gunther E. Biernat [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, July 24, 2001 8:32 AM
 To: Adrian D'Costa; php general list
 Subject: Re: [PHP] php stand alone


 How do I compile php to work as a stand alone.  Right now it is working
 thru the web but need to run it from a cron job.

 Have a look at http://www.php.net/manual/en/install.commandline.php

 The easiest thing of course would be to just call lynx (or any other
 command line browser taht is able to do a HTTP request and exit (that's
 why the -dump)) within your cron table, e.g.:

 0 23 * * * lynx -dump localhost/path/to/some/php/robot.php  /dev/null



 mit freundlichen Gruessen / yours sincerely


 Gunther E. Biernat
 Web Application Engineer
 __

 RealNetworks GmbH   Tel.: +49-40-415204-24
 Weidestraße 128 Fax.: +49-40-415204-11
 22083 Hamburg   Mail: [EMAIL PROTECTED]
 Germany URL : http://de.real.com
 __



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

2001-07-24 Thread mpi

hi there,
have a problem getting a user input string as GET/query string.
what i wanna do is enable a user to append an additional string to the end
of the URL. there is no problem when the user inputs strictly english chars.
but whenever they input a latin-2 specific character (like eg. "latin letter
a with ogonek" - that's unicode description of the char) i get two
characters which do not look any like anything i know... i thought it might
be unicode or something, but it doesn't work that way with "normal"/plain
(ISO-8859-1) characters.
the trouble is with stuff like: etc.
is there some kind of work around for this or is it completely impossible to
achieve that kind of input?
i found some module (multi byte chars) - but it's experimental...
please help
regards



Zagraj w I Lidze z wlasna druzyna...
http://ruletka.interia.pl/


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




RE: [PHP] array from mysql help?

2001-07-24 Thread Remo Pini

To be destructive, I would use a sensible data-representation in mysql,
yours seems to suck...

something like

table x
idx as integer, auto_increment, primary key
node as text
parent as int (this points to the parent primary key)

But here is what I would do with the current data structure (recursive
stuff):

get all nodes of the current level (starting with 1): select distinct
parent_cat from table where level = the current level

this gives you all nodes...

now with each node do: select child_cat from table where level = the
current level and parent_cat = the current parent node

this gives you all children...

then increase the level and redo from start...

it is possible to wrap all that up in a query, but the handling would be
much worse and since neither the amount of levels nor the uniqueness of the
nodenames is given, that could turn out to be rather nasty.

hope this helps a little...

remo

 I want to create an array like this:

 $tree = array (
 first  = array (stuff1, stuff2, stuff3),
 second = array (stuff1, stuff2)
 );


 based on tree of information, stored in a database table:

 level parent_cat child_cat
 --
 1 first   first
 1 second  second
 2 first   stuff1
 2 first   stuff2
 2 first   stuff3
 2 second  stuff1
 2 second  stuff2


 That translates to a structure like this:


  firstsecond
| |
  |-|||---|
 stuff1  stuff2stuff3  stuff1  stuff2


 Can someone point me towards an SQL example that would help me
 structure the
 query, and an example of how to reference information in it once
 I have it?
 e.g. a while list/each but for a multidimensional array?


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




RE: [PHP] Need some help with this idea!

2001-07-24 Thread Remo Pini

select * from whatnot order by timestampcolumn desc limit 1

if the limit 1 doesn't work with your db, just fetch the first result
only...

greets,
remo

 -Original Message-
 From: Chris Cocuzzo [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, July 24, 2001 8:28 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Need some help with this idea!


 hey-

 I want to select the oldest show from a database to display on my
 main page,
 since the oldest show is also the show happening closest to any current
 time(if that makes sense...). I included a timestamp field in my table of
 shows in anticipation of checking that to find out what was the oldest.
 however, I'm wondering how I should go about doing that exactly.
 my idea was
 the scan through just that column of timestamps, find the lowest one, and
 then make a selection from the db based on the timestamp. Can any give me
 some examples of code to scan through a column like i mentioned,
 or give me
 better ideas on how to do this??

 thanks
 chris


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

2001-07-24 Thread Remo Pini

hi

i'm trying to index several files (ms office, pdf, txt, html) using php and
LINUX, are any suggestions and/or libraries for that around?

greets,
remo

Remo Pini
Pini Computer Trading
http://www.pct.ch
Tel: +41  1 822 1000
Fax: +41  1 882 4000
Mob: +41 79 216 1551


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




Re: [PHP] Need some help with this idea!

2001-07-24 Thread Chris Cocuzzo

you bring up something I've been wondering about, can I fetch just a single
row to output?

chris


- Original Message -
From: Remo Pini [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, July 24, 2001 11:13 AM
Subject: RE: [PHP] Need some help with this idea!


 select * from whatnot order by timestampcolumn desc limit 1

 if the limit 1 doesn't work with your db, just fetch the first result
 only...

 greets,
 remo

  -Original Message-
  From: Chris Cocuzzo [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, July 24, 2001 8:28 AM
  To: [EMAIL PROTECTED]
  Subject: [PHP] Need some help with this idea!
 
 
  hey-
 
  I want to select the oldest show from a database to display on my
  main page,
  since the oldest show is also the show happening closest to any current
  time(if that makes sense...). I included a timestamp field in my table
of
  shows in anticipation of checking that to find out what was the oldest.
  however, I'm wondering how I should go about doing that exactly.
  my idea was
  the scan through just that column of timestamps, find the lowest one,
and
  then make a selection from the db based on the timestamp. Can any give
me
  some examples of code to scan through a column like i mentioned,
  or give me
  better ideas on how to do this??
 
  thanks
  chris
 
 
  --
  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]




Re: [PHP] .htaccess

2001-07-24 Thread Sheridan Saint-Michel

Whatever they put in the name field of the .htaccess prompt is stored in

$PHP_AUTH_USER

and what they put in the password field is stored in

$PHP_AUTH_PW

You can read more about this here
http://www.php.net/manual/en/features.http-auth.php

Sheridan

- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, July 24, 2001 9:33 AM
Subject: [PHP] .htaccess



 If I have a directory protected with an .htaccess file that requires users
to
 log in, is there anyway to determine what username they used in my PHP
scripts?


 --Jon

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




RE: [PHP] PHP_GD PNG Format

2001-07-24 Thread Kurt Lieber

IE 4.0b1 and above, Netscape 4.04 and above and Mozilla can all view
PNGs, I believe.

The PNG home page (http://www.libpng.org/pub/png/) has more information,
but it appears to be down right now.

--kurt

 -Original Message-
 From: Bernie Kruger [mailto:[EMAIL PROTECTED]] 
 Sent: Tuesday, July 24, 2001 5:23 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] PHP_GD PNG Format
 
 
 Hi,
 
 What is the default viewer for this file format.  I create 
 graphs for users and many of them cannot open the page with 
 the embedded .png picture.
 
 Tx
 Bernie
 
 
 
 -- 
 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] $REMOTE_USER vs $PHP_AUTH_USER

2001-07-24 Thread Sheridan Saint-Michel

After replying to a .htaccess thread I read another reply which suggested they user 
$REMOTE_USER.

I read the HTTP Authentication section and found

In order to prevent someone from writing a script which reveals the password for a 
page that was authenticated through a traditional external mechanism, the PHP_AUTH 
variables will not be set if external authentication is enabled for that particular 
page. In this case, the $REMOTE_USER variable can be used to identify the 
externally-authenticated user.

However, I have user $PHP_AUTH_USER in conjunction with .htaccess many times with no 
problems.

If that does not count as an external mechanism, what does?

Thanks
Sheridan



[PHP] PHP Uploads - Please Help!!

2001-07-24 Thread Corin Rathbone

Sorry to again bring up the subject, but could somebody please help me with
multiple
file uploads. I've written the script below, but it doesn't seem to work
properly.
please help. Alternatively, could somebody give me a simple upload script.
My system is Win 98, Apache 1.3.17, php 4.0.5, IE5. The code is below.

Thanks,
Corin Rathbone

?php
$root_path = E:/System/htdocs;

if(isset($uploads_go)){
  static $worked = array();
  for($x=0; $x9; $x++){
$current_file = $userfile[$x];
  $current_file_name = $userfile_name[$x];
  $current_file_size = $userfile_size[$x];
$current_file_path = $root_path.$path_to_file[$x];

print( $xbr\n );
print( $current_filebr\n );
  print( $current_file_namebr\n );
  print( $current_file_sizebr\n );
  print( $current_file_pathbrbr\n );

if(!$current_file=){
  if(!file_exists($current_file_path)){
//copy($current_file, $current_file_path);
//unlink($current_file);
  $fp = fopen($current_file_path, wb) or die(Could not write
file!);
fwrite($fp, $current_file) or die(Could not write file!);
  fclose($fp) or die(Could not close file pointer!);
$worked[] = 1;
  }
  else{
//die(File does not exists!);
  }
}
else{
  $worked[] = 0;
}
  }
}
elseif(!isset($uploads_go)){  
$cfg_upload_max_filesize = get_cfg_var(upload_max_filesize);
print( form action=\upload.php\ method=\post\ 
enctype=\multipart/form-data\\n );
  print(   input type=\hidden\ name=\MAX_FILE_SIZE\ 
value=\$cfg_upload_max_filesize\\n );
  print(   input type=\hidden\ name=\uploads_go\ value=\1\\n );
  print(   Upload these files:br\n );
  print(   File: input name=\userfile[0]\ type=\file\brPath: input 
type=\text\ name=\path_to_file[]\ size=\40\brbr\n );
  print(   File: input name=\userfile[1]\ type=\file\brPath: input 
type=\text\ name=\path_to_file[]\ size=\40\brbr\n );
  print(   File: input name=\userfile[2]\ type=\file\brPath: input 
type=\text\ name=\path_to_file[]\ size=\40\brbr\n );
  print(   File: input name=\userfile[3]\ type=\file\brPath: input 
type=\text\ name=\path_to_file[]\ size=\40\brbr\n );
  print(   File: input name=\userfile[4]\ type=\file\brPath: input 
type=\text\ name=\path_to_file[]\ size=\40\brbr\n );
  print(   File: input name=\userfile[5]\ type=\file\brPath: input 
type=\text\ name=\path_to_file[]\ size=\40\brbr\n );
  print(   File: input name=\userfile[6]\ type=\file\brPath: input 
type=\text\ name=\path_to_file[]\ size=\40\brbr\n );
  print(   File: input name=\userfile[7]\ type=\file\brPath: input 
type=\text\ name=\path_to_file[]\ size=\40\brbr\n );
  print(   File: input name=\userfile[8]\ type=\file\brPath: input 
type=\text\ name=\path_to_file[]\ size=\40\brbr\n );
  print(   File: input name=\userfile[9]\ type=\file\brPath: input 
type=\text\ name=\path_to_file[]\ size=\40\brbr\n );
  print(   input type=\submit\ value=\Send files\\n );
  print( /form );
}
elseif(isset($worked)){
  for($x=0; $x9; $x++){
if($worked[$x]){
  print( The file upload for file $path_to_file[$x] was successfulbr\n );
}
else{
  print( The file upload for file $path_to_file[$x] was bnot/b 
successfulbr\n );
}
  }
}
else{
  print( div class=\main-center\Please select files to be uploaded/div );
}

?



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




Re: [PHP] Capitalize Function ??

2001-07-24 Thread Alexander Skwar

So sprach »Ryan Fischer« am 2001-07-24 um 07:35:37 -0400 :
 Usually, the 3rd is written as John Doe, III, AFAIK, so that's not
 really an issue.

Okay, III isn't an issue then.  What about people with Dr. titles?  Like
'Dr. med John Doe'.  There the 'med' shouldn't be capitalized.  And I'm
sure, there are enough other examples - but: it's your app, *I* would
not do it, but that's just me.  If people are too lazy to type there
name correctly capitalized, than it's their problem IMHO.

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.digitalprojects.com   |   http://www.iso-top.de
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
Uptime: 1 day 16 hours 35 minutes

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

2001-07-24 Thread AJDIN BRANDIC

I have a string that contains \' and I want to remove \ and have only 
'.  Tried $mynewstring=ereg_replace(\',',$mystring); but no luck.

What is the way around this.

Regards

Ajdin

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




RE: [PHP] \ problem

2001-07-24 Thread Robert Covell

Try stripslashes or something like that (not sure on the name of the
function).  It is the opposite of addslashes.  If you look for addslashes in
the function list that you will see the other one.

Sincerely,

Robert T. Covell
President / Owner
Rolet Internet Services, LLC
Web: www.rolet.com
Email: [EMAIL PROTECTED]
Phone: 816.210.7145
Fax: 816.753.1952

-Original Message-
From: AJDIN BRANDIC [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 24, 2001 11:19 AM
To: [EMAIL PROTECTED]
Subject: [PHP] \ problem


I have a string that contains \' and I want to remove \ and have only
'.  Tried $mynewstring=ereg_replace(\',',$mystring); but no luck.

What is the way around this.

Regards

Ajdin

--
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] Trouble with getimagesize

2001-07-24 Thread Patrick J. Militzer

Hi there,

Having problem with a snippet of code, the code works in php4 but not in php3.

Here is the snippet:

$imagesize = getimagesize($UPLOADFILE);
 // print $imagesize[0] .   . $imagesize[1];
 if($imagesize[0]  360 or $imagesize[1] 252 or $UPLOADFILE_size  51024)
 {  // Image Size Too Large
  header(Location:
toolarge.html?HEIGHT=$imagesize[1]WIDTH=$imagesize[0]FS=$UPLOADFILE_size );

 }

When we take out the comments by the print statement we get the image size of
the file we are uploading and they are 960, 660.  The If statement should catch
it and redirect to the toolarge.html page. It does do this in the php4 but not
in php3.

Any ideas

Thanks in advance.

Pat

Pat Militzer
Tech Support Supervisor
Metro/MLS Inc.
11430 W North Ave
Wauwatosa, WI 53226
414-778-5400 ext. 124
Fax 778-6143
email: [EMAIL PROTECTED]
web site: www.metromls.com
  www.wihomes.com


-- 
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] PHP Execution Functions

2001-07-24 Thread billfarr

Hello all,

I'm discovering the joys of PHP as supplied by RH on their 7.1 release.
Actually, everything about it is SO much nicer than ASP or pure Perl.  (Not
to take anything away from either--PHP's just a LOT easier to get hold of!)

I'm running PHP as an Apache module (default RedHat installation) but I did
turn Safe Mode on.  None of the execution functions work at all, though.
The Safe Mode directory is set to /usr/local/bin and the script I want to
run is (also) in that directory.  No matter how I approach it, the system()
or passthru() functions apparently execute nothing and return nothing.  Not
even an error message or warning of any kind.  (Backticks give a decidedly
pointed message in Safe Mode, though:  No can do as I would expect).

How DO I step out of a PHP page and execute a script or command?  And would
that method be safe to give to regular users?  There is no mention in the
manual (to which I constantly refer) nor in any place on the php.net site to
tell me how this should REALLY work.

Any advice would be appreciated.  This is the last stumbling block to
converting my web-portal 100% to PHP.

Best regards,
Bill



[PHP] is this right

2001-07-24 Thread Jeremy Morano

this doesn't work,how should it be done?

insert into test (uid, companyUid)
values(1, select uid from companysTable where company = Micrsoft);

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




RE: [PHP] is this right

2001-07-24 Thread Boget, Chris

 this doesn't work,how should it be done?
 insert into test (uid, companyUid)
 values(1, select uid from companysTable where company = Micrsoft);

If you are using MySQL, it doesn't support sub selects...

Chris



Re: [PHP] is this right

2001-07-24 Thread Alexander Wagner

Jeremy Morano wrote:
 insert into test (uid, companyUid)
 values(1, select uid from companysTable where company = Micrsoft);

insert into test (uid, companyUid) select 1,uid from companysTable 
where company = Micrsoft;

I hope this works.

HTH
Wagner

-- 
Madness takes its toll. Please have exact change.

-- 
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] rename a directory

2001-07-24 Thread Jeff

Does anyone know how to rename a directory? There is rename() for files
but I couldn't find anything for directories...

Thanks,

Jeff


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




Re: [PHP] rename a directory

2001-07-24 Thread Tom Carter

on unix I think it should work for both.. can't say I know on windows..

also, why not try exec or system and just run the normal system command for
it?
- Original Message -
From: Jeff [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, July 24, 2001 6:07 PM
Subject: [PHP] rename a directory


 Does anyone know how to rename a directory? There is rename() for files
 but I couldn't find anything for directories...

 Thanks,

 Jeff


 --
 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] php 4.0.6 Multi-Server Session Problems

2001-07-24 Thread j

Hi everyone.
  We have two webservers set up to be loadbalanced. As you could imagine 
that's a bit of a problem with sessions, but I figured out how to get 
around that. (actually that was kind of easy). You set up the php.ini to 
save the session files in a mutual drive. For example, we have a network 
attatched storage device mounted from both webservers. With the addition of 
--enable-trans-id and form action=url?=SID this seems to work flawlessly.
   But
 I upgraded from 4.0.4pl2 (I think) to 4.0.6 and now magically we're having 
several issues with sessions and specific clients.
   All Netscapes on the macOS, and ALL WIN95 clients can NOT log in. The 
functionality demonstrates the same traits as when a client does not have 
cookies enabled and tries to login, but we've worked with these people, 
they're settings are correct and everything SHOULD be a go, but it's not.
 Anyone have any ideas? 
I'm almost ready to revert back to 4.0.4 here!

 Justin

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




Re: [PHP] D d d d database?

2001-07-24 Thread B. van Ouwerkerk

Take a look at tutorials on www.devshed.com .. or a few simular websites.. 
they sould help you..

I'm not sure about inserting data from a flash movie..

You should check this lists archive for more info on this.

Bye,


B.


At 17:37 23-7-01 -0700, Kyle Smith wrote:
ok i dont know the first thing about data bases so could someone please 
guide me through the process of making a score board for a flash game i 
have made with the variables $name and $score??
(note: i have hosting at f2s.com so i have to use myADMIN)

-legokiller666-
http://www.StupeedStudios.f2s.com
New address new site

ICQ: 115852509
MSN: [EMAIL PROTECTED]
AIM: legokiller666


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




Re: [PHP] D d d d database?

2001-07-24 Thread Tom Carter

http://www.flashkit.com has got some fantastic examples/tutorials on passing
variables to/from flash, including to PHP and a database.. should have
everything you want there..

 Take a look at tutorials on www.devshed.com .. or a few simular websites..
 they sould help you..

 I'm not sure about inserting data from a flash movie..

 You should check this lists archive for more info on this.

 Bye,


 B.


 At 17:37 23-7-01 -0700, Kyle Smith wrote:
 ok i dont know the first thing about data bases so could someone please
 guide me through the process of making a score board for a flash game i
 have made with the variables $name and $score??
 (note: i have hosting at f2s.com so i have to use myADMIN)
 
 -legokiller666-
 http://www.StupeedStudios.f2s.com
 New address new site
 
 ICQ: 115852509
 MSN: [EMAIL PROTECTED]
 AIM: legokiller666


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




Re: [PHP] Capitalize Function ??

2001-07-24 Thread Ryan Fischer

You wrote:
 So sprach »Ryan Fischer« am 2001-07-24 um 07:35:37 -0400 :
  Usually, the 3rd is written as John Doe, III, AFAIK, so that's
not
  really an issue.

 Okay, III isn't an issue then.  What about people with Dr. titles?
Like
 'Dr. med John Doe'.  There the 'med' shouldn't be capitalized.

Never heard of that one before.  Usually, a medical doctor adds an
M.D. at the end of his name indicating so.

 And I'm sure, there are enough other examples - but: it's your app,
 *I* would not do it, but that's just me.  If people are too lazy
 to type there name correctly capitalized, than it's their problem
 IMHO.

Agreed.  ;)

--
 -Ryan :: ICQ - 595003 :: GigaBoard - http://www.gigaboard.net/



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




Re: [PHP] Capitalize Function ??

2001-07-24 Thread Alexander Skwar

So sprach »Ryan Fischer« am 2001-07-24 um 13:18:33 -0400 :
 Never heard of that one before.  Usually, a medical doctor adds an
 M.D. at the end of his name indicating so.

Hmm, this maybe the case in the states.  Dr. med. is the German title.

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.digitalprojects.com   |   http://www.iso-top.de
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
Uptime: 1 day 17 hours 59 minutes

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




Re: [PHP] Zip Code Locator?

2001-07-24 Thread Ben Bleything

You could write your own. . .

Just kidding... well, technically you could... but... that's not the
point.

http://sourceforge.net/projects/zipcodedb has a Raw ZIP code dump... It
has a little more data than just zip, city, state... I don't know what it
means, but maybe you would...

Sorry, it's the best I could do =

Ben

On Mon, 23 Jul 2001, Vincent P. Cocciolone wrote:

 Hi,

 Does anyone know where can I find documentation or example scripts for a zip code 
locator. I'm looking for something that will list
 other zip codes within a number of miles radius of the zip specified.

 Thanks!

 Vince


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




RE: [PHP] rename a directory

2001-07-24 Thread Corin Rathbone

Yes, rename() does work on Windows as well as on *nix.

-Original Message-
From: Tom Carter [mailto:[EMAIL PROTECTED]]
Sent: 24 July 2001 17:54
To: [EMAIL PROTECTED]; Jeff
Subject: Re: [PHP] rename a directory


on unix I think it should work for both.. can't say I know on windows..

also, why not try exec or system and just run the normal system command for
it?
- Original Message -
From: Jeff [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, July 24, 2001 6:07 PM
Subject: [PHP] rename a directory


 Does anyone know how to rename a directory? There is rename() for files
 but I couldn't find anything for directories...

 Thanks,

 Jeff


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




[PHP] URGENT... NEED HELP!!!

2001-07-24 Thread Kyle Smith

What is wrong with this code?
(note: the variables $email and $comments are sent from another page but i get the 
error message from this page saying Warning: Could not deliver email. You are over 
quota. in /web/sites/197/lk6/www.stupeedstudios.f2s.com/email.php on line 15 in which 
line 15 is the line under $message = $email. $comments; saying just ?

?php
$kyle = [EMAIL PROTECTED];
$subject = Comments;
$message = $email. $comments;
?
?php 
mail($kyle, $subject, $message);
?


-legokiller666-
http://www.StupeedStudios.f2s.com
New address new site

ICQ: 115852509
MSN: [EMAIL PROTECTED]
AIM: legokiller666





Re: [PHP] mailing in batches

2001-07-24 Thread Alexander Skwar

So sprach »Justin Farnsworth« am 2001-07-24 um 04:52:57 -0400 :
   Also is there any examples of this kind of app?
 
 Just do something like this with shell, logically
 
 while read_line_from_email_address_list ; do
   cat your_text_file | mail -s Your Subject address_from_list;
   sleep 1;
 done;

Hmm, this is no good if you have a REAL huge list.  If there are more
than 86.400 recipients, it'll take more than a day to do the queuing.

BUT: talking about such huge numbers, I'd not take sendmail anyway.
There are better solutions which also have additional features.
Handling all those bounces manually will be a mess.

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.digitalprojects.com   |   http://www.iso-top.de
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
Uptime: 1 day 18 hours 10 minutes

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




Re: [PHP] .htaccess

2001-07-24 Thread Rasmus Lerdorf

$REMOTE_USER

On Tue, 24 Jul 2001 [EMAIL PROTECTED] wrote:


 If I have a directory protected with an .htaccess file that requires users to
 log in, is there anyway to determine what username they used in my PHP scripts?


 --Jon




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

2001-07-24 Thread Eduardo Kokubo

Hi,
I have been trying to create a directory and a file in it on my server, but my 
code is not working fine.
?php
 
 
 $arquivo = fopen(publico/diretorio.txt,r);
 $cont = fread($arquivo, 5);
 $cont++;
 fclose ($arquivo);

 
 $arquivo = fopen (publico/diretorio.txt,w+);
 fwrite ($arquivo, $cont);
 fclose ($arquivo);
 setcookie(cont, $cont);
 $diretorio = d.$cont;
 
 if (!is_dir(publico/$diretorio)){
 $dirteste = mkdir(publico/$diretorio,0777);}
 if ($textfile = fopen(publico/$diretorio/index.html, w+)){
  fputs($textfile,ob_get_contents());
  fclose($textfile);
  chmod(publico/$diretorio/index.html, 0755);}
  
  
ob_end_flush(); 
?
This was working fine and then stoped. Does anybody know what happened?


I have permission to write but I'm receving the following message:

Warning: fopen(publico/d6/index.html,w+) - Permission denied in 
/home/a0010927/public_html/index.php on line 56





[PHP] Best way to...

2001-07-24 Thread Boget, Chris

get the difference in months between two dates
using a unix time stamp?

I know I can do something like this:

$startMonth = date( m, $startTimestamp );
$startYear = date( Y, $startTimestamp );
$endMonth = date( m, $endTimestamp );
$endYear = date( Y, $endTimestamp );

$numMonths = $endMonth - $startMonth;
if( $startMonth  $endMonth ) {
  $numMonths += 12;

}
$numMonths += ( 12 + ( $endMonth - $startMonth ));

Is there some better way?

Chris



Re: [PHP] rename a directory

2001-07-24 Thread Jeff

Thanks! Next time I won't assume it won't work...

Jeff

Tom Carter wrote:

 on unix I think it should work for both.. can't say I know on windows..

 also, why not try exec or system and just run the normal system command for
 it?
 - Original Message -
 From: Jeff [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Tuesday, July 24, 2001 6:07 PM
 Subject: [PHP] rename a directory

  Does anyone know how to rename a directory? There is rename() for files
  but I couldn't find anything for directories...
 
  Thanks,
 
  Jeff
 
 
  --
  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] bad word filter

2001-07-24 Thread Tyler Longren

Hello everyone,

I've been reading the Profanity Filter thread in the list archives but
haven't found anything real helpful.  Here's my code so far, this of course
won't work.
?
function filterWords($string, $result) {
$badwords=shit, fuck, ass, bitch;
$word=explode(, , $badwords);
for ($i=0; $icount($word); $i++) {
$replace = str_replace($word[$i], , $string);
}
}
$string = Ass monkey;
filterWords($string, $result);
print $result;
?

How can I scan for the $badwords in $string and replace $badwords with ?

Thanks,
Tyler Longren
Captain Jack Communications
[EMAIL PROTECTED]
www.captainjack.com




-- 
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] URGENT... NEED HELP!!!

2001-07-24 Thread Kyle Smith

What is wrong with this code?
(note: the variables $email and $comments are sent from another page but i get the 
error message from this page saying Warning: Could not deliver email. You are over 
quota. in /web/sites/197/lk6/www.stupeedstudios.f2s.com/email.php on line 15 in which 
line 15 is the line under $message = $email. $comments; saying just ?

?php
$kyle = [EMAIL PROTECTED];
$subject = Comments;
$message = $email. $comments;
?
?php 
mail($kyle, $subject, $message);
?


Thanks
-legokiller666-
http://www.StupeedStudios.f2s.com
New address new site

ICQ: 115852509
MSN: [EMAIL PROTECTED]
AIM: legokiller666





[PHP] whats wrong

2001-07-24 Thread Jeremy Morano

Whats wrong with this?


$sql = INSERT INTO $table_name
(uid,companyUid, first_name, last_name, address, state, zip_code, country,
company, occupation, telephone, fax, email, user_name, password)
SELECT
\\, \uid from companyTable WHERE company= Itsolutions\,
\$first_name\,\$last_name\,\$address\,\$state\,\$zip_code\,\$coun
try\,\$company\, \$occupation\, \$telephone\, \$fax\, \$email\,
\$user_name\, \$password\
;


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




RE: [PHP] Best way to...

2001-07-24 Thread Boget, Chris

 $numMonths += ( 12 + ( $endMonth - $startMonth ));

This last line should have read:

$numMonths += ( 12 + ( $endYear - $startYear ));

Too much cutting and pasting... :p

Chris



Re: [PHP] mailing in batches

2001-07-24 Thread Don Read


On 24-Jul-2001 Alexander Skwar wrote:
 So sprach »Justin Farnsworth« am 2001-07-24 um 04:52:57 -0400 :
   Also is there any examples of this kind of app?
 
 Just do something like this with shell, logically
 
 while read_line_from_email_address_list ; do
  cat your_text_file | mail -s Your Subject address_from_list;
  sleep 1;
 done;
 
 Hmm, this is no good if you have a REAL huge list.  If there are more
 than 86.400 recipients, it'll take more than a day to do the queuing.
 

I'll agree; it's not great, but not too bad as a proto-type.

On a similar project I used Perl Socket:: to connect to the mailserver via tcp.
The big win was when the load on the mailserver gets too high it'll stop
accepting connections ...
then the script goes to sleep for a few minutes and tries again.
Plus each connect  close has a build/tear-down time that is an automatic
'sleep' between each batch.

I'd pull 100 addresses at a time (if you order by domain, that's another
save for your DNS box), connect(), spit out 20 'RCPT TO:', 
'DATA' + msg + '.'; repeat till the 100 addresses are sent, close().
Fetch the next batch of 100,  and so on ...

This managed 10,000 /hr with 2 rather modest FreeBSD boxen, one with the
database and script, the other as mailserver hosting the company's POP
mail-drops (stock Sendmail + minor .cf tweaks).

 BUT: talking about such huge numbers, I'd not take sendmail anyway.

Folks whack at Sendmail for its past security sins (old news) + complex
( near impossible to master) .cf configuration. But I know i spent more hours
setting up my first UUCP box then i ever did on sendmail.cf ...

Once setup by a competent admin, Sendmail can hold its own against all but
the heavily customized MTAs.

 There are better solutions which also have additional features.

~ s/ better / other /

 Handling all those bounces manually will be a mess.
 

No matter which MTA you use.

 Alexander Skwar
 -- 

Regards,
-- 
Don Read   [EMAIL PROTECTED]
-- It's always darkest before the dawn. So if you are going to 
   steal the neighbor's newspaper, that's the time to do it.

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




Re: [PHP] mailing in batches

2001-07-24 Thread Alexander Skwar

So sprach »Don Read« am 2001-07-24 um 13:56:51 -0500 :
 Folks whack at Sendmail for its past security sins (old news) + complex
 ( near impossible to master) .cf configuration. But I know i spent more hours
 setting up my first UUCP box then i ever did on sendmail.cf ...
 
 Once setup by a competent admin, Sendmail can hold its own against all but
 the heavily customized MTAs.
 
  There are better solutions which also have additional features.
 
 ~ s/ better / other /
 
  Handling all those bounces manually will be a mess.
  
 
 No matter which MTA you use.

Yep, exactly.  This was not intended to be a flame against sendmail.  I
simply used sendmail as an example for any MTA, except those highly
specialized ones.  It also might be a viable idea to outsource something
like this.  It's often cheaper and saves you the hastle.

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.digitalprojects.com   |   http://www.iso-top.de
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
Uptime: 1 day 19 hours 45 minutes

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

2001-07-24 Thread Phil Spitler

I am running PHP in CGI mode on win2k.  I keep getting an error when I try
to load a PHP page.  I have 2 other servers set up exactly the same that
work just fine.  Does anyone know what this could be?

CGI Error
The specified CGI application misbehaved by not returning a complete set of
HTTP headers. The headers it did return are:

Thanks!

Phil


-- 
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] Date/Time Query Help

2001-07-24 Thread Shrout, Ryan

Okay, I need help with this one:

I have a table with a column in the MySQL DATETIME format.  (2001-07-24
13:02:02)

I need a MySQL query that will select all the entries in it made within the
last hour.

I tried this, but it is not working correctly, what am I doing wrong?

SELECT * 
FROM session

WHERE (session.Date  DATE_SUB(NOW(), INTERVAL 1 HOUR))

Thanks!!!

Ryan Shrout

-- 
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] Re: URGENT... NEED HELP!!!

2001-07-24 Thread Bopolissimus Platypus

On Tue, 24 Jul 2001 19:34:22 -0700, [EMAIL PROTECTED] (Kyle Smith)
wrote:

snip

i get the error message from this page saying Warning: Could not =
deliver email. You are over quota. in =
/web/sites/197/lk6/www.stupeedstudios.f2s.com/email.php on line 15 in =
which line 15 is the line under $message =3D $email. $comments; saying =
just ?

snip

mail($kyle, $subject, $message);

guess

can you create any file on that filesystem at all?  e.g., what happens
when you do:

cd FullPathToYourrWebDirHere
echo 1  someRandomFileName.txt

at the shell prompt?

the error message says you're over quota.  sounds to me like the
system administrator is enforcing disk quotas and you've used up
all the disk space you're allowed to.  i assume that the mail(...)
function creates temporary files and that's the part that's failing.

delete some files that you don't need.  e.g., for any temporary
files that you create in your scripts, do you delete them?

/guess

-- 
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] Apache/phpinfo

2001-07-24 Thread Tom Malone

How can you tell if your host has PHP installed as mod_php or in CGI mode on
the webserver (Apache in my case)? Is it in phpinfo.php? If so, where - I
couldn't find it...

Thanks
Tom Malone


-- 
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] Re: Apache/phpinfo

2001-07-24 Thread Philip Hallstrom

http://www.php.net/manual/en/function.php-sapi-name.php

On Tue, 24 Jul 2001, Tom Malone wrote:

 How can you tell if your host has PHP installed as mod_php or in CGI mode on
 the webserver (Apache in my case)? Is it in phpinfo.php? If so, where - I
 couldn't find it...

 Thanks
 Tom Malone


 --
 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] Re: Date/Time Query Help

2001-07-24 Thread Bopolissimus Platypus

On Tue, 24 Jul 2001 15:09:14 -0400, [EMAIL PROTECTED]
(Ryan Shrout) wrote:
I need a MySQL query that will select all the entries in it made within the
last hour.

I tried this, but it is not working correctly, what am I doing wrong?

SELECT * 
FROM session

WHERE (session.Date  DATE_SUB(NOW(), INTERVAL 1 HOUR))

Now() will return the current time.  by definition, at the time it's
running, there will be zero or almost zero (depends on how 
fast the query runs... someone might insert a row between
when the now() gets executed and when the query ends)
rows.  you are basically asking for rows that were inserted
from now up to one hour in the future.  those rows aren't
there yet.

try testing for less than.

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




Re: [PHP] Apache/phpinfo

2001-07-24 Thread Tom Carter

create a file on one of your websites, say call it test.php and in it put
the following

?
phpinfo();
?


- Original Message -
From: Tom Malone [EMAIL PROTECTED]
To: PHP Users [EMAIL PROTECTED]
Sent: Tuesday, July 24, 2001 8:14 PM
Subject: [PHP] Apache/phpinfo


 How can you tell if your host has PHP installed as mod_php or in CGI mode
on
 the webserver (Apache in my case)? Is it in phpinfo.php? If so, where - I
 couldn't find it...

 Thanks
 Tom Malone


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




RE: [PHP] Apache/phpinfo

2001-07-24 Thread Corin Rathbone

Run phpinfo() and if it is in CGI mode Server API, at the top, will say
CGI or if in is mod_php Server API will say Apache.

Corin Rathbone

-Original Message-
From: Tom Malone [mailto:[EMAIL PROTECTED]]
Sent: 24 July 2001 20:15
To: PHP Users
Subject: [PHP] Apache/phpinfo


How can you tell if your host has PHP installed as mod_php or in CGI mode on
the webserver (Apache in my case)? Is it in phpinfo.php? If so, where - I
couldn't find it...

Thanks
Tom Malone


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




RE: [PHP] Re: Date/Time Query Help

2001-07-24 Thread Shrout, Ryan

Think of it this way:

WHERE session.Date  DATE_SUB(NOW(), INTERVAL 1 HOUR) is equal to:

WHERE 2001-07-24 15:03:24  SUBTRACTION( 2001-07-24 15:30:21, 00:01:00) =
WHERE 2001-07-24 15:03:24  2001-07-24 14:30:21 

That seems right now, but it doesn't work

Ryan

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 24, 2001 2:58 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Re: Date/Time Query Help


On Tue, 24 Jul 2001 15:09:14 -0400, [EMAIL PROTECTED]
(Ryan Shrout) wrote:
I need a MySQL query that will select all the entries in it made within the
last hour.

I tried this, but it is not working correctly, what am I doing wrong?

SELECT * 
FROM session

WHERE (session.Date  DATE_SUB(NOW(), INTERVAL 1 HOUR))

Now() will return the current time.  by definition, at the time it's
running, there will be zero or almost zero (depends on how 
fast the query runs... someone might insert a row between
when the now() gets executed and when the query ends)
rows.  you are basically asking for rows that were inserted
from now up to one hour in the future.  those rows aren't
there yet.

try testing for less than.

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




Re: [PHP] bad word filter

2001-07-24 Thread Ryan Fischer

You wrote:
 I've been reading the Profanity Filter thread in the list archives
but
 haven't found anything real helpful.  Here's my code so far, this of
course
 won't work.
 ?
 function filterWords($string, $result) {
 $badwords=shit, fuck, ass, bitch;
 $word=explode(, , $badwords);
 for ($i=0; $icount($word); $i++) {
 $replace = str_replace($word[$i], , $string);
 }
 }
 $string = Ass monkey;
 filterWords($string, $result);
 print $result;
 ?

 How can I scan for the $badwords in $string and replace $badwords with
?

Why waste your time?  People will find a way around the filters anyway,
if they really want to use the words you're censoring.  Just a point to
be made.

Anyway, here's what I would do:

function filterWords($str){
$badwords = array(shit, fuck, ass, bitch);
for($i=0; $icount($badwords); $i++){
$str = $eregi_replace($badwords[$i], *, $str);
}
return $str;
}
$str = filterWords(Ass monkey);
print $str; // Prints * monkey

If you want to get really fancy, you can replace the * with some
function calculating just how many asterisks you need to censor out the
current word for its length.  HTH.  :)

--
 -Ryan :: ICQ - 595003 :: GigaBoard - http://www.gigaboard.net/



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




Re: [PHP] bad word filter

2001-07-24 Thread Tyler Longren

I waste my time because the clients pay me to. ;-)
They get what they want.  I told them there would very easy ways around the
filters.  but they insisted.

Thanks!
Tyler Longren
Captain Jack Communications
[EMAIL PROTECTED]
www.captainjack.com


- Original Message -
From: Ryan Fischer [EMAIL PROTECTED]
To: Tyler Longren [EMAIL PROTECTED]; php-general
[EMAIL PROTECTED]
Sent: Tuesday, July 24, 2001 2:27 PM
Subject: Re: [PHP] bad word filter


 You wrote:
  I've been reading the Profanity Filter thread in the list archives
 but
  haven't found anything real helpful.  Here's my code so far, this of
 course
  won't work.
  ?
  function filterWords($string, $result) {
  $badwords=shit, fuck, ass, bitch;
  $word=explode(, , $badwords);
  for ($i=0; $icount($word); $i++) {
  $replace = str_replace($word[$i], , $string);
  }
  }
  $string = Ass monkey;
  filterWords($string, $result);
  print $result;
  ?
 
  How can I scan for the $badwords in $string and replace $badwords with
 ?

 Why waste your time?  People will find a way around the filters anyway,
 if they really want to use the words you're censoring.  Just a point to
 be made.

 Anyway, here's what I would do:

 function filterWords($str){
 $badwords = array(shit, fuck, ass, bitch);
 for($i=0; $icount($badwords); $i++){
 $str = $eregi_replace($badwords[$i], *, $str);
 }
 return $str;
 }
 $str = filterWords(Ass monkey);
 print $str; // Prints * monkey

 If you want to get really fancy, you can replace the * with some
 function calculating just how many asterisks you need to censor out the
 current word for its length.  HTH.  :)

 --
  -Ryan :: ICQ - 595003 :: GigaBoard - http://www.gigaboard.net/



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




  1   2   >