[PHP] Re: [PHP-QA] Error in www.php.net (To site admin)

2001-03-08 Thread Zak Greant
Are you still encountering the error?  I don't see it.

--zak

- Original Message - 
From: "Yasuo Ohgaki" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Wednesday, March 07, 2001 8:06 PM
Subject: [PHP-QA] Error in www.php.net (To site admin)


 There is a error on www.php.net
 
 http://www.php.net/manual/browse-errata.php
 
 Fatal error: Call to undefined function: spc() in
 /local/Web/sites/phpweb/manual/browse-errata.php on line 39
 
 I don't know where to report
 I hope www.php.net admin read this post.
 
 Regards,
 Yasuo Ohgaki
 


-- 
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] ldap_search()

2001-03-08 Thread Nick Talbott

Mike

The purpose of setting the basedn is to say "search in this branch of the
directory".

The only person who can really tell you what basedn to use is whoever
designed or manages the structure of your LDAP server.  Having said that, a
base dn is commony something like ...
o=Your Organisation,c=US

Some LDAP managers also make consistent use of the "ou" or
"organizationalUnit" attribute to provide a further logical division of the
directory.  If your directory is organised this way, and you want to
restrict your search to just one ou in the organisation, you might set the
basedn for the search to be
ou=Whatever Section,o=Your Organisation,c=US

HTH

Nick Talbott
IT Policy and Strategy Manager, Powys County Council, UK

email [EMAIL PROTECTED]
FAX +44 (0) 1597 824781
web http://www.powys.gov.uk and http://www.powysweb.co.uk


-Original Message-
From: Mike Tuller [EMAIL PROTECTED]
To: php mailing list [EMAIL PROTECTED]
Date: 08 March 2001 01:03
Subject: [PHP] ldap_search()


Sorry about this, but I don't know much about LDAP, and the book I have
doesn't tell me much.

I was shown the following script to grab information from an LDAP server
and
display the results in a phonebook type format.

HTML
BODY
?php
$ldapserver = "ldap.something.com";
$basedn = "dc=something, dc=com";

$dir =ldap_connect($ldapserver);// Connect to server

if ($dir) {
  ldap_bind($dir);  // Bind to the server
  $result = ldap_search($dir, $basedn, "sn=*");  // query connection, set
the base and look for any sn

  $info = ldap_get_entries($dir, $result);  // The results get sent to the
$info object

  for ($i=0; $i$info["count"]; $i++) {// Count is a ldap feature that
contains the length of the resultset
echo $info[$i]["cn"][0]; // choose any parameter you want see here
  }

  ldap_close($dir);
}
?
/BODY
/HTML


The problem I am running into I think is that I work for a school district,
and I don't have a .com address. I have anoka.k12.mn.us. I tried to put in
$basedn = "dc=anoka, dc=k12, dc=mn, dc=us"; but I still receive an error on
ldap_search. Am I doing this correctly?

Mike


--
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] last inserted record

2001-03-08 Thread Christian Reiniger

On Thursday 08 March 2001 06:42, you wrote:
 Assuming that you do have a primary key, how can you grab the last
 record you inserted?  Can you use @@IDENTITY, or something like that?

For that I'd add another field - type "timestamp".
In MySQL, timestamp fields are automatically set to NOW() on each insert 
and update *if* they are not set to something else in it (the insert or 
update)

Or simply add some timestamp or datetime field that you "manually" set to 
NOW() on each insert (if you don't want the date to be changed on an 
UPDATE).

 On Saturday 03 March 2001 05:16, you wrote:
  i'm having a little bit of problems with a little mysql table i'm
  using. the table has no primary key nor index nor nothing.
 
  i was wondering if it's possible to select the last inserted record
  of a table with this characteristics.

 Add a primary key. now. Accesses without that will be painfully slow.

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

Very funny, Scotty! Now beam up my clothes...

--
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] parsing html / xml (more)

2001-03-08 Thread Bruin, Bolke de

Hi,

I wrote php-lib-htmlparse
doesn't do they arguments stuff, but should be easily
added (code is there already although not functioning)

go to www.phpbuilder.com for the code snippets

Bolke

-Oorspronkelijk bericht-
Van: Nathaniel Hekman [mailto:[EMAIL PROTECTED]]
Verzonden: Wednesday, March 07, 2001 9:39 PM
Aan: '[EMAIL PROTECTED]'
Onderwerp: RE: [PHP] parsing html / xml (more)


Matt McClanahan wrote:
[...]
 You're not going to find an XML parser that allows for most HTML,
 because if such a parser did exist, it would be a broken XML parser. :)
[...]

Fair enough, and that's as I expected.  So that brings me to the second part
of my question:  is there any php library that allows parsing of html?

Perhaps I'll have to write one myself.  All I want really is something that
parses a bunch of text and calls handlers whenever tags are encountered.
Just like xml_parse, except I don't care if tags are out of order, I don't
care about case, and I don't care if there is a close tag for every open.
If anyone knows of a package that does this, please advise.  If anyone else
would be interested in this, let me know and I could post my code when I'm
done (if I have to do this myself).


Nate

-- 
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] last inserted record

2001-03-08 Thread Soeren Staun-Pedersen

 On Thursday 08 March 2001 06:42, you wrote:
  Assuming that you do have a primary key, how can you grab the last
  record you inserted?  Can you use @@IDENTITY, or something like that?
 
 For that I'd add another field - type "timestamp".
 In MySQL, timestamp fields are automatically set to NOW() on each insert 
 and update *if* they are not set to something else in it (the insert or 
 update)

I would prefer using mysql_insert_id() if possible.
http://www.php.net/manual/en/function.mysql-insert-id.php

Regards,

Sren



--
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] Regex Masters: Please inspect this regex- Pulling urls out of page

2001-03-08 Thread Christian Reiniger

On Thursday 08 March 2001 09:19, you wrote:
 I'm putting together a regex to pull all of the urls out of a web page.
 Not the href tag, but just the url part of that tag.

 Here's what I've come up with:

 preg_match_all('/.*href\s*=\s*(\"|\')?(.*?)(\s|\"|\'|)/i', $html,
 $matches);
 foreach($matches[2] as $m) print "P$m\n";

 All regex masters please tell me if I'm missing something. It's working
 well, but I'm still learning about perl regex and I'd like any input if
 at all possible.

Pretty good. Some minor things:
(1) ".*href" will also match a name='foo'h2 example of 
href="hello"/h2

(2) You're pretty lax on the tag syntax - you don't require quotes to 
match, don't require quotes at all etc

I'd rewrite it to
'/\s*a\s*href\s*=\s*("|\')(.*?)\\1\s*/i'

 What's a good way to exclude things like javascript: urls and other non
 URI info? I guess what I'm really looking for is all the http urls, no
 ftp, mms etc... or anything like that.

Use the following regexes on your result to get only the types you want:

$HostName = '([a-zA-Z][\w-]*(\.[a-zA-Z][\w-]*)+)';
$HostIP   = '(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})';
$Host = '(' . $HostName . '|' . $HostIP . ')';
$HTTPPath = '(([\w\.\/~\?%=\-]|amp;)+)';
$FTPPath  = '(\/[^\/\s]*)*\/?';
$Port = '(:\d+)?';
$HTTPURL = 'http:\/\/' . $Host . $Port . $HTTPPath;
$WWWAddress = 'www\.' . $HostName . $Port . $HTTPPath;
$FTPURL = 'ftp:\/\/' . $Host . $FTPPath;

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

Very funny, Scotty! Now beam up my clothes...

--
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] last inserted record

2001-03-08 Thread Christian Reiniger

On Thursday 08 March 2001 10:31, you wrote:

  On Thursday 08 March 2001 06:42, you wrote:
   Assuming that you do have a primary key, how can you grab the last
   record you inserted?  Can you use @@IDENTITY, or something like
   that?
 
  For that I'd add another field - type "timestamp".
  In MySQL, timestamp fields are automatically set to NOW() on each
  insert and update *if* they are not set to something else in it (the
  insert or update)

 I would prefer using mysql_insert_id() if possible.
 http://www.php.net/manual/en/function.mysql-insert-id.php

Which however only works (1) with autoincrement keys and (2) for the last 
insert you did using the same mysql connection, i.e. if you do an insert 
in foo.php, mysql_insert_id () won't show anything in bar.php

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

Very funny, Scotty! Now beam up my clothes...

--
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] Fixed session prob with Netscape

2001-03-08 Thread Robert Fischler, Ph.D. ABD

I fixed the problem I had with Netscape not working well with sessions
(whereas MSIE worked fine for me).  Apparently, Netscape works well with
cookies (and ironically, MSIE doesn't).  Of course, many would probably
disagree, but I'm ONLY speaking from MY recent experience and specifically
on the Mac platform.  So, anyway, my solution was to set both sessions and
cookies at the same time, wherever needed, and do my authentication (etc) by
seeing if either one or the other is set (e.g., if $session = logged or
$cookie = bitten then...).

Hope this helps someone.

Best,
-- 
Robert Fischler, PhD ABD
IUB Campus Manager
CampCampus.com

 From: "Robert Fischler, Ph.D. ABD" [EMAIL PROTECTED]
 Date: Fri, 02 Mar 2001 17:59:52 -0600
 To: [EMAIL PROTECTED]
 Subject: [PHP] Netscape problems with PHP
 
 Hello all (first post for me!):
 
 I've been running into problems when testing PHP scripts on Netscape (when
 MSIE works fine).
 
 First problem (SOLVED) was that Netscape does something funny with the
 $PHP_SELF environmental variable, so I've learned to circumvent the problem
 by just hard-coding the page name instead of relying on the $PHP_SELF trick.
 
 Second problem (UNSOLVED, SO FAR) is that Netscape (...and I'm talking about
 Communicator 4.75 for the Mac, at least) doesn't carry my session variables
 over from page to page.  Has anyone else ran into this problem and found a
 solution?
 
 Thanks!!!
 P.S.   Things seem to work fine in the new Netscape 6, but most Mac users
 are still at 4.75.
 
 -- 
 Robert Fischler, PhD ABD
 IUB Campus Manager
 CampCampus.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] RE: sending SMS messages via PHP

2001-03-08 Thread Greig, Euan

We send SMS messages from Oracle, but the method could be used in php I think. We use 
www.quios.com. They accept SMS messages as XML documents which you simply post to 
their site using http. The response, also by http, is an xml document. It is very easy 
to build your outgoing xml document, and the response document is so simple in 
structure that you could probably get by without an xml parser to interpret it.

HTH

-Original Message-
From: Michael Smith [mailto:[EMAIL PROTECTED]]
Sent: 07 March 2001 17:00
To: [EMAIL PROTECTED]
Subject: sending SMS messages via PHP


I can easily send standard email messages via PHP. Does anyone know how to
send SMS messages?

--
Michael A. Smith [EMAIL PROTECTED]
Director of Data Systems, wcities.com
ICQ: 35884415
:wq


**
Any opinions expressed in this email are those of the individual and 
not necessarily the Company. This email and any files transmitted with 
it, including replies and forwarded copies (which may contain alterations) 
subsequently transmitted from the Company, are confidential and solely for 
the use of the intended recipient. If you are not the intended recipient 
or the person responsible for delivering to the intended recipient, be 
advised that you have received this email in error and that any use is 
strictly prohibited.

**

-- 
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 dll on NT - more reliable with Apache than IIS?

2001-03-08 Thread Greig, Euan

Thanks Lance. The file is there, though I didn't put it there! 

-Original Message-
From: Lance Koh [mailto:[EMAIL PROTECTED]]
Sent: 07 March 2001 14:20
To: Greig, Euan
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] PHP dll on NT - more reliable with Apache than IIS?


did you copy this file "php4ts.dll" into your winnt/system32 folder?

i believe you need that in order for the isapi to work

--lance

- Original Message -
From: "Greig, Euan" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, March 07, 2001 5:44 PM
Subject: [PHP] PHP dll on NT - more reliable with Apache than IIS?


I have been having problems using the PHP 4 ISAPI module with IIS 4 on NT4
(The most common problem is HTTP 500 internal server error which disappears
if page is refreshed). This is apparently not too surprising given the
current status of the ISAPI module. So I have switched to using CGI, which
seems absolutely fine, but is noticeably slower.

I was wondering if it is worth trying the Apache module. Will it be more
reliable? And are there any notable gotchas to watch out for in installing
this combination?

Euan Greig
Technical Consultant
BRANN DATA
[EMAIL PROTECTED]
01285 645997





**
Any opinions expressed in this email are those of the individual and
not necessarily the Company. This email and any files transmitted with
it, including replies and forwarded copies (which may contain alterations)
subsequently transmitted from the Company, are confidential and solely for
the use of the intended recipient. If you are not the intended recipient
or the person responsible for delivering to the intended recipient, be
advised that you have received this email in error and that any use is
strictly prohibited.

**

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





**
Any opinions expressed in this email are those of the individual and 
not necessarily the Company. This email and any files transmitted with 
it, including replies and forwarded copies (which may contain alterations) 
subsequently transmitted from the Company, are confidential and solely for 
the use of the intended recipient. If you are not the intended recipient 
or the person responsible for delivering to the intended recipient, be 
advised that you have received this email in error and that any use is 
strictly prohibited.

**

-- 
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] Max Number of require_once()ed files? [BUG or SPEC?]

2001-03-08 Thread Yasuo Ohgaki
I included definition files using require_once(), I noticed the last
definition file is not included w/o any error messages.

 I tested with include() and require(), it worked fine but not with
require_once() or include_once(). Require_once() and include_once() silently
fails to include files.

I've checked with get_required_files() and get_included_files(), there are
20 files included where it should be 21 files.  It seems 20 files for max
number of include_once()/require_once() is too few. (Usually I don't include
this many files unless I have to)

I think PHP should warn or raise error if it cannot include files.

First of all, is this a spec? If so, I'm fine with this restriction. (More
than 20 included files are too many anyway)

If this is a problem, I would like to know other people have the problem. If
it is the case, I will post new bug report to bug DB. (Searched with require
as keyword in Scripting Engine section, no matched record. Or is this
reported?? or even better will it be fixed in 4.0.5?)

If no one has the same problem, I'm going to update my glibc to see if it
fix other strange PHP behavior also. (I have code that loops as if there is
"goto" statement under my environment.)

OS: RedHat7 (w/o glibc update)
Apache: 1.3.17
PHP: 4.0.4pl1 (module)

Thanks for your info.

--
Yasuo Ohgaki

-- 
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 dll on NT - more reliable with Apache than IIS?

2001-03-08 Thread Greig, Euan

Thanks Paulo, that is very interesting and useful. I will give apache a try.

Euan

-Original Message-
From: Paulo Parola [mailto:[EMAIL PROTECTED]]
Sent: 07 March 2001 20:18
To: [EMAIL PROTECTED]
Subject: Re: [PHP] PHP dll on NT - more reliable with Apache than IIS?


We have started using PHP on NT over Apache, but since our ISP used IIS we
switched to it. Anyway, we just started having real problems after our
application got really big, so that I cannot really compare Apache x IIS on
NT very well (our errors started happening on IIS if I recall correctly).

And you are right, CGI version is much more stable: our application has even
crashed IIS on our ISP (and thus all other clients websites as well went
down...) when running PHP as ISAPI. We asked the ISP to configure PHP as CGI
for our virtual host only, did the same test and got an error but all the
sites still were running fine, ours as well.

I believe you should do some tests over apache, it is really easy to
install. And relating to IIS, CGI is definetly more stable. You could anyway
consider moving to Linux or UNIX. The developers of PHP seem also to be much
more prolific in relation to this world, for obious reasons... But in my
opinion, as a commercial product in a production environment I would say
that PHP over Windows is definetly not the better choice.

Paulo


- Original Message -
From: Greig, Euan [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, March 07, 2001 6:44 AM
Subject: [PHP] PHP dll on NT - more reliable with Apache than IIS?


 I have been having problems using the PHP 4 ISAPI module with IIS 4 on NT4
(The most common problem is HTTP 500 internal server error which disappears
if page is refreshed). This is apparently not too surprising given the
current status of the ISAPI module. So I have switched to using CGI, which
seems absolutely fine, but is noticeably slower.

 I was wondering if it is worth trying the Apache module. Will it be more
reliable? And are there any notable gotchas to watch out for in installing
this combination?

 Euan Greig
 Technical Consultant
 BRANN DATA
 [EMAIL PROTECTED]
 01285 645997





 **
 Any opinions expressed in this email are those of the individual and
 not necessarily the Company. This email and any files transmitted with
 it, including replies and forwarded copies (which may contain alterations)
 subsequently transmitted from the Company, are confidential and solely for
 the use of the intended recipient. If you are not the intended recipient
 or the person responsible for delivering to the intended recipient, be
 advised that you have received this email in error and that any use is
 strictly prohibited.

 **

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





**
Any opinions expressed in this email are those of the individual and 
not necessarily the Company. This email and any files transmitted with 
it, including replies and forwarded copies (which may contain alterations) 
subsequently transmitted from the Company, are confidential and solely for 
the use of the intended recipient. If you are not the intended recipient 
or the person responsible for delivering to the intended recipient, be 
advised that you have received this email in error and that any use is 
strictly prohibited.

**

-- 
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] Sessions, and timeout

2001-03-08 Thread Bård Farstad

Hi all,

I have a timeout problem with sessions. I use the PHP session handling 
(4.0.4pl1). It works, but it times to fast out. 

I've set:
ini_alter("session.gc_maxlifetime", "172800");

and

phpinfo() says:
session.cache_expire: local=172800, global=180
session.gc_maxlifetime: local=172800, global=1440

It times out really quick, mabye 10-20 minutes.

Any hints on why that might be?

I used to just use cookies, but I want the url backup system of PHP.


Also the setting in phpinfo():
url_rewriter.tags : a=href,area=href,frame=src,form=fakeentry

Is it possible to have a variable other that the PHPSESSION variable be 
appended to the URL automatically. I.e. I want to use cookies, but if cookies 
are not accepted then I want to use url variables? And I really don't need 
the session functionality cause I handle that myself.. (timeout etc.)

That is just use the feature PHP has to append variables to links and forms. 
To use it as a cookie backup system, without using PHP sessions..

So I want a variable MyVAR which is appended to urls and forms automatically 
( trans-sid is enabled ). 

If I can do that I also need to know how I can check if cookies are accepted 
or not, so I can append the variables only if cookies are not accepted.

( Using redhat linux 6.2 with the latest PHP version, 4.0.4pl1 )

Cheers,

-- 
Brd Farstad
Systems developer
ez.no | developer.ez.no | zez.org

-- 
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: explode question

2001-03-08 Thread Tim Ward

in what way did the previous responses not answer this?

if you really want a loop then foreach($arrLoginName as $element) or for($x
= 0; $x  sizeof($arrLoginName); $x++) will do, but why not just use
if(in_array())? Are you really holding all of your user names in a single
"@" delimited string?

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: Rol [mailto:[EMAIL PROTECTED]]
 Sent: 07 March 2001 19:09
 To: [EMAIL PROTECTED]
 Subject: explode question
 
 
 Hello again,
 
 I'd better explain better.
 
 I have logon screen Header("WWW-Authenticate: Basic 
 realm=\"whatever\"");
 where I would like the compare the user name $PHP_AUTH_USER 
 with the one in
 my database
 All names  like Mike or mike are @ seperated strings
 
 How can I check the names from this array $arrLoginName = explode("@",
 $row-usr_loginName)
 
 and return true if  a name in the var $arrLoginName == $PHP_AUTH_USER
 
 How can I construct a loop which stops and returns true if a 
 match is found?
 
 Any hints would be great.
 
 Many thanks
 
 Roland
 
 
 
 

