php-general Digest 26 Apr 2001 10:32:50 -0000 Issue 650

Topics (messages 50377 through 50442):

Re: user login names/values
        50377 by: Meir kriheli

Re: translating a function from Perl to PHP
        50378 by: ..s.c.o.t.t.. [gts]
        50381 by: Black Dragon
        50433 by: Steven Haryanto

Re: Passing arrays from page to page
        50379 by: ..s.c.o.t.t.. [gts]

Compressing an upload
        50380 by: Michael Conley
        50384 by: Chris Anderson
        50439 by: Thimo von Rauchhaupt

Re: update form design question.
        50382 by: Don Read

Re: selected <option bla bla >
        50383 by: Vivre Draco

Re: PHP --with-imap
        50385 by: Chris Fry

FATAL ERROR
        50386 by: Randy Johnson
        50416 by: Maxim Maletsky

Big Problem
        50387 by: Thomas Booms
        50394 by: Mark Maggelet

Strange errors
        50388 by: Joseph Blythe
        50390 by: Chris Fry
        50391 by: Mark Maggelet
        50395 by: Joseph Blythe
        50396 by: Mark Maggelet
        50407 by: Joseph Blythe

Ldap question
        50389 by: Mike Tuller

cookies and clocks
        50392 by: Mark Maggelet
        50398 by: DanO
        50402 by: Mark Maggelet
        50403 by: Rasmus Lerdorf
        50406 by: Mark Maggelet
        50419 by: Maxim Maletsky

Re: the SkyBiz matrix|downline program using PHP & mySQL
        50393 by: Don Read

Re: [linux] FATAL ERROR
        50397 by: Randy Johnson

PHP FREE MEMORY
        50399 by: Randy Johnson
        50400 by: Rasmus Lerdorf

automatic download
        50401 by: Dan Harrington

MySQL problem...
        50404 by: Brian Rue
        50405 by: Peter Houchin
        50420 by: Maxim Maletsky
        50421 by: Brian Rue
        50425 by: Maxim Maletsky
        50438 by: Thimo von Rauchhaupt

conflicting types for 'RETCODE'
        50408 by: Chris Lee

Online Training and User Tracking
        50409 by: John Monfort

Transfering an image
        50410 by: Ben Quinn

PHP SDL (Simple DirectMedia Layer) module project
        50411 by: Brian Wang

PHP+MS Access and/or MS SQL
        50412 by: John Monfort

Re: SQL Query time?
        50413 by: Maxim Maletsky

Re: I need help from you.
        50414 by: Maxim Maletsky
        50417 by: Chris Fry
        50418 by: Maxim Maletsky

Re: MySQL and LIKE?
        50415 by: Maxim Maletsky

Re: checking if e-mail address and syntax are valid
        50422 by: Dan Lowe

Re: DOCUMENT_ROOT
        50423 by: Dan Lowe

Re: OOP and Future of PHP
        50424 by: Yasuo Ohgaki
        50427 by: Ulf Wendel
        50428 by: Ulf Wendel
        50430 by: Yasuo Ohgaki
        50432 by: Steven Haryanto

win32 dll
        50426 by: Patrick Lai
        50429 by: elias

Re: Globalness of variables? Functions & subs
        50431 by: Steven Haryanto

Re: Wierd error messages
        50434 by: Euan Greig

Re: Payflow, story continued
        50435 by: Henning Kilset Pedersen

Filesystem security
        50436 by: Anton G. Popov
        50437 by: Mattias Segerdahl
        50442 by: Maxim Maletsky

trouble in httpd
        50440 by: ratno wahyu

Re: database server comparation
        50441 by: Anuradha Ratnaweera

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [EMAIL PROTECTED]


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


On Wednesday 25 April 2001 13:43, Thimo von Rauchhaupt wrote:
> Just to mention security, look at this page:
>
> http://www.livin4.com/jhacker/jh1.htm
>
> A simple login isn?t that easy,

If you have magic quotes turned on or use the addslashes function, this 
should be no problem.

Always validate user data !!!!

-- 
Meir Kriheli

  There's someone in my head, but it's not me - Pink Floyd




i tried to do it myself and nearly fell off
my chair becuase PHP makes you jump through
hoops to do such a simple thing....

print preg_replace('/<%([a-zA-Z]*)%>/e', "\$mioArray['$1']",  $testo);

i never could understand why other languages
made regular expressions so convoluted.
why not just support the =~ binding operator
instead of that awful function syntax...?

> -----Original Message-----
> From: Black Dragon [mailto:[EMAIL PROTECTED]]
> Subject: [PHP] translating a function from Perl to PHP
> 
> 
> Hi everyone,
>     I'm a good perl programmer, but I'm not able to translate this small
> Perl program to PHP:
> 
> $testo = 'Hi <%NOME%>, how are you? Tomorrow I\'ll go to <%DESTINAZIONE%>
> with <%AMICO%>!';
> 
> %mioArray=( 'NOME' => 'Pippo',
>    'AMICO' => 'Pluto',
>    'DESTINAZIONE' => 'Roma');
> 
> print $testo."\n\n";
> 
> $testo =~ s/<%([a-zA-Z]*)%>/$mioArray{$1}/g;    # <== this is my problem!!!
> 
> print $testo."\n";





You've been my salvation!! thanks! :)


> print preg_replace('/<%([a-zA-Z]*)%>/e', "\$mioArray['$1']",  $testo);
>
> i never could understand why other languages
> made regular expressions so convoluted.
> why not just support the =~ binding operator
> instead of that awful function syntax...?
>







At 4/26/2001 05:33 AM, ..s.c.o.t.t.. [gts] wrote:
>i tried to do it myself and nearly fell off
>my chair becuase PHP makes you jump through
>hoops to do such a simple thing....
>
>print preg_replace('/<%([a-zA-Z]*)%>/e', "\$mioArray['$1']",  $testo);
>
>i never could understand why other languages
>made regular expressions so convoluted.
>why not just support the =~ binding operator
>instead of that awful function syntax...?

Perhaps this is in every Perl programmer's dream. :-) But perhaps
not every language has the luxury/willingness to include regular
expressions in the core language, since they think *that* is
convoluted.

Steve





well, one idea is to serialize the array and put
into a HIDDEN text field to be submitted with
the FORM.

or, with no form, try this:
"doc.php?myarray=". htmlentities(serialize($array));

> -----Original Message-----
> From: Clif [mailto:[EMAIL PROTECTED]]
> Subject: [PHP] Passing arrays from page to page
> 
> I'm trying pass an array from one page to another.
> 
> Page 1 is a form.
> Page 2 has the data sent by Page 1 available in $HTTP_POST_VARS.
> This is where I'm stuck: Page three needs access to those same variables
> in $HTTP_POST_VARS.





I am going to have a page that will be used for visitors to upload a file to
my web server.  I already use gzcompress to compress some of the pages that
I send to visitors, but can I also compress files that they are uploading to
my web server?  They will be text files and some may be fairly large (20
MB).  How would I implement compression on files that are getting uploaded?




