|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
php-general Digest 17 Mar 2005 12:26:52 -0000 Issue 3343
php-general-digest-help
lists.php.net
Date: Thu Mar 17 2005 - 06:26:52 CST
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
php-general Digest 17 Mar 2005 12:26:52 -0000 Issue 3343
Topics (messages 210928 through 210965):
Re: incrementing a number from a text file
210928 by: Kurt Yoder
Re: recommending a PHP book?
210929 by: freaky.irish.gmail.com
Re: opt-in mail list best practice
210930 by: Jeff Schmidt
210954 by: Scott Haneda
PHP source code formatter for OS X
210931 by: DuSTiN KRySaK
Seleting records
210932 by: Simon Allison
210933 by: David Robley
obscure error message - PHP Notice: (null)(): Permission denied (errflg=2) in Unknown on line 0
210934 by: Zinovi Boyadjiev
FreeBSD php upgrade oddity - can't load dynamic libraries
210935 by: Al Arzaga
Session time out
210936 by: Jacques
210937 by: yangshiqi
210955 by: Jacques
Re: showing the decimal places
210938 by: Rob Agar
210941 by: Kim Madsen
Re: db to xml using php]
210939 by: K Karthik
db to xml using php
210940 by: K Karthik
210959 by: K Karthik
Re: PHP Classes
210942 by: Kim Madsen
Re: How to access any function of a any class?
210943 by: Kim Madsen
210949 by: pf.sistemasdinamicos.com.ar
210953 by: pf.sistemasdinamicos.com.ar
210962 by: pf.sistemasdinamicos.com.ar
VERY basic function question
210944 by: William Stokes
210946 by: YaronKh.clalit.org.il
210947 by: Chris Ramsay
210948 by: YaronKh.clalit.org.il
SimpleXML and xpath woes
210945 by: Simon Turvey
Re: php 4 & php 5
210950 by: Bostjan Skufca . domenca.com
210951 by: Bostjan Skufca . domenca.com
Re: Strange PHP5 message
210952 by: Andrei Verovski (aka MacGuru)
something stupid... split().
210956 by: Chris Knipe
210960 by: Chris Knipe
210961 by: Kim Madsen
Re: [PEAR] Re: HTTP_Download to track amount of bytes downloaded help
210957 by: Ken
210958 by: Ken
multiple OR's
210963 by: AndreaD
210964 by: AndreaD
210965 by: AndreaD
Administrivia:
To subscribe to the digest, e-mail:
php-general-digest-subscribe
lists.php.net
To unsubscribe from the digest, e-mail:
php-general-digest-unsubscribe
lists.php.net
To post to the list, e-mail:
php-general
lists.php.net
----------------------------------------------------------------------
attached mail follows:
On Mar 15, 2005, at 11:24 AM, Richard Lynch wrote:
> BAD (probably):
>>>>> Select blablabla FROM t1,t2,t3
>>>>> WHERE customers LIKE '%$s%'
>>>>> OR name LIKE '%$s%'
>>>>> OR domain LIKE '%$s%'
>>>>> OR email LIKE '%$s%'
>>>>> OR log LIKE '%$s%'
>>>>> AND t1.id = t2.t1_id
>>>>> AND t1.id = t3.t1_id
>
> GOOD (usually):
>>>>> Select blablabla FROM t1,t2,t3
>>>>> WHERE (customers LIKE '%$s%'
>>>>> OR name LIKE '%$s%'
>>>>> OR domain LIKE '%$s%'
>>>>> OR email LIKE '%$s%'
>>>>> OR log LIKE '%$s%')
>>>>> AND t1.id = t2.t1_id
>>>>> AND t1.id = t3.t1_id
>
> Note parentheses added around OR expressions.
>
I see. Thanks for the info.
--
Kurt Yoder
http://yoderhome.com
attached mail follows:
Try this:
http://www.free-itebooks.com/php-mysql-free-itebooks/
and maybe you'll find ebook you're looking for
attached mail follows:
Todd Trent wrote:
> This works fine for a few test emails. What I would like to know is
what is
> considered best practice considering the following things:
>
> - This could be hosted on shared hosting server.
> - Opt-in list could be less than 100 or in the 1000s.
> - May need a way to track sending success.
>
Hello Todd,
This is solely my suggestion on the matter, and I don't think I could
classify this as 'best practice', as it is just my opinion (although it
might be). I suggest that you setup a mailing list that is managed by a
mailing list package, like GNU Mailman, or some other mailing list
manager. A good mailing list manager is designed to track issues like
mail being successfully sent, user unsubscribe, etc. Let the mailing
list manager software do what it is good at, and have your script simply
email your messages to the mailing list, which then takes care of
distribution.
If setting up a mailing list server is not possible on your shared
host (very likely in a shared hosting setup), it is possible you might
be able to setup a list with a third-party mailing-list hosting site.
I've not researched this personally, but I'm sure probably multiple such
services exist.
It should be possible, I think, in such a situation, to automate
subscribing users to the list, from your scripts, when they create an
account on your website (as well as initially adding all the users
currently in the database, but you'd probably use a run-once script that
did that in a batch).
Anyhow, that is just my thoughts on the matter. Packages like
Mailman are very good at managing mailing lists, so I would just use
something like that to take care of that problem.
Jeff Schmidt
attached mail follows:
on 3/16/05 12:46 PM, Todd Trent at todd
hogfishdesign.com wrote:
> - This could be hosted on shared hosting server.
> - Opt-in list could be less than 100 or in the 1000đs.
> - May need a way to track sending success.
Check this out:
<http://phpmailer.sourceforge.net/>
I use it to create HTML emails, send them to 1000's of people. I think I
did a test to 30K or so, it handled it fine using mail locally.
As for tracking, what we do is embed a image bug in the html and track when
that loads, it is getting less reliable in todays anti spam world, but in my
case these are paying subscribers so they generally want to get these
emails.
To track your users, at least the bounces we set the bounce address
(return-path) to mysql_user_id
domain.com and POP check domain.com every few
seconds. We then scan for the bounce address and mark that user as bouncing
x times, if they go over y we cancel the account.
Many will want you to use mailman and such, a mailing list manager, but if
you want to do custom mailings to each person, to integrate all this is just
not gonna be easy.
--
-------------------------------------------------------------
Scott Haneda Tel: 415.898.2602
<http://www.newgeo.com> Novato, CA U.S.A.
attached mail follows:
Does anyone know of a PHP source code formatter to clean up sloppy code
that runs on OS X?
d
attached mail follows:
Hello,
My news table has a year field as such
Year
--------
2000
2000
2001
2001
2003
2005
2005
I was wondering if you could select from this table so you only get one of
each year, so the output would be
2000
2001
2003
2005
Is this possible, I was trying to think of an algorithm that would work, but
I have had no luck yet?
Thanks,
Simon
attached mail follows:
Simon Allison wrote:
> Hello,
>
>
>
> My news table has a year field as such
>
>
>
> Year
>
> --------
>
> 2000
>
> 2000
>
> 2001
>
> 2001
>
> 2003
>
> 2005
>
> 2005
>
>
>
> I was wondering if you could select from this table so you only get one of
> each year, so the output would be
>
>
>
> 2000
>
> 2001
>
> 2003
>
> 2005
>
>
>
> Is this possible, I was trying to think of an algorithm that would work,
> but I have had no luck yet?
Use mysql DISTINCT
SELECT DISTINCT(year-field) FROM table
attached mail follows:
Hello,
I am getting this strange error while developing imap mail to mysql
inporting script :
PHP Notice: (null)(): Permission denied (errflg=2) in Unknown on line 0
I am getting it at the end of the script execution without affecting any
actual script functionality.
I am using PHP 4.3.10 CLI interface on Windows
Does someone experienced the same problem ? Do you have any solution or hint
where to look for ?
Regards,
Zinovi
attached mail follows:
I'm running FreeBSD 5.2.1, and last night I cvsupped to the latest
ports.
This afternoon, I proceeded to upgrade PHP from 5.0.1 to 5.0.3.
But I kept getting these errors when restarting apache that it could not
find various shared libraries in /usr/local/lib/php/20041030
I see that I'm supposed to have such a directory, but what I do have is
a /usr/local/lib/php/20040412 instead. (Pointing to that directory in
php.ini clearly is not the answer.)
Similar errors appear when running from the command line:
[kungpao:~]$ php -v
PHP Warning: PHP Startup: Unable to load dynamic library
'/usr/local/lib/php/20041030/ctype.so' - Cannot open
"/usr/local/lib/php/20041030/ctype.so" in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library
'/usr/local/lib/php/20041030/simplexml.so' - Cannot open
"/usr/local/lib/php/20041030/simplexml.so" in Unknown on line
0
PHP Warning: PHP Startup: Unable to load dynamic library
'/usr/local/lib/php/20041030/dom.so' - Cannot open
"/usr/local/lib/php/20041030/dom.so" in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library
'/usr/local/lib/php/20041030/gd.so' - Cannot open
"/usr/local/lib/php/20041030/gd.so" in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library
'/usr/local/lib/php/20041030/iconv.so' - Cannot open
"/usr/local/lib/php/20041030/iconv.so" in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library
'/usr/local/lib/php/20041030/ldap.so' - Cannot open
"/usr/local/lib/php/20041030/ldap.so" in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library
'/usr/local/lib/php/20041030/mysql.so' - Cannot open
"/usr/local/lib/php/20041030/mysql.so" in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library
'/usr/local/lib/php/20041030/odbc.so' - Cannot open
"/usr/local/lib/php/20041030/odbc.so" in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library
'/usr/local/lib/php/20041030/oracle.so' - Cannot open
"/usr/local/lib/php/20041030/oracle.so" in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library
'/usr/local/lib/php/20041030/pcre.so' - Cannot open
"/usr/local/lib/php/20041030/pcre.so" in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library
'/usr/local/lib/php/20041030/pdf.so' - Cannot open
"/usr/local/lib/php/20041030/pdf.so" in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library
'/usr/local/lib/php/20041030/posix.so' - Cannot open
"/usr/local/lib/php/20041030/posix.so" in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library
'/usr/local/lib/php/20041030/session.so' - Cannot open
"/usr/local/lib/php/20041030/session.so" in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library
'/usr/local/lib/php/20041030/sqlite.so' - Cannot open
"/usr/local/lib/php/20041030/sqlite.so" in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library
'/usr/local/lib/php/20041030/tokenizer.so' - Cannot open
"/usr/local/lib/php/20041030/tokenizer.so" in Unknown on line
0
PHP Warning: PHP Startup: Unable to load dynamic library
'/usr/local/lib/php/20041030/xml.so' - Cannot open
"/usr/local/lib/php/20041030/xml.so" in Unknown on line 0
PHP 5.0.3 (cli) (built: Mar 16 2005 20:27:24)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v2.0.3, Copyright (c) 1998-2004 Zend Technologies
[kungpao:~]$
I've tried re-installing just the base install without any php
configurations but to no avail.
Can anyone provide some insight on how I may solve this?
-Al
attached mail follows:
What is the life time of a PHP session object (variable)? Which conditional
test can I perform to check if the session object has timed out?
Jacques
attached mail follows:
In your php.ini, session.gc_maxlifetime=1440;
Best regards,
Yang Shiqi
-----Original Message-----
From: Jacques [mailto:admin
hrfocus.co.za]
Sent: Thursday, March 17, 2005 1:48 PM
To: php-general
lists.php.net
Subject: [PHP] Session time out
What is the life time of a PHP session object (variable)? Which conditional
test can I perform to check if the session object has timed out?
Jacques
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
Is session time measured in seconds or minutes?
Regards
Jacques
"Jacques" <admin
hrfocus.co.za> wrote in message
news:20050317054744.54178.qmail
lists.php.net...
> What is the life time of a PHP session object (variable)? Which
> conditional test can I perform to check if the session object has timed
> out?
>
> Jacques
attached mail follows:
> From: ross
aztechost.com [mailto:ross
aztechost.com]
> when I define a number as
>
> $number = 2.00
>
> then echo it the number shows as 2. How can I get the two
> zeros to show?
>
> This is not in any of my books but a fairly easy solution I'll bet!
the function you want is called sprintf (s for string, f for format)
summat like this:
echo sprintf('%0.2f', $number);
hth,
Rob Agar
attached mail follows:
-----Original Message-----
From: ross
aztechost.com [mailto:ross
aztechost.com]
Sent: Thursday, March 17, 2005 1:21 AM
> when I define a number as
> $number = 2.00
> then echo it the number shows as 2. How can I get the two zeros to
show?
Are You _sure_ the var is declared as a float? Have a look at gettype()
http://dk2.php.net/manual/en/function.gettype.php
$number += 2.00;
Should convert the var to a float according to:
http://dk2.php.net/manual/en/language.types.type-juggling.php#language.t
ypes.typecasting
--
Med venlig hilsen / best regards
ComX Networks A/S
Kim Madsen
Systemudvikler
Naverland 31
DK-2600 Glostrup
www.comx.dk
Telefon: +45 70 25 74 74
Telefax: +45 70 25 73 74
E-mail: km
comx.dk
attached mail follows:
attached mail follows:
can anyone help me to write from db to xml using php.
if there is any site please do refer me.
thanks,
karthik
attached mail follows:
can anyone help me to write from db to xml using php.
if there is any site please do refer me.
thanks,
karthik
attached mail follows:
sir,
i downloaded the zip from
http://php.chregu.tv/sql2xml/. and then i couldnt know what i am suppose
to do..
when i tried running the file am getting error
Fatal error: main() [function.require]: Failed opening required
'XML/sql2xml.php' (include_path='.:/usr/local/lib/php') in
/home/kkarthik/web/XML_sql2xml-0.3.2/sql2xml_ext.php on line 20
what shd i do..
thanks,
karthik
attached mail follows:
-----Original Message-----
From: Phil Neeb [mailto:06prneeb
alma.edu]
Sent: Wednesday, March 16, 2005 8:58 PM
> I've gone through the PHP Manual a few times now, reading about classes,
> but really, what's written there doesn't make a whole lot of sense to
> me. I know a lot, if not the vast majority, of PHP programmers use
> classes, so I was wondering if some of you could explain them to me.
> What are the benefits of using classes? What's the format of a class?
> I'd like to know things like that and anything else you folks would like
> to teach me. Thanks
This is a PHP maillist, Youīre asking about a programming concept. Google for oop+tutorial for info.
In short a class is a bunch of functions, which manipulates the same area of data, for instance a SQL class which contains a select, insert, update and a delete function.
--
Med venlig hilsen / best regards
ComX Networks A/S
Kim Madsen
Systemudvikler/Systemdeveloper
Naverland 31
DK-2600 Glostrup
www.comx.dk
Telefon: +45 70 25 74 74
Telefax: +45 70 25 73 74
E-mail: km
comx.dk
attached mail follows:
-----Original Message-----
From: pf
sistemasdinamicos.com.ar [mailto:pf
sistemasdinamicos.com.ar]
Sent: Wednesday, March 16, 2005 2:27 PM
To: php-general
lists.php.net
Subject: [PHP] How to access any function of a any class?
Hello.
Please consider this:
class A {
[snip]
class B {
[snip]
class Container{
function Container(){
[snip]
$MyOBJ=new Container();
> The problem is that "sometimes" member functions and variables can be
> reached this way, but sometimes not (mainly variables or file pointers)
> depending WHEN you create the object and when (for example) you create a
> file pointer inside some class.
> What I want to do is to be able to use any function of any class from any
> function of any class.
Thatīs not possible if You wanna do _entirely_ OOPD programming. You can let B inherits from A and let Container inherits from B then an instance of Container will contain all functions, but a instance from A cannot call the function Container. Read more here: http://dk2.php.net/manual/en/keyword.extends.php
You could just drop the idea of several classes or the OOP programming (I removed the D on purpose due to the bad design ;-)
--
Med venlig hilsen / best regards
ComX Networks A/S
Kim Madsen
Systemudvikler/Systemdeveloper
Naverland 31
DK-2600 Glostrup
www.comx.dk
Telefon: +45 70 25 74 74
Telefax: +45 70 25 73 74
E-mail: km
comx.dk
attached mail follows:
>
> -----Original Message-----
> From: pf
sistemasdinamicos.com.ar [mailto:pf
sistemasdinamicos.com.ar]
> Sent: Wednesday, March 16, 2005 2:27 PM
> To: php-general
lists.php.net
> Subject: [PHP] How to access any function of a any class?
>
> Hello.
> Please consider this:
>
> class A {
> [snip]
>
> class B {
> [snip]
>
> class Container{
> function Container(){
> [snip]
>
> $MyOBJ=new Container();
>
>
>> The problem is that "sometimes" member functions and variables can be
>> reached this way, but sometimes not (mainly variables or file pointers)
>> depending WHEN you create the object and when (for example) you create a
>> file pointer inside some class.
>
>> What I want to do is to be able to use any function of any class from
>> any
>> function of any class.
>
> Thatīs not possible if You wanna do _entirely_ OOPD programming. You can
> let B inherits from A and let Container inherits from B then an instance
> of Container will contain all functions, but a instance from A cannot call
> the function Container. Read more here:
> http://dk2.php.net/manual/en/keyword.extends.php
I'm sorry Kim, but it is possible, I've made a web hosting control panel
using entirely this approach and it is working very well for months now. A
demo: http://cpdemo.sistemasdinamicos.com.ar/
Just a snip of the class that creates a domain (any other class uses
exactle the same constructor):
class CDominio
{
function CDominio(&$cont)
{
$this->ct= &$cont;
$this->classname=get_class($this);
}
#
#
function CreateDomain($d,$SecLevel="1",$UserType="1") /*UserType 1)
reseller 2) user*/
{
$d=trim($d);
$new_user_id=$this->ct->syf->user_uniqid(2);
if(!$this->ct->db->query("insert into dominios (dominio, user_id) values
('$d', '$new_user_id')")) {
die(gettext("Unable to insert new domain"));
}
//Si el usuario que crea es un reseller, tomamos la info de su PC
if($this->ct->cr->sess->user['perms'] == "reseller") {
Look how I can access any member using the container class (which has a
reference to every class used in the script)
For ex: $this->ct->db->query...
The db class contained by ct (the container)
or
$this->ct->cr->sess
the cr object (another container [contained in the ct] that contains all
the core classes=session, authentication, security)
But, this approach works ok statically or in single scripts, but I have
problems, for example with this:
class A, B and the Container the same as before
and thne you add (for example) a socket pointer to the Container (from the
main script or from B), then you if you do
is_resource($this->Container->SocketPointer) from A the poiter is not
there.
It seems that "sometimes" it works as expected and sometimes not.
It do work when you add the class to the container after you add the
pointer to it (I've found this today)
Googling I also found that I should first create tmp copies of the objects
before adding them to the container class (I was trying to find the link
to post it here, but forgot the query I've made).
Perhaps I should try php5, I was told it has MUCH BETTER objects.
Thanks for your answer.
>
> You could just drop the idea of several classes or the OOP programming (I
> removed the D on purpose due to the bad design ;-)
>
> --
> Med venlig hilsen / best regards
> ComX Networks A/S
> Kim Madsen
> Systemudvikler/Systemdeveloper
> Naverland 31
>
> DK-2600 Glostrup
> www.comx.dk
> Telefon: +45 70 25 74 74
> Telefax: +45 70 25 73 74
> E-mail: km
comx.dk
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
Hernán Marino
attached mail follows:
> Hi
>
> -----Original Message-----
> From: pf
sistemasdinamicos.com.ar [mailto:pf
sistemasdinamicos.com.ar]
> Sent: Thursday, March 17, 2005 10:04 AM
>
>> I'm sorry Kim, but it is possible, I've made a web hosting control panel
>> using entirely this approach and it is working very well for months now.
>> A
>> demo: http://cpdemo.sistemasdinamicos.com.ar/
>
> As I understood You wanted to create an instance of class a and directly
> access class Bīs functions with $A->function_from_b();
>
> THAT is only solved if Your class A inherits from B
>
> #######################################
>
> class CDominio
> {
>
> function CDominio(&$cont)
> {
> $this->ct= &$cont;
> $this->classname=get_class($this);
> }
> #
> function CreateDomain($d,$SecLevel="1",$UserType="1") /*UserType 1)
> reseller 2) user*/
> {
> $d=trim($d);
> $new_user_id=$this->ct->syf->user_uniqid(2);
> if(!$this->ct->db->query("insert into dominios (dominio, user_id) values
> ('$d', '$new_user_id')")) {
> die(gettext("Unable to insert new domain"));
> }
>
>
> ####################################################
>
>> Look how I can access any member using the container class (which has a
>> reference to every class used in the script)
>
>> For ex: $this->ct->db->query...
>> The db class contained by ct (the container)
>> or $this->ct->cr->sess
>> the cr object (another container [contained in the ct] that contains all
>> the core classes=session, authentication, security)
>
> But is it true to OOPD? No :-) Workarounds can always be made, but then
> You miss the whole concept of OOPD and all the advantages. This is not
> easy read code, right?
>
>> Perhaps I should try php5, I was told it has MUCH BETTER objects.
>
> I think You WILL run into problems with the current code in PHP5, since it
> introduces private and
> public functions.
I dont think so, because nothing is declared private in the present code.
But OOPD is not the point, nor it benefits (I found that trying to to be
complaint with EVERY specification and rule is a whole job on itself).
The point of my post was to know if somebody knows a way to use this
approach consistently, without the oddities I've found while programming.
Anyway thanks A LOT for your answers (and your time), I'll try php5 and
see what happens.
>
> But if it works for You then thatīs cool ;-)
>
> Sincerely
> Kim Madsen
>
>
attached mail follows:
>> I dont think so, because nothing is declared private in the present
>> code.
>
> But they _might_ be as default in PHP5 ;-) Thatīs the really annoying
> difference between JAVA and C++, one is public by default, the other is
> private by default. I donīt know which approach theyīve chosen in PHP5, I
> would be surprised if they chose to do it different than C++, since these
> languages are very similar, syntax-wise, IE itīs public
>
>> The point of my post was to know if somebody knows a way to use this
>> approach consistently, without the oddities I've found while
>> programming.
>
> Inherit is the way to do it, the whole idea of OOPD is to give access to
> only the stuff the user needs:
>
> Class User {
> Function list_users(){}
> }
> Class Supervisor extends User {
> Function edit_users(){}
> }
> Class Admin extends Supervisor {
> Function delete_users(){}
> }
> Class Ceo extends Supervisor {
> Function sack_employee(){}
> }
>
Nice clear example, it very clearly shows the OOP design concept.
But (and there's always a but ;) real life problems are not so easy to
abstract all the time, and inevitable you always end "fixing something in
a rush" just to make it work (you know what I mean ;)
This doesn't mean you care little of the quality or security or speed of
your code, but as Lee Iacocca (GM's former ceo) used to say "don`t matter
how much information you collect before, to hit the duck you will almost
always end moving the rifle" (not exactly quote, but that's the idea).
So unless you go trough a strict programming cycle, defining precisely
prerequisites, use cases, identifying objects, etc, etc all things you
would expect more in a "serious" (read big) company, you (read I) just
write down the main objects I can think off, then write a couple of ideas
of what the client wants (read what I would want if I was him) and then
start writing some code.
In this my "OOPD killing" design approach :), 100% of the time is more
usefull to keep things all accesible so you can use them the second you
need them and rely in other means for access restriction (permissions,
etc).
Anyway, the way you mention is THE way to go, definitly, but you have that
little overhead of pre design tasks, that are not always worth, except in
big collaborative envs, etc.
> This way an instance of supervisor can list and edit users, but NOT delete
> them
> Admin can also delete them, but not fire any
> The CEO can fire a person, but not delete a user (for a number of reasons)
>
> YOU wanna give the user access to all, not good ;-)
>
>> Anyway thanks A LOT for your answers (and your time), I'll try php5 and
>> see what happens.
>
> No problem :-)
>
> /Kim
>
>
>
attached mail follows:
I'm trying to learn functions (just started). I can't see why this fails:
<?php
function count($var)
{
if ($var == 10){
$result = $var + 10;
return $result;
}
else {
$result = $var + 20;
return $result;
}
}
$setvar = 10;
count($setvar);
echo "$result";
?>
I probably just didn't understand my manual. Any ideas?
Thanks
-Will
attached mail follows:
Hi
Dont call you function count
-----Original Message-----
From: William Stokes [mailto:kalles
operamail.com]
Sent: Thursday, March 17, 2005 10:25 AM
To: php-general
lists.php.net
Subject: [PHP] VERY basic function question
I'm trying to learn functions (just started). I can't see why this fails:
<?php
function count($var)
{
if ($var == 10){
$result = $var + 10;
return $result;
}
else {
$result = $var + 20;
return $result;
}
}
$setvar = 10;
count($setvar);
echo "$result";
?>
I probably just didn't understand my manual. Any ideas?
Thanks
-Will
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
On Thu, 17 Mar 2005 10:24:31 +0200, William Stokes <kalles
operamail.com> wrote:
> I'm trying to learn functions (just started). I can't see why this fails:
> <?php
> function count($var)
You cannot use count as a function name - count() actually does
something - see the php manual
> {
> if ($var == 10){
> $result = $var + 10;
> return $result;
> }
> else {
> $result = $var + 20;
> return $result;
> }
> }
> $setvar = 10;
> count($setvar);
> echo "$result";
> ?>
This is what you may want:
<?php
function my_count($var)
{
if ($var == 10){
$result = $var + 10;
return $result;
}
else {
$result = $var + 20;
return $result;
}
}
$setvar = 10;
echo my_count($setvar);
?>
>
> I probably just didn't understand my manual. Any ideas?
>
> Thanks
> -Will
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
attached mail follows:
And another thing
Let say you called you function count1
Change :
count1($setvar);
to :
$result = count1($setvar);
echo "$result";
-----Original Message-----
From: William Stokes [mailto:kalles
operamail.com]
Sent: Thursday, March 17, 2005 10:25 AM
To: php-general
lists.php.net
Subject: [PHP] VERY basic function question
I'm trying to learn functions (just started). I can't see why this fails:
<?php
function count($var)
{
if ($var == 10){
$result = $var + 10;
return $result;
}
else {
$result = $var + 20;
return $result;
}
}
$setvar = 10;
count($setvar);
echo "$result";
?>
I probably just didn't understand my manual. Any ideas?
Thanks
-Will
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
Hi all,
(Apologies for the larger than normal wrapping - there are some long lines)
I'm playing with SimpleXML for reading REST responses from Amazon Web Services.
Having successfuly read the response to my request I'd like to perform an xpath query
on the result. I've pared down the original response to a static XML file for testing
purposes containing the following:
<ItemLookupResponse xmlns="http://webservices.amazon.com/AWSECommerceService/2005-02-23">
<OperationRequest>
<HTTPHeaders>
<Header Name="UserAgent"/>
</HTTPHeaders>
<RequestId>0MTRFP41HYDBPAEM41Q5</RequestId>
<Arguments>
<Argument Name="Service" Value="AWSECommerceService"/>
<Argument Name="SubscriptionId" Value="055S8QK9GNAKPNMYQZ02"/>
<Argument Name="ItemId" Value="0201788977"/>
<Argument Name="Operation" Value="ItemLookup"/>
</Arguments><RequestProcessingTime>0.0166029930114746</RequestProcessingTime>
</OperationRequest>
<Items>
<Request>
<IsValid>True</IsValid>
<ItemLookupRequest>
<ItemId>0201788977</ItemId>
</ItemLookupRequest>
</Request>
<Item>
<ASIN>0201788977</ASIN>
<ItemAttributes>
<Author>Hesham Soliman</Author>
<ProductGroup>Book</ProductGroup>
<Title>Mobile IPv6 : Mobility in a Wireless Internet</Title>
</ItemAttributes>
</Item>
</Items>
</ItemLookupResponse>
The code looks like this:
$xml = simplexml_load_file('test.xml');
$result = $xml->xpath($query);
var_dump($result);
When:
$query = '//*';
Everything is fine and an enormous array of matching elements is returned. However, when:
$query = '//ItemLookupResponse';
var_dump returns:
array(0) {
}
Either a) I'm doing something terribly wrong (and I thought that I was attempting a pretty
simple xpath query) or b) SimpleXML's broken.
I'd prefer a) - it's easier to fix :)
Thanks a bunch,
Simon Turvey
attached mail follows:
Abandon all your hopes, this will not work (unless you do some heavy
programming/patching) because modules interfere with each other. I've been
trying this for a week without success.
Still the best/easiest approach is to set up ordinary apache/PHP4 server
combination with proxy support compiled in, then configure it to forward
all .php5 requests to another apache/PHP5 server (listening i.e. internally
on 127.0.0.1:81)
PHP3/PHP4 was a diffferent situation, do not compare it to this one.
Bostjan
On Wednesday 16 March 2005 13:45, Kim Madsen wrote:
> -----Original Message-----
> From: Rasmus Lerdorf [mailto:rasmus
lerdorf.com]
> Sent: Tuesday, March 15, 2005 4:05 AM
>
> > > That's why I'd like to stick with apache2 + php5 default and
> > > apache2+php4 just for a single site hosted (the one that uses imp).
> >
> > See my previous message describing the ProxyPass approach. It is by far
> > the easiest way to solve this cleanly.
>
> Iīve only been on the list for a couple of weeks, so sorry if itīs already
> been answered but couldnīt one use 2 AddTypes?
>
> LoadModule php4_module libexec/libphp4.so
> AddType application/x-httpd-php .php4
>
> LoadModule php5_module libexec/libphp5.so
> AddType application/x-httpd-php5 .php .php5
>
> AddModule mod_php4.c
> AddModule mod_php5.c
>
> I believe thatīs how we did it while testing 3 vs 4 at one of my previous
> jobs (the ISP World Online/Tiscali), worked for hosted customers aswell.
>
> --
> Med venlig hilsen / best regards
> ComX Networks A/S
> Kim Madsen
> Systemudvikler
> Naverland 31
>
> DK-2600 Glostrup
> www.comx.dk
> Telefon: +45 70 25 74 74
> Telefax: +45 70 25 73 74
> E-mail: km
comx.dk
attached mail follows:
Versioned libraries do not work either.
Bostjan
On Wednesday 16 March 2005 23:11, Rasmus Lerdorf wrote:
> Kim Madsen wrote:
> > -----Original Message-----
> > From: Rasmus Lerdorf [mailto:rasmus
lerdorf.com]
> > Sent: Tuesday, March 15, 2005 4:05 AM
> >
> >>>That's why I'd like to stick with apache2 + php5 default and
> >>>apache2+php4 just for a single site hosted (the one that uses imp).
> >>
> >>See my previous message describing the ProxyPass approach. It is by far
> >>the easiest way to solve this cleanly.
> >
> > Iīve only been on the list for a couple of weeks, so sorry if itīs
> > already been answered but couldnīt one use 2 AddTypes?
> >
> > LoadModule php4_module libexec/libphp4.so
> > AddType application/x-httpd-php .php4
> >
> > LoadModule php5_module libexec/libphp5.so
> > AddType application/x-httpd-php5 .php .php5
> >
> > AddModule mod_php4.c
> > AddModule mod_php5.c
> >
> > I believe thatīs how we did it while testing 3 vs 4 at one of my previous
> > jobs (the ISP World Online/Tiscali), worked for hosted customers aswell.
>
> Nope, this won't work. libphp4.so and libphp5.so will have a lot of
> symbol clashes. You could attempt compiling versioned libraries here,
> but we really haven't tested that.
>
> -Rasmus
attached mail follows:
Hi, Jason,
Thanks a lot for suggestion. Does it mean that I have tried to
serialize some object (like adodb db object)? How I can eliminate this?
I really cannot find where this object or whatever else is going to be
serailized. The problematic line of code just serialized an array.
On Mar 16, 2005, at 18:30, Jason Barnett wrote:
> Andrei Verovski wrote:
> ...
>> Notice: serialize() [function.serialize]: __sleep should return an
>> array
>> only containing the names of instance-variables to serialize. in
>> ANVphpApp.php on line 840
>>
>>
>> Anyone knows what is the problem?
>
> Exactly what the notice says ;) basically __sleep is used so that you
> can prevent certain properties (file pointers, db connections, objects,
> etc.) from being serialized.
>
> <?php
>
> session_start();
> error_reporting(E_ALL);
>
> class Dummy {
> public $s1 = 'I am a test string';
> protected $s2 = 'I am the protected string';
> private $_s3 = 'I am the private string';
> var $a1 = array('testing', 1, 2, 3);
> static $i1 = 0;
>
> function __sleep() {
> $i = self::$i1++;
> echo "Oops, I forgot everything! $i\n";
> return array();
> }
> }
>
> class hasMemory extends Dummy {
>
> private $_fp = NULL;
>
> function __construct() {
> $this->_fp = fopen('/path/to/some/file', 'r');
> }
>
> function __sleep() {
> $props_to_save = array('s1', 's2', 'a1');
> echo "I know about the following properties:\n";
> print_r($props_to_save);
> return $props_to_save;
> }
> }
>
> $_SESSION['obj1'] = new Dummy();
> $_SESSION['obj2'] = new hasMemory();
> $_SESSION['string'] = '123abcdefg!';
> $_SESSION['integer'] = 1;
> $_SESSION['float'] = .1234;
> $_SESSION['double'] = .1234567890123456;
> $_SESSION['bool'] = TRUE;
>
> foreach ($_SESSION as $key => $value) {
> echo "$key: ";
> var_dump(serialize($value));
> }
>
> ?>
>
> --
> Teach a man to fish...
>
> NEW? | http://www.catb.org/~esr/faqs/smart-questions.html
> STFA | http://marc.theaimsgroup.com/?l=php-general&w=2
> STFM | http://php.net/manual/en/index.php
> STFW | http://www.google.com/search?q=php
> LAZY |
> http://mycroft.mozdev.org/download.html?
> name=PHP&submitform=Find+search+plugins
>
*********************************************
* Best Regards --- Andrei Verovski
*
* Personal Home Page
* http://snow.prohosting.com/guru4mac/
* Mac, Linux, DTP, Development, IT WEB Site
*********************************************
attached mail follows:
Message-ID: <000701c52ae2$bcd1d1d0$0a01a8c0
ops.cenergynetworks.com>
Reply-To: "Chris Knipe" <savage
savage.za.org>
From: "Chris Knipe" <savage
savage.za.org>
To: <php-general
lists.php.net>
Date: Thu, 17 Mar 2005 13:16:16 +0200
MIME-Version: 1.0
Content-Type: text/plain;
format=flowed;
charset="iso-8859-1";
reply-type=original
Content-Transfer-Encoding: 7bit
Subject: something stupid... split().
Lo all,
echo ConvertTime($AcctSessionTime/90); # Returns: 03:17:46.7666666667
I am trying to drop the .whatever.. Thus,
list($Duration, $none) = split('.', ConvertTime($AcctSessionTime/90), 2);
However, $Duration is empty, and $none has the whole string from
ConvertTime.... As I said, something silly ;)
Thanks for the help.
--
Chris.
attached mail follows:
[] was the answer... Something stupid sorted :)
--
Chris
----- Original Message -----
From: "Chris Knipe" <savage
savage.za.org>
To: <php-general
lists.php.net>
Sent: Thursday, March 17, 2005 1:16 PM
Subject: [PHP] something stupid... split().
> Lo all,
>
> echo ConvertTime($AcctSessionTime/90); # Returns: 03:17:46.7666666667
>
> I am trying to drop the .whatever.. Thus,
>
> list($Duration, $none) = split('.', ConvertTime($AcctSessionTime/90), 2);
>
>
> However, $Duration is empty, and $none has the whole string from
> ConvertTime.... As I said, something silly ;)
>
> Thanks for the help.
>
> --
> Chris.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
attached mail follows:
-----Original Message-----
From: Chris Knipe [mailto:savage
savage.za.org]
Sent: Thursday, March 17, 2005 12:16 PM
To: php-general
lists.php.net
Subject: [PHP] something stupid... split().
> echo ConvertTime($AcctSessionTime/90); # Returns: 03:17:46.7666666667
> I am trying to drop the .whatever.. Thus,
> list($Duration, $none) = split('.', ConvertTime($AcctSessionTime/90),
2);
> However, $Duration is empty, and $none has the whole string from
> ConvertTime.... As I said, something silly ;)
"." means any char in regular expressions.
list($Duration, $none) = split('\.', ConvertTime($AcctSessionTime/90),
2);
will do the trick for ya.
--
Med venlig hilsen / best regards
ComX Networks A/S
Kim Madsen
Systemudvikler/Systemdeveloper
Naverland 31
DK-2600 Glostrup
www.comx.dk
Telefon: +45 70 25 74 74
Telefax: +45 70 25 73 74
E-mail: km
comx.dk
attached mail follows:
On Thu, 17 Mar 2005 12:19:38 +0100, Ken <kenkam
gmail.com> wrote:
> Header for download script
> ****************************************
> http://localhost/download.php?fid=1&SID=bb9309b20034a71e4c59382028afd1c3&user=strikers
>
> GET /download.php?fid=1&SID=bb9309b20034a71e4c59382028afd1c3&user=strikers
> HTTP/1.1
> Host: localhost
> User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.6)
> Gecko/20050225 Firefox/1.0.1
> Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
> Accept-Language: en-us,en;q=0.5
> Accept-Encoding: gzip,deflate
> Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
> Keep-Alive: 300
> Connection: keep-alive
> Referer: http://localhost/?item=repository&cat=2
> Cookie: wordpressuser_86a9106ae65537651a8e456835b316ab=admin;
> GALLERYSID=c8dd063a064de9c093628f3e5ebc9f1c;
> wordpresspass_86a9106ae65537651a8e456835b316ab=0f2f790150e18652ee1c7ff3deb39670;
> comment_author_86a9106ae65537651a8e456835b316ab=Administrator;
> comment_author_email_86a9106ae65537651a8e456835b316ab=kenkam%40gmail.com;
> visited=y; userdetails[unique]=2ab983fb60321d8de1045100c656cf5e;
> userdetails[username]=strikers; userdetails[loggedin]=y;
> phpbb2mysql_data=a%3A2%3A%7Bs%3A11%3A%22autologinid%22%3Bs%3A32%3A%221a1dc91c907325c69271ddf0c944bc72%22%3Bs%3A6%3A%22userid%22%3Bi%3A2%3B%7D;
> PHPSESSID=bb9309b20034a71e4c59382028afd1c3;
> phpbb2mysql_sid=5e345aa85f774eeece28ecae74742716;
> phpbb2mysql_t=a%3A1%3A%7Bi%3A12%3Bi%3A1111057793%3B%7D
>
> HTTP/1.x 200 OK
> Date: Thu, 17 Mar 2005 11:10:04 GMT
> Server: Apache/2.0.49 (Win32) PHP/4.3.10
> X-Powered-By: PHP/4.3.10
> Pragma: cache
> Cache-Control: public, must-revalidate, max-age=0
> Accept-Ranges: bytes
> x-sent-by: PEAR::HTTP::Download
> content-disposition: attachment; filename="KPM1.avi"
> Etag: "2063849717d32dd19e534b77cabac517--856247520"
> Content-Length: 0
> Keep-Alive: timeout=15, max=84
> Connection: Keep-Alive
> Content-Type: application/x-octetstream
> *********** END ************
>
> And after I refresh the page:
> ***********************************************
> http://localhost/?item=repository&cat=2
>
> GET /?item=repository&cat=2 HTTP/1.1
> Host: localhost
> User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.6)
> Gecko/20050225 Firefox/1.0.1
> Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
> Accept-Language: en-us,en;q=0.5
> Accept-Encoding: gzip,deflate
> Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
> Keep-Alive: 300
> Connection: keep-alive
> Referer: http://localhost/?item=repository&cat=1
> Cookie: wordpressuser_86a9106ae65537651a8e456835b316ab=admin;
> GALLERYSID=c8dd063a064de9c093628f3e5ebc9f1c;
> wordpresspass_86a9106ae65537651a8e456835b316ab=0f2f790150e18652ee1c7ff3deb39670;
> comment_author_86a9106ae65537651a8e456835b316ab=Administrator;
> comment_author_email_86a9106ae65537651a8e456835b316ab=kenkam%40gmail.com;
> visited=y; userdetails[unique]=2ab983fb60321d8de1045100c656cf5e;
> userdetails[username]=strikers; userdetails[loggedin]=y;
> phpbb2mysql_data=a%3A2%3A%7Bs%3A11%3A%22autologinid%22%3Bs%3A32%3A%221a1dc91c907325c69271ddf0c944bc72%22%3Bs%3A6%3A%22userid%22%3Bi%3A2%3B%7D;
> PHPSESSID=bb9309b20034a71e4c59382028afd1c3;
> phpbb2mysql_sid=5e345aa85f774eeece28ecae74742716;
> phpbb2mysql_t=a%3A1%3A%7Bi%3A12%3Bi%3A1111057793%3B%7D
> Cache-Control: max-age=0
>
> HTTP/1.x 200 OK
> Date: Thu, 17 Mar 2005 11:10:10 GMT
> Server: Apache/2.0.49 (Win32) PHP/4.3.10
> X-Powered-By: PHP/4.3.10
> Cache-Control: no-store, no-cache, must-revalidate, max-age=0
> Pragma: no-cache
> Expires: Sat, 01 Jan 2000 00:00:00 GMT
> Set-Cookie: visited=y; expires=Fri, 18-Mar-2005 11:10:10 GMT
> Keep-Alive: timeout=15, max=80
> Connection: Keep-Alive
> Transfer-Encoding: chunked
> Content-Type: text/html; charset=ISO-8859-1
> ****************END*****************
>
> I strongly believe that this is a ffox problem. It does not happen at
> all with IE...
>
> Ken
>
> On Thu, 17 Mar 2005 11:43:27 +0100, Michael Wallner <mike
php.net> wrote:
> > Hi Ken, you wrote:
> >
> > > Thanks for the reply
> > > Second thing:
> > > I am getting errors from refreshing the page after I cancel the download:
> > >
> > > Warning: fseek(): supplied argument is not a valid stream resource in
> > > C:\php\pear\HTTP\download.php on line 849
> > >
> > > Warning: fread(): supplied argument is not a valid stream resource in
> > > C:\php\pear\HTTP\download.php on line 855
> > >
> > > I am using firefox 1.01... i don't know if its firefox or not (since
> > > ie doesn't seem to have the error).
> > >
> > > I fixed it by adding
in front of fseek and fread... would this have
> > > an effect on the performance?
> >
> > Yes a tiny bit, which should be neglible for downloads...
> >
> > However, the HTTP headers you receive when this happens may help a
> > lot (which shouldn't be too hard to discover with livehttpheaders).
> >
> > Does the same error occur if you hit "Go" instead of "Refresh"?
> >
> > Thanks,
> > --
> > Michael - < mike(
)php.net >
> >
> >
> >
>
attached mail follows:
i forgot to add: pressing go has the same effect as refresh.
On Thu, 17 Mar 2005 12:20:12 +0100, Ken <kenkam
gmail.com> wrote:
> On Thu, 17 Mar 2005 12:19:38 +0100, Ken <kenkam
gmail.com> wrote:
> > Header for download script
> > ****************************************
> > http://localhost/download.php?fid=1&SID=bb9309b20034a71e4c59382028afd1c3&user=strikers
> >
> > GET /download.php?fid=1&SID=bb9309b20034a71e4c59382028afd1c3&user=strikers
> > HTTP/1.1
> > Host: localhost
> > User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.6)
> > Gecko/20050225 Firefox/1.0.1
> > Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
> > Accept-Language: en-us,en;q=0.5
> > Accept-Encoding: gzip,deflate
> > Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
> > Keep-Alive: 300
> > Connection: keep-alive
> > Referer: http://localhost/?item=repository&cat=2
> > Cookie: wordpressuser_86a9106ae65537651a8e456835b316ab=admin;
> > GALLERYSID=c8dd063a064de9c093628f3e5ebc9f1c;
> > wordpresspass_86a9106ae65537651a8e456835b316ab=0f2f790150e18652ee1c7ff3deb39670;
> > comment_author_86a9106ae65537651a8e456835b316ab=Administrator;
> > comment_author_email_86a9106ae65537651a8e456835b316ab=kenkam%40gmail.com;
> > visited=y; userdetails[unique]=2ab983fb60321d8de1045100c656cf5e;
> > userdetails[username]=strikers; userdetails[loggedin]=y;
> > phpbb2mysql_data=a%3A2%3A%7Bs%3A11%3A%22autologinid%22%3Bs%3A32%3A%221a1dc91c907325c69271ddf0c944bc72%22%3Bs%3A6%3A%22userid%22%3Bi%3A2%3B%7D;
> > PHPSESSID=bb9309b20034a71e4c59382028afd1c3;
> > phpbb2mysql_sid=5e345aa85f774eeece28ecae74742716;
> > phpbb2mysql_t=a%3A1%3A%7Bi%3A12%3Bi%3A1111057793%3B%7D
> >
> > HTTP/1.x 200 OK
> > Date: Thu, 17 Mar 2005 11:10:04 GMT
> > Server: Apache/2.0.49 (Win32) PHP/4.3.10
> > X-Powered-By: PHP/4.3.10
> > Pragma: cache
> > Cache-Control: public, must-revalidate, max-age=0
> > Accept-Ranges: bytes
> > x-sent-by: PEAR::HTTP::Download
> > content-disposition: attachment; filename="KPM1.avi"
> > Etag: "2063849717d32dd19e534b77cabac517--856247520"
> > Content-Length: 0
> > Keep-Alive: timeout=15, max=84
> > Connection: Keep-Alive
> > Content-Type: application/x-octetstream
> > *********** END ************
> >
> > And after I refresh the page:
> > ***********************************************
> > http://localhost/?item=repository&cat=2
> >
> > GET /?item=repository&cat=2 HTTP/1.1
> > Host: localhost
> > User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.6)
> > Gecko/20050225 Firefox/1.0.1
> > Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
> > Accept-Language: en-us,en;q=0.5
> > Accept-Encoding: gzip,deflate
> > Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
> > Keep-Alive: 300
> > Connection: keep-alive
> > Referer: http://localhost/?item=repository&cat=1
> > Cookie: wordpressuser_86a9106ae65537651a8e456835b316ab=admin;
> > GALLERYSID=c8dd063a064de9c093628f3e5ebc9f1c;
> > wordpresspass_86a9106ae65537651a8e456835b316ab=0f2f790150e18652ee1c7ff3deb39670;
> > comment_author_86a9106ae65537651a8e456835b316ab=Administrator;
> > comment_author_email_86a9106ae65537651a8e456835b316ab=kenkam%40gmail.com;
> > visited=y; userdetails[unique]=2ab983fb60321d8de1045100c656cf5e;
> > userdetails[username]=strikers; userdetails[loggedin]=y;
> > phpbb2mysql_data=a%3A2%3A%7Bs%3A11%3A%22autologinid%22%3Bs%3A32%3A%221a1dc91c907325c69271ddf0c944bc72%22%3Bs%3A6%3A%22userid%22%3Bi%3A2%3B%7D;
> > PHPSESSID=bb9309b20034a71e4c59382028afd1c3;
> > phpbb2mysql_sid=5e345aa85f774eeece28ecae74742716;
> > phpbb2mysql_t=a%3A1%3A%7Bi%3A12%3Bi%3A1111057793%3B%7D
> > Cache-Control: max-age=0
> >
> > HTTP/1.x 200 OK
> > Date: Thu, 17 Mar 2005 11:10:10 GMT
> > Server: Apache/2.0.49 (Win32) PHP/4.3.10
> > X-Powered-By: PHP/4.3.10
> > Cache-Control: no-store, no-cache, must-revalidate, max-age=0
> > Pragma: no-cache
> > Expires: Sat, 01 Jan 2000 00:00:00 GMT
> > Set-Cookie: visited=y; expires=Fri, 18-Mar-2005 11:10:10 GMT
> > Keep-Alive: timeout=15, max=80
> > Connection: Keep-Alive
> > Transfer-Encoding: chunked
> > Content-Type: text/html; charset=ISO-8859-1
> > ****************END*****************
> >
> > I strongly believe that this is a ffox problem. It does not happen at
> > all with IE...
> >
> > Ken
> >
> > On Thu, 17 Mar 2005 11:43:27 +0100, Michael Wallner <mike
php.net> wrote:
> > > Hi Ken, you wrote:
> > >
> > > > Thanks for the reply
> > > > Second thing:
> > > > I am getting errors from refreshing the page after I cancel the download:
> > > >
> > > > Warning: fseek(): supplied argument is not a valid stream resource in
> > > > C:\php\pear\HTTP\download.php on line 849
> > > >
> > > > Warning: fread(): supplied argument is not a valid stream resource in
> > > > C:\php\pear\HTTP\download.php on line 855
> > > >
> > > > I am using firefox 1.01... i don't know if its firefox or not (since
> > > > ie doesn't seem to have the error).
> > > >
> > > > I fixed it by adding
in front of fseek and fread... would this have
> > > > an effect on the performance?
> > >
> > > Yes a tiny bit, which should be neglible for downloads...
> > >
> > > However, the HTTP headers you receive when this happens may help a
> > > lot (which shouldn't be too hard to discover with livehttpheaders).
> > >
> > > Does the same error occur if you hit "Go" instead of "Refresh"?
> > >
> > > Thanks,
> > > --
> > > Michael - < mike(
)php.net >
> > >
> > >
> > >
> >
>
attached mail follows:
Looking for the most code efficient way to do multiple boolean OR's on one
line
if ($name==andrea) OR ($name==john)
Ta
AD
attached mail follows:
Looking for the most code efficient way to do multiple boolean OR's on one
line
if ($name==andrea) OR ($name==john)
Ta
AD
attached mail follows:
Looking for the most code efficient way to do multiple boolean OR's on one
line
if ($name==andrea) OR ($name==john)
Ta
AD
- text/directory attachment: Alden_Arzaga.vcf
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]