-- 
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] Sessions, and timeout

2001-03-08 Thread Yasuo Ohgaki

I guess your clients PC's clock is not accurate. How about set timeout to 0?
Then session cookie will not timeout until browser is closed.

You can compile PHP with trans-sid to add session id automatically.
http://www.php.net/manual/en/ref.session.php

I've posted PHP session helper HTML file that checks JavaScript and cookie
is enabled. You can find at
http://www.zend.com/codex.php?id=458single=1

Regards,

Yasuo Ohgaki

 Hi all,

 I have a timeout problem with sessions. I use the PHP session handling
 (4.0.4pl1). It works, but it times to fast out.

 I've set:
 ini_alter("session.gc_maxlifetime", "172800");

 and

 phpinfo() says:
 session.cache_expire: local=172800, global=180
 session.gc_maxlifetime: local=172800, global=1440

 It times out really quick, mabye 10-20 minutes.

 Any hints on why that might be?

 I used to just use cookies, but I want the url backup system of PHP.


 Also the setting in phpinfo():
 url_rewriter.tags : a=href,area=href,frame=src,form=fakeentry

 Is it possible to have a variable other that the PHPSESSION variable be
 appended to the URL automatically. I.e. I want to use cookies, but if
cookies
 are not accepted then I want to use url variables? And I really don't need
 the session functionality cause I handle that myself.. (timeout etc.)

 That is just use the feature PHP has to append variables to links and
forms.
 To use it as a cookie backup system, without using PHP sessions..

 So I want a variable MyVAR which is appended to urls and forms
automatically
 ( trans-sid is enabled ).

 If I can do that I also need to know how I can check if cookies are
accepted
 or not, so I can append the variables only if cookies are not accepted.

 ( Using redhat linux 6.2 with the latest PHP version, 4.0.4pl1 )

 Cheers,

 --
 Brd Farstad
 Systems developer
 ez.no | developer.ez.no | zez.org

 --
 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: Value of if(isset(X)) problem

2001-03-08 Thread Tim Ward

I honestly can't remember when and where I found this happening, but since
then I've decided not to rely on submit buttons being posted so I haven't
seen them working or not working.

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: Johnson, Kirk [mailto:[EMAIL PROTECTED]]
 Sent: 07 March 2001 17:46
 To: '[EMAIL PROTECTED]'
 Subject: RE: [PHP] RE: Value of if(isset(X)) problem
 
 
 Tim, I just tried this in IE 5.0, and the submit button 
 name-value pair was
 posted along with the other form variables, even though I 
 submitted the form
 by hitting return on another field. Is the behavior you 
 described specific
 to a certain browser version?
 
 Kirk
 
 -Original Message-
 From: Tim Ward [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, March 07, 2001 7:48 AM
 To: 'Martin Skjöldebrand'; [EMAIL PROTECTED]
 Subject: [PHP] RE: Value of if(isset(X)) problem
 
 
 I think you'll find that cmdFinish is only passed through if 
 the form is
 submitted by pressing the button. Hitting return on any other 
 field will
 submit the form without sending cmdFinish.
 
 
  -Original Message-
  From: Martin Skjöldebrand [mailto:[EMAIL PROTECTED]]
  Sent: 07 March 2001 05:34
  To: [EMAIL PROTECTED]
  Subject: Value of if(isset(X)) problem
 
input type="submit" value="Modify client" name="cmdFinish"
 

--
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] Sessions, and timeout

2001-03-08 Thread Bård Farstad

On Thursday 08 March 2001 11:14, Yasuo Ohgaki wrote:
 I guess your clients PC's clock is not accurate. How about set timeout to
 0? Then session cookie will not timeout until browser is closed.

Actually the server and client clock only differs with about 1 minute.

The 0 timeout will not work. I want the session to be remember for several 
days, I had no problems with pure cookies while doing this.

The timeout value that PHP reports suggests that the timeout should be 
several days.. but it does not seem to work.

 You can compile PHP with trans-sid to add session id automatically.
 http://www.php.net/manual/en/ref.session.php

I have that and PHP does append the PHPSESSID variable to urls. Works great. 

My question is: can I manually tell PHP to append e.g. MyVAR=foo to all URL's 
and forms.

BTW: if you use header( "Location: ..." ); to redirect PHP does not append 
the session id to the header information (cookie less that is). You have to 
append it to the Location manually. ( Bug in PHP )

 I've posted PHP session helper HTML file that checks JavaScript and cookie
 is enabled. You can find at
 http://www.zend.com/codex.php?id=458single=1

I'll check, but I prefer not using javascript.

cheers,


-- 
Brd Farstad
Systems developer
ez.no | developer.ez.no | zez.org

-- 
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-CVS] cvs: php4 /ext/midgard article.c mgd_session.h session.c session.sql

2001-03-08 Thread David Guerizec

davidg  Thu Mar  8 02:25:15 2001 EDT

  Added files: 
/php4/ext/midgard   session.c mgd_session.h session.sql 

  Modified files:  
/php4/ext/midgard   article.c 
  Log:
  Session management (experimental code)
  
  
Index: php4/ext/midgard/article.c
diff -u php4/ext/midgard/article.c:1.11 php4/ext/midgard/article.c:1.12
--- php4/ext/midgard/article.c:1.11 Tue Mar  6 02:35:02 2001
+++ php4/ext/midgard/article.c  Thu Mar  8 02:25:15 2001
@@ -1,4 +1,4 @@
-/* $Id: article.c,v 1.11 2001/03/06 10:35:02 emile Exp $
+/* $Id: article.c,v 1.12 2001/03/08 10:25:15 davidg Exp $
 Copyright (C) 1999 Jukka Zitting [EMAIL PROTECTED]
 Copyright (C) 2000 The Midgard Project ry
 Copyright (C) 2000 Emile Heyns, Aurora SA [EMAIL PROTECTED]
@@ -770,7 +770,7 @@
 
 MGD_FUNCTION(bool, update_article, (int id, int topic, string name,
string title, 
string abstract,
-   string 
content, string author,
+   string 
+content, int author,
string url, 
string calstart,
int caldays, 
int icon, int view,
int print, 
string extra1, string extra2,

Index: php4/ext/midgard/session.c
+++ php4/ext/midgard/session.c
/* $Id: session.c,v 1.1 2001/03/08 10:25:15 davidg Exp $
Copyright (C) 1999 Jukka Zitting [EMAIL PROTECTED]
Copyright (C) 2000 The Midgard Project ry
Copyright (C) 2001 David Guerizec, Aurora SA [EMAIL PROTECTED]

This program is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
by the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*/

#include "php_midgard.h"

#if HAVE_MIDGARD
#if HAVE_MIDGARD_SESSION
#include "php.h"


#include "../session/php_session.h"
#include "mgd_session.h"

#define GET_MGD midgard * mgd = mgd_handle();

typedef struct {
int id;
int ready;
} ps_midgard;

ps_module ps_mod_midgard = {
PS_MOD(midgard)
};

static int ps_midgard_valid_key(const char *key)
{
size_t len;
const char *p;
char c;
int ret = 1;

for (p = key; (c = *p); p++) {
/* valid characters are a..z,A..Z,0..9 */
if (!((c = 'a'  c = 'z') ||
(c = 'A'  c = 'Z') ||
(c = '0'  c = '9'))) {
ret = 0;
break;
}
}

len = p - key;

if (len == 0)
ret = 0;

return ret;
}

static int ps_midgard_write(ps_midgard * data, const char * key, const char * val)
{
GET_MGD;

if(!data-ready)
return FAILURE;
if(data-id) {
if(mgd_update(mgd, "session", data-id, 
"sess_data='$s', "
"expire=UNIX_TIMESTAMP() + 3600, "
"changed=UNIX_TIMESTAMP()",
val))
return SUCCESS;
assert(0);
} else {
if((data-id = mgd_create(mgd, "session",
"sess_key, sess_data, person, expire, 
changed",
"$q, $q, $d, UNIX_TIMESTAMP() + 3600, 
UNIX_TIMESTAMP()",
key, val, mgd_user(mgd
return SUCCESS;
assert(0);
}
return FAILURE;
}

static void ps_midgard_open(ps_midgard *data, const char *key)
{
GET_MGD;

if(data-id) {
php_error(E_WARNING, "Called twice ??");
}

data-id = 0;
if(!mgd) {
php_error(E_WARNING, "Midgard is not ready yet for session management,"
" please come back later...");
return;
}
if(!ps_midgard_valid_key(key))
return;

data-id = mgd_exists_id(mgd, "session", 
"sess_key=$q AND 

Re: [PHP] Sessions, and timeout

2001-03-08 Thread Yasuo Ohgaki

 On Thursday 08 March 2001 11:14, Yasuo Ohgaki wrote:
  I guess your clients PC's clock is not accurate. How about set timeout
to
  0? Then session cookie will not timeout until browser is closed.

 Actually the server and client clock only differs with about 1 minute.

Then how about check the server's response headers that sent to client? You
can view headers using wget or like. PHP might be sending global ini
var(which is set to small number) to client for some reason.


 The 0 timeout will not work. I want the session to be remember for several
 days, I had no problems with pure cookies while doing this.

It might be browser specific problem, if server is sending correct headers.
Is it happen all browsers you have? or just a few of them?

 The timeout value that PHP reports suggests that the timeout should be
 several days.. but it does not seem to work.

  You can compile PHP with trans-sid to add session id automatically.
  http://www.php.net/manual/en/ref.session.php

 I have that and PHP does append the PHPSESSID variable to urls. Works
great.

 My question is: can I manually tell PHP to append e.g. MyVAR=foo to all
URL's
 and forms.

Do you mean just like trans-sid? I think you cannot as far as I know. PHP
Programmers/HTML designer have to write code manually to add query string.
Anyone??


 BTW: if you use header( "Location: ..." ); to redirect PHP does not append
 the session id to the header information (cookie less that is). You have
to
 append it to the Location manually. ( Bug in PHP )

  I've posted PHP session helper HTML file that checks JavaScript and
cookie
  is enabled. You can find at
  http://www.zend.com/codex.php?id=458single=1

 I'll check, but I prefer not using javascript.

You also can find very simple PHP code to check cookie is enabled or not at
code exchange.

Regards,
Yasuo Ohgaki



-- 
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 Digest 8 Mar 2001 11:43:55 -0000 Issue 554

2001-03-08 Thread php-general-digest-help


php-general Digest 8 Mar 2001 11:43:55 - Issue 554

Topics (messages 42959 through 43025):

Re: on the list yesterday regarding mysql time
42959 by: Jerry Lake
42960 by: John Huggins
42967 by: Jerry Lake

Oracle Function Calls
42961 by: Richard S. Crawford

Re: are sessions single threaded?
42962 by: Bill Rausch

String indexing with braces
42963 by: Toby Butzon
42979 by: php3.developersdesk.com

do..while(0) not staying true
42964 by: David Minor
42966 by: Jim Winstead
42971 by: ..s.c.o.t.t.. [gts]

database
42965 by: Pat

Dynamic Links..
42968 by: Ashwin Kutty
42972 by: Richard S. Crawford

Re: exec as another user
42969 by: Jon Snell
42970 by: Jason Brooke
42973 by: Henrik Hansen

Microtime math and display
42974 by: Todd Cary
42981 by: Chris Lee

populate select box with contents of a file?
42975 by: Jerry Lake
42976 by: Andrew Halliday
42977 by: David Robley
42978 by: Sean R. Bright

ldap_search()
42980 by: Mike Tuller
43009 by: Nick Talbott

php vs php3 weirdness
42982 by: Darren Ward

Problems with dynamic HTML tables on large pages
42983 by: Eric Nielsen

Announcement: Smarty template engine 1.3.1 released
42984 by: Monte Ohrt

Error in www.php.net (To site admin)
42985 by: Yasuo Ohgaki

new php.net look
42986 by: Michael Kimsal
42990 by: Jason Murray

Re: Auto Prepend/Append
42987 by: chris.improbable.org

mysql_fetch_array()
42988 by: Deependra B. Tandukar
42991 by: Tyler Longren
42992 by: David Robley

Oracle CLOB and PHP
42989 by: Bob Kakalec

Twin Cities User Group
42993 by: Chris Moewes-Bystrom

The coolest function in the world
42994 by: Thomas Deliduka

News Server (news.php.net)
42995 by: Yasuo Ohgaki
42996 by: Philip Olson
42997 by: David Robley

Changing urls
42998 by: Todd Heim

File uploads cease to function
42999 by: Cody Caughlan

Re: last inserted record
43000 by: John Meyer
43010 by: Christian Reiniger
43012 by: Soeren Staun-Pedersen
43014 by: Christian Reiniger

test - can someone please reply?
43001 by: matth.usaexpress.net
43002 by: David Robley
43003 by: David Robley
43004 by: Maxim Maletsky
43005 by: Jacky.lilst

to however designed PHP.NET - che.e.e.e.ers!
43006 by: Maxim Maletsky

Regex Masters: Please inspect this regex- Pulling urls out of page
43007 by: Matt Friedman
43013 by: Christian Reiniger

Re: [PHP-QA] Error in www.php.net (To site admin)
43008 by: Zak Greant

Re: parsing html / xml (more)
43011 by: Bruin, Bolke de

Fixed session prob with Netscape
43015 by: Robert Fischler, Ph.D. ABD

Re: sending SMS messages via PHP
43016 by: Greig, Euan

Re: PHP dll on NT - more reliable with Apache than IIS?
43017 by: Greig, Euan
43019 by: Greig, Euan

Max Number of require_once()ed files? [BUG or SPEC?]
43018 by: Yasuo Ohgaki

Sessions, and timeout
43020 by: Bård Farstad
43022 by: Yasuo Ohgaki
43024 by: Bård Farstad
43025 by: Yasuo Ohgaki

Re: explode question
43021 by: Tim Ward

Re: Value of if(isset(X)) problem
43023 by: Tim Ward

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]


--



never mind anything below my signature
I forgot to erase it, damn non-thread
capable email...

Jerry Lake- [EMAIL PROTECTED]
Web Designer
Europa Communications - http://www.europa.com
Pacifier Online - http://www.pacifier.com





Forget about the PHP functions and do this:

$query  = "INSERT INTO tablename ";
$query .= "SET field1 = '$field1', ";
$query .= "field2 = '$field2', ";
$query .= "datesubmitted = NOW();

Let MySQL simply do this for you with the NOW() SQL command.

 -Original Message-
 From: Jerry Lake [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, March 07, 2001 5:41 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] on the list yesterday regarding mysql time
 
 
 I know this was on the list yesterday,
 but I for some reason erased it.
 
 I have an online form that I would like
 to have record the time submitted and
 recorded into a MySQL date field, how
 the hell do I use the date and mktime
 functions to make the date compatible
 with the MySQL -00-00 format?
 
 Jerry Lake- [EMAIL PROTECTED]
 Web Designer
 Europa Communications - http://www.europa.com
 Pacifier Online   - http://www.pacifier.com
 
 
 -Original Message-
 From: george [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, March 07, 

[PHP-CVS] cvs: php4 /ext/midgard README.session config.m4.session session.modules.c

2001-03-08 Thread David Guerizec

davidg  Thu Mar  8 02:39:32 2001 EDT

  Added files: 
/php4/ext/midgard   session.modules.c README.session 
config.m4.session 
  Log:
  More on session installation.
  
  

Index: php4/ext/midgard/session.modules.c
+++ php4/ext/midgard/session.modules.c
/*
 * To add a PHP session module, #include its header file and 
 * add a ps_xxx_ptr in the struct...
 */

#include "mod_files.h"
#include "mod_mm.h"
#include "mod_user.h"
#if HAVE_MIDGARD_SESSION
#include "../midgard/mgd_session.h"
#endif

static ps_module *ps_modules[] = {
ps_files_ptr,
ps_mm_ptr,
ps_user_ptr,
#if HAVE_MIDGARD_SESSION
ps_midgard_ptr,
#endif
};


Index: php4/ext/midgard/README.session
+++ php4/ext/midgard/README.session
To enable the session management:

- add session.c in the Makefile.in to the LTLIBRARY_SOURCES:
LTLIBRARY_SOURCES = mgd_errno.c midgard.c article.c \
parameter.c attachment.c oop.c \
topic.c element.c mail.c \
group.c file.c host.c image.c member.c \
calendar.c event.c eventmember.c page.c \
pageelement.c pagelink.c person.c \
preferences.c snippet.c \
snippetdir.c style.c sitegroup.c \
preparser-parser.c preparser-scanner.c \
preparser.c session.c


- copy config.m4.session over config.m4

- copy session.modules.c over ext/session/modules.c

Then run:
$ phpize
$ ./configure --with-midgard[=/path/to/midgard] --enable-mgd-session
$ make
# make install

Then edit your php.ini:
session.save_handler = midgard
session.auto_start   = 0

Restart apache.

To test it, insert in a Midgard page the following code:
--8--
?php
session_register ("count");
$count++;
?

Hello visitor, you have seen this page (count); times.p

php?
# the ?=SID? is necessary to preserve the session id
# in the case that the user has disabled cookies
?

To continue, A HREF="(midgard.uri);??=SID?"click here/A
--8--


Index: php4/ext/midgard/config.m4.session
+++ php4/ext/midgard/config.m4.session
dnl $Id: config.m4.session,v 1.1 2001/03/08 10:39:31 davidg Exp $

dnl  Copyright (C) 1999 Jukka Zitting [EMAIL PROTECTED]
dnl  Copyright (C) 2000 The Midgard Project ry
dnl  Copyright (C) 2000 Emile Heyns, Aurora SA [EMAIL PROTECTED]
dnl 
dnl  This program is free software; you can redistribute it and/or modify it
dnl  under the terms of the GNU Lesser General Public License as published
dnl  by the Free Software Foundation; either version 2 of the License, or
dnl  (at your option) any later version.
dnl 
dnl  This program is distributed in the hope that it will be useful,
dnl  but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
dnl  GNU General Public License for more details.
dnl 
dnl  You should have received a copy of the GNU General Public License
dnl  along with this program; if not, write to the Free Software
dnl  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

AC_PROG_YACC
AC_DECL_YYTEXT
AC_PROG_LEX

PHP_ARG_WITH(midgard, for midgard support,
[  --with-midgard  Include midgard 1.4 support])

if test "$PHP_MIDGARD" != "no"; then
  if test "$PHP_MIDGARD" != "yes"; then
AC_ADD_LIBRARY_WITH_PATH(midgard, "$PHP_MIDGARD/lib", MIDGARD_SHARED_LIBADD)
AC_ADD_INCLUDE("$PHP_MIDGARD/include")
  else
AC_ADD_LIBRARY(midgard)
  fi
  AC_DEFINE(HAVE_MIDGARD, 1, [ ])
  PHP_EXTENSION(midgard, $ext_shared)

dnl EEH/TODO: Add checks for apache-static compilation
  AC_PATH_PROG(APXS, apxs)
  if test -z $APXS; then
AC_MSG_ERROR(apxs not found.)
  fi
  APACHE_INCLUDES=`$APXS -q INCLUDEDIR`
  AC_ADD_INCLUDE($APACHE_INCLUDES)
  
  AC_PATH_PROG(GLIBCONFIG, glib-config)
  dnl Ackackack... why do people do this?
  if test -z $GLIBCONFIG; then
AC_PATH_PROG(GLIBCONFIG, glib12-config)
  fi
  if test -z $GLIBCONFIG; then
AC_MSG_ERROR(glib-config not found. Did you install glib?)
  fi
  CFLAGS="$CFLAGS "`$GLIBCONFIG --cflags`
  LIBS="$LIBS "`$GLIBCONFIG --libs`
  LFLAGS="$LFLAGS -Pmgd -olex.yy.c"
  
  PHP_SUBST(GLIBCONFIG)

  AC_MSG_CHECKING(for midgard experimental functions support)
  AC_ARG_ENABLE(mgd-experimental, 
  [  --enable-mgd-experimental  Enable midgard 1.4.1 experimental functions 
support], PHP_MIDGARD_EXPERIMENTAL=[$]enableval, PHP_MIDGARD_EXPERIMENTAL="no")
  echo "$PHP_MIDGARD_EXPERIMENTAL";
  if test "$PHP_MIDGARD_EXPERIMENTAL" != "no"; then
AC_DEFINE(YOU_WANT_TO_TEST, 1, [ ])
  fi

  AC_MSG_CHECKING(for midgard [experimental] session support)
  AC_ARG_ENABLE(mgd-session, 
  [  --enable-mgd-session  Enable midgard 1.4.1 [experimental] session 
support], PHP_MIDGARD_SESSION=[$]enableval, PHP_MIDGARD_SESSION="no")
  echo 

[PHP-CVS] cvs: php4 /ext/midgard README.session

2001-03-08 Thread David Guerizec

davidg  Thu Mar  8 02:42:33 2001 EDT

  Modified files:  
/php4/ext/midgard   README.session 
  Log:
  Corrected the README.session
  
  
Index: php4/ext/midgard/README.session
diff -u php4/ext/midgard/README.session:1.1 php4/ext/midgard/README.session:1.2
--- php4/ext/midgard/README.session:1.1 Thu Mar  8 02:39:31 2001
+++ php4/ext/midgard/README.session Thu Mar  8 02:42:29 2001
@@ -17,9 +17,10 @@
 
 - copy session.modules.c over ext/session/modules.c
 
-Then run:
-$ phpize
-$ ./configure --with-midgard[=/path/to/midgard] --enable-mgd-session
+Then you have to compile PHP4 with Midgard:
+cd ../../ # cd to top directory of PHP sources
+$ ./buildconf
+$ ./configure --with-apxs --with-midgard[=/path/to/midgard] --enable-mgd-session 
+--with-whatever-options
 $ make
 # make install
 



-- 
PHP CVS 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-CVS] cvs: php4 /ext/midgard README.session

2001-03-08 Thread David Guerizec

davidg  Thu Mar  8 02:44:27 2001 EDT

  Modified files:  
/php4/ext/midgard   README.session 
  Log:
  Forgot to talk about the session table
  
  
Index: php4/ext/midgard/README.session
diff -u php4/ext/midgard/README.session:1.2 php4/ext/midgard/README.session:1.3
--- php4/ext/midgard/README.session:1.2 Thu Mar  8 02:42:29 2001
+++ php4/ext/midgard/README.session Thu Mar  8 02:44:27 2001
@@ -1,5 +1,8 @@
 To enable the session management:
 
+- create the session table in Midgard DB:
+$ mysql -u midgard -p midgard  session.sql
+
 - add session.c in the Makefile.in to the LTLIBRARY_SOURCES:
 LTLIBRARY_SOURCES = mgd_errno.c midgard.c article.c \
 parameter.c attachment.c oop.c \



-- 
PHP CVS 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-CVS] cvs: php4 /ext/midgard config.m4

2001-03-08 Thread David Guerizec

davidg  Thu Mar  8 02:49:18 2001 EDT

  Modified files:  
/php4/ext/midgard   config.m4 
  Log:
  Midgard experimental functions support was not displayed correctly in ./configure
  
  
Index: php4/ext/midgard/config.m4
diff -u php4/ext/midgard/config.m4:1.10 php4/ext/midgard/config.m4:1.11
--- php4/ext/midgard/config.m4:1.10 Fri Feb 23 15:14:42 2001
+++ php4/ext/midgard/config.m4  Thu Mar  8 02:49:18 2001
@@ -1,4 +1,4 @@
-dnl $Id: config.m4,v 1.10 2001/02/23 23:14:42 davidg Exp $
+dnl $Id: config.m4,v 1.11 2001/03/08 10:49:18 davidg Exp $
 
 dnl  Copyright (C) 1999 Jukka Zitting [EMAIL PROTECTED]
 dnl  Copyright (C) 2000 The Midgard Project ry
@@ -61,7 +61,7 @@
   AC_ARG_ENABLE(mgd-experimental, 
   [  --enable-mgd-experimental  Enable midgard 1.4.1 experimental functions 
support], PHP_MIDGARD_EXPERIMENTAL=[$]enableval, PHP_MIDGARD_EXPERIMENTAL="no")
   echo "$PHP_MIDGARD_EXPERIMENTAL";
-  if test "$PHP_MIDGARD_EXPERIMENTAL" = "yes"; then
+  if test "$PHP_MIDGARD_EXPERIMENTAL" != "no"; then
 AC_DEFINE(YOU_WANT_TO_TEST, 1, [ ])
   fi
 fi



-- 
PHP CVS 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-CVS] cvs: php4 /win32 README.txt

2001-03-08 Thread David Croft


shouldn't that be php-windows-subscribe?


On Thu, 8 Mar 2001, Zeev Suraski wrote:

 zeev  Thu Mar  8 02:43:52 2001 EDT

   Modified files:
 /php4/win32   README.txt
   Log:
   Point people to the Windows mailing list...


 Index: php4/win32/README.txt
 diff -u php4/win32/README.txt:1.4 php4/win32/README.txt:1.5
 --- php4/win32/README.txt:1.4 Fri Jul 14 12:42:59 2000
 +++ php4/win32/README.txt Thu Mar  8 02:43:52 2001
 @@ -31,6 +31,14 @@
  http://download.microsoft.com/msdownload/dcom/95/x86/en/dcom95.exe


 +Support
 +---
 +
 +For questions and help with PHP under Windows, your best bet would be the
 +PHP-Windows mailing list ([EMAIL PROTECTED]).  To subscribe, send
 +an empty message to [EMAIL PROTECTED]
 +
 +
  Installation
  




 --
 PHP CVS 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 CVS 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-CVS] cvs: php4 /win32 README.txt

2001-03-08 Thread Zeev Suraski

zeevThu Mar  8 03:21:18 2001 EDT

  Modified files:  
/php4/win32 README.txt 
  Log:
  
  
  
Index: php4/win32/README.txt
diff -u php4/win32/README.txt:1.5 php4/win32/README.txt:1.6
--- php4/win32/README.txt:1.5   Thu Mar  8 02:43:52 2001
+++ php4/win32/README.txt   Thu Mar  8 03:21:18 2001
@@ -36,7 +36,7 @@
 
 For questions and help with PHP under Windows, your best bet would be the
 PHP-Windows mailing list ([EMAIL PROTECTED]).  To subscribe, send
-an empty message to [EMAIL PROTECTED]
+an empty message to [EMAIL PROTECTED]
 
 
 Installation



-- 
PHP CVS 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-CVS] cvs: php4 /win32 README.txt

2001-03-08 Thread Zeev Suraski

Yep :)