unfortunately, you dont have access to the files until they are on your
server, ie: already uploaded. You can compress them afterwards though like
you would normally
----- Original Message -----
From: "Michael Conley" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, April 25, 2001 6:37 PM
Subject: [PHP] Compressing an upload


> I am going to have a page that will be used for visitors to upload a file
to
> my web server.  I already use gzcompress to compress some of the pages
that
> I send to visitors, but can I also compress files that they are uploading
to
> my web server?  They will be text files and some may be fairly large (20
> MB).  How would I implement compression on files that are getting
uploaded?
>
>


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


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






"Michael Conley" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
2102328FD2ECD411879E00609737BFD105DB37@FATBOY">news:2102328FD2ECD411879E00609737BFD105DB37@FATBOY...
> I am going to have a page that will be used for visitors to upload a file
to
> my web server.  I already use gzcompress to compress some of the pages
that
> I send to visitors, but can I also compress files that they are uploading
to
> my web server?  They will be text files and some may be fairly large (20
> MB).  How would I implement compression on files that are getting
uploaded?

Write a secure applet in java, is the only way how you "maybe" get access to
the filesystem of the client. With php you will IMHO not be able to do that.







On 25-Apr-01 Larry Hotchkiss wrote:
>       Basically I am just trolling for some thoughts on how others may
> accomplish this task.
> 
>       I have a mysql database. In the database I of course have records.
> These records have a date field and after so many days I have a script
> to delete old records. Now, there are often times when a user will want
> to "refresh" one or more records and also delete one or more as well and
> possibly not do anything to other records.
> 
>       My initial thought was to have thier records displayed with 2
> checkboxes, one to check to delete the record and one to check to
> refresh(renew the record by setting the date field to the current date).
> Not checking either will simply do nothing to the record in question. 
> 

id int auto_increment not null primary key,
ts timestamp not null,
valid tinyint not null default 1,
uid int not null,
 ...

to "refresh" :
  update table set valid=valid+1 where id=$id
to "delete":
  update table set valid=0 where id=$id
the expire & cleanup script:
  update table set valid=0 where ts < date_sub(now(), interval 7 day)
  delete from table where valid=0

>       Most users will have anywhere from 50 to 3000 records and 3k records
> would be a little unwieldy to display on one page which brought up a
> concern for how to handle the processing of the previous page of records
> when you head to the next. Should I update the DB as I move to the next
> page or perhaps after all pages are viewed? 
> 
>       Anyways, any thoughts, ideas and or suggestions are all welcome.

I'd think a "commit changes" on the last page would be more intuitive for the
users, but the programming would get a bit complex ...

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.




   This probably isn't the most elegant method either, but this is how I did
it:

function mark_sel($value, $option) {
// Compare the actual value ($value) to a possible value ($option) to
determine
// if the possible value should be marked as "selected" in a form element.
    if ($value == $option) return 'selected';
}

   In practice, it looks something like this:

echo '<select name="jenis_biasiswa">'.
    '<option' . mark_sel($actual_value_in_db, Penuh) . '>Penuh</option>'.
    '<option' . mark_sel($actual_value_in_db, Separuh) .
'>Separuh</option>'.
    '<option' . mark_sel($actual_value_in_db, Sendiri) .
'>Sendiri</option>'.
    '</select>'
;

   A slightly more elegant method might be to write a function to write the
entire option tag for you. Off the top of my head, that would probably be
something like:

function print_option($selected, $value) {
// $selected is the value of the selected element, $value is the value of
this
// element.
    echo '<option';
    if ($value == $selected) echo ' selected';
    echo '>' . $value . '</option>' . "\n";
}

   If you want to get really fancy, write a print_selected function that
accepts a list of options and loops through them to place the proper option
tags, selections, etc. However, that's a bit beyond the scope of this
message :)

   Note also that the label displayed to the user and the value sent to the
server can be different if you want, by using the value attribute (e.g.,
<option value="foo">Click here to foo!</option>).

--
Copyright 2001 Vivre Draco ([EMAIL PROTECTED])

My apologies if MS Outlook Express did anything evil to this message. I told
it to post in plain text, but who knows if that means it'll actually DO
it...







have you installed IMAP?

Chris

Calin Rotaru wrote:

> Hello.
>
> I have a problem with PHP.
> I want to use imap functions. I receive a message that imap function is not
> defined. I compiled PHP again with --with-imap option , but I've got an error
> message at Apache compilation.
> What is realy happening?
> Thanks
>
> Calin
>
> --
> 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]

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

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

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

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

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

This notice should not be removed.






Several people got the following error today when accessing my site.  Does
anybody know what is going on?


They are PHP scripts accessing a mysql database if that helps.

I am not sure if this is a physical memory problem or what....



Thanks

Randy





what did you say the error was?
can you cut&paste it to us?

a fatal error is an error that ends with an Exit; - means it is fatal - non
debugguble.

I guess your database is doing something funny.


Sincerely, 

 Maxim Maletsky
 Founder, Chief Developer
 PHPBeginner.com (Where PHP Begins)
 [EMAIL PROTECTED]
 www.phpbeginner.com





-----Original Message-----
From: Randy Johnson [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 25, 2001 11:49 AM
To: [EMAIL PROTECTED]
Cc: PHP General Mailing List
Subject: [PHP] FATAL ERROR


Several people got the following error today when accessing my site.  Does
anybody know what is going on?


They are PHP scripts accessing a mysql database if that helps.

I am not sure if this is a physical memory problem or what....



Thanks

Randy


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




Hi all,

I'm using on my new machine (SuSE 7.0) PHP4. In one PHP4-Script I use
the mail-Function. But my /var/log/mail (qmail) does not give any entry
for this mail.

Is there a bug?

In PHP3 it was all running good.

I have a serious problem here because this is a customers site!

Thanks in advance.

Thomas





On Thu, 26 Apr 2001 01:48:13 +0200, Thomas Booms
([EMAIL PROTECTED]) wrote:
>Hi all,
>
>I'm using on my new machine (SuSE 7.0) PHP4. In one PHP4-Script I
use
>the mail-Function. But my /var/log/mail (qmail) does not give any
>entry
>for this mail.
>
>Is there a bug?
>
>In PHP3 it was all running good.
>
>I have a serious problem here because this is a customers site!
>
>Thanks in advance.
>
>Thomas

maybe sendmail_path should be set, or else I think you can just check
that sendmail is in the path. I know that you're using qmail, but it
usually puts a wrapper called sendmail in the path which calls qmail.





Hey all,

I keep getting this error message on a couple of pages from a site I am 
currently working on, the strange thing about this is there are no 
included files in 'browser.php' and I am certainly not including 
'browser.php' anywhere.

Warning:  Failed opening '/home/binary/public_html/browser.php' for 
inclusion (include_path='./inc:/usr/local/lib/php:.') in Unknown on line 0

If anyone knows what is wrong or  has had a simular problem please let 
me know.

Regards

Joseph









Have a look at php.ini in /usr/local/lib

It looks like your prepend file is browser.php - just comment that line out.

Chris Fry

Joseph Blythe wrote:

> Hey all,
>
> I keep getting this error message on a couple of pages from a site I am
> currently working on, the strange thing about this is there are no
> included files in 'browser.php' and I am certainly not including
> 'browser.php' anywhere.
>
> Warning:  Failed opening '/home/binary/public_html/browser.php' for
> inclusion (include_path='./inc:/usr/local/lib/php:.') in Unknown on line 0
>
> If anyone knows what is wrong or  has had a simular problem please let
> me know.
>
> Regards
>
> Joseph
>
> --
> 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]

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

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

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

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

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