At 13:10 8/3/2001, David Croft wrote:

shouldn't that be php-windows-subscribe?


On Thu, 8 Mar 2001, Zeev Suraski wrote:

  zeev  Thu Mar  8 02:43:52 2001 EDT
 
Modified files:
  /php4/win32   README.txt
Log:
Point people to the Windows mailing list...
 
 
  Index: php4/win32/README.txt
  diff -u php4/win32/README.txt:1.4 php4/win32/README.txt:1.5
  --- php4/win32/README.txt:1.4 Fri Jul 14 12:42:59 2000
  +++ php4/win32/README.txt Thu Mar  8 02:43:52 2001
  @@ -31,6 +31,14 @@
   http://download.microsoft.com/msdownload/dcom/95/x86/en/dcom95.exe
 
 
  +Support
  +---
  +
  +For questions and help with PHP under Windows, your best bet would be the
  +PHP-Windows mailing list ([EMAIL PROTECTED]).  To subscribe, send
  +an empty message to [EMAIL PROTECTED]
  +
  +
   Installation
   
 
 
 
 
  --
  PHP CVS 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]
 
 

--
Zeev Suraski [EMAIL PROTECTED]
CTO   co-founder, Zend Technologies Ltd. http://www.zend.com/


-- 
PHP CVS 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-CVS] cvs: php4 /pear/Cache Container.php Output.php /pear/Cache/Container db.php file.php phplib.php

2001-03-08 Thread Christian Stocker

chregu  Thu Mar  8 03:57:16 2001 EDT

  Modified files:  
/php4/pear/CacheContainer.php Output.php 
/php4/pear/Cache/Container  db.php file.php phplib.php 
  Log:
  Introduced getExpiresAbsolute($expire) function, which translates 
  relative/human readable/unixtime expire-times in unixtime-format.
  
  
Index: php4/pear/Cache/Container.php
diff -u php4/pear/Cache/Container.php:1.6 php4/pear/Cache/Container.php:1.7
--- php4/pear/Cache/Container.php:1.6   Tue Mar  6 07:27:30 2001
+++ php4/pear/Cache/Container.php   Thu Mar  8 03:57:15 2001
@@ -14,9 +14,10 @@
 // +--+
 // | Authors: Ulf Wendel [EMAIL PROTECTED]   |
 // |  Sebastian Bergmann [EMAIL PROTECTED]   |
+// |  Christian Stocker [EMAIL PROTECTED] |
 // +--+
 //
-// $Id: Container.php,v 1.6 2001/03/06 15:27:30 sbergmann Exp $
+// $Id: Container.php,v 1.7 2001/03/08 11:57:15 chregu Exp $
 
 /**
 * Common base class of all cache storage container.
@@ -36,7 +37,7 @@
 * not recommended!
 * 
 * @author   Ulf Wendel [EMAIL PROTECTED]
-* @version  $Id: Container.php,v 1.6 2001/03/06 15:27:30 sbergmann Exp $
+* @version  $Id: Container.php,v 1.7 2001/03/08 11:57:15 chregu Exp $
 * @package  Cache
 * @access   public
 * @abstract
@@ -372,5 +373,47 @@
 else
 return unserialize($data);
 } // end func decode
+
+/**
+* Translates human readable/relative times in unixtime
+*
+* @var  mixed   can be in the following formats:
+*   human readable  : mmddhhmm[ss]] eg: 20010308095100
+*   relative in seconds (1) : +xx  eg: +10
+*   relative in seconds (2) : x   946681200   eg: 10
+*   absolute unixtime   : x  2147483648   eg: 2147483648
+*   see comments in code for details
+*/
+
+function getExpiresAbsolute($expires)
+
+{
+if (!$expires)
+return 0;
+//for api-compatibility, one has not to provide a "+",
+// if integer is  946681200 (= Jan 01 2000 00:00:00)
+if ('+' == $expires[0] || $expires  946681200)
+{
+return(time() + $expires);
+}
+//if integer is  1000 (= in 3140 years),
+// it must be an absolut unixtime
+// (since the "human readable" definition asks for a higher number)
+elseif ($expires  1000)
+{
+return $expires;
+}
+// else it's "human readable";
+else
+{
+$year = substr($expires, 0, 4);
+$month = substr($expires, 4, 2);
+$day = substr($expires, 6, 2);
+$hour = substr($expires, 8, 2);
+$minute = substr($expires, 10, 2);
+$second = substr($expires, 12, 2);
+return mktime($hour, $minute, $second, $month, $day, $year);
+}
+}
 }
 ?
Index: php4/pear/Cache/Output.php
diff -u php4/pear/Cache/Output.php:1.9 php4/pear/Cache/Output.php:1.10
--- php4/pear/Cache/Output.php:1.9  Tue Mar  6 07:27:30 2001
+++ php4/pear/Cache/Output.php  Thu Mar  8 03:57:15 2001
@@ -17,7 +17,7 @@
 // |  Vinai Kopp [EMAIL PROTECTED]   |
 // +--+
 //
-// $Id: Output.php,v 1.9 2001/03/06 15:27:30 sbergmann Exp $
+// $Id: Output.php,v 1.10 2001/03/08 11:57:15 chregu Exp $
 
 require_once 'Cache.php';
 
@@ -129,11 +129,11 @@
 /*
 * Stores the content of the output buffer into the cache and returns the content.
 *
-* @paraminteger lifetime of the cached data in seconds - 0 for endless
+* @parammixed   lifetime of the cached data in seconds - 0 for endless. More 
+formats available. see Container::getExpiresAbsolute()
 * @paramstring  additional userdefined data
 * @return   string  cached output
 * @access   public
-* @see  endPrint(), endGet()
+* @see  endPrint(), endGet(), Container::getExpiresAbsolute()
 */
 function end($expire = 0, $userdata = "") {
 $content = ob_get_contents();
Index: php4/pear/Cache/Container/db.php
diff -u php4/pear/Cache/Container/db.php:1.7 php4/pear/Cache/Container/db.php:1.8
--- php4/pear/Cache/Container/db.php:1.7Tue Mar  6 07:27:30 2001
+++ php4/pear/Cache/Container/db.phpThu Mar  8 03:57:16 2001
@@ -17,7 +17,7 @@
 // |  Chuck Hagenbuch [EMAIL PROTECTED]   |
 // +--+
 //
-// $Id: db.php,v 1.7 2001/03/06 15:27:30 sbergmann Exp $
+// $Id: db.php,v 1.8 2001/03/08 11:57:16 chregu Exp $
 
 require_once 'DB.php';
 require_once 'Cache/Container.php';
@@ -52,7 +52,7 @@
 * )
 *
 * @author   Sebastian Bergmann [EMAIL 

[PHP] PHP Site - New Design

2001-03-08 Thread Miles Thompson

Wow - it is much faster, good job, although the previous version was 
wonderfully exotic. Loved the popups for Quick Reference and Mirror Sites.

I would like to see one backward step --- ability to resize the font. In 
Netscape 4.7 and Internet Explorer 5 changing the font size doesn't work. 
In fact, this is really a utility site, so I'd like to see most 
"designerish" elements pushed to the back, as I believe they have been.

I can resize the displayed fonts in Netscape 6, but I don't usually run 
that browser.

So - is this a site designed from the "This is  the way the web is going?" 
point of view? Or did someone simply forget us old (50+) guys with bifocals?

Anyone tried it with Amaya?

Miles Thompson


-- 
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-CVS] cvs: php4 /pear/Cache Container.php Output.php/pear/Cache/Container db.php file.php phplib.php

2001-03-08 Thread Sebastian Bergmann

Christian Stocker wrote:
 chregu  Thu Mar  8 03:57:16 2001 EDT
 
   Modified files:
 /php4/pear/CacheContainer.php Output.php
 /php4/pear/Cache/Container  db.php file.php phplib.php
   Log:
   Introduced getExpiresAbsolute($expire) function, which translates
   relative/human readable/unixtime expire-times in unixtime-format.

  Could some kind soul have a look at the cvs commit mail script and let it
send commit mails regarding PEAR/ to the new pear-cvs mailing list?

  Thanks,
Sebastian

-- 
 sebastian bergmann e-mail :  [EMAIL PROTECTED]
  homepage :  http://www.sebastian-bergmann.de
   make a gift : http://wishlist.sebastian-bergmann.de
 measure the usability of your web application - http://phpOpenTracker.de

-- 
PHP CVS 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-ES] (roberto celestino)MCAL! set-up.

2001-03-08 Thread Celestino Roberto Alejandro

Dear's partners...
 I download the source of the Mcal library and Drivers, and i have found a
doubt, because when i compile it, ever,  show an error  that can't give me
compile, then, i cant have correctly installed this library...
..I make the SF (structure of files), that this describe in its README, in
this say
...make..
../libmcal/
../libmcal/icap/
../libmcal/dummy/
..Are icap an dummy drivers for MCAL (Modular Calendar Acces Library), and
when i compile (also describe in README)
i give the option
./configure --with-icap
./ make (failed)
./ make install (also failed, obvious)
the error that i found is like the next:
/*OUTPUT*/
gcc -O0 -Wall -g  -I.  -c  mcal.c
In file included from mcal.c:37:
drivers.c:1: parse error before `-'
drivers.c:1: stray '\' in program
drivers.c:1: stray '\' in program
mcal.c: In function `cal_getdriver':
mcal.c:68: `driver_registry' undeclared (first use in this function)
mcal.c:68: (Each undeclared identifier is reported only once
mcal.c:68: for each function it appears in.)
*** Error code 1
make: Fatal error: Command failed for target `mcal.o'
/*\OUTPUT*/
..and i have another doubt?, why if i want compile the driver alone (Ex:
icap), this also give some errors...?
Thanks, and Sorry..!
I'm running in a Solaris 2.7, thanks!

Celestino, Roberto Alejandro
Argentina, Universidad Nacional de la Matanza


-- 
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] Microtime math and display

2001-03-08 Thread Shaun Thomas

On Wed, 7 Mar 2001, Todd Cary wrote:

 I want to check the time for queries.  I have

 $starttime = getmicrotime();
 $endtime = getmicrotime();
 $delta = $endtime - $starttime;

There is no such function as "getmicrotime".  You're probably trying to
use "microtime".  Second of all, microtime returns a string containing
"msec sec", so you'll need to do this:

list($smsec, $ssec) = explode(" ", microtime());
list($emsec, $esec) = explode(" ", microtime());

$dSec  = $esec - $ssec
$dMsec = $emsec - $smsec

Then, if you wanted the number of seconds it took, use $dSec.  If you
want the number of milliseconds, use $dMsec.  Or, if you want to know
both, just add $dSec and $dMsec and use the result.

Take care

-- 
+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+
| Shaun M. ThomasINN Database Programmer  |
| Phone: (309) 743-0812  Fax  : (309) 743-0830|
| Email: [EMAIL PROTECTED]AIM  : trifthen  |
| Web  : hamster.lee.net  |
| |
| "Most of our lives are about proving something, either to   |
| "ourselves or to someone else." |
|   -- Anonymous  |
+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+



-- 
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-CVS] cvs: php4 /pear/Cache Container.php Output.php/pear/Cache/Container db.php file.php phplib.php

2001-03-08 Thread André Langhorst

   Modified files:
 /php4/pear/CacheContainer.php Output.php
 /php4/pear/Cache/Container  db.php file.php phplib.php
   Log:
   Introduced getExpiresAbsolute($expire) function, which translates
   relative/human readable/unixtime expire-times in unixtime-format.
 
 
   Could some kind soul have a look at the cvs commit mail script and let it
 send commit mails regarding PEAR/ to the new pear-cvs mailing list?

NONONO! pear-cvs@ will be the list for commits for the PEAR not the PHP 
repository, no change is needed here...

andr




-- 
 Andr Langhorstt: +49 331 5811560 
 [EMAIL PROTECTED]  m: +49 173 9558736 
* PHP Quality Assurance  http://qa.php.net  *


-- 
PHP CVS 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] Qmail problem

2001-03-08 Thread pete collins


I keep getting:
qmail-inject: fatal: read error

I've tried everything.

Sendmail is symlinked to /var/qmail/bin/sendmail wrapper

$ ls -l /usr/lib/sendmail
lrwxrwxrwx   1 root root   28 Aug 25  2000 /usr/lib/sendmail
- ../../var/qmail/bin/sendmail

$ ls -l /usr/sbin/sendmail
lrwxrwxrwx   1 root root   28 Aug 25  2000
/usr/sbin/sendmail - ../../var/qmail/bin/sendmail


I have tried every permutation for my sendmail_path in php.ini

I tested the php code i'm using from my FreeBSD box which uses sendmail
and it all works fine.

I can use qmail fine from perl.

Does anyone have any ideas? This is down right silly. ;-)

Thanks

--pete

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

2001-03-08 Thread Jeff Oien

If you put the date in MMDD format you can compare
the numbers.
http://www.php.net/manual/en/function.date.php
Jeff Oien

 Hi,
 Since there is no Date type in php, is there a way to compare dates?
 
 Something like:
 
 if ((3/8/2001)  (3/9/2001)){
// Date is newer
 }
 
 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] Date Question

2001-03-08 Thread John Huggins

You might try converting these dates to Unix time and then compare the
numbers as integers.


Let's see, here is a function that converts the data from a MySQL date field
to a Unix timestamp...


  function mysql_to_epoch ($datestr)
  {
list($year,$month,$day,$hour,$minute,$second) =
split("([^0-9])",$datestr);
return date("U",mktime($hour,$minute,$second,$month,$day,$year));
  }


And here is where I use it to calculate the age of the item in the database.

  $epochTime = mysql_to_epoch($messageCreated);
  $currentEpochTime = time();
  $ageInSeconds = $currentEpochTime - $epochTime;


I hope this provides a clue for your application.

John

 -Original Message-
 From: Chris [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, March 08, 2001 12:12 PM
 To: php
 Subject: [PHP] Date Question


 Hi,
 Since there is no Date type in php, is there a way to compare dates?

 Something like:

 if ((3/8/2001)  (3/9/2001)){
// Date is newer
 }

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

2001-03-08 Thread Jason Jacobs

Ok, I understand that the epoch is a point in time that's static, but what
exactly is the epoch?  I've heard it mentioned a lot on the list, but I have
no idea what it really is. :)

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]




Re: [PHP] GTK-PHP install doubt?

2001-03-08 Thread Adam Wright

Make sure you're building against a 4.0.5 build of PHP. I tried this
afternoon with the latest PHP from snaps.php.net and the GTK bindings, and
it worked flawlessly.

adamw

- Original Message -
From: "Celestino Roberto Alejandro" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, March 08, 2001 2:22 PM
Subject: [PHP] GTK-PHP install doubt?


 Friends,
  i get the source of the GTK-PHP module, or library, as you want to say,
 but, when i going to do, the steps that describe in their
 ebpage( http://gtk.php.net/), i do

 phpize
 ./configure
 make (This failed)
 make install (obviously failed)

 When i do the make, this say that the function  php_if_gdk_window_new_dc
in
 php_gtk_types.c have too many arguments to function
 zend_hash_get_current_key_ex (316line)
 and all-recursive Error.
 Why could be this?
 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 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] Date Question

2001-03-08 Thread John Huggins

If it is on a Unix box, it most likely is the Unix time value; It is the
number of seconds since the UNIX Epoch which I believe starts at 0 seconds
in January 1970.  I am not quite sure about that date, but it is close.

It also reveals the problem if you are dealing with dates before 1970 and
after 2^32 seconds after that.

Again, this specifics above may not be totally accurate, but are close
enough to describe the point.

John

 -Original Message-
 From: Jason Jacobs [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, March 08, 2001 12:22 PM
 To: [EMAIL PROTECTED]
 Subject: Re: [PHP] Date Question


 Ok, I understand that the epoch is a point in time that's static, but what
 exactly is the epoch?  I've heard it mentioned a lot on the list,
 but I have
 no idea what it really is. :)

 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]



-- 
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-CVS] cvs: php4 /ext/recode recode.c

2001-03-08 Thread Stanislav Malyshev

stasThu Mar  8 09:11:57 2001 EDT

  Modified files:  
/php4/ext/recoderecode.c 
  Log:
  Better use buffer_to_buffer, since zval is really buffer, not string (it can 
  contain \0's and not end in \0).
  # and recode_string is recode_buffer_to_buffer internally anyways
  
  
Index: php4/ext/recode/recode.c
diff -u php4/ext/recode/recode.c:1.11 php4/ext/recode/recode.c:1.12
--- php4/ext/recode/recode.c:1.11   Sat Jul 15 09:09:18 2000
+++ php4/ext/recode/recode.cThu Mar  8 09:11:57 2001
@@ -16,7 +16,7 @@
+--+
  */
  
-/* $Id: recode.c,v 1.11 2000/07/15 16:09:18 eschmid Exp $ */
+/* $Id: recode.c,v 1.12 2001/03/08 17:11:57 stas Exp $ */
 
 /* {{{ includes  prototypes */
 
@@ -96,7 +96,7 @@
 
php_info_print_table_start();
php_info_print_table_row(2, "Recode Support", "enabled");
-   php_info_print_table_row(2, "Revision", "$Revision: 1.11 $");
+   php_info_print_table_row(2, "Revision", "$Revision: 1.12 $");
php_info_print_table_end();
 
 }
@@ -111,6 +111,7 @@
pval **str;
pval **req;
bool success;
+   int r_len=0, r_alen =0;

ReSLS_FETCH();
if (ZEND_NUM_ARGS() != 2
@@ -132,13 +133,13 @@
goto error_exit;
}

-   r = recode_string(request, (*str)-value.str.val);
+   recode_buffer_to_buffer(request, Z_STRVAL_PP(str), Z_STRLEN_PP(str), r, 
+r_len, r_alen);
if (!r) {
php_error(E_WARNING, "Recoding failed.");
goto error_exit;
}

-   RETVAL_STRING(r, 1);
+   RETVAL_STRINGL(r, r_len, 1);
free(r);
/* FALLTHROUGH */
 



-- 
PHP CVS 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] need help w/ Split()

2001-03-08 Thread Scott Walter

I am attempting to take a line of text (a list) that has been entered into 
a form and split it into the appropriate parts, placing them into an 
array.  I am splitting the input on commas, semi-colons, and spaces.

Problem 1:  Is with "white space".  If the input has spaces after a comma, 
it splits on the comma, but enters each "space" as a separate element of 
the array.

Problem 2: Is with "white space" also.  If the input has just spaces 
between the appropriate parts, then it will split on the first "space", but 
enter the rest of the "spaces" as separate elements of the array.

Here my code:
$course_list = preg_split("/[\,\;\s*]/", $input_list);
for ($i=0; $icount($course_list); $i++) {
echo("Item $i: $course_list[$i]br\n");
}

Which on input "0101, 0102,  0103" produces [0101][ ][0102][ ][ ][ ][0103]

Any help would be appreciated!!


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

2001-03-08 Thread Jason Jacobs

Anyone know offhand a way to organize the output from a query by week?  I'm
writing a work log app and I want the admin to see everyone's work ordered
first by lastname, and then by date.  But only want that week's data to show
up, and maybe a dropdown with previous weeks available.  Don't go thinking
about an answer, cuz I'm doing that, but if anyone already knows how to
solve this problem or part of it, lemme know.  Thanks once again.

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]




RE: [PHP] need help w/ Split()

2001-03-08 Thread Nathaniel Hekman

Your regex is incorrect.  You've written:

/[\,\;\s*]/

That * means "match a *" because it's inside the brackets.  Put it outside,
like this (actually use a + instead):

/[\,\;\s]+/

to match 1 or more of any of those characters.

That may not be exactly what you want, since that will also cause this:

input "0101, 0102,0103" == [0101][0102][0103]

If you want repeated commas to create empty elements, then try something
like this:

/\s*[\,\;\s]\s*/

I haven't tried that, but it looks right at first glance...  Optional white
space, followed by exactly one of ',; ', followed by optional white space.


Nate

-Original Message-
From: Scott Walter [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 08, 2001 10:44 AM
To: [EMAIL PROTECTED]
Subject: [PHP] need help w/ Split()


I am attempting to take a line of text (a list) that has been entered into 
a form and split it into the appropriate parts, placing them into an 
array.  I am splitting the input on commas, semi-colons, and spaces.

Problem 1:  Is with "white space".  If the input has spaces after a comma, 
it splits on the comma, but enters each "space" as a separate element of 
the array.

Problem 2: Is with "white space" also.  If the input has just spaces 
between the appropriate parts, then it will split on the first "space", but 
enter the rest of the "spaces" as separate elements of the array.

Here my code:
$course_list = preg_split("/[\,\;\s*]/", $input_list);
for ($i=0; $icount($course_list); $i++) {
echo("Item $i: $course_list[$i]br\n");
}

Which on input "0101, 0102,  0103" produces [0101][ ][0102][ ][ ][
][0103]

Any help would be appreciated!!


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

2001-03-08 Thread stas

Hello,

How can I format a date stored in the database in a Date field. It's in this
format:

-mm-dd

I understand that date() function only works for current system date/time. I
am looking for something like this:

dateformat($date, "mask"),

sort of like the one in ColdFusion. Thanks much!

stas




-- 
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] Sessions Kill all

2001-03-08 Thread Christian Reiniger

On Thursday 08 March 2001 03:45, you wrote:
 Is there a way as a server admin to kill all sessions to a site.  I
 need a way to logout all members to a site.

Well, usually you'd keep the session data in a database, so you can just 
empty the sessioninfo table.

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

...1000100011010101101010110100111010113...

--
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: Re: [PHP] are sessions single threaded?

2001-03-08 Thread Chris Carbaugh


By not using cookies, each browser window would have it's own session,
propagated through the URL.  Which I don't think you would want users
with multi sessions in an intranet app.

You didn't mention how you are storing your session data, but I'll
assume it's the defualt (files).  I would further quess that the
hanging that you are seeing is do to a lock on the particular session
file.

Any body know for sure?

I'm currently working on are pretty complex intranet app that has
mulitple frames, each needing access to the session data independant of
the others.  In my situation, PHP sessions just couldn't do what I
wanted.  I ended up rolling my own session/authentication scheme backed
by a DB.

Chris

On Wed, 7 Mar 2001, Bill Rausch wrote:
 Date: Wed, 7 Mar 2001 15:00:41 -0800
 To: Ernest E Vogelsinger [EMAIL PROTECTED]
 From: Bill Rausch [EMAIL PROTECTED]
 Subject: Re: [PHP] are sessions single threaded?
 
 At 4:04 PM -0800 3/6/01, Ernest E Vogelsinger wrote:
 At 00:56 07.03.2001, Bill Rausch said:
 [snip]
 What I mean is, if a user is connected to a php page that uses
 sessions and
 that is involved in a time consuming operation (say 20 seconds or
 more)
 before returning an answer, and the user also opens a second window
 in the
 same browser to connect to another page in the same site that uses
 sessions
 the second window  will hang till the first operation is complete.
 
 While testing, I was able to show that if I don't use sessions this
 doesn't
 happen.
 
 I need to use sessions and would like to allow users to have
 multiple
 windows connected to my site (it is an intranet application).
 [snip]
 
 try not to use cookies - use session keys via URL/hidden form
 fields. This
 way multiple browser connects can have multiple session keys, and
 you won't
 "hang"
 
 Thanks for the answer.  Help me to understand please.  Is this a
 limitation
 of PHP somehow or is it a limitation of the browsers.  Why does not
 using
 cookies make a difference?  Where would I go to find more information
 on
 this issue?
 
 ---
  Bill Rausch, Software Development, Unix, Mac, Windows
  Numerical Applications, Inc.  509-943-0861   [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] populate select box with contents of a file?

2001-03-08 Thread Jerry Lake

Ok, I am using this modified code from the
manual. It works great, but how do I modify
it further to only show .jpg files ?

snip
?php
$handle=opendir('.');
 echo "select name=image_url";
while (false!==($file = readdir($handle))) {
if ($file != "."  $file != "..") {
 echo "option ";
 echo "value=".$file."";
 echo $file;
 echo "/option\n\r";
}
}
echo "/select";
closedir($handle);
?
/snip

Jerry Lake- [EMAIL PROTECTED]
Web Designer
Europa Communications - http://www.europa.com
Pacifier Online - http://www.pacifier.com