This notice should not be removed.






maybe it's something in auto_prepend_file or auto_append_file. do
phpinfo() to check.


On Thu, 26 Apr 2001 09:36:56 +0930, Joseph Blythe
([EMAIL PROTECTED]) wrote:
>Hey all,
>
>I keep getting this error message on a couple of pages from a site I
>am
>currently working on, the strange thing about this is there are no
>included files in 'browser.php' and I am certainly not including
>'browser.php' anywhere.
>
>Warning:  Failed opening '/home/binary/public_html/browser.php' for
>inclusion (include_path='./inc:/usr/local/lib/php:.') in Unknown on
>line 0
>
>If anyone knows what is wrong or  has had a simular problem please
>let
>me know.
>
>Regards
>
>Joseph
>
>
>
>
>
>
>--
>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: php-list-
>[EMAIL PROTECTED]








Chris Fry wrote:

> Have a look at php.ini in /usr/local/lib
> 
> It looks like your prepend file is browser.php - just comment that line out.

Those lines in the php.ini are blank

; automatically add files before or after any PHP document
auto_prepend_file       =
auto_append_file        =

Hmm, all the scripts look fine, I have restarted apache too. This has me 
stuffed!

Regards

Joseph






On Thu, 26 Apr 2001 09:54:04 +0930, Joseph Blythe
([EMAIL PROTECTED]) wrote:
>Chris Fry wrote:
>
>> Have a look at php.ini in /usr/local/lib
>>
>> It looks like your prepend file is browser.php - just comment that
>>line out.
>
>Those lines in the php.ini are blank
>
>; automatically add files before or after any PHP document
>auto_prepend_file       =
>auto_append_file        =

they could be also be set in .htaccess or httpd.conf or maybe
somewhere else. the best way to check is phpinfo()






Mark Maggelet wrote:

> On Thu, 26 Apr 2001 09:54:04 +0930, Joseph Blythe 
> ([EMAIL PROTECTED]) wrote:
> 
>> Chris Fry wrote:
>> 
>>> Have a look at php.ini in /usr/local/lib
>>> 
>>> It looks like your prepend file is browser.php - just comment that
>>> line out.
>> 
>> Those lines in the php.ini are blank
>> 
>> ; automatically add files before or after any PHP document
>> auto_prepend_file       =
>> auto_append_file        =
> 
> 
> they could be also be set in .htaccess or httpd.conf or maybe 
> somewhere else. the best way to check is phpinfo()

Thanks, it was a permission thing just the error messgage was a little 
strange and there was no error in  apaches error_log for that host hence 
my confusion :-)

Regards

Joseph

> 





I am trying to pull info from an Exchange LDAP server to make a dynamically
created phonebook, and am having trouble with one field. I think the problem
is that the script I have has everything pulled in an array, and all but the
field I am having problems with are strings. The telephoneNumber would be
integer. Would this cause the telephoneNumber info to not show up when I
view it through a web browser?

Here is the script I have.

<?php
$ldapserver = "myserver.com";
$basedn = "o=myOrganization";
$attribs = array ("cn", "title", "department", "telephoneNumber");

$dir = ldap_connect($ldapserver)
  or die("Failed to connect to LDAP server");

$r = ldap_bind($dir)
  or die("Failed binding to server");

$result = ldap_search($dir, $basedn, "sn=T*", $attribs)
  or die("Error executing LDAP search");

$info = ldap_get_entries($dir, $result);
print count($info) . "entries returned<br>";

print "<table>";

for ($i=0; $i<$info["count"]; $i++) {

print "<tr>";
print "<td>";
print $info[$i]["cn"][0];
print "</td>";
print "<td>";
print $info[$i]["title"][0];
print "</td>";
print "<td>";
print $info[$i]["department"][0];
print "</td>";
print "<td>";
print $info[$i]["telephoneNumber"][0];
print "</td>";
print "</tr>";

  }

ldap_close($dir);
?>





I have a cookie that times out after an hour for security reasons.
About 1 out of 200 of my users send me an email saying they can't log
into my site and I find out that it's usually because their clocks
are off. Has anyone had any luck using the time on the client to set
cookies by instead of server time? I hate using javascript for this
but I don't see much choice.

thanks,
- Mark





look at it this way:

you are dealing with an INTERVAL of time, thus the only reason you really
need javascript is in the construction of a date object.

you can either import that object into php as a string, or you can actually
go the extra mile and set the cookie in javascript.

HTH,
DanO


"Mark Maggelet" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
I have a cookie that times out after an hour for security reasons.
About 1 out of 200 of my users send me an email saying they can't log
into my site and I find out that it's usually because their clocks
are off. Has anyone had any luck using the time on the client to set
cookies by instead of server time? I hate using javascript for this
but I don't see much choice.

thanks,
- Mark


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







On Wed, 25 Apr 2001 17:32:44 -0700, DanO
([EMAIL PROTECTED]) wrote:
>look at it this way:
>
>you are dealing with an INTERVAL of time, thus the only reason you
>really need javascript is in the construction of a date object.

as far as I know the only way to set a cookie's expiration is with an
exact GMT timestamp. If there were a way to tell a browser "1 hour
from now" then this would solve my problem.

>you can either import that object into php as a string, or you can
>actually go the extra mile and set the cookie in javascript.

right. I hate to do this though. I guess I'm asking if someone out
there has had this problem and found a good way around it.

thanks,
- Mark