-Original Message-
From: Sean R. Bright [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 07, 2001 4:50 PM
To: 'Jerry Lake'; 'Henrik Hansen'; 'php general'
Subject: RE: [PHP] populate select box with contents of a file?



Take a look at dir() and readdir().  Those along with echo() should help you
out.

Sean

 -Original Message-
 From: Jerry Lake [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, March 07, 2001 7:40 PM
 To: Henrik Hansen; php general
 Subject: [PHP] populate select box with contents of a file?


 I would like to be able to populate
 the options of a select box with the
 contents of my images directory online
 so I can select the image I want to
 go with the form I am filling out.
 what functions do I need to look into
 to figure this one out?

 Jerry Lake- [EMAIL PROTECTED]
 Web Designer
 Europa Communications - http://www.europa.com
 Pacifier Online   - http://www.pacifier.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 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] Dynamic Links..

2001-03-08 Thread Jon Haworth

As a quick caveat you need to be *very* careful you're not obfuscating the
target site copyright infringement, anyone?

-Original Message-
From: Richard S. Crawford [mailto:[EMAIL PROTECTED]]
Sent: 08 March 2001 00:02
To: Ashwin Kutty; [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Dynamic Links..


At our company we solve this problem by including the second page in a 
frameset.  That's what I would recommend for you.

At 07:39 PM 3/7/01 -0400, Ashwin Kutty wrote:

No, not the URL and therefore not HTTP_REFERER..

This is how it is..

My_Script.php redirects to Someone_Elses_Dynamically_Generated_Page.html
Someone_Elses_Dynamically_Generated_Page.html has 'link' to another Page.
I want My_Script.php to grab the a href="contents" of the 'link' and
redirect to it, right after.

The reason I want to do the above is, the first page dynamically creates a
session id and attaches it to the 'link'.. I need that session id to
continue on, and since this page is not on my server I cant control it..

Thanks..


**
'The information included in this Email is of a confidential nature and is 
intended only for the addressee. If you are not the intended addressee, 
any disclosure, copying or distribution by you is prohibited and may be 
unlawful. Disclosure to any party other than the addressee, whether 
inadvertent or otherwise is not intended to waive privilege or confidentiality'

**

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

2001-03-08 Thread Joe Sheble (Wizaerd)


You could use the mySQL function DATE_FORMAT() in your query string..

SELECT DATE_FORMAT( DateAdded, '%m/%d/%Y' ) as d_Added FROM myDB


At 12:52 PM 1/8/01 -0500, stas wrote:
Hello,

How can I format a date stored in the database in a Date field. It's in this
format:

-mm-dd

I understand that date() function only works for current system date/time. I
am looking for something like this:

dateformat($date, "mask"),

sort of like the one in ColdFusion. Thanks much!

stas




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

2001-03-08 Thread Miguel Loureiro

Hello,
to refresh a site I use this (META HTTP-EQUIV="Refresh" CONTENT="300" ), but, now I 
make some updates im my right page and I want to refresh other page( left page of 
frameset ).How can I do it?
T.Y.
Best Regards
Miguel Loureiro [EMAIL PROTECTED] 



RE: [PHP] Sessions Kill all

2001-03-08 Thread Randy Johnson

Does anybody know where I could get more info on storing session data in a
database rather than the default way?

thanks

randy

-Original Message-
From: Christian Reiniger [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 08, 2001 12:58 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Sessions Kill all


On Thursday 08 March 2001 03:45, you wrote:
 Is there a way as a server admin to kill all sessions to a site.  I
 need a way to logout all members to a site.

Well, usually you'd keep the session data in a database, so you can just
empty the sessioninfo table.

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

...1000100011010101101010110100111010113...

--
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] populate select box with contents of a file?

2001-03-08 Thread Joe Sheble (Wizaerd)

?php
$handle=opendir('.');
 echo "select name=image_url";
while (false!==($file = readdir($handle))) {

 // new code here
 $cExt = explode( ".", $file );

 // and here
 if ($file != "."  $file != ".."  ( strtolower( $cExt[1] ) == "jpg" ) {
 echo "option ";
 echo "value=".$file."";
 echo $file;
 echo "/option\n\r";
 }
}
 echo "/select";
closedir($handle);
?



At 10:04 AM 3/8/01 -0800, Jerry Lake wrote:
Ok, I am using this modified code from the
manual. It works great, but how do I modify
it further to only show .jpg files ?

snip
?php
$handle=opendir('.');
 echo "select name=image_url";
while (false!==($file = readdir($handle))) {
 if ($file != "."  $file != "..") {
 echo "option ";
 echo "value=".$file."";
 echo $file;
 echo "/option\n\r";
 }
}
 echo "/select";
closedir($handle);
?
/snip

Jerry Lake- [EMAIL PROTECTED]
Web Designer
Europa Communications - http://www.europa.com
Pacifier Online - http://www.pacifier.com


-Original Message-
From: Sean R. Bright [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 07, 2001 4:50 PM
To: 'Jerry Lake'; 'Henrik Hansen'; 'php general'
Subject: RE: [PHP] populate select box with contents of a file?



Take a look at dir() and readdir().  Those along with echo() should help you
out.

Sean

  -Original Message-
  From: Jerry Lake [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, March 07, 2001 7:40 PM
  To: Henrik Hansen; php general
  Subject: [PHP] populate select box with contents of a file?
 
 
  I would like to be able to populate
  the options of a select box with the
  contents of my images directory online
  so I can select the image I want to
  go with the form I am filling out.
  what functions do I need to look into
  to figure this one out?
 
  Jerry Lake- [EMAIL PROTECTED]
  Web Designer
  Europa Communications - http://www.europa.com
  Pacifier Online   - http://www.pacifier.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 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] need help w/ Split()

2001-03-08 Thread Christian Reiniger

On Thursday 08 March 2001 18:43, you wrote:
 I am attempting to take a line of text (a list) that has been entered
 into a form and split it into the appropriate parts, placing them into
 an array.  I am splitting the input on commas, semi-colons, and spaces.

 Problem 1:  Is with "white space".  If the input has spaces after a
 comma, it splits on the comma, but enters each "space" as a separate
 element of the array.

 Problem 2: Is with "white space" also.  If the input has just spaces
 between the appropriate parts, then it will split on the first "space",
 but enter the rest of the "spaces" as separate elements of the array.

 Here my code:
   $course_list = preg_split("/[\,\;\s*]/", $input_list);

You can't put the asterisk in the character class - it's taken as literal 
asterisk in there.

try preg_split("/([\,\;]\s*)|(\s+)/", $input_list);

i.e. "either (',' or ';' eventually followed by spaces) or (at least one 
space)"

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

...1000100011010101101010110100111010113...

--
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] Stumped Newbie: Can't get results in db query even though everything checks - what am I missing?

2001-03-08 Thread Nicole Lallande

Greetings,

I keep getting the message that I cannot get results.  I have a simple
user authentication code that uses a mysql database to authenticate
from.  Initially I had the code working when I had the mysql_connect
variables in the code itself.  When I moved the connection variables to
an include file and then called them as variables, it was necessary to
change the variable names in the database (both were initially
$username, $password).  Now, while I have the connection and opening the
db correct I can't get results.  Here is my code:

require("connect.inc.php");

$connection = mysql_connect("$hostname","$username","$password") or die
("Unable to connect to database.");
echo "I'm connected.br";
**__A-OK here

mysql_select_db("dnaUsers") or die ("Unable to select database.");
echo "I've opened the dnaUsers db.br";
echo "$ruser, $rpassbr"; //this is from the html login form
**__Yup, no problem so far - 

// Formulate the query  
$sql = "SELECT rep_name FROM reps WHERE username='$ruser' and
password='$rpass'";
// Execute the query and put the results in $result
$result = mysql_query($sql,$connection) or die ("Couldn't get
results.");  

**__Here it is - crash and burn - the database name is correct, the
fields are correct, the username and password are in the db and have
been input correctly and are even being passed from the form correctly. 

I have checked the names of all the fields to ensure they match the
variables in the query, checked that the values in the fields are
correct -  (yes, I have checked that they match.) 

I have searched the archives but the hard thing about the archives is
formulating the question in a way that will yield an answer.  Sorry if
this has been asked before.

TIA,

Nicole
-- 

Nicole Lallande
[EMAIL PROTECTED]
760.753.6766


-- 
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] Stumped Newbie: Can't get results in db query even though everything checks - what am I missing?

2001-03-08 Thread Nicole Lallande

Greetings,

I keep getting the message that I cannot get results.  I have a simple
user authentication code that uses a mysql database to authenticate
from.  Initially I had the code working when I had the mysql_connect
variables in the code itself.  When I moved the connection variables to
an include file and then called them as variables, it was necessary to
change the variable names in the database (both were initially
$username, $password).  Now, while I have the connection and opening the
db correct I can't get results.  Here is my code:

require("connect.inc.php");

$connection = mysql_connect("$hostname","$username","$password") or die
("Unable to connect to database.");
echo "I'm connected.br";
**__A-OK here

mysql_select_db("dnaUsers") or die ("Unable to select database.");
echo "I've opened the dnaUsers db.br";
echo "$ruser, $rpassbr"; //this is from the html login form
**__Yup, no problem so far - 

// Formulate the query  
$sql = "SELECT rep_name FROM reps WHERE username='$ruser' and
password='$rpass'";
// Execute the query and put the results in $result
$result = mysql_query($sql,$connection) or die ("Couldn't get
results.");  

**__Here it is - crash and burn - the database name is correct, the
fields are correct, the username and password are in the db and have
been input correctly and are even being passed from the form correctly. 

I have checked the names of all the fields to ensure they match the
variables in the query, checked that the values in the fields are
correct -  (yes, I have checked that they match.) 

I have searched the archives but the hard thing about the archives is
formulating the question in a way that will yield an answer.  Sorry if
this has been asked before.

TIA,

Nicole


-- 

Nicole Lallande
[EMAIL PROTECTED]
760.753.6766


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

2001-03-08 Thread Christian Reiniger

On Thursday 08 March 2001 18:49, you wrote:
 Anyone know offhand a way to organize the output from a query by week? 
 I'm writing a work log app and I want the admin to see everyone's work
 ordered first by lastname, and then by date.  But only want that week's
 data to show up, and maybe a dropdown with previous weeks available. 
 Don't go thinking about an answer, cuz I'm doing that, but if anyone
 already knows how to solve this problem or part of it, lemme know. 
 Thanks once again.

for MySQL add a WHERE (WEEK(yourtimefield) = WEEK(NOW()))

this will have the problem that it will show all of week X even if you're 
on 23:55 on the last day of that week

WHERE ((yourtimefield = NOW()) AND (yourtimefield = DATE_ADD(NOW(), 
INTERVAL 1 WEEK))

might be better

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

...1000100011010101101010110100111010113...

--
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] Sessions Kill all

2001-03-08 Thread Christian Reiniger

On Thursday 08 March 2001 07:17, you wrote:
 Does anybody know where I could get more info on storing session data
 in a database rather than the default way?

Hmm, perhaps phpbuilder.com has an article on it. Alternatively I could 
send you some of my code

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

...1000100011010101101010110100111010113...

--
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] Stumped Newbie: Can't get results in db query even though everything checks - what am I missing?

2001-03-08 Thread Joe Sheble (Wizaerd)


I'd start by adding the mysql_error() function in your die() statement...
$result = mysql_query($sql,$connection) or die ("Couldn't get results: " . 
mysql_error());

it might give more information to help you find the problem...

At 10:15 AM 3/8/01 -0800, Nicole Lallande wrote:
Greetings,

I keep getting the message that I cannot get results.  I have a simple
user authentication code that uses a mysql database to authenticate
from.  Initially I had the code working when I had the mysql_connect
variables in the code itself.  When I moved the connection variables to
an include file and then called them as variables, it was necessary to
change the variable names in the database (both were initially
$username, $password).  Now, while I have the connection and opening the
db correct I can't get results.  Here is my code:

require("connect.inc.php");

$connection = mysql_connect("$hostname","$username","$password") or die
("Unable to connect to database.");
echo "I'm connected.br";
**__A-OK here

mysql_select_db("dnaUsers") or die ("Unable to select database.");
echo "I've opened the dnaUsers db.br";
echo "$ruser, $rpassbr"; //this is from the html login form
**__Yup, no problem so far -

// Formulate the query
$sql = "SELECT rep_name FROM reps WHERE username='$ruser' and
password='$rpass'";
// Execute the query and put the results in $result
$result = mysql_query($sql,$connection) or die ("Couldn't get
results.");

**__Here it is - crash and burn - the database name is correct, the
fields are correct, the username and password are in the db and have
been input correctly and are even being passed from the form correctly.

I have checked the names of all the fields to ensure they match the
variables in the query, checked that the values in the fields are
correct -  (yes, I have checked that they match.)

I have searched the archives but the hard thing about the archives is
formulating the question in a way that will yield an answer.  Sorry if
this has been asked before.

TIA,

Nicole
--

Nicole Lallande
[EMAIL PROTECTED]
760.753.6766


--
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] Hebrew websites transition with php3 ..

2001-03-08 Thread Boaz Yahav

Hi

The case In Israel is different. It's not that we chose this browser
over another... Netscape wouldn't support Hebrew and IE did.
So there was no actual war.

The data about the 3% is pretty accurate and is collaborated by
all 3 major portals in Israel. 

Sincerely

  berber

Visit http://www.weberdev.com Today!!! 
To see where PHP might take you tomorrow.
 

-Original Message-
From: Manuel Lemos [mailto:[EMAIL PROTECTED]]
Sent: Sunday, March 04, 2001 6:45 PM
To: [EMAIL PROTECTED]
Subject: RE: [PHP] Hebrew websites transition with php3 ..


Hello Boaz,

On 01-Mar-01 04:17:25, you wrote:

The IE / NN war was one that left no chance for NN in Israel.
While MS spent millions in making all of their products in Hebrew,
including the free IE, NN refused to support Hebrew.

I don't think this is a matter of browser wars.  Ideally, portals should
target their target audience not the other way arround.  If your portal
pages can't display in users browsers, they simply go away and won't bother
telling you why.


While the 3% is correct for Israel, it's far from being true on an
international basis.

If you got me right, if your portal only displays right in logical Hebrew,
there is no reason for those 3% be just 0% because nobody returns to a
portal that does not display in their browser, right?


With all due respect to people that like other browsers, developing
for all browsers costs lots of $$$ and as long as portals are free 
and loosing lots of $$$ it's not profitable to develop for all.

Bottom line, as the CTO of one of those portals I say go
with Logical Hebrew and dump Netscape (In Israel Only).

Personally I don't care about Netscape.  My point was just to bring to the
attention that when you think your are just dumping Netscape or whatever
browser, what you are actually dumping is share of users that you believe
that it is 3% but might be actually much more.  I know that over here
people assumed that was 10% but was in reality 30%.

In a market like the Internet portals where the winner takes almost all, it
may be worthy for you to rethink your options before you realize that your
portal is not the winner because your not really evaluating the real user
audience figures, but rather those that are technically more convinient.

Just my 0.02 EUR. :-)


Regards,
Manuel Lemos

Web Programming Components using PHP Classes.
Look at: http://phpclasses.UpperDesign.com/?[EMAIL PROTECTED]
--
E-mail: [EMAIL PROTECTED]
URL: http://www.mlemos.e-na.net/
PGP key: http://www.mlemos.e-na.net/ManuelLemos.pgp
--


-- 
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] Stumped Newbie: Can't get results in db query eventhough everything checks - what am I missing?

2001-03-08 Thread Nicole Lallande

Thanks Joe - that showed me right away!! all better now -- on to the
next step..

Nicole


"Joe Sheble (Wizaerd)" wrote:
 
 I'd start by adding the mysql_error() function in your die() statement...
 $result = mysql_query($sql,$connection) or die ("Couldn't get results: " .
 mysql_error());
 
 it might give more information to help you find the problem...
 
 At 10:15 AM 3/8/01 -0800, Nicole Lallande wrote:
 Greetings,
 
 I keep getting the message that I cannot get results.  I have a simple
 user authentication code that uses a mysql database to authenticate
 from.  Initially I had the code working when I had the mysql_connect
 variables in the code itself.  When I moved the connection variables to
 an include file and then called them as variables, it was necessary to
 change the variable names in the database (both were initially
 $username, $password).  Now, while I have the connection and opening the
 db correct I can't get results.  Here is my code:
 
 require("connect.inc.php");
 
 $connection = mysql_connect("$hostname","$username","$password") or die
 ("Unable to connect to database.");
 echo "I'm connected.br";
 **__A-OK here
 
 mysql_select_db("dnaUsers") or die ("Unable to select database.");
 echo "I've opened the dnaUsers db.br";
 echo "$ruser, $rpassbr"; //this is from the html login form
 **__Yup, no problem so far -
 
 // Formulate the query
 $sql = "SELECT rep_name FROM reps WHERE username='$ruser' and
 password='$rpass'";
 // Execute the query and put the results in $result
 $result = mysql_query($sql,$connection) or die ("Couldn't get
 results.");
 
 **__Here it is - crash and burn - the database name is correct, the
 fields are correct, the username and password are in the db and have
 been input correctly and are even being passed from the form correctly.
 
 I have checked the names of all the fields to ensure they match the
 variables in the query, checked that the values in the fields are
 correct -  (yes, I have checked that they match.)
 
 I have searched the archives but the hard thing about the archives is
 formulating the question in a way that will yield an answer.  Sorry if
 this has been asked before.
 
 TIA,
 
 Nicole
 --
 
 Nicole Lallande
 [EMAIL PROTECTED]
 760.753.6766
 
 
 --
 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]

-- 

Nicole Lallande
[EMAIL PROTECTED]
760.753.6766


-- 
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: Re: Re: [PHP] are sessions single threaded?

2001-03-08 Thread Chris Carbaugh


It's a PHP class that's included at the top of every page that needs
session/authentication.  It's cookie based only, no option for URL
propagation.

PHPLib can do the same, as well as some other classes floating around.

Chris

On Thu, 8 Mar 2001, Bill Rausch wrote:
 Date: Thu, 8 Mar 2001 10:21:37 -0800
 To: [EMAIL PROTECTED]
 From: Bill Rausch [EMAIL PROTECTED]
 Subject: Re: Re: [PHP] are sessions single threaded?
 
 Thanks Chris.
 
 I've been looking at the PHP source code and have tentatively come to
 the
 same conclusion about the file locks.
 
 I'm going to play around with the no-cookies option and see where
 that
 takes me.
 
 Bill
 
 PS:  The roll-your-own that you did.  Did you modify the PHP program
 or
 just handle it in your web pages?
 
 
 At 10:01 AM -0800 3/8/01, Chris Carbaugh wrote:
 By not using cookies, each browser window would have it's own
 session,
 propagated through the URL.  Which I don't think you would want
 users
 with multi sessions in an intranet app.
 
 You didn't mention how you are storing your session data, but I'll
 assume it's the defualt (files).  I would further quess that the
 hanging that you are seeing is do to a lock on the particular
 session
 file.
 
 Any body know for sure?
 
 I'm currently working on are pretty complex intranet app that has
 mulitple frames, each needing access to the session data independant
 of
 the others.  In my situation, PHP sessions just couldn't do what I
 wanted.  I ended up rolling my own session/authentication scheme
 backed
 by a DB.
 
 Chris
 
 On Wed, 7 Mar 2001, Bill Rausch wrote:
  Date: Wed, 7 Mar 2001 15:00:41 -0800
  To: Ernest E Vogelsinger [EMAIL PROTECTED]
  From: Bill Rausch [EMAIL PROTECTED]
  Subject: Re: [PHP] are sessions single threaded?
 
  At 4:04 PM -0800 3/6/01, Ernest E Vogelsinger wrote:
  At 00:56 07.03.2001, Bill Rausch said:
  [snip]
  What I mean is, if a user is connected to a php page that uses
  sessions and
  that is involved in a time consuming operation (say 20 seconds
 or
  more)
  before returning an answer, and the user also opens a second
 window
  in the
  same browser to connect to another page in the same site that
 uses
  sessions
  the second window  will hang till the first operation is
 complete.
  
  While testing, I was able to show that if I don't use sessions
 this
  doesn't
  happen.
  
  I need to use sessions and would like to allow users to have
  multiple
  windows connected to my site (it is an intranet application).
  [snip]
  
  try not to use cookies - use session keys via URL/hidden form
  fields. This
  way multiple browser connects can have multiple session keys, and
  you won't
  "hang"
 
  Thanks for the answer.  Help me to understand please.  Is this a
  limitation
  of PHP somehow or is it a limitation of the browsers.  Why does
 not
  using
  cookies make a difference?  Where would I go to find more
 information
  on
  this issue?
 
  ---
   Bill Rausch, Software Development, Unix, Mac, Windows
   Numerical Applications, Inc.  509-943-0861   [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]
 
 
 ---
  Bill Rausch, Software Development, Unix, Mac, Windows
  Numerical Applications, Inc.  509-943-0861   [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] HELP!!! Date time problems!!!!

2001-03-08 Thread Bruno Freire

Hi, My name is Bruno, From Brazil.

Yes...it's me again...hehehe

Look...my problem is..

I wanna make something like this:

(10 november 2001) - (5 November 2001) = 5 days

(10 november 2001) - (10 December 2001) = 30 days

How can i do this


Thanks for any help

Your friend, Bruno From   !



Re: [PHP] Dynamic Links..

2001-03-08 Thread Ashwin Kutty

We wont.. Their banners, logos, URL's etc. appear on the pages, so even if it is
in the frameset, it will be fine..

Jon Haworth wrote:

 As a quick caveat you need to be *very* careful you're not obfuscating the
 target site copyright infringement, anyone?

 -Original Message-
 From: Richard S. Crawford [mailto:[EMAIL PROTECTED]]
 Sent: 08 March 2001 00:02
 To: Ashwin Kutty; [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Subject: Re: [PHP] Dynamic Links..

 At our company we solve this problem by including the second page in a
 frameset.  That's what I would recommend for you.

 At 07:39 PM 3/7/01 -0400, Ashwin Kutty wrote:

 No, not the URL and therefore not HTTP_REFERER..
 
 This is how it is..
 
 My_Script.php redirects to Someone_Elses_Dynamically_Generated_Page.html
 Someone_Elses_Dynamically_Generated_Page.html has 'link' to another Page.
 I want My_Script.php to grab the a href="contents" of the 'link' and
 redirect to it, right after.
 
 The reason I want to do the above is, the first page dynamically creates a
 session id and attaches it to the 'link'.. I need that session id to
 continue on, and since this page is not on my server I cant control it..
 
 Thanks..

 **
 'The information included in this Email is of a confidential nature and is
 intended only for the addressee. If you are not the intended addressee,
 any disclosure, copying or distribution by you is prohibited and may be
 unlawful. Disclosure to any party other than the addressee, whether
 inadvertent or otherwise is not intended to waive privilege or confidentiality'

 **

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

--
"Wise men talk because they have something to say; fools talk
because they have to say something." - Plato

Ashwin Kutty
Systems Administrator
Dalhousie University Libraries
(902) 494-2694




-- 
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] Dynamic Links..

2001-03-08 Thread Boget, Chris

  As a quick caveat you need to be *very* careful you're not 
  obfuscating the target site copyright infringement, anyone?
 We wont.. Their banners, logos, URL's etc. appear on the 
 pages, so even if it is in the frameset, it will be fine..

Yes, but their URL won't be in the address line.  Not that it makes
much of a difference, the site in question might actually care about
that.  A URL is as much a product brand as a logo is.

Chris



Re: [PHP] Dynamic Links..

2001-03-08 Thread Richard S. Crawford

Yes, I should have mentioned... we actually do develop contracts outlining 
co-branding agreements with our partners before we establish a frameset.

I should also mention that we don't use PHP for session tracking; we use a 
home-grown Perl/Oracle hybrid for session tracking.  But I imagine that 
establishing a frameset like this would work for PHP session tracking as well.

At 02:46 PM 3/8/01 -0400, Jon Haworth wrote:
  As a quick caveat you need to be *very* careful you're not obfuscating the
  target site copyright infringement, anyone?

--
http://www.mossroot.com/index.php
AIM Handle: Buffalo2K
e-mail: [EMAIL PROTECTED]
"When you lose the power to laugh at yourself, you lose the power to think 
straight."  --Clarence Darrow


-- 
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: sending SMS messages via PHP

2001-03-08 Thread Henrik Hansen

 We send SMS messages from Oracle, but the method could be used in php I
think. We use www.quios.com. They accept SMS messages as XML documents
which you simply post to their site using http. The response, also by http,
is an xml document. It is very easy to build your outgoing xml document,
and the response document is so simple in structure that you could probably
get by without an xml parser to interpret it.


Does it cost anything?
Do you need to be registered?

Are there similar services?

--
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] HELP!!! Date time problems!!!!

2001-03-08 Thread Pierre-Yves Lemaire

Hello,
this is a function I use on my site, you can problably find
your answer,
py

// =
// This function returns the difference between a dates
// and the current date.
// arg1: separator
// arg2: startdate  date dd mm 
// return number of days of differences
// ==
function diff_date( $sep, $startdate ){
 // Date of file in database
 $startdate = explode( "$sep", $startdate );
 $startdate = mktime( 0, 0, 0, $startdate[1], $startdate[2],
$startdate[0] );
 // Now
 $enddate = mktime( 0, 0, 0, date("n"), date("d"), date("Y") );
 // get difference in days by dividing by 24*24*60
 return ( $enddate - $startdate ) / ( 86400 );
} // end function


- Original Message -
From: Bruno Freire [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, March 08, 2001 7:05 PM
Subject: [PHP] HELP!!! Date time problems


 Hi, My name is Bruno, From Brazil.

 Yes...it's me again...hehehe

 Look...my problem is..

 I wanna make something like this:

 (10 november 2001) - (5 November 2001) = 5 days

 (10 november 2001) - (10 December 2001) = 30 days

 How can i do this


 Thanks for any help

 Your friend, Bruno From   !



-- 
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-CVS] cvs: php4 /ext/ircg ircg_scanner.re

2001-03-08 Thread Sascha Schumann

sas Thu Mar  8 10:43:52 2001 EDT

  Modified files:  
/php4/ext/ircg  ircg_scanner.re 
  Log:
  Add handling for underline/bold control sequences
  
  
Index: php4/ext/ircg/ircg_scanner.re
diff -u php4/ext/ircg/ircg_scanner.re:1.6 php4/ext/ircg/ircg_scanner.re:1.7
--- php4/ext/ircg/ircg_scanner.re:1.6   Sat Mar  3 13:22:13 2001
+++ php4/ext/ircg/ircg_scanner.re   Thu Mar  8 10:43:52 2001
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: ircg_scanner.re,v 1.6 2001/03/03 21:22:13 sas Exp $ */
+/* $Id: ircg_scanner.re,v 1.7 2001/03/08 18:43:52 sas Exp $ */
 
 #include ext/standard/php_smart_str.h
 #include stdio.h
@@ -54,6 +54,8 @@
int bg_code;
int fg_code;
int font_tag_open;
+   int bold_tag_open;
+   int underline_tag_open;

smart_str scheme;
smart_str *result;
@@ -68,6 +70,8 @@
 digit = [0-9];
 scheme = alpha alnum*;
 coloresc = "";
+bold = "";
+underline = "";
 */
 
 #define YYFILL(n) { }
@@ -129,6 +133,34 @@
}
 }
 
+static void handle_bold(STD_PARA, int final)
+{
+   switch (ctx-bold_tag_open) {
+   case 0:
+   if (!final) smart_str_appends(ctx-result, "b");
+   break;
+   case 1:
+   smart_str_appends(ctx-result, "/b");
+   break;
+   }
+
+   ctx-bold_tag_open = 1 - ctx-bold_tag_open;
+}
+
+static void handle_underline(STD_PARA, int final)
+{
+   switch (ctx-underline_tag_open) {
+   case 0:
+   if (!final) smart_str_appends(ctx-result, "ul");
+   break;
+   case 1:
+   smart_str_appends(ctx-result, "/ul");
+   break;
+   }
+
+   ctx-underline_tag_open = 1 - ctx-underline_tag_open;
+}
+
 static void commit_color_stuff(STD_PARA)
 {
finish_color_stuff(STD_ARGS);
@@ -158,7 +190,7 @@
 
mctx.result = result;
mctx.scheme.c = NULL;
-   mctx.font_tag_open = 0;
+   mctx.font_tag_open = mctx.bold_tag_open = mctx.underline_tag_open = 0;

if (msg_len == -1)
msg_len = strlen(msg);
@@ -178,7 +210,9 @@
"" { add_entity(STD_ARGS, "lt;"); continue; }
"" { add_entity(STD_ARGS, "gt;"); continue; }
"" { add_entity(STD_ARGS, "amp;"); continue; }
-   (anynoneof\([])) (anynoneof\[/])*   { passthru(STD_ARGS); 
continue; }
+   bold{ handle_bold(STD_ARGS, 0); continue; }
+   underline   { handle_underline(STD_ARGS, 0); continue; }
+   (anynoneof\([])) (anynoneof\[/])* { passthru(STD_ARGS); 
+continue; }
anynoneof   { passthru(STD_ARGS); continue; }
eof { goto stop; }
 */
@@ -226,4 +260,6 @@
smart_str_free(ctx-scheme);
 
finish_color_stuff(STD_ARGS);
+   handle_bold(STD_ARGS, 1);
+   handle_underline(STD_ARGS, 1);
 }



-- 
PHP CVS 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] Developer certifications

2001-03-08 Thread Krznaric Michael

OK now I'm pissed.  I consider myself to be an above average
programmer with extensive skill in PHP (amongst other things).  

NOW... I am not going to go jumping through hoops just because some
ignorant/illiterate HR Recruiter/IS Head thinks that if you're not PHP
certified by some company (eg. brainbench) you're not worth consideration.
I REFUSE to do it.  I WOULD NOT on my life take the MCSE of MCwhatever,
however I may take the Cisco or the Oracle test.  Things that require and
properly compensate specialization I am open to.  But things that test how
well you can interact with a GUI (Windows) are bullshit.  With respect to
PHP there are other methods of determining ones competency with a particular
language.  What should be judged is a persons overall programming
competency, or how well they can adapt to a new language, as oppose to
specialization in PHP or PERL or .  If you specialize in PHP, what are
you going to do when there is no more PHP. (Not that we are expecting that).

To summarize, judging a proficiency as it relates to a particular
language shows the inexperience and ignorance of your future management.
The bottom line is that "YOU DO NOT WANT TO WORK FOR PEOPLE LIKE THAT".  I'm
sure some experienced programmers around here know what I'm talking about.

Mike


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 28, 2001 1:33 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Developer certifications


Does anyone know of a company which is offering or planning to offer PHP
developer certifications? Arguments against certification programs aside[1],
there are a lot of companies which prefer certified developers, even to the
point of assuming a project done in ASP will be better than the same thing
done
in PHP simply because the ASP developers are Microsoft certified.

While this seems like an interesting sideline for a company like Zend, I'm
also
somewhat curious about whether an "Open Source" test could be developed.
It'd
certainly have to be quite different from normal tests and that move away
from
easily memorized answers would probably be a very good thing.

[1] We've all heard them before. I'm personally in favor only of
certifications
like certain devilishly hard Cisco exams which measure more than
multiple-choice memory.

-- 
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-CVS] cvs: php4 /ext/ircg ircg_scanner.c

2001-03-08 Thread Sascha Schumann

sas Thu Mar  8 10:59:46 2001 EDT

  Modified files:  
/php4/ext/ircg  ircg_scanner.c 
  Log:
  Add handling for underline/bold control sequences
  
  

Index: php4/ext/ircg/ircg_scanner.c
diff -u php4/ext/ircg/ircg_scanner.c:1.5 php4/ext/ircg/ircg_scanner.c:1.6
--- php4/ext/ircg/ircg_scanner.c:1.5Sat Mar  3 09:01:31 2001
+++ php4/ext/ircg/ircg_scanner.cThu Mar  8 10:59:46 2001
@@ -1,5 +1,5 @@
-/* Generated by re2c 0.5 on Sat Mar  3 16:35:30 2001 */
-#line 1 "/usr/home/sas/chat/php4/ext/ircg/ircg_scanner.re"
+/* Generated by re2c 0.5 on Thu Mar  8 19:50:44 2001 */
+#line 1 "/home/sas/src/php4/ext/ircg/ircg_scanner.re"
 /*
+--+
| PHP version 4.0  |
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: ircg_scanner.c,v 1.5 2001/03/03 17:01:31 sas Exp $ */
+/* $Id: ircg_scanner.c,v 1.6 2001/03/08 18:59:46 sas Exp $ */
 
 #include ext/standard/php_smart_str.h
 #include stdio.h
@@ -56,12 +56,14 @@
int bg_code;
int fg_code;
int font_tag_open;
+   int bold_tag_open;
+   int underline_tag_open;

smart_str scheme;
smart_str *result;
 } ircg_msg_scanner;
 
-#line 71
+#line 75
 
 
 #define YYFILL(n) { }
@@ -123,6 +125,34 @@
}
 }
 
+static void handle_bold(STD_PARA, int final)
+{
+   switch (ctx-bold_tag_open) {
+   case 0:
+   if (!final) smart_str_appends(ctx-result, "b");
+   break;
+   case 1:
+   smart_str_appends(ctx-result, "/b");
+   break;
+   }
+
+   ctx-bold_tag_open = 1 - ctx-bold_tag_open;
+}
+
+static void handle_underline(STD_PARA, int final)
+{
+   switch (ctx-underline_tag_open) {
+   case 0:
+   if (!final) smart_str_appends(ctx-result, "ul");
+   break;
+   case 1:
+   smart_str_appends(ctx-result, "/ul");
+   break;
+   }
+
+   ctx-underline_tag_open = 1 - ctx-underline_tag_open;
+}
+
 static void commit_color_stuff(STD_PARA)
 {
finish_color_stuff(STD_ARGS);
@@ -145,17 +175,17 @@
smart_str_appends(ctx-result, entity);
 }
 
-void ircg_mirc_color(const char *msg, smart_str *result) {
+void ircg_mirc_color(const char *msg, smart_str *result, size_t msg_len) {
int mode = STATE_PLAIN;
const char *end, *xp, *q, *start;
-   size_t msg_len;
ircg_msg_scanner mctx, *ctx = mctx;
 
mctx.result = result;
mctx.scheme.c = NULL;
-   mctx.font_tag_open = 0;
+   mctx.font_tag_open = mctx.bold_tag_open = mctx.underline_tag_open = 0;

-   msg_len = strlen(msg);
+   if (msg_len == -1)
+   msg_len = strlen(msg);
end = msg + msg_len;
xp = msg;

@@ -208,83 +238,96 @@
 yy0:
if((YYLIMIT - YYCURSOR)  4) YYFILL(4);
yych = *YYCURSOR;
-   if(yych = ''){
+   if(yych = ''){
if(yych = '\003'){
-   if(yych = '\000')  goto yy13;
+   if(yych = '\000')  goto yy17;
+   if(yych = '\001')  goto yy16;
if(yych = '\002')  goto yy12;
goto yy4;
} else {
-   if(yych == '') goto yy10;
-   if(yych = ';') goto yy12;
-   goto yy6;
+   if(yych == '\025')  goto yy14;
+   if(yych = '%') goto yy16;
+   goto yy10;
}
} else {
-   if(yych = '@'){
-   if(yych == '') goto yy8;
-   goto yy12;
+   if(yych = ''){
+   if(yych == '') goto yy6;
+   if(yych = '=') goto yy16;
+   goto yy8;
} else {
-   if(yych = 'Z') goto yy2;
-   if(yych = '`') goto yy12;
-   if(yych = '{') goto yy12;
+   if(yych = 'Z'){
+   if(yych = '@') goto yy16;
+   } else {
+   if(yych = '`') goto yy16;
+   if(yych = '{') goto yy16;
+   }
}
}
 yy2:   yych = *++YYCURSOR;
-   if(yybm[0+yych]  128)  goto yy17;
-   if(yych == ':') goto yy19;
-   goto yy16;
+   if(yybm[0+yych]  128)  goto yy21;
+   if(yych == ':') goto yy23;
+   goto yy20;
 yy3:
-#line 181
+#line 215
{ passthru(STD_ARGS); continue; }
 yy4:   yych = *++YYCURSOR;
 yy5:
-#line 177
+#line 209
{ mctx.fg_code = mctx.bg_code = -1; STATE = STATE_COLOR_FG; continue; }
 yy6:   yych = *++YYCURSOR;
 yy7:
-#line 178
+#line 210
{ add_entity(STD_ARGS, "lt;"); continue; }
 

[PHP] Tell me if this works

2001-03-08 Thread Karl J. Stubsjoen

I'm using the SetTimeOut function of JavaScript to refresh an image every 3
seconds.  The SRC for the image is a PHP page which constructs a valid image
with some text added to the image and returns the image to the colling
Image.  This works fine, however the information should be changing every so
often for the image.  The value to display in the image is a value being
fetched from a table, that value is changing all the time.  The value is set
to the first-time-through value and then subsequent request of the image
remain all the same (the image should be changing and it isn't).

Is this a Javascript issue, browser issue, cache issue???
I've tested it on a couple of different platforms, with no luck.  Here is my
JavaScript code:

function GetStat() {
 var Image2
 Image2 = new Image(185,39)
 Image2.src = "GetStat.php"
 document.stat1.src = Image2
 setTimeout('GetStat()',3000)
  status = " "
}

img name="stat1" src="images/NumberDisplay.png" border=0

Thanks for the help!


-- 
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-CVS] cvs: php4 /ext/ircg ircg_scanner.c ircg_scanner.re

2001-03-08 Thread Sascha Schumann

sas Thu Mar  8 11:29:33 2001 EDT

  Modified files:  
/php4/ext/ircg  ircg_scanner.c ircg_scanner.re 
  Log:
  Fix underline handling
  
  

Index: php4/ext/ircg/ircg_scanner.c
diff -u php4/ext/ircg/ircg_scanner.c:1.6 php4/ext/ircg/ircg_scanner.c:1.7
--- php4/ext/ircg/ircg_scanner.c:1.6Thu Mar  8 10:59:46 2001
+++ php4/ext/ircg/ircg_scanner.cThu Mar  8 11:29:33 2001
@@ -1,4 +1,4 @@
-/* Generated by re2c 0.5 on Thu Mar  8 19:50:44 2001 */
+/* Generated by re2c 0.5 on Thu Mar  8 20:32:13 2001 */
 #line 1 "/home/sas/src/php4/ext/ircg/ircg_scanner.re"
 /*
+--+
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: ircg_scanner.c,v 1.6 2001/03/08 18:59:46 sas Exp $ */
+/* $Id: ircg_scanner.c,v 1.7 2001/03/08 19:29:33 sas Exp $ */
 
 #include ext/standard/php_smart_str.h
 #include stdio.h
@@ -143,10 +143,10 @@
 {
switch (ctx-underline_tag_open) {
case 0:
-   if (!final) smart_str_appends(ctx-result, "ul");
+   if (!final) smart_str_appends(ctx-result, "u");
break;
case 1:
-   smart_str_appends(ctx-result, "/ul");
+   smart_str_appends(ctx-result, "/u");
break;
}
 
@@ -189,7 +189,6 @@
end = msg + msg_len;
xp = msg;

-   
while (1) {
start = YYCURSOR;
 
@@ -200,14 +199,14 @@
YYCTYPE yych;
unsigned int yyaccept;
static unsigned char yybm[] = {
- 0,  64,  64,  64,  64,  64,  64,  64, 
-64,  64,  64,  64,  64,  64,  64,  64, 
-64,  64,  64,  64,  64,  64,  64,  64, 
+ 0,  64,   0,   0,  64,  64,  64,  64, 
 64,  64,  64,  64,  64,  64,  64,  64, 
 64,  64,  64,  64,  64,  64,  64,  64, 
 64,  64,  64,  64,  64,  64,  64,   0, 
+64,  64,  64,  64,  64,  64,   0,  64, 
+64,  64,  64,  64,  64,  64,  64,   0, 
192, 192, 192, 192, 192, 192, 192, 192, 
-   192, 192,  64,  64,  64,  64,  64,  64, 
+   192, 192,  64,  64,   0,  64,   0,  64, 
 64, 192, 192, 192, 192, 192, 192, 192, 
192, 192, 192, 192, 192, 192, 192, 192, 
192, 192, 192, 192, 192, 192, 192, 192, 
@@ -238,22 +237,31 @@
 yy0:
if((YYLIMIT - YYCURSOR)  4) YYFILL(4);
yych = *YYCURSOR;
-   if(yych = ''){
+   if(yych = '.'){
if(yych = '\003'){
-   if(yych = '\000')  goto yy17;
+   if(yych = '\000')  goto yy19;
if(yych = '\001')  goto yy16;
if(yych = '\002')  goto yy12;
goto yy4;
} else {
-   if(yych == '\025')  goto yy14;
-   if(yych = '%') goto yy16;
-   goto yy10;
+   if(yych = '\037'){
+   if(yych = '\036')  goto yy16;
+   goto yy14;
+   } else {
+   if(yych == '') goto yy10;
+   goto yy16;
+   }
}
} else {
if(yych = ''){
-   if(yych == '') goto yy6;
-   if(yych = '=') goto yy16;
-   goto yy8;
+   if(yych = ';'){
+   if(yych = '/') goto yy17;
+   goto yy16;
+   } else {
+   if(yych = '') goto yy6;
+   if(yych = '=') goto yy16;
+   goto yy8;
+   }
} else {
if(yych = 'Z'){
if(yych = '@') goto yy16;
@@ -264,70 +272,90 @@
}
}
 yy2:   yych = *++YYCURSOR;
-   if(yybm[0+yych]  128)  goto yy21;
-   if(yych == ':') goto yy23;
-   goto yy20;
+   if(yybm[0+yych]  128)  goto yy23;
+   if(yych == ':') goto yy25;
+   goto yy22;
 yy3:
-#line 215
+#line 214
{ passthru(STD_ARGS); continue; }
 yy4:   yych = *++YYCURSOR;
 yy5:
-#line 209
+#line 208
{ mctx.fg_code = mctx.bg_code = -1; STATE = STATE_COLOR_FG; continue; }
 yy6:   yych = *++YYCURSOR;
 yy7:
-#line 210
+#line 209
{ add_entity(STD_ARGS, "lt;"); continue; }
 yy8:   yych = *++YYCURSOR;
 yy9:
-#line 211
+#line 210
{ add_entity(STD_ARGS, "gt;"); continue; }
 yy10:  yych = *++YYCURSOR;
 yy11:
-#line 212
+#line 211
{ add_entity(STD_ARGS, "amp;"); continue; }
 yy12:  yych = *++YYCURSOR;
 yy13:
-#line 213
+#line 212
{ handle_bold(STD_ARGS, 0); continue; }
 yy14:  yych = *++YYCURSOR;
 yy15:
-#line 214
+#line 213
{ handle_underline(STD_ARGS, 0); continue; }
 yy16:  yych = 

Re: [PHP] Tell me if this works

2001-03-08 Thread Karl J. Stubsjoen

never mind... 'or - i fixed my own problem!  i enabled cacheing on both PHP
pages, the page with the image who's source calls the PHP page that creates
the image.


- Original Message -
From: "Karl J. Stubsjoen" [EMAIL PROTECTED]
To: "PHP Mailing List" [EMAIL PROTECTED]
Sent: Thursday, March 08, 2001 12:52 PM
Subject: [PHP] Tell me if this works


 I'm using the SetTimeOut function of JavaScript to refresh an image every
3
 seconds.  The SRC for the image is a PHP page which constructs a valid
image
 with some text added to the image and returns the image to the colling
 Image.  This works fine, however the information should be changing every
so
 often for the image.  The value to display in the image is a value being
 fetched from a table, that value is changing all the time.  The value is
set
 to the first-time-through value and then subsequent request of the image
 remain all the same (the image should be changing and it isn't).

 Is this a Javascript issue, browser issue, cache issue???
 I've tested it on a couple of different platforms, with no luck.  Here is
my
 JavaScript code:

 function GetStat() {
  var Image2
  Image2 = new Image(185,39)
  Image2.src = "GetStat.php"
  document.stat1.src = Image2
  setTimeout('GetStat()',3000)
   status = " "
 }

 img name="stat1" src="images/NumberDisplay.png" border=0

 Thanks for the help!


 --
 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-CVS] cvs: php4 /pear Cache.php /pear/Cache Container.php Error.php /pear/Cache/Container db.php file.php phplib.php

2001-03-08 Thread Ulf Wendel

uw  Thu Mar  8 12:39:17 2001 EDT

  Added files: 
/php4/pear/CacheError.php 

  Modified files:  
/php4/pear  Cache.php 
/php4/pear/CacheContainer.php 
/php4/pear/Cache/Container  db.php file.php phplib.php 
  Log:
  Added a basic Cache_Error class.
  
  
  

Index: php4/pear/Cache.php
diff -u php4/pear/Cache.php:1.5 php4/pear/Cache.php:1.6
--- php4/pear/Cache.php:1.5 Tue Mar  6 07:27:30 2001
+++ php4/pear/Cache.php Thu Mar  8 12:39:15 2001
@@ -16,15 +16,17 @@
 // |  Sebastian Bergmann [EMAIL PROTECTED]   |
 // +--+
 //
-// $Id: Cache.php,v 1.5 2001/03/06 15:27:30 sbergmann Exp $
+// $Id: Cache.php,v 1.6 2001/03/08 20:39:15 uw Exp $
 
+require_once "Cache/Error.php";
+
 /**
 * Cache is a base class for cache implementations.
 *
 * TODO: Simple usage example goes here.
 *
 * @author   Ulf Wendel [EMAIL PROTECTED]
-* @version  $Id: Cache.php,v 1.5 2001/03/06 15:27:30 sbergmann Exp $
+* @version  $Id: Cache.php,v 1.6 2001/03/08 20:39:15 uw Exp $
 * @package  Cache
 * @access   public 
 */
@@ -136,7 +138,7 @@
 * @parammixed   userdefined expire date
 * @paramstring  cache group
 * @return   boolean
-* @throws   CacheError
+* @throws   Cache_Error
 * @access   public
 * @see  getUserdata()
 */
Index: php4/pear/Cache/Container.php
diff -u php4/pear/Cache/Container.php:1.7 php4/pear/Cache/Container.php:1.8
--- php4/pear/Cache/Container.php:1.7   Thu Mar  8 03:57:15 2001
+++ php4/pear/Cache/Container.php   Thu Mar  8 12:39:15 2001
@@ -17,8 +17,10 @@
 // |  Christian Stocker [EMAIL PROTECTED] |
 // +--+
 //
-// $Id: Container.php,v 1.7 2001/03/08 11:57:15 chregu Exp $
+// $Id: Container.php,v 1.8 2001/03/08 20:39:15 uw Exp $
 
+require_once "Cache/Error.php";
+
 /**
 * Common base class of all cache storage container.
 * 
@@ -37,7 +39,7 @@
 * not recommended!
 * 
 * @author   Ulf Wendel [EMAIL PROTECTED]
-* @version  $Id: Container.php,v 1.7 2001/03/08 11:57:15 chregu Exp $
+* @version  $Id: Container.php,v 1.8 2001/03/08 20:39:15 uw Exp $
 * @package  Cache
 * @access   public
 * @abstract
@@ -208,7 +210,7 @@
 * @paramstring  dataset ID
 * @paramstring  cache group
 * @return   array   format: [expire date, cached data, user data]
-* @throws   CacheError
+* @throws   Cache_Error
 * @abstract
 */
 function fetch($id, $group) {
@@ -224,7 +226,7 @@
 * @paramstring  cache group
 * @paramstring  additional userdefined data
 * @return   boolean
-* @throws   CacheError
+* @throws   Cache_Error
 * @access   public
 * @abstract
 */
Index: php4/pear/Cache/Container/db.php
diff -u php4/pear/Cache/Container/db.php:1.8 php4/pear/Cache/Container/db.php:1.9
--- php4/pear/Cache/Container/db.php:1.8Thu Mar  8 03:57:16 2001
+++ php4/pear/Cache/Container/db.phpThu Mar  8 12:39:16 2001
@@ -17,7 +17,7 @@
 // |  Chuck Hagenbuch [EMAIL PROTECTED]   |
 // +--+
 //
-// $Id: db.php,v 1.8 2001/03/08 11:57:16 chregu Exp $
+// $Id: db.php,v 1.9 2001/03/08 20:39:16 uw Exp $
 
 require_once 'DB.php';
 require_once 'Cache/Container.php';
@@ -52,7 +52,7 @@
 * )
 *
 * @author   Sebastian Bergmann [EMAIL PROTECTED]
-* @version  $Id: db.php,v 1.8 2001/03/08 11:57:16 chregu Exp $
+* @version  $Id: db.php,v 1.9 2001/03/08 20:39:16 uw Exp $
 * @package  Cache
 */
 class Cache_Container_db extends Cache_Container {
@@ -81,17 +81,17 @@
 function Cache_Container_db($options)
 {
 if (!is_array($options) || !isset($options['dsn'])) {
-return new CacheError('No dsn specified!', __FILE__, __LINE__);
+return new Cache_Error('No dsn specified!', __FILE__, __LINE__);
 }
 
 $this-setOptions($options, array('dsn', 'cache_table'));
 
 if (!$this-dsn)
-return new CacheError('No dsn specified!', __FILE__, __LINE__);
+return new Cache_Error('No dsn specified!', __FILE__, __LINE__);
 
 $this-db = DB::connect($this-dsn, true);
 if (DB::isError($this-db)) {
-return new CacheError('DB::connect failed: ' . 
DB::errorMessage($this-db), __FILE__, __LINE__);
+return new Cache_Error('DB::connect failed: ' . 
+DB::errorMessage($this-db), __FILE__, __LINE__);
 } else {
 $this-db-setFetchMode(DB_FETCHMODE_ASSOC);
 }
@@ -108,7 +108,7 @@
 $res = $this-db-query($query);
 
 if (DB::isError($res))
-return new CacheError('DB::query failed: ' . DB::errorMessage($res), 
__FILE__, __LINE__);
+return new Cache_Error('DB::query failed: ' . DB::errorMessage($res), 
+__FILE__, __LINE__);
 
 $row = 

Re: [PHP] Announcement: Smarty template engine 1.3.1 released (1.3.1pl1)

2001-03-08 Thread Monte Ohrt

1.3.1pl1 fixed a bug with a missing function _syntax_error.

Monte Ohrt wrote:
 
 Homepage:
 http://www.phpinsider.com/php/code/Smarty/


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

2001-03-08 Thread george

I am building a site which pulls FAQ's out of the database onto a page,but
having just finished reading the FAQ's I realise that they will have to be
spread over a few pages,
how to I get the new page to take over where the old page finished.

TIA

george



-- 
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] HELP with Multi Dimensional Array Problem

2001-03-08 Thread Yev

Hi,
I've been trying to figure this out all night, and need some
assistance.

I have a form that takes input, and I'm trying to read the variables
directly into a MultiDim array ie:

input type=text name="field[text][email]" value="[EMAIL PROTECTED]"
input type=text name="field[text][url]" value="http://www.email.com"

Now upon the form's submission, these variables are only accessible in
$HTTP_GET_VARS (register_globals is Off)

Now, in the backend, I use a form processing functions that check the
input.. 

So, it sees $name="field[text][email]", and attempts to retrieve the
value, so in essense $HTTP_GET_VARS[$name] should return
"[EMAIL PROTECTED]", but it doesn't work..  
However, if i try to access $HTTP_GET_VARS[field][text][email] that
properly returns "[EMAIL PROTECTED]".

This works perfectly if the input names are just plain variables, but
when I try to read those variables into a predefined hash, I run into
problems.. 

Does anyone have any pointers, or suggestions?
Thanks in advance,
Yev

__
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.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-CVS] cvs: php4 /pear Cache.php /pear/Cache Container.php

2001-03-08 Thread Ulf Wendel

uw  Thu Mar  8 12:41:40 2001 EDT

  Modified files:  
/php4/pear  Cache.php 
/php4/pear/CacheContainer.php 
  Log:
  Formatting and minor inline doc changes.
  
  
  
Index: php4/pear/Cache.php
diff -u php4/pear/Cache.php:1.6 php4/pear/Cache.php:1.7
--- php4/pear/Cache.php:1.6 Thu Mar  8 12:39:15 2001
+++ php4/pear/Cache.php Thu Mar  8 12:41:39 2001
@@ -16,7 +16,7 @@
 // |  Sebastian Bergmann [EMAIL PROTECTED]   |
 // +--+
 //
-// $Id: Cache.php,v 1.6 2001/03/08 20:39:15 uw Exp $
+// $Id: Cache.php,v 1.7 2001/03/08 20:41:39 uw Exp $
 
 require_once "Cache/Error.php";
 
@@ -26,7 +26,7 @@
 * TODO: Simple usage example goes here.
 *
 * @author   Ulf Wendel [EMAIL PROTECTED]
-* @version  $Id: Cache.php,v 1.6 2001/03/08 20:39:15 uw Exp $
+* @version  $Id: Cache.php,v 1.7 2001/03/08 20:41:39 uw Exp $
 * @package  Cache
 * @access   public 
 */
@@ -281,5 +281,6 @@
 $last_run = time();
 }
 } // end func garbageCollection
+
 } // end class cache 
 ?
Index: php4/pear/Cache/Container.php
diff -u php4/pear/Cache/Container.php:1.8 php4/pear/Cache/Container.php:1.9
--- php4/pear/Cache/Container.php:1.8   Thu Mar  8 12:39:15 2001
+++ php4/pear/Cache/Container.php   Thu Mar  8 12:41:39 2001
@@ -17,7 +17,7 @@
 // |  Christian Stocker [EMAIL PROTECTED] |
 // +--+
 //
-// $Id: Container.php,v 1.8 2001/03/08 20:39:15 uw Exp $
+// $Id: Container.php,v 1.9 2001/03/08 20:41:39 uw Exp $
 
 require_once "Cache/Error.php";
 
@@ -39,7 +39,7 @@
 * not recommended!
 * 
 * @author   Ulf Wendel [EMAIL PROTECTED]
-* @version  $Id: Container.php,v 1.8 2001/03/08 20:39:15 uw Exp $
+* @version  $Id: Container.php,v 1.9 2001/03/08 20:41:39 uw Exp $
 * @package  Cache
 * @access   public
 * @abstract
@@ -364,6 +364,7 @@
 return serialize($data);
 } // end func encode
 
+
 /**
 * Decodes the data from the storage container.
 * 
@@ -376,19 +377,19 @@
 return unserialize($data);
 } // end func decode
 
+
 /**
 * Translates human readable/relative times in unixtime
 *
-* @var  mixed   can be in the following formats:
+* @param  mixed   can be in the following formats:
 *   human readable  : mmddhhmm[ss]] eg: 20010308095100
 *   relative in seconds (1) : +xx  eg: +10
 *   relative in seconds (2) : x   946681200   eg: 10
 *   absolute unixtime   : x  2147483648   eg: 2147483648
 *   see comments in code for details
+* @return integer unix timestamp
 */
-
 function getExpiresAbsolute($expires)
-
 {
 if (!$expires)
 return 0;
@@ -416,6 +417,8 @@
 $second = substr($expires, 12, 2);
 return mktime($hour, $minute, $second, $month, $day, $year);
 }
-}
-}
+
+} // end func getExpireAbsolute
+
+} // end class Container
 ?



-- 
PHP CVS 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] Dynamic Links..