>HTH,
>DanO
>
>
>"Mark Maggelet" <[EMAIL PROTECTED]> wrote in message
>[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>I have a cookie that times out after an hour for security reasons.
>About 1 out of 200 of my users send me an email saying they can't
log
>into my site and I find out that it's usually because their clocks
>are off. Has anyone had any luck using the time on the client to set
>cookies by instead of server time? I hate using javascript for this
>but I don't see much choice.
>
>thanks,
>- Mark
>
>
>--
>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: php-list-
>[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: php-list-
>[EMAIL PROTECTED]






> I have a cookie that times out after an hour for security reasons.
> About 1 out of 200 of my users send me an email saying they can't log
> into my site and I find out that it's usually because their clocks
> are off. Has anyone had any luck using the time on the client to set
> cookies by instead of server time? I hate using javascript for this
> but I don't see much choice.

Just use a session cookie (by not providing an expiry time) and add the
server's expiry timestamp to the value of the cookie.  Then when you get
that cookie sent to you, check it against your server's time and make the
decision on whether to accept the cookie or not based on that.

That way you are immune from people not having their system clocks set
right.

-Rasmus





On Wed, 25 Apr 2001 17:48:48 -0700 (PDT), Rasmus Lerdorf
([EMAIL PROTECTED]) wrote:
>> I have a cookie that times out after an hour for security reasons.
>> About 1 out of 200 of my users send me an email saying they can't
>>log
>> into my site and I find out that it's usually because their clocks
>> are off. Has anyone had any luck using the time on the client to
>>set
>> cookies by instead of server time? I hate using javascript for
this
>> but I don't see much choice.
>
>Just use a session cookie (by not providing an expiry time) and add
>the
>server's expiry timestamp to the value of the cookie.  Then when you
>get
>that cookie sent to you, check it against your server's time and
>make the
>decision on whether to accept the cookie or not based on that.
>
>That way you are immune from people not having their system clocks
>set
>right.

good idea. I'll do that.
- Mark





my advise : use that as less as possible, 
whatever is on the client side could be easy to hack, and not every browser
understand JavaScript either.

Use cookies, 1-200 is out - means they are unable to use your service : they
chousen it that way.


Sincerely, 

 Maxim Maletsky
 Founder, Chief Developer
 PHPBeginner.com (Where PHP Begins)
 [EMAIL PROTECTED]
 www.phpbeginner.com



-----Original Message-----
From: Mark Maggelet [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 26, 2001 9:16 AM
To: [EMAIL PROTECTED]
Subject: [PHP] cookies and clocks


I have a cookie that times out after an hour for security reasons. 
About 1 out of 200 of my users send me an email saying they can't log 
into my site and I find out that it's usually because their clocks 
are off. Has anyone had any luck using the time on the client to set 
cookies by instead of server time? I hate using javascript for this 
but I don't see much choice.

thanks,
- Mark


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





On 25-Apr-01 Thomas Edison Jr. wrote:
> we're trying to develop an exact replica of the SkyBiz
> downline|Matrix system program. But it's getting so
> complicated & niether is the logic coming out. we're
> in need of help. Anyone familiar with the skybiz
> matrix, please help!!
> It's a 2 X 2 matrix system where a person can have
> only two legs below him - Left & Right = and thus the
> chain grows. Each person sponsors 2 people below him.
> They can be directly below him or somewhere down the
> line.

Not a matrix, it's called a Binary Tree (B-Tree); programming 101.
also look for "recursion" near-by.


   N
  / \
 K   Q
      \
       S
      / \
     R   T

func count(x) {
  if (x == NULL)
    return(0);

  cnt=1 + count(x->left) + count(x->right);
  return(cnt)
}

> But keeping a count of how many people o one's
> right & left is getting impossible logically. 
> please help!

I'd kinda imagine it would.

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.




sorry i forgot to paste the error i was getting

Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to
allocate 3840 bytes) in Unknown on line 0



-----Original Message-----
From: Randy Johnson [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 24, 2001 7:49 PM
To: [EMAIL PROTECTED]
Cc: PHP General Mailing List
Subject: [linux] FATAL ERROR


Several people got the following error today when accessing my site.  Does
anybody know what is going on?


They are PHP scripts accessing a mysql database if that helps.

I am not sure if this is a physical memory problem or what....



Thanks

Randy


To unsubscribe, email [EMAIL PROTECTED], or
visit www.egroups.com.

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/







if I put the following piece of code in a forloop does it use more memory or
does it use the same memory since the same variable result is being used:

will it use up lots of memory if I execute it 1000 times or will it use the
same memory.


for (loop) {

$result = mysql_query ("UPDATE A_TBL SET dog ='$var' WHERE type ='$var2'");
    $nr=mysql_affected_rows();
    if ($nr==0) { process error}

}


thanks Randy





> if I put the following piece of code in a forloop does it use more memory or
> does it use the same memory since the same variable result is being used:
>
> will it use up lots of memory if I execute it 1000 times or will it use the
> same memory.
>
>
> for (loop) {
>
> $result = mysql_query ("UPDATE A_TBL SET dog ='$var' WHERE type ='$var2'");
>     $nr=mysql_affected_rows();
>     if ($nr==0) { process error}
>
> }

It will re-use the same memory because of reference-count-based garbage
collection feature in PHP 4.

-Rasmus





Hello,

Is there a way with PHP to spawn an automatic download of an image file, a zip
file, or
PDF file (or other kind of file).

Basically I want to be able to popup that stupid little "Open/Save As" window
at my discretion, rather than let the end users browser choose that.

Or is this something that should be done with Javascript?

e.g. even if they have a PDF viewer installed, I want to be able to force their
browser
to download it, even though their browser has the capability of viewing it in
the
browser window.

Thanks
Dan





MySQL doesn't like me....

Sometimes, my pages that connect to the database get the error "Warning:
Supplied argument is not a valid MySQL result resource..." repeated over and
over again (something like 1000 times...)

What's causing this error? Obviously, PHP isn't getting a result back from
MySQL... and it keeps trying to get it.

Any help?


Thanks,
Brian Rue






some code would be nice to have a look at :)

Other than that, check table names, database names, also your result lines, I've found 
i get that error by not calling a result or calling the incorrect table/database

Peter

-----Original Message-----
From: Brian Rue [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 26, 2001 10:28 AM
To: [EMAIL PROTECTED]
Subject: [PHP] MySQL problem...


MySQL doesn't like me....

Sometimes, my pages that connect to the database get the error "Warning:
Supplied argument is not a valid MySQL result resource..." repeated over and
over again (something like 1000 times...)

What's causing this error? Obviously, PHP isn't getting a result back from
MySQL... and it keeps trying to get it.

Any help?


Thanks,
Brian Rue



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





it might also be the characters escaping.

Sincerely, 

 Maxim Maletsky
 Founder, Chief Developer
 PHPBeginner.com (Where PHP Begins)
 [EMAIL PROTECTED]
 www.phpbeginner.com



-----Original Message-----
From: Brian Rue [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 26, 2001 9:28 AM
To: [EMAIL PROTECTED]
Subject: [PHP] MySQL problem...


MySQL doesn't like me....

Sometimes, my pages that connect to the database get the error "Warning:
Supplied argument is not a valid MySQL result resource..." repeated over and
over again (something like 1000 times...)

What's causing this error? Obviously, PHP isn't getting a result back from
MySQL... and it keeps trying to get it.

Any help?


Thanks,
Brian Rue



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




Here's all the code that uses MySQL...

 $db = mysql_connect("localhost","user","pass");
  mysql_select_db("db",$db);
  $gmdquery="SELECT * FROM game_of_the_day";
  $the_info = mysql_query($gmdquery,$db);

while ($myrow = mysql_fetch_row($the_info)) {
        (get info from the result)
}

... (decide whether or not to conduct the following operation)

if (true) {
   $query="SELECT id FROM games WHERE rating >= 7";
   $result=mysql_query($query,$db);
   $numgames=mysql_num_rows($result);
   $z=0;
   while ($row=mysql_fetch_row($result)){
    $gotd_cand[$z]=$row[0];
    $z++;
   }

   (at this point, i randomly select 2 games from the db)

     $query="SELECT genre,number FROM games WHERE id=$game1_to_get";
     $gameinfo=mysql_query($query,$db);
     while($row=mysql_fetch_row($gameinfo)){
      (use the result)
     }

(do the same thing as before, but for the second game)


   }
      (update the db)
   $query="DELETE FROM game_of_the_day";
   $result=mysql_query($query,$db);


   $query="INSERT INTO game_of_the_day VALUES
('',$curr_yday,'$gameone_genre',$gameone_number,'$gametwo_genre',$gametwo_nu
mber)";
   $result=mysql_query($query,$db);

  }



Keep in mind that this only happens some of the time... sometimes it works,
and sometimes it just doesn't.


Today, I noticed that it stored the first game into the db twice (the code
doesn't allow for the same game to be selected twice...)



Thanks for your time


""Peter Houchin"" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> some code would be nice to have a look at :)
>
> Other than that, check table names, database names, also your result
lines, I've found i get that error by not calling a result or calling the
incorrect table/database
>
> Peter
>
> -----Original Message-----
> From: Brian Rue [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, April 26, 2001 10:28 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] MySQL problem...
>
>
> MySQL doesn't like me....
>
> Sometimes, my pages that connect to the database get the error "Warning:
> Supplied argument is not a valid MySQL result resource..." repeated over
and
> over again (something like 1000 times...)
>
> What's causing this error? Obviously, PHP isn't getting a result back from
> MySQL... and it keeps trying to get it.
>
> Any help?
>
>
> Thanks,
> Brian Rue
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>






I think here's your problem:

  $query="INSERT INTO game_of_the_day VALUES
('',$curr_yday,'$gameone_genre',$gameone_number,'$gametwo_genre',$gametwo_nu
mber)";

should look like : 

  $query="
INSERT INTO
        game_of_the_day
(ID, curr_yday, gameone_genre, gameone_number, gametwo_genre,
gametwo_number)
        VALUES
('',$curr_yday,'$gameone_genre',$gameone_number,'$gametwo_genre',$gametwo_nu
mber)
";

try it.


Sincerely, 

 Maxim Maletsky
 Founder, Chief Developer
 PHPBeginner.com (Where PHP Begins)
 [EMAIL PROTECTED]
 www.phpbeginner.com



-----Original Message-----
From: Brian Rue [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 26, 2001 12:24 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] MySQL problem...


Here's all the code that uses MySQL...

 $db = mysql_connect("localhost","user","pass");
  mysql_select_db("db",$db);
  $gmdquery="SELECT * FROM game_of_the_day";
  $the_info = mysql_query($gmdquery,$db);

while ($myrow = mysql_fetch_row($the_info)) {
        (get info from the result)
}

... (decide whether or not to conduct the following operation)

if (true) {
   $query="SELECT id FROM games WHERE rating >= 7";
   $result=mysql_query($query,$db);
   $numgames=mysql_num_rows($result);
   $z=0;
   while ($row=mysql_fetch_row($result)){
    $gotd_cand[$z]=$row[0];
    $z++;
   }

   (at this point, i randomly select 2 games from the db)

     $query="SELECT genre,number FROM games WHERE id=$game1_to_get";
     $gameinfo=mysql_query($query,$db);
     while($row=mysql_fetch_row($gameinfo)){
      (use the result)
     }

(do the same thing as before, but for the second game)


   }
      (update the db)
   $query="DELETE FROM game_of_the_day";
   $result=mysql_query($query,$db);


   $query="INSERT INTO game_of_the_day VALUES
('',$curr_yday,'$gameone_genre',$gameone_number,'$gametwo_genre',$gametwo_nu
mber)";
   $result=mysql_query($query,$db);

  }



Keep in mind that this only happens some of the time... sometimes it works,
and sometimes it just doesn't.


Today, I noticed that it stored the first game into the db twice (the code
doesn't allow for the same game to be selected twice...)



Thanks for your time


""Peter Houchin"" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> some code would be nice to have a look at :)
>
> Other than that, check table names, database names, also your result
lines, I've found i get that error by not calling a result or calling the
incorrect table/database
>
> Peter
>
> -----Original Message-----
> From: Brian Rue [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, April 26, 2001 10:28 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] MySQL problem...
>
>
> MySQL doesn't like me....
>
> Sometimes, my pages that connect to the database get the error "Warning:
> Supplied argument is not a valid MySQL result resource..." repeated over
and
> over again (something like 1000 times...)
>
> What's causing this error? Obviously, PHP isn't getting a result back from
> MySQL... and it keeps trying to get it.
>
> Any help?
>
>
> Thanks,
> Brian Rue
>
>
>
> --
> 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]





Generally spoken, echo the SQL-Statement, and paste it in your local MySql
Client (e.g. MySql-Font). These Frontends give you a better error, and
you´ll find the problem in seconds. (hope so)

""Peter Houchin"" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> some code would be nice to have a look at :)
>
> Other than that, check table names, database names, also your result
lines, I've found i get that error by not calling a result or calling the
incorrect table/database
>
> Peter
>
> -----Original Message-----
> From: Brian Rue [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, April 26, 2001 10:28 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] MySQL problem...
>
>
> MySQL doesn't like me....
>
> Sometimes, my pages that connect to the database get the error "Warning:
> Supplied argument is not a valid MySQL result resource..." repeated over
and
> over again (something like 1000 times...)
>
> What's causing this error? Obviously, PHP isn't getting a result back from
> MySQL... and it keeps trying to get it.
>
> Any help?
>
>
> Thanks,
> Brian Rue







Dear all,

OS: Redhat Linux 7.1 / i686

I want to compile PHP 4.04pl1 with the the following config:
./configure --enable-track-vars --with-sybase=/usr/local/freetds 
--with-ibm-db2=/home/db2inst1/sqllib 

After I run MAKE, the following error occur:

In file included from /home/db2inst1/sqllib/include/sqlcli1.h:42,
                 from /usr/src/php-4.0.4pl1/ext/odbc/php_odbc.h:160,
                 from internal_functions.c:39:
/home/db2inst1/sqllib/include/sqlcli.h:344: conflicting types for
`RETCODE'
/usr/local/freetds/include/sybdb.h:72: previous declaration of
`RETCODE'
make[2]: *** [internal_functions.lo] Error 1
make[2]: Leaving directory `/usr/src/php-4.0.4pl1/main'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/src/php-4.0.4pl1/main'
make: *** [all-recursive] Error 1


I checked the source code and found

/sqlcli.h
typedef signed short RETCODE;

/sydbd.h
typedef int RETCODE;

Can I change the typedef to signed short in sysdb.h file?
Any other workaround.

Many thanks in advance for newbie question.

Regards,
Chris Lee







 Hello everyone,

 I want to build an online training center that let's me monitor/track
 user progress, througout an online curriculum. The goal of the project is
 to be able to 'certify' the user after completing certain lessons.

 I want to:
    -have online exams,etc.
    -make it possible to track each user's progress
    -provide online training videos
    -provide access to reference documents [searchable db], etc.

 I'm looking for recommendations on the best tools to use to create and
 manage, such a system. I'm currently looking at MM COURSEBUILDER,
 combine with NT+SQLServer+PHP. I wanted to know if there is
 better way to approach this.

1) Have any of you done something similar?
2) What software do you recommend for this?

3) I plan to use NT+SQLserver+PHP and/or else. Any suggestions, comments?

What are the best tools to do this? By 'best', I mean:
   -easy (relatively) to implement
   -easy to manage [template based]
   -scalable


Any help would be greatly appreciated.

Thx in advance!

-John


__________John Monfort_________________
_+-----------------------------------+_
     P E P I E  D E S I G N S
       www.pepiedesigns.com
"The world is waiting, are you ready?"
-+___________________________________+-







Hi all,

I am trying to copy an image from an external server and save it to my own.
I have the following script to do this for a txt file and it works great!

?>

$page  = "../temp/yep.txt";

$date = date("http:/www.example.com/yep.txt");

$cartFile = fopen("$page","a");
fwrite($cartFile,$date,strlen($date));
fclose($cartFile);

?>

But i can't get it to work for image files - the images are saved and
displayed on screen as a whole bunch of rubbish.

I'd appreciate any help you can give me






I've just started a PHP SDL module project on Sourceforge.  The goal of this project 
is to exploit the possibility of multimedia application development under PHP 
utilizing SDL (Simple DirectMedia Layer) libraries.  You will find an initial v0.1 
release at http://www.sourceforge.net/projects/phpsdl.  It includes a ported stars 
demo by Nathan Strong.

It is far from finish, and if anyone would like to help out, please contact me.

Sincerely,

Brian Wang





 Hello everyone,

 I'm looking for information on PHP+ MS Access , and PHP+MS SQL.

 Any recommendations?

 Thx in advance!


__________John Monfort_________________
_+-----------------------------------+_
     P E P I E  D E S I G N S
       www.pepiedesigns.com
"The world is waiting, are you ready?"
-+___________________________________+-

On Thu, 26 Apr 2001, Ben Quinn wrote:

> Hi all,
>
> I am trying to copy an image from an external server and save it to my own.
> I have the following script to do this for a txt file and it works great!
>
> ?>
>
> $page  = "../temp/yep.txt";
>
> $date = date("http:/www.example.com/yep.txt");
>
> $cartFile = fopen("$page","a");
> fwrite($cartFile,$date,strlen($date));
> fclose($cartFile);
>
> ?>
>
> But i can't get it to work for image files - the images are saved and
> displayed on screen as a whole bunch of rubbish.
>
> I'd appreciate any help you can give me
>
>
>
> --
> 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]
>
>





what about microtime() ?

you can do it your self:

$start = microtime();
mysql_query()...
$stop = microtime();

$token = round($stop-$start, 3);
echo "Query took $token seconds";

I mean this is not as precise as SQL would do itself, but will work
approximately.


Sincerely, 

 Maxim Maletsky
 Founder, Chief Developer
 PHPBeginner.com (Where PHP Begins)
 [EMAIL PROTECTED]
 www.phpbeginner.com




-----Original Message-----
From: James, Yz [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 26, 2001 5:17 AM
To: [EMAIL PROTECTED]
Subject: [PHP] SQL Query time?


Hi all,

I have seen a few pages that echo the time it's taken to execute an SQL
query, like "The results in the database were returned in 0.3 seconds."
Anyone know if there's a built in function to display this, and if there is,
what it is?  My more-than-useless-ISP seems to have taken an aversion to
allowing me to surf tonight without disconnecting me.

Thanks.
James.



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




no, don't worry, we'll help:-)

use mysql_query("INSRT INTO table SET name='$name', email='$email'"); ...etc

see some examples you can find in documentations. Browse the web for it -
there's a whole bunch.


Sincerely, 

 Maxim Maletsky
 Founder, Chief Developer
 PHPBeginner.com (Where PHP Begins)
 [EMAIL PROTECTED]
 www.phpbeginner.com

 

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 26, 2001 6:01 AM
To: [EMAIL PROTECTED]
Subject: [PHP] I need help from you.


Hello,

I have seen your email at PHP site - developers.

I need a simple syntax that you may understand.

I want to send data TO mysql   FROM   my   contact  form.

the database is hosted and provided by my   hosting provider.

I do not know what is the syntax  to send  that data.

I make quality design services, maybe you will need 
anything to improve, I will be glad to  do it in  exchange.

Thank you !

Javier Yep 
[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]




Don't think that's going to work - that's an UPDATE syntax - should be:

mysql_query("INSERT INTO table (name, email) VALUES('$name', '$email')"); ...etc

Chris Fry

Maxim Maletsky wrote:

> no, don't worry, we'll help:-)
>
> use mysql_query("INSRT INTO table SET name='$name', email='$email'"); ...etc
>
> see some examples you can find in documentations. Browse the web for it -
> there's a whole bunch.
>
> Sincerely,
>
>  Maxim Maletsky
>  Founder, Chief Developer
>  PHPBeginner.com (Where PHP Begins)
>  [EMAIL PROTECTED]
>  www.phpbeginner.com
>
>
>
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, April 26, 2001 6:01 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] I need help from you.
>
> Hello,
>
> I have seen your email at PHP site - developers.
>
> I need a simple syntax that you may understand.
>
> I want to send data TO mysql   FROM   my   contact  form.
>
> the database is hosted and provided by my   hosting provider.
>
> I do not know what is the syntax  to send  that data.
>
> I make quality design services, maybe you will need
> anything to improve, I will be glad to  do it in  exchange.
>
> Thank you !
>
> Javier Yep
> [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]

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

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

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

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

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

This notice should not be removed.






YUP, that will

read few manuals


Sincerely, 

 Maxim Maletsky
 Founder, Chief Developer
 PHPBeginner.com (Where PHP Begins)
 [EMAIL PROTECTED]
 www.phpbeginner.com



-----Original Message-----
From: Chris Fry [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 26, 2001 11:37 AM
To: Maxim Maletsky
Cc: '[EMAIL PROTECTED]'; [EMAIL PROTECTED]
Subject: Re: [PHP] I need help from you.


Don't think that's going to work - that's an UPDATE syntax - should be:

mysql_query("INSERT INTO table (name, email) VALUES('$name', '$email')");
...etc

Chris Fry

Maxim Maletsky wrote:

> no, don't worry, we'll help:-)
>
> use mysql_query("INSRT INTO table SET name='$name', email='$email'");
...etc
>
> see some examples you can find in documentations. Browse the web for it -
> there's a whole bunch.
>
> Sincerely,
>
>  Maxim Maletsky
>  Founder, Chief Developer
>  PHPBeginner.com (Where PHP Begins)
>  [EMAIL PROTECTED]
>  www.phpbeginner.com
>
>
>
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, April 26, 2001 6:01 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] I need help from you.
>
> Hello,
>
> I have seen your email at PHP site - developers.
>
> I need a simple syntax that you may understand.
>
> I want to send data TO mysql   FROM   my   contact  form.
>
> the database is hosted and provided by my   hosting provider.
>
> I do not know what is the syntax  to send  that data.
>
> I make quality design services, maybe you will need
> anything to improve, I will be glad to  do it in  exchange.
>
> Thank you !
>
> Javier Yep
> [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]

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

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

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

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

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

This notice should not be removed.



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




I think you should use:

SELECT myTable.col
FROM myTable, otherTable
WHERE myTable.id = otherTable.ID
AND otherTable.data (LIKE "a.%" or LIKE "s.%" or LIKE "io.bean");

Sincerely, 

 Maxim Maletsky
 Founder, Chief Developer
 PHPBeginner.com (Where PHP Begins)
 [EMAIL PROTECTED]
 www.phpbeginner.com




-----Original Message-----
From: Jason Caldwell [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 26, 2001 6:40 AM
To: [EMAIL PROTECTED]
Subject: [PHP] MySQL and LIKE?


I'm trying to create a multiple pattern search using LIKE (in mySQL) -- the
following doesn't seem to work and was wondering if someone knew of an easy
efficient way of adding multiple search criteria.

SELECT myTable.col
FROM myTable, otherTable
WHERE myTable.id = otherTable.ID
AND otherTable.data LIKE ("a.%" or "s.%" or "io.bean");

So....
LIKE ("a.%" or "s.%" or "io.bean");    <<- doesn't seem to work like this.

Thanks.
Jason





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




Problem with this is that many people use '+' in email addresses along with
other strange characters (a friend of mine has an apostrophe in her address
at General Electric).

Bottom line, trying to catch all valid email addresses using a regex is a
really ugly thing to try to do.  The one shown here will probably work for
95% or more of them though.

As an aside, underscores in domain names are illegal (more correctly,
underscores in MX-related DNS records are illegal).  As such, you don't
need to have underscore to the right of the @ sign in this regex.

 -d

Previously, Nikhil Goyal said:
> I wrote a similar script of my own... Works fine for me
> 
> function email_valid($email) {
> 
> $pattern="^[0-9a-zA-Z_-]+(\.[0-9a-zA-Z_-]+)*@[0-9a-zA-Z_-]+(\.[0-9a-zA-Z_-]+
> )+$";
>  return ereg($pattern, $email);
>  }
> 
> (returns false if email is not valid, true if it is)

-- 
It's been said that a million monkeys at a million keyboards could produce
the complete works of Shakespeare; now thanks to the Internet, we can say
that this is not true.                       -Unknown




Previously, Jordan Elver said:
>
> I'm not using virtual hosts on my local machine but I am on the production 
> machine. What should DOCUMENT_ROOT return? I though it returns the directory 
> of the current script. So if I had a site in 
> /usr/local/apache/htdocs/cha/script.php then I would expect DOCUMENT_ROOT to 
> return /usr/local/apache/htdocs/cha/, is that right?

No, if you want to fetch that then do this:

    $my_directory = dirname($PHP_SELF);

If you don't have register_globals on then you might have to do this
instead:

    $my_directory= dirname($HTTP_SERVER_VARS['PHP_SELF']);

Should end up with "/usr/local/apache/htdocs/cha" in $my_directory (in this
particular case).

$DOCUMENT_ROOT is whatever your httpd.conf file says DocumentRoot is.
Even if you don't use virtualhosts, there should be a DocumentRoot in one
of your Apache config files.  I believe Apache will complain loudly on
startup if that parameter is missing.

 -dan

-- 
Plan to be spontaneous - tomorrow.




"Steven Haryanto" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> At 4/25/2001 09:02 PM, Reuben D Budiardja wrote:

*SNIP*

> What I *really* like to see in PHP is:
>
> - NAMESPACE
> - TRACEBACK INFO
> - exception (try-except block)
> - $obj->method()->anotherMethod()
> - real destructor would be nice, but not extremely important for
>    the time being, due to the nature of PHP usage in Web pages

I agree, but

$obj->method()->anotherMethod()

works for me. What does not work to be specific?

I don't use GDB, but it seems it supports traceback.
How about Zend Debugger? Does it support? Anyone?

Regards,
--
Yasuo Ohgaki







Rasmus Lerdorf schrieb:
> > If anyone has any idea, or tricks to hide information in a variables or
> > method in a class, or in other words, make a variable or method a private,
> > I would really like to know. Thanks for any comments.
> 
> PHP also doesn't have introspection, so there isn't a good way for people
> to see what is in your API so a bit of obscurity should hide things for
> you.

Hmm, the old, dirty hack print_r($obj). And the new functions:

http://www.php.net/manual/en/function.get-class.php
http://www.php.net/manual/en/function.get-class-vars.php
http://www.php.net/manual/en/function.get-object-vars.php
http://www.php.net/manual/en/function.get-class-methods.php
...

I'd call these not only debugging function but functions that can be
used for introspection.

Anyway, people should not use parts of the API your documentation does
not mention as public. Whoever does so, should reread the book on OOP.
Yes, it could be better, but think of the zillions of PHP scripts that
will break and all the beginners - PHP is quite often a beginners
language - will ask you, Reuben, for support ;).

Ulf

-- 
Neu: PEAR Cache Erweiterung OutputCompression
http://www.ulf-wendel.de/php/show_source.php?file=out_cache_com
http://www.phpdoc.de






Yasuo Ohgaki schrieb:
> I don't use GDB, but it seems it supports traceback.
> How about Zend Debugger? Does it support? Anyone?

http://dd.cron.ru/dbg/ ?

Ulf

-- 
Neu: PEAR Cache Erweiterung OutputCompression
http://www.ulf-wendel.de/php/show_source.php?file=out_cache_com
http://www.phpdoc.de




> 
> 
> Yasuo Ohgaki schrieb:
> > I don't use GDB, but it seems it supports traceback.
> > How about Zend Debugger? Does it support? Anyone?
> 
> http://dd.cron.ru/dbg/ ?
> 
> Ulf

Thanks for correcting my typo, Ulf.
GDB => DBG :)

Yasuo Ohgaki




At 4/26/2001 12:10 PM, Yasuo Ohgaki wrote:
> > What I *really* like to see in PHP is:
> >
> > - NAMESPACE
> > - TRACEBACK INFO
> > - exception (try-except block)
> > - $obj->method()->anotherMethod()
> > - real destructor would be nice, but not extremely important for
> >    the time being, due to the nature of PHP usage in Web pages
>
>I agree, but
>
>$obj->method()->anotherMethod()
>works for me. What does not work to be specific?

Hm, I'm using 4.0.4pl1. Perhaps this has been added somewhere in
the 4.0.5RC series? Sorry, haven't got the chance of trying that
(apart from using the PEAR from 4.0.5RC2).

===
class C1 {
     function &f() { return $this; }
     function g() { echo "Hi!"; }
}

$C=new C;
$C->f()->g();
===

does not work me here.

>I don't use GDB, but it seems it supports traceback.
>How about Zend Debugger? Does it support? Anyone?

Yes, I've heard that it supports traceback. I guess this means I
have to use a source-level debugger for now. Lacking a stack trace
leads to a rather cumbersome error reporting, since I have to
supply __LINE__, __FILE__, and the name of the function in every
call to the error function.

Regards,
Steve





Can anyone tell me whether php can use win32 dll library functions? If yes,
how?

Patrick






not that i know...but if you can code an extension that have functions to
call Win32 dlls than you solved it...
I also care to know if what you asked for have a direct solution...

-elias
http://www.hostrix.com

""Patrick Lai"" <[EMAIL PROTECTED]> wrote in message
9c8d8l$uh3$[EMAIL PROTECTED]">news:9c8d8l$uh3$[EMAIL PROTECTED]...
> Can anyone tell me whether php can use win32 dll library functions? If
yes,
> how?
>
> Patrick
>
>
>
> --
> 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]
>






At 4/25/2001 08:11 AM, Dexter wrote:
>I see functions , are there subroutine calls. I guess 
>not.     A function acts as a sub when it returns no value . A 
>sub that returns a value is a function.

You probably came from Pascal or something similar, which formally
separate 'function' from 'procedure'. They are exactly the same
(i.e., subroutines: some piece of code you call and will eventually
return to you, hence the word 'sub'.)

Steve





Sorrry, if this wasn't clear, but the problem _has_ persisted after the
reboots.

Euan

""Brian S. Dunworth"" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
> At 03:03 PM 4/25/01 +0100, Euan Greig wrote:
> >[25-Apr-2001 14:34:48] PHP Warning:  Missing ] in üu variable in Unknown
> >on line 0
> >[25-Apr-2001 14:34:50] PHP Warning:  Missing ] in }´üt variable in
Unknown
> >on line 0
>
>   [...] etc
>
>    I hate to say it, but this looks suspiciously like a memory leak in
> WindowsNT...  especially if the problem cleared up after rebooting.
>
>   - Brian
>
>
>   -------------------------------------
>     Brian S. Dunworth
>     Sr. Software Development Engineer
>     Oracle Database Administrator
>     The Printing House, Ltd.
>
>     (850) 875-1500  x225
>     <[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]
>






Yup, I'm reading the other posts.

But the fact of the matter is, I don't have time to wait for a new
extension. I need to develop a solution *NOW*.

Thus, I will continue full-steam ahead with what I'm doing. I'll gladly
switch to the new extension once/if it becomes available.

Regards,
Henning
Funcom Oslo AS


-----Original Message-----
From: Robert Covell [mailto:[EMAIL PROTECTED]]
Sent: 25. april 2001 22:55
To: Dan Harrington; Henning Kilset Pedersen; [EMAIL PROTECTED]
Subject: RE: [PHP] Payflow, story continued


Is anybody reading the other posts about the work in progress being done by
John?  This extra work seems pointless if it is being looked into by the PHP
development team.

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: Dan Harrington [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 25, 2001 3:52 PM
To: Henning Kilset Pedersen; [EMAIL PROTECTED]
Subject: RE: [PHP] Payflow, story continued



Congratulations,

So you've overcome the PNVersion demons, now to others.
What you need to do now is to locate the f73e89fd.0 file found in the PFPro
library and make sure it is present in your OpenSSL or other SSL certs
directory.
It should be in the same directory as your server cert(s).  That is what
is generating the response code -31.

That file is (in the SDK 3.0) found in

verisign/payflowpro/linux/certs/f73e89fd.0

You need that to be in your SSL Certs directory in order for PHP to
recognize
that it exists, and present it to the Payflow Pro when it asks for it.

> Verisign response code was -31, which means: The certificate chain did not
> validate, no local certificate found The transaction request: Array
 [USER]
> => mylogin [PWD] => mypassword [TRXTYPE] => S [TENDER] => C [AMT] => 1.5
> [ACCT] => 4111111111111111 [EXPDATE] => 0904 ) The response: Array
>  [RESULT] => -31 [RESPMSG] => The certificate chain did not validate, no
> local certificate found )
>
> Hmm. Certificate not found. I think that is in the directory that I
> specified for --with-pfpro=....., under the ./certs subdirectory there. I
> just downloaded the test version, tho. I haven't found any information
from
> Verisign on how to update/change that certificate if needed, or any
> information from PHP's manuals on how to choose where the cert is located.
> Should it be in some PHP includable directory, for example?
>
> Regards,
> Henning


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







Hi

I have to set up a site for free web hosting incl. php
I installed apache and php4.0.4pl1 and now the php scripts can browse the
entire filesystem of the machine. Does anyone know how to fix that?

10x a lot

Antt





10x? That a CD Player speed or something!?

Quit the kiddie talk, use english!

-----Ursprungligt meddelande-----
Från: Anton G. Popov [mailto:[EMAIL PROTECTED]]
Skickat: den 26 april 2001 10:45
Till: [EMAIL PROTECTED]
Ämne: [PHP] Filesystem security


Hi

I have to set up a site for free web hosting incl. php
I installed apache and php4.0.4pl1 and now the php scripts can browse the
entire filesystem of the machine. Does anyone know how to fix that?

10x a lot

Antt


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






Read the php.ini file and the manuals on php.net.

There are some directives which can limit the parser to operate on files
under a certain level.

You can also disallow functions if you care. As well as what directives can
be overwritten by .htaccess files. 

No idea where have I read all that, but I am sure there is.


Sincerely, 

 Maxim Maletsky
 Founder, Chief Developer
 PHPBeginner.com (Where PHP Begins)
 [EMAIL PROTECTED]
 www.phpbeginner.com

 

-----Original Message-----
From: Anton G. Popov [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 26, 2001 5:45 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Filesystem security


Hi

I have to set up a site for free web hosting incl. php
I installed apache and php4.0.4pl1 and now the php scripts can browse the
entire filesystem of the machine. Does anyone know how to fix that?

10x a lot

Antt


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




I have trouble in my httpd. I want to compile my PHP3 with MySQL and Imap support. 
when compile finished, httpd not be run. it's alert "..not suport gss_mech_krb5 ..."
can some body help me, please. 
-- 
_______________________________________________
Get your free email from www.keromail.com 


Powered by Outblaze





Slightly off topic...

If you need features, postgresql is way ahead. It supports many advanced
features that are not available under other systems such sub-selects,
triggers, views, foreign key referential integrity, transactions and
sophisticated locking (7.1 supports outer joins).

It was believed that mysql was faster for lightweight work, but recent
tests has shown that this is no longer correct.

Even some large sites have been converted from mysql to postgresql (e.g.
sourceforge).

If you are looking for a high end commertial system, oracle has many
features.

Regards,

Anuradha

On Fri, 20 Apr 2001, yanto wrote:

> 
> Hi....
> is there one one know about any site explain comparation among database
> server software from various perspective.
> 
> thanx.
> 
> -toto-
> 
> -- 
> 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]
> 
> 



Reply via email to