2001-03-08 Thread Ashwin Kutty

I dont want to get into a long drawn out debate about the copyright
infringements since we have already established our agreements with the
companies..

You are right of course, sometimes the URL does tell it all, and as I
mentioned, and if you read my note carefully, "Their banners, logos,
URL's etc. appear on the pages.."; mind you this is also not required by
the company in question, but we are doing it nonetheless.. Thanks for
the heads up anyways..

"Boget, Chris" wrote:

   As a quick caveat you need to be *very* careful you're not
   obfuscating the target site copyright infringement, anyone?
  We wont.. Their banners, logos, URL's etc. appear on the
  pages, so even if it is in the frameset, it will be fine..

 Yes, but their URL won't be in the address line.  Not that it makes
 much of a difference, the site in question might actually care about
 that.  A URL is as much a product brand as a logo is.

 Chris

--
"Wise men talk because they have something to say; fools talk
because they have to say something." - Plato

Ashwin Kutty
Systems Administrator
Dalhousie University Libraries
(902) 494-2694




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

2001-03-08 Thread mat t

Please can you help:

I can't send duplicate input types to $HTTP_POST_VARS
For example:
---HTML---
First person:

NAME input type="text" name="Name" size="24" value=""
input name="Name_type" type="hidden" value="textbox"

Phone No.input type="text" name="Phone" size="24" value=""
input name="Phone_type" type="hidden" value="textbox" 

Second Person:

NAME input type="text" name="Name" size="24" value=""
input name="Name_type" type="hidden" value="textbox"

Phone No.input type="text" name="Phone" size="24" value=""
input name="Phone_type" type="hidden" value="textbox"

---

Then when I use :

reset ($HTTP_POST_VARS);
while (list ($key, $val) = each ($HTTP_POST_VARS))
  {
echo "$key = $valbr\n";
  }

Here is the output

Output--

Name = 
Name_type = textbox
Phone = 
Phone_type = textbox



What happened to the Second person?
How can I stop it ignoring duplicates and insert in the array 1 by 1?


_
Pick up your email anywhere in the world --- http://www.remail.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] $HTTP_POST_VARS

2001-03-08 Thread Jerry Lake

You're not setting a value for the first variable ie.."Name"
unless you put something in the text box to represent the variable
it will come across as empty.

Jerry Lake- [EMAIL PROTECTED]
Web Designer
Europa Communications - http://www.europa.com
Pacifier Online - http://www.pacifier.com


-Original Message-
From: mat t [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 08, 2001 2:10 PM
To: [EMAIL PROTECTED]
Subject: [PHP] $HTTP_POST_VARS


Please can you help:

I can't send duplicate input types to $HTTP_POST_VARS
For example:
---HTML---
First person:

NAME input type="text" name="Name" size="24" value=""
input name="Name_type" type="hidden" value="textbox"

Phone No.input type="text" name="Phone" size="24" value=""
input name="Phone_type" type="hidden" value="textbox" 

Second Person:

NAME input type="text" name="Name" size="24" value=""
input name="Name_type" type="hidden" value="textbox"

Phone No.input type="text" name="Phone" size="24" value=""
input name="Phone_type" type="hidden" value="textbox"

---

Then when I use :

reset ($HTTP_POST_VARS);
while (list ($key, $val) = each ($HTTP_POST_VARS))
  {
echo "$key = $valbr\n";
  }

Here is the output

Output--

Name = 
Name_type = textbox
Phone = 
Phone_type = textbox



What happened to the Second person?
How can I stop it ignoring duplicates and insert in the array 1 by 1?


_
Pick up your email anywhere in the world --- http://www.remail.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 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] strange files in my upload_tmp_dir

2001-03-08 Thread Gerard Onorato

Hello,

I should probably know the answer to this but I do not. I was hoping someone
here could offer me some incite.

I recently changed my upload_tmp_dir from the apache default; actually it
wasn't set at all, to another directory which I created for this purpose.
The directory is outside of the normally accessible directory structure for
apache web on my Linux box. I have no forms anywhere on the site which allow
FTP just yet. I manually uploaded a few files and have been downloading them
via a local VB program. So no PHP access to the directory yet.

Today I noticed about 20 files, all named something like php??. They are
from various time during the day and have a zero file length with no content
at all. I have no idea where these files are coming from. They are certainly
not session files as those are appearing correctly in another directory.

Any ideas on what these might be? Thanks very much!

Gerard Onorato


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

2001-03-08 Thread PeterOblivion

My goal.. 
Take an image (gif,jpg) from a remote server, resize it into 200x150 and then 
save it on my local server.
My friend gave me a premade script but that doesnt work. Anyone have 
something like this already done or know where to find it?

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




Re: [PHP] HELP!!! Date time problems!!!!

2001-03-08 Thread karakedi

figured out the logic,
but still cant make it run

i put this command :

echo diff_date("/", "05/03/2001") ;

to test the function. but it doest seem to work :(
any help ?

btw i believe it must be 24*60*60 inorder to 24*24*60 :)

""Pierre-Yves Lemaire"" [EMAIL PROTECTED] wrote in message
01c301c0a7e0$17f85f00$9ceee740@py">news:01c301c0a7e0$17f85f00$9ceee740@py...
 Hello,
 this is a function I use on my site, you can problably find
 your answer,
 py

 // =
 // This function returns the difference between a dates
 // and the current date.
 // arg1: separator
 // arg2: startdate  date dd mm 
 // return number of days of differences
 // ==
 function diff_date( $sep, $startdate ){
  // Date of file in database
  $startdate = explode( "$sep", $startdate );
  $startdate = mktime( 0, 0, 0, $startdate[1], $startdate[2],
 $startdate[0] );
  // Now
  $enddate = mktime( 0, 0, 0, date("n"), date("d"), date("Y") );
  // get difference in days by dividing by 24*24*60
  return ( $enddate - $startdate ) / ( 86400 );
 } // end function


 - Original Message -
 From: Bruno Freire [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Thursday, March 08, 2001 7:05 PM
 Subject: [PHP] HELP!!! Date time problems


  Hi, My name is Bruno, From Brazil.
 
  Yes...it's me again...hehehe
 
  Look...my problem is..
 
  I wanna make something like this:
 
  (10 november 2001) - (5 November 2001) = 5 days
 
  (10 november 2001) - (10 December 2001) = 30 days
 
  How can i do this
 
 
  Thanks for any help
 
  Your friend, Bruno From   !
 


 --
 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] external data saving

2001-03-08 Thread Petr Jza

Hi,
I have one question, please. Can anybody  help me with external data saving?
I require to save the user data (I suppose data will be in the text format)
from user (from his computer) to a database server. And I want not use
ActiveX technology because it must run even under Netscape. Are there
functions for work with files in Javascript?

Thank you very much.
Lot of regards, PETER



-- 
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 codes from 'mysql_error()'

2001-03-08 Thread Dennis Gearon

I do an insert using phpadmin, and i get back the error message (or
maybe it's a warning?) The insert is of a duplicate on a unique field. I
expected an error, but when I do mysql_error() or mysql_errno(), nothing
comes back(and I do it the next line in the script). the
'mysql_query($sql, $link)' function DOES insert when the value is
unique, DOES return false, but I'd like to inform the user what the
error was. PHP Admin can get the 'error' why can't I?

Please reply to me as well, OK? I'm trying to finish this script at work
today.
[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-CVS] cvs: php4 /pear Cache.php /pear/Cache Container.phpError.php /pear/Cache/Container db.php file.php phplib.php

2001-03-08 Thread Christian Stocker

 No Message Collected 

--
PHP CVS 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] HELP!!! Date time problems!!!!

2001-03-08 Thread karakedi

ok here is the right one working : smt was wrong with the arrays i beleive :

?php


// =
// This function returns the difference between a dates
// and the current date.
// arg1: separator
// arg2: startdate  date dd mm 
// return number of days of differences
// ==
function diff_date( $sep, $startdate ){
 // Date of file in database
 $startdate = explode( "$sep", $startdate );
 $startdate = mktime( 0, 0, 0, $startdate[1], $startdate[0],
$startdate[2] );
 // Now
 $enddate = mktime( 0, 0, 0, date("n"), date("d"), date("Y") );
 // get difference in days by dividing by 24*60*60
 return ( $enddate - $startdate ) / ( 86400 );
} // end function

echo diff_date("/", "05/3/2001") ;

?


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




Re: [PHP] external data saving

2001-03-08 Thread Michael Hall


Petr:

I'm not exactly clear about what you want to do, but ...

PHP can process user data and save it to databases. This is probably what
PHP does best. Javascript has nothing to do with this process (but you
can use it in your PHP pages if you want).

All I know about ActiveX is that it is a M$ technology that costs $$$ for
the software involved and it is not as easy to use as PHP.

Mick


On Fri, 9 Mar 2001, [iso-8859-2] Petr Jùza wrote:

 Hi,
 I have one question, please. Can anybody  help me with external data saving?
 I require to save the user data (I suppose data will be in the text format)
 from user (from his computer) to a database server. And I want not use
 ActiveX technology because it must run even under Netscape. Are there
 functions for work with files in Javascript?
 
 Thank you very much.
 Lot of regards, PETER
 
 
 
 -- 
 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] newbie: ye ol' nemesis using mysql_fetch_array to load data

2001-03-08 Thread Nicole Lallande

Hello all,

I have an order form where I am trying to load an option button with a
field column from a database file:

This part works fine (actually Professional PHP has an example using the
do...while statement - I wonder which is better?):

$len = mysql_num_rows($result); 
for ($i=0; $i=$len; $i++) {
  echo "option value=\"$catid[$i]\"$catid/option";
}  

The problem I have is loading the array - either I get the first or last
element of the array as a scalar variable or I get arrays of the word
'Array':

   while ($row = mysql_fetch_array($result)) {
 $rowid[] = $row["dnaProd_ID"];
 $catid[] = $row["Cat_ID"];
 $desc[] = $row["Description"];
 $size[] = $row["Pkg_size"];
 $price[] = $row["Price"];
   } 
and I have tried it without the [] - neither works.  I also tried this
with a for loop - replacing the while statement with 
   for($j=0; $j=$len; $j++) {
   $row = mysql_fetch_array($result); 
   $rowid[$j] = $row["dnaProd_ID"];
   $catid[$j] = $row["Cat_ID"];  etc, etc

nope ;{ sigh - checked the archives, books - saw a similar question
but I tried what they did and it did not work. This is one of those
instances where the solution is so simple I can't find it.

TIA for your help,

Nicole   
-- 

Nicole Lallande
[EMAIL PROTECTED]
760.753.6766


-- 
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] HELP!!! Date time problems!!!!

2001-03-08 Thread Pierre-Yves Lemaire

Yes, there was a little bug, it was set to handle date in /mm/dd and
not dd/mm/yyy.

Now this works ok.
py

function diff_date( $sep, $startdate ){
 // Date of file in database
 $startdate = explode( $sep, $startdate );
 $startdate = mktime( 0, 0, 0, $startdate[1], $startdate[0],
$startdate[2] );
 // Now
 $enddate = mktime( 0, 0, 0, date("n"), date("d"), date("Y") );
 // get difference in days by dividing by 24*24*60
 return ( $enddate - $startdate ) / ( 86400 );
} // end function


echo diff_date("/", "05/03/2001" ) ;


- Original Message -
From: karakedi [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, March 08, 2001 11:01 PM
Subject: Re: [PHP] HELP!!! Date time problems


 figured out the logic,
 but still cant make it run

 i put this command :

 echo diff_date("/", "05/03/2001") ;

 to test the function. but it doest seem to work :(
 any help ?

 btw i believe it must be 24*60*60 inorder to 24*24*60 :)

 ""Pierre-Yves Lemaire"" [EMAIL PROTECTED] wrote in message
 01c301c0a7e0$17f85f00$9ceee740@py">news:01c301c0a7e0$17f85f00$9ceee740@py...
  Hello,
  this is a function I use on my site, you can problably find
  your answer,
  py
 
  // =
  // This function returns the difference between a dates
  // and the current date.
  // arg1: separator
  // arg2: startdate  date dd mm 
  // return number of days of differences
  // ==
  function diff_date( $sep, $startdate ){
   // Date of file in database
   $startdate = explode( "$sep", $startdate );
   $startdate = mktime( 0, 0, 0, $startdate[1], $startdate[2],
  $startdate[0] );
   // Now
   $enddate = mktime( 0, 0, 0, date("n"), date("d"), date("Y") );
   // get difference in days by dividing by 24*24*60
   return ( $enddate - $startdate ) / ( 86400 );
  } // end function
 
 
  - Original Message -
  From: Bruno Freire [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Thursday, March 08, 2001 7:05 PM
  Subject: [PHP] HELP!!! Date time problems
 
 
   Hi, My name is Bruno, From Brazil.
  
   Yes...it's me again...hehehe
  
   Look...my problem is..
  
   I wanna make something like this:
  
   (10 november 2001) - (5 November 2001) = 5 days
  
   (10 november 2001) - (10 December 2001) = 30 days
  
   How can i do this
  
  
   Thanks for any help
  
   Your friend, Bruno From   !
  
 
 
  --
  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-CVS] cvs: php4 /pear/Cache Error.php

2001-03-08 Thread Sebastian Bergmann

sbergmann   Thu Mar  8 14:20:06 2001 EDT

  Modified files:  
/php4/pear/CacheError.php 
  Log:
  I think we need to load PEAR.php here.
  
Index: php4/pear/Cache/Error.php
diff -u php4/pear/Cache/Error.php:1.1 php4/pear/Cache/Error.php:1.2
--- php4/pear/Cache/Error.php:1.1   Thu Mar  8 12:39:15 2001
+++ php4/pear/Cache/Error.php   Thu Mar  8 14:20:06 2001
@@ -1,4 +1,26 @@
 ?php
+// +--+
+// | PHP version 4.0  |
+// +--+
+// | Copyright (c) 1997, 1998, 1999, 2000, 2001 The PHP Group |
+// +--+
+// | This source file is subject to version 2.0 of the PHP license,   |
+// | that is bundled with this package in the file LICENSE, and is|
+// | available at through the world-wide-web at   |
+// | http://www.php.net/license/2_02.txt. |
+// | If you did not receive a copy of the PHP license and are unable to   |
+// | obtain it through the world-wide-web, please send a note to  |
+// | [EMAIL PROTECTED] so we can mail you a copy immediately.   |
+// +--+
+// | Authors: Ulf Wendel [EMAIL PROTECTED]   |
+// |  Christian Stocker [EMAIL PROTECTED] |
+// |  Vinai Kopp [EMAIL PROTECTED]   |
+// +--+
+//
+// $Id: Error.php,v 1.2 2001/03/08 22:20:06 sbergmann Exp $
+
+require_once "PEAR.php";
+
 /**
 * Cache Error class
 * 



-- 
PHP CVS 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-CVS] cvs: php4 /pear/Cache Error.php

2001-03-08 Thread Sebastian Bergmann

sbergmann   Thu Mar  8 14:20:55 2001 EDT

  Modified files:  
/php4/pear/CacheError.php 
  Log:
  This is 100% pure Ulf :-)
  
Index: php4/pear/Cache/Error.php
diff -u php4/pear/Cache/Error.php:1.2 php4/pear/Cache/Error.php:1.3
--- php4/pear/Cache/Error.php:1.2   Thu Mar  8 14:20:06 2001
+++ php4/pear/Cache/Error.php   Thu Mar  8 14:20:55 2001
@@ -13,11 +13,9 @@
 // | [EMAIL PROTECTED] so we can mail you a copy immediately.   |
 // +--+
 // | Authors: Ulf Wendel [EMAIL PROTECTED]   |
-// |  Christian Stocker [EMAIL PROTECTED] |
-// |  Vinai Kopp [EMAIL PROTECTED]   |
 // +--+
 //
-// $Id: Error.php,v 1.2 2001/03/08 22:20:06 sbergmann Exp $
+// $Id: Error.php,v 1.3 2001/03/08 22:20:55 sbergmann Exp $
 
 require_once "PEAR.php";
 



-- 
PHP CVS 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-CVS] cvs: php4 /ext/ircg config.m4

2001-03-08 Thread Sascha Schumann

sas Thu Mar  8 15:07:07 2001 EDT

  Modified files:  
/php4/ext/ircg  config.m4 
  Log:
  Refine complain message
  
  
Index: php4/ext/ircg/config.m4
diff -u php4/ext/ircg/config.m4:1.3 php4/ext/ircg/config.m4:1.4
--- php4/ext/ircg/config.m4:1.3 Mon Feb 26 14:14:24 2001
+++ php4/ext/ircg/config.m4 Thu Mar  8 15:07:07 2001
@@ -9,7 +9,7 @@
 if test "$PHP_IRCG" != "no"; then
   $IRCG_CONFIG --ldflags
   if test "$?" != "0"; then
-AC_MSG_ERROR([Please verify that ircg-config is in your PATH or pass the path to 
ircg-config as --with-ircg-config])
+AC_MSG_ERROR([I cannot run the ircg-config script which should have been 
+installed by IRCG. Please ensure that the script is in your PATH or point --with-ircg 
+to the path of the script.])
   fi
   
   PHP_EVAL_LIBLINE(`$IRCG_CONFIG --ldflags`)



-- 
PHP CVS 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] HELP!!! Date time problems!!!!

2001-03-08 Thread karakedi

upss sorry couldnt see your latest post.
thx anywy :))


""karakedi"" [EMAIL PROTECTED] wrote in message
98942f$qcd$[EMAIL PROTECTED]">news:98942f$qcd$[EMAIL PROTECTED]...
 ok here is the right one working : smt was wrong with the arrays i beleive
:

 ?php


 // =
 // This function returns the difference between a dates
 // and the current date.
 // arg1: separator
 // arg2: startdate  date dd mm 
 // return number of days of differences
 // ==
 function diff_date( $sep, $startdate ){
  // Date of file in database
  $startdate = explode( "$sep", $startdate );
  $startdate = mktime( 0, 0, 0, $startdate[1], $startdate[0],
 $startdate[2] );
  // Now
  $enddate = mktime( 0, 0, 0, date("n"), date("d"), date("Y") );
  // get difference in days by dividing by 24*60*60
  return ( $enddate - $startdate ) / ( 86400 );
 } // end function

 echo diff_date("/", "05/3/2001") ;

 ?


 this one 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 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] newbie: ye ol' nemesis using mysql_fetch_array to loaddata

2001-03-08 Thread Aaron Tuller

At 3:37 PM -0800 3/8/01, Nicole Lallande wrote:
$len = mysql_num_rows($result);
for ($i=0; $i=$len; $i++) {
   echo "option value=\"$catid[$i]\"$catid/option";
}

I believe your problem is in that code becuase it's ambiguous and 
because $catid is an array and you're treating it as a regular 
variable.

what you should do is something like:

while ($row = mysql_fetch_array($result)) {
  $rowid[] = $row["dnaProd_ID"];
  $catid[] = $row["Cat_ID"];
  $desc[] = $row["Description"];
  $size[] = $row["Pkg_size"];
  $price[] = $row["Price"];
}

for($i = 0; $i  sizeof($catid); $i++)
{
$cat = $catid[$i];
echo "option value=\"$cat\"$cat/option";
}

or you could build this up during your first loop:

$optionValues = "";
while ($row = mysql_fetch_array($result)) {

$cat = $row["Cat_ID"];

$optionValues .= "option value=\"$cat\"$cat/option\n";
}

then just echo $optionValues whenever you want.

OR

you can create a generic function you can use anytime you want to 
make an option list, just pass in an array of options:

GenerateOptionValues($optionArr)
{
$string = "";
foreach($optionArr as $option}
{
$string .= "option value=\"$option\"$option/option\n";
}

return $string;
}

or if you need different values from the options, pass in an 
associateive array:

GenerateOptionValues($optionArr)
{
$string = "";
foreach($optionArr as $option = $value}
{
$string .= "option value=\"$value\"$option/option\n";
}

return $string;
}

alright, sorry for going on and on.

-aaron

-- 
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 use ob_get_contents() to send a page as email

2001-03-08 Thread kaab kaoutar

Hi
I've tried what, one of u, has kindly suggested, to send the whole html page 
as email :
i put at the beginning of the page
?mail('[EMAIL PROTECTED]', 'confirmation', ob_get_contents()); ?
and at the end, after /html
? ob_end_flush();?
but i receive  a blank email
Can u please help !
THANKS
_
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.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 Digest 8 Mar 2001 23:45:04 -0000 Issue 555

2001-03-08 Thread php-general-digest-help


php-general Digest 8 Mar 2001 23:45:04 - Issue 555

Topics (messages 43026 through 43091):

PHP Site - New Design
43026 by: Miles Thompson

[PHP-ES] (roberto celestino)MCAL! set-up.
43027 by: Celestino Roberto Alejandro

Re: Microtime math and display
43028 by: Shaun Thomas

GTK-PHP install doubt?
43029 by: Celestino Roberto Alejandro
43039 by: Adam Wright

exec timing out revisited
43030 by: Bill.Hoffman.walgreens.com

Re: Sessions, and timeout
43031 by: Bård Farstad

Sessions Kill all
43032 by: Randy Johnson
43045 by: Christian Reiniger
43051 by: Randy Johnson
43058 by: Christian Reiniger

PHPHOO2 support question
43033 by: Jim Knotts

Date Question
43034 by: Chris
43036 by: Jeff Oien
43037 by: John Huggins
43038 by: Jason Jacobs
43040 by: John Huggins

Qmail problem
43035 by: pete collins

need help w/ Split()
43041 by: Scott Walter
43043 by: Nathaniel Hekman
43053 by: Christian Reiniger

weeks
43042 by: Jason Jacobs
43056 by: Christian Reiniger

Formatting Dates
43044 by: stas
43049 by: Joe Sheble (Wizaerd)

Re: are sessions single threaded?
43046 by: Chris Carbaugh
43062 by: Chris Carbaugh

Re: populate select box with contents of a file?
43047 by: Jerry Lake
43052 by: Joe Sheble (Wizaerd)
43057 by: Jerry Lake

Re: Dynamic Links..
43048 by: Jon Haworth
43065 by: Ashwin Kutty
43066 by: Boget, Chris
43067 by: Richard S. Crawford
43076 by: Ashwin Kutty

refresh
43050 by: Miguel Loureiro

Stumped Newbie: Can't get results in db query even though everything checks - what am 
I missing?
43054 by: Nicole Lallande
43055 by: Nicole Lallande
43059 by: Joe Sheble (Wizaerd)
43061 by: Nicole Lallande

Re: Hebrew websites transition with php3 ..
43060 by: Boaz Yahav

HELP!!! Date time problems
43063 by: Bruno Freire
43069 by: Pierre-Yves Lemaire
43082 by: karakedi
43085 by: karakedi
43088 by: Pierre-Yves Lemaire
43089 by: karakedi

addslashes against single and double quotes
43064 by: Terry Romine

Re: sending SMS messages via PHP
43068 by: Henrik Hansen

Re: Developer certifications
43070 by: Krznaric Michael

Tell me if this works
43071 by: Karl J. Stubsjoen
43072 by: Karl J. Stubsjoen

Re: Announcement: Smarty template engine 1.3.1 released (1.3.1pl1)
43073 by: Monte Ohrt

displaying information
43074 by: george

HELP with Multi Dimensional Array Problem
43075 by: Yev

$HTTP_POST_VARS
43077 by: mat t
43078 by: Jerry Lake
43079 by: Nathaniel Hekman

strange files in my upload_tmp_dir
43080 by: Gerard Onorato

image resize
43081 by: PeterOblivion.aol.com

external data saving
43083 by: Petr Jùza
43086 by: Michael Hall

Error codes from 'mysql_error()'
43084 by: Dennis Gearon

newbie: ye ol' nemesis using mysql_fetch_array to load data
43087 by: Nicole Lallande
43090 by: Aaron Tuller

how to use ob_get_contents() to send a page as email
43091 by: kaab kaoutar

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]


--



Wow - it is much faster, good job, although the previous version was 
wonderfully exotic. Loved the popups for Quick Reference and Mirror Sites.

I would like to see one backward step --- ability to resize the font. In 
Netscape 4.7 and Internet Explorer 5 changing the font size doesn't work. 
In fact, this is really a utility site, so I'd like to see most 
"designerish" elements pushed to the back, as I believe they have been.

I can resize the displayed fonts in Netscape 6, but I don't usually run 
that browser.

So - is this a site designed from the "This is  the way the web is going?" 
point of view? Or did someone simply forget us old (50+) guys with bifocals?

Anyone tried it with Amaya?

Miles Thompson





Dear's partners...
 I download the source of the Mcal library and Drivers, and i have found a
doubt, because when i compile it, ever,  show an error  that can't give me
compile, then, i cant have correctly installed this library...
..I make the SF (structure of files), that this describe in its README, in
this say
...make..
../libmcal/
../libmcal/icap/
../libmcal/dummy/
..Are icap an dummy drivers for MCAL (Modular Calendar Acces Library), and
when i compile (also describe in README)
i give the option
./configure --with-icap
./ make (failed)
./ make install (also failed, obvious)
the error that i found is like the next:
/*OUTPUT*/
gcc -O0 -Wall -g  

Re: [PHP] Error codes from 'mysql_error()'

2001-03-08 Thread Aaron Tuller

mysql_query($sql) or die("there was an error: ".mysql_error());

-aaron

At 3:16 PM -0800 3/8/01, Dennis Gearon wrote:
I do an insert using phpadmin, and i get back the error message (or
maybe it's a warning?) The insert is of a duplicate on a unique field. I
expected an error, but when I do mysql_error() or mysql_errno(), nothing
comes back(and I do it the next line in the script). the
'mysql_query($sql, $link)' function DOES insert when the value is
unique, DOES return false, but I'd like to inform the user what the
error was. PHP Admin can get the 'error' why can't I?

Please reply to me as well, OK? I'm trying to finish this script at work
today.
[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] Qmail problem

2001-03-08 Thread David Robley

On Fri,  9 Mar 2001 03:43, pete collins wrote:
 I keep getting:
 qmail-inject: fatal: read error

 I've tried everything.

 Sendmail is symlinked to /var/qmail/bin/sendmail wrapper

 $ ls -l /usr/lib/sendmail
 lrwxrwxrwx   1 root root   28 Aug 25  2000
 /usr/lib/sendmail - ../../var/qmail/bin/sendmail

 $ ls -l /usr/sbin/sendmail
 lrwxrwxrwx   1 root root   28 Aug 25  2000
 /usr/sbin/sendmail - ../../var/qmail/bin/sendmail


 I have tried every permutation for my sendmail_path in php.ini

 I tested the php code i'm using from my FreeBSD box which uses sendmail
 and it all works fine.

 I can use qmail fine from perl.

 Does anyone have any ideas? This is down right silly. ;-)

 Thanks

 --pete

For me, on Slackware, this works:

~$ ls -l /usr/sbin/sendmail
lrwxrwxrwx   1 root root   23 Aug 28  2000 /usr/sbin/sendmail 
- /var/qmail/bin/sendmail*
~$ ls -l /usr/lib/sendmail
lrwxrwxrwx   1 root root   18 Jul 12  2000 /usr/lib/sendmail 
- /usr/sbin/sendmail*

sendmail_path   =   /usr/sbin/sendmail -t -i;for unix only, 
may supply arguments as well (default is sendmail -t) 

Cheers  
-- 
David Robley| WEBMASTER  Mail List Admin
RESEARCH CENTRE FOR INJURY STUDIES  | http://www.nisu.flinders.edu.au/
AusEinet| http://auseinet.flinders.edu.au/
Flinders University, ADELAIDE, SOUTH AUSTRALIA

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