[PHP] XML deprecated Call-time pass-by-reference

2003-01-20 Thread kellan
I have an RSS parser that uses PHP's expat XML functions.  Recently PHP
started complaining about Call-time pass-by-reference has been
deprecated whenever I used the idiom:

xml_set_object( $this-parser, $this );

Does that mean the function xml_set_object has been deprecated as well? 
Is there another preferred way to call xml_set_object?  Is there another
preferred way to wrap XML parsing inside an object?

Thanks
Kellan

ps.  the full text of the warning is:

Call-time pass-by-reference has been deprecated - argument passed by
value;  If you would like to pass it by reference, modify the declaration
of xml_set_object().  If you would like to enable call-time
pass-by-reference, you can set allow_call_time_pass_reference to true in
your INI file.  However, future versions may not support this any longer. 
in /home/kellan/projs/magpierss/rss_parse.inc on line 124

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] JOIN for FREE ... Learn and Earn

2003-01-20 Thread Charles Cedeno
Hello:

My name is Charles Cedeno. I am now focusing in one online
opportunity.I have tried several of these opportunities full of hype
promising us thousands of dollars every month. I would get all excited and
run to my family and friends with another Great Money Maker .  It is a
sad fact that many people who are in need of additional income, are being
victimized by these fly by night scam artists. 
As a result of trying all these opportunities, I finally found the
company which is true to their words. Not full of hype, but consistently
send me the monthly check. They have given me the best compensation plan
with their high % commission. I didn't have to perform some juggling act
to maintain some 60 to 40% balance in my legs. It is not a pyramid, so
there are no legs. It is not one of those binary compensation plan
failures either. Everyone earns commissions here. They are providing a
real service not the one that simply transfers wealth from the new signups
to the people at the top.
When you join, you will have a team of up line sponsors who will help
you succeed every step of the way. Instead of being left alone, you will
be guided step by step by real people, not those auto responders. Only you
can make your own success together with the help of your sponsors. If you
have 2 to 3 hours a day, you will be able to earn a full income in a few
months. And there is absolutely no limit as to how much you can earn. It
is designed to gain momentum after some time. But I prefer to avoid such
statements as You will get rich. I read it everywhere and will not allow
myself to sound like them. I experienced it personally, you can be
comfortable. 
To get your FREE membership ID, send email to [EMAIL PROTECTED] and
put REGISTER ME FOR FREE in the subject and your full name in the body
of your email. Also include the statement below in the body of your email.
By submitting a request for a FREE DHS Club membership I agree to receive
emails from DHS Club for both their Consumer and Business Opportunities.
I will then register you into the system. You will receive a confirmation
email asking you to verify. Open it up and activate your free membership
immediately. Then set back and watch as your new business explodes.


Best regards,


Charles Cedeno


Note: You don't need to request for removal. This is a one-time email.
Your email address will be automatically de-activated in our list if you
don't respond to this mail.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] PHP and Sessions?

2003-01-20 Thread Tim Thorburn
Hi,

I've created a password protected area on the site I'm working on using PHP 
Sessions - I've done this several times before without any 
difficulty.  This time, I've copied my old code - made the necessary 
changes for login/passwd/database names, yet the sessions don't appear to 
be working.

I've been comparing the PHP settings on each server - the server that works 
is using 4.2.2, the one that does not is using 4.1.2.  Other than that, the 
only difference is that on the server that works I've changed the path to 
the PHP include dir (from the server set default into my account).

Can anyone offer any suggestions?



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP and Sessions?

2003-01-20 Thread Sean Burlington
Tim Thorburn wrote:

Hi,

I've created a password protected area on the site I'm working on using 
PHP Sessions - I've done this several times before without any 
difficulty.  This time, I've copied my old code - made the necessary 
changes for login/passwd/database names, yet the sessions don't appear 
to be working.

I've been comparing the PHP settings on each server - the server that 
works is using 4.2.2, the one that does not is using 4.1.2.  Other than 
that, the only difference is that on the server that works I've changed 
the path to the PHP include dir (from the server set default into my 
account).

Can anyone offer any suggestions?




This is by far the most FAQ on this list...

what changed
http://www.php.net/manual/en/language.variables.predefined.php

why it changed
http://www.php.net/manual/en/security.registerglobals.php


 In PHP 4.2.0 and later, the default value for the PHP directive 
register_globals is off. This is a major change in PHP. Having 
register_globals off affects the set of predefined variables available 
in the global scope. For example, to get DOCUMENT_ROOT you'll use 
$_SERVER['DOCUMENT_ROOT'] instead of $DOCUMENT_ROOT, or $_GET['id'] from 
the URL http://www.example.com/test.php?id=3 instead of $id, or 
$_ENV['HOME'] instead of $HOME.

For related information on this change, read the configuration entry for 
register_globals, the security chapter on Using Register Globals , as 
well as the PHP 4.1.0 and 4.2.0 Release Announcements.

Using the available PHP Reserved Predefined Variables, like the 
superglobal arrays, is preferred.

--

Sean


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] XML deprecated Call-time pass-by-reference

2003-01-20 Thread Jason Wong
On Monday 20 January 2003 16:43, kellan wrote:
 I have an RSS parser that uses PHP's expat XML functions.  Recently PHP
 started complaining about Call-time pass-by-reference has been
 deprecated whenever I used the idiom:

 xml_set_object( $this-parser, $this );

Assuming that xml_set_object() has been defined correctly then to get rid of 
that error/warning message simply use:

  xml_set_object( $this-parser, $this );

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *

/*
With all the fancy scientists in the world, why can't they just once
build a nuclear balm?
*/


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] ssl:// with fsockopen () on Windows XP

2003-01-20 Thread Alexander Stirmlinger
Hello,

when I try to open a SSL-connection via ssl:// with fsockopen () on Windows
XP and PHP 4.3.0, I get the following error message:

no SSL support in this build...

I tried to add extension=php_openssl.dll in my php.ini and copied
libeay32.dll into the SYSTEM32-directory, but that doesn't help.

Is it possible to use SSL-support in the standard windows binary
distribution or do I have to build PHP from the source by myself?

Thanks in advance,
alex.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Which country?

2003-01-20 Thread Martin Thoma
Hello!

Is there a way to get to know from which country a user is calling the
webside with my php-script?

Martin



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Which country?

2003-01-20 Thread Timothy Hitchens \(HiTCHO\)
Yes and no... you can use whois information about the IP class or enlist
the services
from a GEO firm that provides database information that includes
information down to
and including Cities etc.

The accuracy of this type of service in some areas of the world is not
exactly accurate
but usable.

Look for PHP whois classes but remember that most registries restrict
the number of requests these
days.



Timothy Hitchens (HiTCHO)
Open Source Consulting
e-mail: [EMAIL PROTECTED]

 -Original Message-
 From: Martin Thoma [mailto:[EMAIL PROTECTED]] 
 Sent: Monday, 20 January 2003 8:06 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Which country?
 
 
 Hello!
 
 Is there a way to get to know from which country a user is 
 calling the webside with my php-script?
 
 Martin
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] building apache 1.3.27 + php 4.3.0

2003-01-20 Thread Stain

when building apache 1.3.27 + php 4.3.0 i found out several errors, depending 
of what options i added with configure.

these are my configure commands

PHP:
./configure --with-apache=../apache_1.3.27 --with-mysql

APACHE:
./configure --with-layout=Apache --prefix=/usr/local/install/apache/ 
--activate-modules/php4/libmodphp4.a

compiling  installing php without errors, then i configure apache correctly, 
but when i try to make apache i find out:

gcc -c  -I../../os/unix -I../../include   -DLINUX=22 -DUSE_HSREGEX 
-DNO_DL_NEEDED `../../apaci`mod_php4.c
mod_php4.c:22: php_apache_http.h: No such file or directory
make[4]: *** [mod_php4.o] Error 1
make[3]: *** [all] Error 1
make[2]: *** [subdirs] Error 1
make[2]: Leaving directory `/usr/local/src/apache_1.3.27/src'
make[1]: *** [build-std] Error 2
make[1]: Leaving directory `/usr/local/src/apache_1.3.27'
make: *** [build] Error 2

any int? is it a bug?

thanks

Stain

-- 
If there is any, error is human

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Which country?

2003-01-20 Thread David Freeman

  Is there a way to get to know from which country a user is
  calling the webside with my php-script?

Probably only if you're going to ask them to tell you what country they
are in.

You can look at the resolved domain that they are coming from and it's
country code - this might be indicative or it might not be (particularly
as .com domains are used by many people not in the US, for example).

You can look at the browser's IP address but some companies have IP
addresses that they use world-wide and some companies route all traffic
through central proxies that may or may not indicate the country of
origin of the actual browser.

The only thing left is asking the user.  Anything else cannot be
considered reliable.

CYA, Dave





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Something difference betwen php-4.0.3 and php-4.2.3

2003-01-20 Thread Marek Kilimajer
I have never heard of  out of range error, but is it really an error 
or just a notice? If it is a notice, adjust error reporting to not 
display notices

[EMAIL PROTECTED] wrote:

Hello,

I try to move an Web application in Php-4.0.3 to php-4.2.3, and some
programs
don't work well on some pages. I  make search in the code, and after
tests, I find that
the following code doesn't work in php-4.2.3, but works in php-4.0.3pl1


html
body
form
?
$i = 0;
while ($i=3) {
 $selected = ;
 $selectTab[$i] = option value='.$i.' .$selected. bla bla
/option\n;
 $i++;
 }
printf(select name='filiere' multiple size='%d' class='textNoir'\n,
($i-1) );
$j = 0;
while ( $j = $i ) {
 printf($selectTab[$j]);
 $j++;
 }
printf(/select);
?
/body
/html


It's because there is an error in the code : this instruction is wrong
while ( $j = $i ),
there is an out of range in the array selectTab[] when $j=$i=4
the good instruction is while ( $j  $i )

Is there something changed in the gestion of the error out of range in
an array
betwen php-4.0.3pl1 and php-4.2.4 ?

Thanks for your help ?

AL


 



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] building apache 1.3.27 + php 4.3.0

2003-01-20 Thread Stain

sorry, i discovered in php INSTALL file my error was related to 
--activate-module parameter. (and configure command i posted was wrong!)

i apologize.

bye


Il 11:43, lunedì 20 gennaio 2003, Stain ha scritto:
 when building apache 1.3.27 + php 4.3.0 i found out several errors,
 depending of what options i added with configure.

 these are my configure commands

 PHP:
 ./configure --with-apache=../apache_1.3.27 --with-mysql

 APACHE:
 ./configure --with-layout=Apache --prefix=/usr/local/install/apache/
 --activate-modules/php4/libmodphp4.a

 compiling  installing php without errors, then i configure apache
 correctly, but when i try to make apache i find out:

 gcc -c  -I../../os/unix -I../../include   -DLINUX=22 -DUSE_HSREGEX
 -DNO_DL_NEEDED `../../apaci`mod_php4.c
 mod_php4.c:22: php_apache_http.h: No such file or directory
 make[4]: *** [mod_php4.o] Error 1
 make[3]: *** [all] Error 1
 make[2]: *** [subdirs] Error 1
 make[2]: Leaving directory `/usr/local/src/apache_1.3.27/src'
 make[1]: *** [build-std] Error 2
 make[1]: Leaving directory `/usr/local/src/apache_1.3.27'
 make: *** [build] Error 2

 any int? is it a bug?

 thanks

 Stain

-- 
If there is any, error is human

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] File perms when dir already exists

2003-01-20 Thread Marek Kilimajer
Simply call umask everytime

[EMAIL PROTECTED] wrote:


Hello all!

I have a number of scripts that upload 5 files at a time each.
The first one creates the dir using umask(000)and mkdir($dir,0777)
which gives the first five files perms 777, which is what I want.

I have the subsequent scripts check if the dir exists and if not does the same
thing with umask and mkdir.  The problem is the uploaded files in scripts 2
through 5 do not inherit the perms 777.

The script:

if (!is_dir(/mnt/ls6/17/169//htdocs/2003/uploads/$mls)){
umask(000);
mkdir($dir,0777)or die(couldn't create directory);
}
$path1=$dir . /1.jpg;	
	move_uploaded_file( $upload1, $path1)or die(couldn't upload photo);	
	$sql = ( UPDATE gallery SET img1 = '1' WHERE mls = '$mls';); 

Is there a parameter I can include in move_uploaded_file() to set the perms on
the remaining files?

Any help is greatly appreciated.

RW

 



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Image opendialog function

2003-01-20 Thread Steven Seijmonsbergen
Hi

I'm looking for a Opendialog function in php, With a thumb function where I
can see examples of the selected photes?
Does anyone Know that??

Greetz Steven



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] How know how many sessions are active?

2003-01-20 Thread Marek Kilimajer
You can also use your custom save handler and store sessions in sql, and 
count it there

Justin French wrote:

If you're on a dedicated server (no other sites on the server), you could
just count the session files in /tmp.

Otherwise, the general consensus seems to be that you need to decide how
long a user is active for (say a minute, or 3, or an hour?), and save (eg)
the SID and timestamp in a file or MySQL table.

In theory, you then count the number of sessions that were created or
reactivated (restamped) within your definition of active time (eg 3 mins).


This has been discussed waaay too many time on the list... do a search on
the archives for 'active users', perhaps also try a search with the word
ASP too :)


Justin


on 19/01/03 10:27 PM, Jeremías Grunge ([EMAIL PROTECTED]) wrote:

 

Sorry I'm novice.

There is a way to know how many sessions are active and to get variables or
the id of them?

Thanks


   



 



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Undefinied Symbol error

2003-01-20 Thread Marek Kilimajer
use
ldd /usr/lib/php4/php_kcvsClient.so
to find out which library is missing.
libsometh.so.6 = /usr/lib/libsometh.so.6 (0x4002)
  ^^
you need to get something like this after every library listed


Trilochan wrote:


i used swig to convert C++ module into a .so file. but when i use .so file
in a php4 script i get following error :-

Warning: Unable to load dynamic library '/usr/lib/php4/php_kcvsClient.so' -
/usr/lib/php4/php_kcvsClient.so: undefined symbol: import__FPcN20 in
/var/www.unitedkalinga.com/patro/cvs_swig/kcvsClient.php on line 19

Fatal error: Call to undefined function: checkout() in
/var/www.unitedkalinga.com/patro/cvs_swig/runme_.php4 on line 5


Regards
Trilochan



 



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] PHP and FDF

2003-01-20 Thread ed

 I'm trying to create web page based on a PDF Form with the action
assigned to a php script to parse out the vars. It seems to be working
because I can parse and write the vars to a database but it seems that a
file is getting passed back to the client containing the output of the php
script that was called. If I write in a header(Location) command and
route the client to another page their browser opens a file locally on
their computer that contains the source code of the page called. How do I
just get the results of the form?

TIA,

Ed



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Freshmeat question

2003-01-20 Thread De deco
Hello,

  I am new to PHP scripting, but I have read some introdutory material, to know at 
least the basics of the basics.

  But my question here is not about the thing I read, that PHP is used for. I would 
like to know if I can use PHP to make scripts at home (not on my server, not for 
woprking inside a homepage).

  Example: I make PHP access a certain homepage, get the source, process it in a way I 
might fancy, or save it, etc., etc., ...

  Is that possible with PHP? What should I do then, can anyone give some headlines?

  I have seen this done with Perl. Would anyone recommend Perl instead PHP to do this? 
Or would it just depend on the scripting language you are used to? If someone would 
kindly do a PHP X Perl would be nice.(I think for all the list too :)

  Kind regards to all,

-=-=-=-=
=Dedeco-
-=-=-=-=
-- 
__
Sign-up for your own FREE Personalized E-mail at Mail.com
http://www.mail.com/?sr=signup

Meet Singles
http://corp.mail.com/lavalife


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Database abstraction class

2003-01-20 Thread Clarkson, Nick

Hi,

Can anyone give me any pointers for creating a database abstraction class ?
I know there are a few out there already, but I'm doing this purely as an OO
learning exercise. I'm only at the paper design right now and I've only got
this far;

Properties:

Persistent  - Persistent connection ? (Boolean)
User- Username (String)
Pass- Password (String)
Host- Database Server (String)
Port- Database Port (3306 default for MySQL
Query   - Query to run (String)
Result  - Query Result (String)
Error   - Error returned (if any)
NumRows - Num of rows returned from query (int)
NumCols - Num od columns returned from query (int)
RowsPerPage - Number of rows per page
PagingOn- Return results in page ? (Boolean)
CurrentPage - Current page number (int)

Methods:

Connect - Connect to db
Close   - Close connection
SelectDB- Select database
RunQuery- Execute query
OutputTable - Output query results in table
OutputPage  - Outputs page of query results (calls OutputTable)
FetchRow- Returns single row from query
CreateLink  - Creates HTML A tags for drill down queries


Are there any other properties/methods that would be useful ? Links/advice
welcome (read needed)

Cheers,

Nick


This private and confidential e-mail has been sent to you by Egg.
The Egg group of companies includes Egg Banking plc
(registered no. 2999842), Egg Financial Products Ltd (registered
no. 3319027) and Egg Investments Ltd (registered no. 3403963) which
carries out investment business on behalf of Egg and is regulated
by the Financial Services Authority.  
Registered in England and Wales. Registered offices: 1 Waterhouse Square,
138-142 Holborn, London EC1N 2NA.
If you are not the intended recipient of this e-mail and have
received it in error, please notify the sender by replying with
'received in error' as the subject and then delete it from your
mailbox.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] simple date question

2003-01-20 Thread adrian [EMAIL PROTECTED]
this is pretty simple but my brain's not working

I get the numerical value of a week in the year thus

e.g  $today = date(W);

gives 4 .so this is the 4th week of the year.
I want to get the month based on this number.
e.g 4 should be january. 7 will be feb etc..

i'm not bothered about being too exact ,where some weeks are in 2 separate
months,
the earlier month should be displayed.and this is just for 2003.

thanks,
adrian



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Getting https-page

2003-01-20 Thread Martin Thoma
Hello!

You can easily get an webpage with:
 $fp = fopen(http://www.mydomain.com/;, r);
 if ($fp) exit;
 while(!feof($fp))
 { $line .= fgets($fp, 4096);
 }
 fclose($fp);
 print $line;

But this doesn't work with https (SSL). How can I get an https-page?

Martin


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: simple date question

2003-01-20 Thread Martin Thoma
Hi Adria,

why not just using  $month=date(m)?

Martin




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: Freshmeat question

2003-01-20 Thread Martin Thoma
Well, it's quite easy: Just write a php-script and start it with php myscript.php. 
Thats all.

You could fetch a web-page with fopen:
$fp = fopen(http://www.mydomain.com/;, r);
$line = ;
 while(!feof($fp))
 { $line .= fgets($fp, 4096);
 }
 fclose($fp);
 print $line;

If you are new in programming, I think PHP is easyier to learn than Perl.

Martin



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] How know how many sessions are active?

2003-01-20 Thread Jeremías Grunge
Thanks to everybody

I decided to use the way of store the sessions on database and stamped them

Another question

Do you know a way to close a session when client closes the explorer?
Perhaps with a client script?

Marek Kilimajer [EMAIL PROTECTED] escribió en el mensaje
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 You can also use your custom save handler and store sessions in sql, and
 count it there

 Justin French wrote:

 If you're on a dedicated server (no other sites on the server), you could
 just count the session files in /tmp.
 
 Otherwise, the general consensus seems to be that you need to decide how
 long a user is active for (say a minute, or 3, or an hour?), and save
(eg)
 the SID and timestamp in a file or MySQL table.
 
 In theory, you then count the number of sessions that were created or
 reactivated (restamped) within your definition of active time (eg 3
mins).
 
 
 This has been discussed waaay too many time on the list... do a search on
 the archives for 'active users', perhaps also try a search with the word
 ASP too :)
 
 
 Justin
 
 
 on 19/01/03 10:27 PM, Jeremías Grunge ([EMAIL PROTECTED]) wrote:
 
 
 
 Sorry I'm novice.
 
 There is a way to know how many sessions are active and to get variables
or
 the id of them?
 
 Thanks
 
 
 
 
 
 
 
 




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] simple date question

2003-01-20 Thread Rick Emery
Why not just get the month with another call to date(m) as well?  Then call date(W) 
to get the
week, if that's required?
- Original Message -
From: adrian [EMAIL PROTECTED] [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, January 20, 2003 8:42 AM
Subject: [PHP] simple date question


this is pretty simple but my brain's not working

I get the numerical value of a week in the year thus

e.g  $today = date(W);

gives 4 .so this is the 4th week of the year.
I want to get the month based on this number.
e.g 4 should be january. 7 will be feb etc..

i'm not bothered about being too exact ,where some weeks are in 2 separate
months,
the earlier month should be displayed.and this is just for 2003.

thanks,
adrian



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Getting https-page

2003-01-20 Thread Chris Shiflett
--- Martin Thoma [EMAIL PROTECTED] wrote:
 How can I get an https-page?

I have never tested this myself, but I found this page in
the manual:

http://www.php.net/manual/en/function.fsockopen.php

It has this to say:

As of PHP 4.3.0, if you have compiled in OpenSSL support,
you may prefix the hostname with either 'ssl://' or
'tls://' to use an SSL or TLS client connection over TCP/IP
to connect to the remote host.

I'm sure you could use the openssl functions, but this
sounds much easier.

Chris

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Security

2003-01-20 Thread Phil Ewington
Hi,

Can PHP run as a different user for different sites on the same server. The
reason I ask is a client that has a PHP web site on our RAQ4 has had a PHP
application written by someone else and wants us to upload it. Can PHP be
configured to allow certain web sites access to files and directories within
their web root only?

TIA

Phil Ewington
Technical Director

43 PLC
35 Broad Street, Wokingham
Berkshire RG40 1AU
T: +44 (0)118 978 9500
F: +44 (0)118 978 4994
E: [EMAIL PROTECTED]
W: http://www.43plc.com



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] PHP Books

2003-01-20 Thread Mike Morton
As well as books there are some great PHP/MYSQL tutorials that cover all
aspects that the book do in a more visual way.

http://www.vtc.com - there are mysql and php tutorials there - you can view
the first few tutorials online to see if that is what you are looking for.


On 1/19/03 11:31 PM, Armoured [EMAIL PROTECTED] wrote:

 hello,
 
 i have been told that i should email you to help me
 with my question, and the auestion is:
 
 Can you recommend an GREAT book for someone to learn
 php off. The person will only have knowladge of html.
 Is there a really good book out there that will teach
 me php???
 
 thanks
 
 __
 Do you Yahoo!?
 Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
 http://mailplus.yahoo.com

-- 



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Security

2003-01-20 Thread Chris Shiflett
--- Phil Ewington [EMAIL PROTECTED] wrote:
 Can PHP be configured to allow certain web sites
 access to files and directories within their web
 root only?

I would suggest looking into safe mode. It sounds like it
may work for you:

http://www.php.net/manual/en/features.safe-mode.php

Chris

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Select multiple boxes

2003-01-20 Thread Ford, Mike [LSS]
 -Original Message-
 From: Cal Evans [mailto:[EMAIL PROTECTED]]
 Sent: 18 January 2003 14:41
 
 use [] in your select box name. When it comes back in the 
 $_POST array you
 will have an array of options.  It breaks HTML standard 

No, it does not break HTML standards -- that is a PHP urban myth (which, to
my chagrin, I helped to propagate before a wiser head sent me to read said
standards in minute detail).  It does not even break XHTML standards.

Believe me -- I've interrogated the damn standards to within an inch of
their lives, and they nonetheless insist that [] are legal characters in
form element name= attributes, and form element name= attributes are *not*
deprecated.

Cheers!

Mike

-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning  Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] $_POST vars problem

2003-01-20 Thread Kenneth Brill
I just changed my server to SSL, everything worked before that.  now if I
have a form with an input box (named searchstring for example) with a
value of TEST, when that form is posted (submitted) I get the following:

foreach($_POST as $key = $value) {
 echo [POST]Key: '$key'; Value: '$value'br\n;
}

will print:
Key:'searchstring' ; Value: 'TESTsearchstring=TEST'

can anyone tell me where the second searchstring=TEST is coming from?  I
have tried register globals on and off.

[EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] $_POST vars problem

2003-01-20 Thread Chris Shiflett
--- Kenneth Brill [EMAIL PROTECTED] wrote:
 can anyone tell me where the second
 searchstring=TEST is coming from?  I
 have tried register globals on and off.

Can you also show us the HTML for your form on the previous
page? The simplest test case that produces this problem
would be best.

Chris

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] $_POST vars problem

2003-01-20 Thread Kenneth Brill
I will try to shortly.  The server in question is password protected and has
lot of information I don;t need hacked into right now.  I'll set up a
limited short term account and post everything then.

On another note, I have found that if I include (and use) the submit button
everything works perfectly, HOWEVER if I just enter data and hit return then
it messes up.  That make no sence to me but maybe someone out there can put
it together.

thanks

Chris Shiflett [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 --- Kenneth Brill [EMAIL PROTECTED] wrote:
  can anyone tell me where the second
  searchstring=TEST is coming from?  I
  have tried register globals on and off.

 Can you also show us the HTML for your form on the previous
 page? The simplest test case that produces this problem
 would be best.

 Chris



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] How know how many sessions are active?

2003-01-20 Thread Marek Kilimajer
By setting cookie_lifetime to 0 (this is default), but the user has to 
close all browser windows

Jeremías Grunge wrote:

Thanks to everybody

I decided to use the way of store the sessions on database and stamped them

Another question

Do you know a way to close a session when client closes the explorer?
Perhaps with a client script?

Marek Kilimajer [EMAIL PROTECTED] escribió en el mensaje
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 

You can also use your custom save handler and store sessions in sql, and
count it there

Justin French wrote:

   

If you're on a dedicated server (no other sites on the server), you could
just count the session files in /tmp.

Otherwise, the general consensus seems to be that you need to decide how
long a user is active for (say a minute, or 3, or an hour?), and save
 

(eg)
 

the SID and timestamp in a file or MySQL table.

In theory, you then count the number of sessions that were created or
reactivated (restamped) within your definition of active time (eg 3
 

mins).
 

This has been discussed waaay too many time on the list... do a search on
the archives for 'active users', perhaps also try a search with the word
ASP too :)


Justin


on 19/01/03 10:27 PM, Jeremías Grunge ([EMAIL PROTECTED]) wrote:



 

Sorry I'm novice.

There is a way to know how many sessions are active and to get variables
   

or
 

the id of them?

Thanks




   



 




 



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Getting https-page

2003-01-20 Thread Kenneth Brill
I would just read up on the CURL functions and either use them or get CURL
and use it externally.


Chris Shiflett [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 --- Martin Thoma [EMAIL PROTECTED] wrote:
  How can I get an https-page?

 I have never tested this myself, but I found this page in
 the manual:

 http://www.php.net/manual/en/function.fsockopen.php

 It has this to say:

 As of PHP 4.3.0, if you have compiled in OpenSSL support,
 you may prefix the hostname with either 'ssl://' or
 'tls://' to use an SSL or TLS client connection over TCP/IP
 to connect to the remote host.

 I'm sure you could use the openssl functions, but this
 sounds much easier.

 Chris



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] $_POST vars problem

2003-01-20 Thread Chris Shiflett
--- Kenneth Brill [EMAIL PROTECTED] wrote:
 I will try to shortly.  The server in question is
 password protected and has lot of information I
 don;t need hacked into right now. I'll set up a
 limited short term account and post everything then.

So you do not have access to the server that has the code
you are trying to debug? That seems like a bigger problem.

If you can at least test this with a browser, you can use
it to view the source. This will reveal the HTML, and you
can just show us the relevant parts.

Of course, if we notice the problem, it sounds like it is
useless anyway, since you cannot access the server to fix
anything. Unless I am missing something...

Chris



 
 On another note, I have found that if I include (and use)
 the submit button
 everything works perfectly, HOWEVER if I just enter data
 and hit return then
 it messes up.  That make no sence to me but maybe someone
 out there can put
 it together.
 
 thanks
 
 Chris Shiflett [EMAIL PROTECTED] wrote in message

[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  --- Kenneth Brill [EMAIL PROTECTED] wrote:
   can anyone tell me where the second
   searchstring=TEST is coming from?  I
   have tried register globals on and off.
 
  Can you also show us the HTML for your form on the
 previous
  page? The simplest test case that produces this problem
  would be best.
 
  Chris
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




php-general Digest 20 Jan 2003 16:32:38 -0000 Issue 1834

2003-01-20 Thread php-general-digest-help

php-general Digest 20 Jan 2003 16:32:38 - Issue 1834

Topics (messages 132205 through 132259):

PHP Books
132205 by: Armoured
132215 by: olinux
132250 by: Mike Morton
132252 by: Mike Morton

Can I use white spaces?
132206 by: Cesar Aracena
132208 by: Larry E. Ullman
132211 by: Cesar Aracena
132213 by: Larry E. Ullman

Re: Mass Mailing with PHP  MySQL
132207 by: Justin French
132210 by: rw.xend.net
132219 by: Brendon G

Re: php.ini: how to load different ini file depending on host?
132209 by: John Nichel
132217 by: Jean-Christian Imbeault

Re: Multiplication of double
132212 by: Bobby Patel

Login scritp help needed.
132214 by: Karl James
132216 by: olinux

Recommended freeware guestbook?
132218 by: David Chamberlin

jpgraph
132220 by: Rizki Salamun

Generating formatted reports
132221 by: Denis L. Menezes

Undefinied Symbol error
13 by: Trilochan
132238 by: Marek Kilimajer

XML  deprecated Call-time pass-by-reference
132223 by: kellan
132227 by: Jason Wong

JOIN for FREE ... Learn and Earn
132224 by: Charles Cedeno

PHP and Sessions?
132225 by: Tim Thorburn
132226 by: Sean Burlington

ssl:// with fsockopen () on Windows XP
132228 by: Alexander Stirmlinger

Which country?
132229 by: Martin Thoma
132230 by: Timothy Hitchens \(HiTCHO\)
132232 by: David Freeman

building apache 1.3.27 + php 4.3.0
132231 by: Stain
132234 by: Stain

Re: Something difference betwen php-4.0.3 and php-4.2.3
132233 by: Marek Kilimajer

Re: File perms when dir already exists
132235 by: Marek Kilimajer

Image opendialog function
132236 by: Steven Seijmonsbergen

Re: How know how many sessions are active?
132237 by: Marek Kilimajer
132246 by: Jeremías Grunge
132257 by: Marek Kilimajer

PHP and FDF
132239 by: ed.home.homes2see.com

Freshmeat question
132240 by: De deco
132245 by: Martin Thoma

Database abstraction class
132241 by: Clarkson, Nick

simple date question
132242 by: adrian murphy.2020tourism.com
132244 by: Martin Thoma
132247 by: Rick Emery

Getting https-page
132243 by: Martin Thoma
132248 by: Chris Shiflett
132258 by: Kenneth Brill

Security
132249 by: Phil Ewington
132251 by: Chris Shiflett

Re: Select multiple boxes
132253 by: Ford, Mike   [LSS]

$_POST vars problem
132254 by: Kenneth Brill
132255 by: Chris Shiflett
132256 by: Kenneth Brill
132259 by: Chris Shiflett

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]


--

---BeginMessage---
hello,

i have been told that i should email you to help me
with my question, and the auestion is:

Can you recommend an GREAT book for someone to learn
php off. The person will only have knowladge of html.
Is there a really good book out there that will teach
me php???

thanks

__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

---End Message---
---BeginMessage---
PHP Fast  Easy Web Development by Julie Meloni
kicked things off for me (after knowing only HTML)

basically walks you through the code of common things
that you would want to do with PHP. (email a submitted
html form - insert/retrieve and edit data in mysql
database)

Read through the examples and picture it in your mind.
Lots of it is repetition but by the end you'll
understand or at lest know where to look to find
answers to solutions you want

http://www.amazon.com/exec/obidos/external-search/002-6827406-7685618?tag=opera-20index=blendedkeyword=PHP+Fast+Easy+Web+Development

Julie's site: www.thickbook.com
Many tutorials available here as well.


PHP Bible is another good reference book. There's also
a lot of sample code in here if I remeber right
http://www.amazon.com/exec/obidos/external-search/002-6827406-7685618?tag=opera-20index=blendedkeyword=PHP+bible

The manual is really invaluable as well. It's very
well organized and easy to find what you need if you
know how to use it. A boring but helpful activity
would be to  read through the summaries of the
functions. You won't remember all [or any :)] of them,
but you will get an idea of what is possible and how
powerful the language is.

Sams Teach Yourself SQL in 10 Minutes
Also ought to pick yourself up this cheapy while your
at it. A great intro to SQL. It's great for a
reference and an idea of what is possible (and how
simple the majority of what you want to do really is)

You'll probably be using MySQL 

Re: [PHP] XML deprecated Call-time pass-by-reference

2003-01-20 Thread kellan
On Mon, 20 Jan 2003 18:04:19 +0800, Jason Wong wrote:

 Assuming that xml_set_object() has been defined correctly then to get rid
 of that error/warning message simply use:
 
   xml_set_object( $this-parser, $this );

Thanks.  That seems to work.  Every example of using xml_set_object
demostrates pass by reference so I assumed it was required.

Kellan

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Getting https-page

2003-01-20 Thread Matthew Walker
Look into the CURL libraries.
http://www.php.net/manual/en/ref.curl.php

They essentially allow you to emulate the behavior of a browser. Where I
work, we use them to make SSL connections to payment processing
gateways.

Matthew

-Original Message-
From: Martin Thoma [mailto:[EMAIL PROTECTED]] 
Sent: Monday, January 20, 2003 7:47 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Getting https-page

Hello!

You can easily get an webpage with:
 $fp = fopen(http://www.mydomain.com/;, r);
 if ($fp) exit;
 while(!feof($fp))
 { $line .= fgets($fp, 4096);
 }
 fclose($fp);
 print $line;

But this doesn't work with https (SSL). How can I get an https-page?

Martin


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] imap_fetchbody - size limit?

2003-01-20 Thread Andy Clarke
Is there any limitation on the size of attachment that IMAP (especially
functions like imap_fetchbody) can handle?

I am writing a PHP script that will cycle through a number of email accounts
and downloads new messages, storing the subject/body etc in a database and
saving the attachments to the (local) hard disk. The script works fine with
a 3MB attachment, but fails for a 4MB one - the file that it saves for the
larger file has zero length (the script also work fine for a message with
multiple 3MB attachments). As I understand it, there is no limit to the size
of a variable's contents within PHP, so I am assuming that this is an issue
with IMAP.

The script is running on XP, and is being run on the command line.

Thanks

Andy Clarke



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] How know how many sessions are active?

2003-01-20 Thread John W. Holmes
 Do you know a way to close a session when client closes the explorer?
 Perhaps with a client script?

If the session cookie lifetime is zero, the cookie will be deleted when
the user closes their browser. However, it's up to you to delete old
information from your database now. Since you have a timestamp, you have
to assume that sessions that haven't been accessed for over X minutes
are old and delete them. This is the same method that PHP uses with
regular session files. That means you need to update the timestamp every
time a script starts/retrieves a session so it's up to date. 

---John W. Holmes...

PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Getting https-page

2003-01-20 Thread John W. Holmes
 You can easily get an webpage with:
  $fp = fopen(http://www.mydomain.com/;, r);
  if ($fp) exit;
  while(!feof($fp))
  { $line .= fgets($fp, 4096);
  }
  fclose($fp);
  print $line;
 
 But this doesn't work with https (SSL). How can I get an https-page?

Use PHP 4.3.0 with OpenSSL enabled and you can do fopen(https://...;)
requests. 

If you can't do that, then use CURL, like others have mentioned.

If that's not an option, install lynx and make an exec call for lynx to
open and return the page to you (any web browser would work, actually,
as long as you can pass it an https request)

---John W. Holmes...

PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Select multiple boxes

2003-01-20 Thread Sean Burlington
Ford, Mike [LSS] wrote:

-Original Message-
From: Cal Evans [mailto:[EMAIL PROTECTED]]
Sent: 18 January 2003 14:41

use [] in your select box name. When it comes back in the 
$_POST array you
will have an array of options.  It breaks HTML standard 


No, it does not break HTML standards -- that is a PHP urban myth (which, to
my chagrin, I helped to propagate before a wiser head sent me to read said
standards in minute detail).  It does not even break XHTML standards.

Believe me -- I've interrogated the damn standards to within an inch of
their lives, and they nonetheless insist that [] are legal characters in
form element name= attributes, and form element name= attributes are *not*
deprecated.



while I agree that it doesn't break standards - I do find it odd.

and annoying in that it limits the ability of php to  process certain 
forms ...

I don't see any benefit of this system - it would be better if php just 
created an array for suitable form data - without requiring that the 
element name changes.

still - I guess it works :)

--

Sean



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] ayuda...solo se ve el cdigo cuando ejecuto los script

2003-01-20 Thread Rot Alvarez

Subo los script y solo veo código...q puedo hacer ayuda 

_
Registra gratis tu cuenta email en http://www.exploraiquique.cl

_
Select your own custom email address for FREE! Get [EMAIL PROTECTED] w/No Ads, 6MB, 
POP  more! http://www.everyone.net/selectmail?campaign=tag

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Select multiple boxes

2003-01-20 Thread John W. Holmes
 use [] in your select box name. When it comes back in the
 $_POST array you
 will have an array of options.  It breaks HTML standard
 
 
  No, it does not break HTML standards -- that is a PHP urban myth
(which,
 to
  my chagrin, I helped to propagate before a wiser head sent me to
read
 said
  standards in minute detail).  It does not even break XHTML
standards.
 
  Believe me -- I've interrogated the damn standards to within an inch
of
  their lives, and they nonetheless insist that [] are legal
characters in
  form element name= attributes, and form element name= attributes are
 *not*
  deprecated.
 
 
 while I agree that it doesn't break standards - I do find it odd.
 
 and annoying in that it limits the ability of php to  process certain
 forms ...
 
 I don't see any benefit of this system - it would be better if php
just
 created an array for suitable form data - without requiring that the
 element name changes.

How does php know what suitable form data is?

I guess it could look for multiple names in the GET or POST data. But
then that would mean for every variable it goes to create, it would have
to go and look if it's already created one by that name. If it did,
erase the old one and make these two an array now. 

Rather than doing that, it can just look for [] in the name and it knows
to make that an array.

---John W. Holmes...

PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] 4.3.0 cpu load raise

2003-01-20 Thread Philipp
Hello !


i upgraded PHP last week. I used 4.2.3 and now
i am using 4.3.0. The System is Linux running
a 2.4.20 kernel and Apache 1.3.27 with PHP
statically compiled in.

I recognized a significant load-raise. it seems
that the new version needs more CPU power
to complete its tasks.

i will evaluate my atsar logs to verify my assumption,
but i like to know if others experienced similar behavior
on their webservers.


Thank you very much,
Philipp


[PHP] Loop inside a table

2003-01-20 Thread Cesar Aracena
Hi all,

I always make for loops inside tables so I usually don't have problems
with it, but this case is a little different. I'm making a mail program
for my client to receive a mail each time a customer places an order in
his site.

Inside the mail program, I declaring a value called $message where an
HTML form is being created dynamically, depending on the products
selected by the customer or visitor.

The problem is that PHP apparently won't let me do a for loop inside
this variable. I have something like this:

$message = 

HTML
HEAD
TITLEtitle goes here/TITLE
/HEAD
BODY
.
for ($x = 0; $x  $num_rows; $x++)
{
//several lines made dynamically
}
.
/BODY
/HTML;

and the error goes like: unexpected T_FOR in line xxx (where my for loop
is). I've never tried this in the past, so I assumed it had to be done
normally but I see I was mistaken. Anyone did this before? What's the
problem here?

Thanks in advance,

Cesar L. Aracena
[EMAIL PROTECTED]
[EMAIL PROTECTED]
(0299) 156-356688
Neuquén (8300) Capital
Argentina




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Change base url

2003-01-20 Thread Jeremías Grunge
I've a few of scrcripts in a directory $baseurl/PHP/scripts.PHP

And I want to include these a script in a diferent dir example
$baseurl/otherDir/otherscript.PHP but the includes that are on the
$baseurl/PHP/scripts.PHP now referrer to $baseurl/otherDir... There is a way
to say a script wthat is its $baseurl?

Thanks




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Loop inside a table

2003-01-20 Thread Jim Lucas
instead of doing that your should do this

$message = 

HTML
HEAD
TITLEtitle goes here/TITLE
/HEAD
BODY
;

for ($x = 0; $x  $num_rows; $x++)
{
$message .= some stuff;
}

$message .= /BODY
/HTML;

you were also missing your last double quote.

Jim

- Original Message -
From: Cesar Aracena [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, January 20, 2003 9:37 AM
Subject: [PHP] Loop inside a table


Hi all,

I always make for loops inside tables so I usually don't have problems
with it, but this case is a little different. I'm making a mail program
for my client to receive a mail each time a customer places an order in
his site.

Inside the mail program, I declaring a value called $message where an
HTML form is being created dynamically, depending on the products
selected by the customer or visitor.

The problem is that PHP apparently won't let me do a for loop inside
this variable. I have something like this:

$message = 

HTML
HEAD
TITLEtitle goes here/TITLE
/HEAD
BODY
.
for ($x = 0; $x  $num_rows; $x++)
{
//several lines made dynamically
}
.
/BODY
/HTML;

and the error goes like: unexpected T_FOR in line xxx (where my for loop
is). I've never tried this in the past, so I assumed it had to be done
normally but I see I was mistaken. Anyone did this before? What's the
problem here?

Thanks in advance,

Cesar L. Aracena
[EMAIL PROTECTED]
[EMAIL PROTECTED]
(0299) 156-356688
Neuquén (8300) Capital
Argentina




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: Security

2003-01-20 Thread Peter Clarke
Phil Ewington wrote:

Hi,

Can PHP run as a different user for different sites on the same server. The
reason I ask is a client that has a PHP web site on our RAQ4 has had a PHP
application written by someone else and wants us to upload it. Can PHP be
configured to allow certain web sites access to files and directories within
their web root only?

TIA

Phil Ewington
Technical Director


Have a look at open_basedir, it won't run as a different user but it 
will restrict the files the site can access.
http://www.php.net/manual/en/features.safe-mode.php#AEN5968
This can be set for each VirtualHost in apache's httpd.conf
php_admin_value open_basedir /path/to/accessable/files

Peter Clarke


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Loop inside a table

2003-01-20 Thread Cesar Aracena
Thanks a lot! I was already doing something of the sort, but with a LOT
more $message .=

Thanks again,

Cesar L. Aracena
[EMAIL PROTECTED]
[EMAIL PROTECTED]
(0299) 156-356688
Neuquén (8300) Capital
Argentina


-Mensaje original-
De: Jim Lucas [mailto:[EMAIL PROTECTED]] 
Enviado el: lunes, 20 de enero de 2003 14:41
Para: Cesar Aracena; [EMAIL PROTECTED]
Asunto: Re: [PHP] Loop inside a table

instead of doing that your should do this

$message = 

HTML
HEAD
TITLEtitle goes here/TITLE
/HEAD
BODY
;

for ($x = 0; $x  $num_rows; $x++)
{
$message .= some stuff;
}

$message .= /BODY
/HTML;

you were also missing your last double quote.

Jim

- Original Message -
From: Cesar Aracena [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, January 20, 2003 9:37 AM
Subject: [PHP] Loop inside a table


Hi all,

I always make for loops inside tables so I usually don't have problems
with it, but this case is a little different. I'm making a mail program
for my client to receive a mail each time a customer places an order in
his site.

Inside the mail program, I declaring a value called $message where an
HTML form is being created dynamically, depending on the products
selected by the customer or visitor.

The problem is that PHP apparently won't let me do a for loop inside
this variable. I have something like this:

$message = 

HTML
HEAD
TITLEtitle goes here/TITLE
/HEAD
BODY
.
for ($x = 0; $x  $num_rows; $x++)
{
//several lines made dynamically
}
.
/BODY
/HTML;

and the error goes like: unexpected T_FOR in line xxx (where my for loop
is). I've never tried this in the past, so I assumed it had to be done
normally but I see I was mistaken. Anyone did this before? What's the
problem here?

Thanks in advance,

Cesar L. Aracena
[EMAIL PROTECTED]
[EMAIL PROTECTED]
(0299) 156-356688
Neuquén (8300) Capital
Argentina




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] please help

2003-01-20 Thread JamsterJAM
I am running my server on windows xp, which i know you probally think it is
silly but i think permissions in xp are automatically set to full or 777.


- Original Message -
From: Ray Hunter [EMAIL PROTECTED]
To: JamsterJAM [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Sunday, January 19, 2003 8:46 PM
Subject: Re: [PHP] please help


 On Sun, 2003-01-19 at 12:57, JamsterJAM wrote:
  Hi,
  I have a problem. I have created a guestbook for my server and i have
php installed. You enter deatils and the guestbook stores it in
guestbook.dat.php file. The guestbook itself is also a php file. I have
tryed it on other hosts and it has worked. When i run it on my server it
doesnt store the data i have inputted and show it on the guestbook. This
might be a bit confusing but if you could help me or forward it to someone
who can help me i would be much abliged.
 
  JAM

 We probably need more info to get to the real problem. However, you are
 probably having a problem with the the webserver (php) writing to the
 file. Make sure that the webserver has permission to write to the file.




 --

 Ray Hunter
 email: [EMAIL PROTECTED]
 www: http://venticon.com


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] $_POST vars problem

2003-01-20 Thread Ford, Mike [LSS]
 -Original Message-
 From: Kenneth Brill [mailto:[EMAIL PROTECTED]]
 Sent: 20 January 2003 15:53
 
 I just changed my server to SSL, everything worked before 
 that.  now if I
 have a form with an input box (named searchstring for 
 example) with a
 value of TEST, when that form is posted (submitted) I get 
 the following:
 
 foreach($_POST as $key = $value) {
  echo [POST]Key: '$key'; Value: '$value'br\n;
 }
 
 will print:
 Key:'searchstring' ; Value: 'TESTsearchstring=TEST'

If you're using Apache 2, I suggeest you browse on over to this bug report:
http://bugs.php.net/bug.php?id=18648.  (Well, maybe you want to go take a
look there anyway, as it's definitely concerning this very behaviour.)

Cheers!

Mike

-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning  Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: 4.3.0 cpu load raise

2003-01-20 Thread Thomas Seifert
Hmm, I didn't see this effect but I only tried on a development machine.
I benchmarked a app there with both php-versions and it was nearly 20%
faster with php-4.3.0.
But that may depend on the application.


Thomas

On Mon, 20 Jan 2003 18:30:05 +0100 [EMAIL PROTECTED] (Philipp) wrote:

 Hello !
 
 
 i upgraded PHP last week. I used 4.2.3 and now
 i am using 4.3.0. The System is Linux running
 a 2.4.20 kernel and Apache 1.3.27 with PHP
 statically compiled in.
 
 I recognized a significant load-raise. it seems
 that the new version needs more CPU power
 to complete its tasks.
 
 i will evaluate my atsar logs to verify my assumption,
 but i like to know if others experienced similar behavior
 on their webservers.
 
 
 Thank you very much,
 Philipp


-- 
Thomas Seifert

mailto:[EMAIL PROTECTED]
http://www.MyPhorum.de 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: Job Opportunity

2003-01-20 Thread Jessica Gillert
Mr. Hunter,
My apologies for the delay in following back up with you.
My client has expressed interest in  talking with you.  I am in the process of pinning 
them down on whether they would like to do a phone or face-to-face interview - and 
also what their schedule/time frame is.  I will follow up with you as soon as I hear 
back.  Please give me an idea of what might work best for you so I can coordinate 
accordingly.
Thanks!
Jessica

Jessica K. Gillert
Account Manager
Hall Kinion ...  The Talent Source for Emerging Technologies
www.hallkinion.com
801.322.2225   x206
801.322.2205   fax



Re: [PHP] Loop inside a table

2003-01-20 Thread Chris Shiflett
--- Cesar Aracena [EMAIL PROTECTED] wrote:
 $message = 
 
 HTML
 HEAD
 TITLEtitle goes here/TITLE
 /HEAD
 BODY
 .
 for ($x = 0; $x  $num_rows; $x++)
 {
 //several lines made dynamically
 }
 ..
 /BODY
 /HTML;

Try something like this instead, if you want all of your
HTML to be in the $message variable:

$message = html\nhead\n;
$message .= \ttitletitle goes here/title\n;
$message .= /head\nbody\n;

for ($x = 0; $x  $num_rows; $x++)
{
 $message .= whatever you want to add\n;
}

$message .= /body\n/html;

Chris

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Re: Job Opportunity

2003-01-20 Thread Ray Hunter
I apologize everyone...evolution is going crazy...

Ray


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Select multiple boxes

2003-01-20 Thread Sean Burlington
John W. Holmes wrote:

use [] in your select box name. When it comes back in the
$_POST array you
will have an array of options.  It breaks HTML standard



No, it does not break HTML standards -- that is a PHP urban myth


(which,


to


my chagrin, I helped to propagate before a wiser head sent me to


read


said


standards in minute detail).  It does not even break XHTML


standards.


Believe me -- I've interrogated the damn standards to within an inch


of


their lives, and they nonetheless insist that [] are legal


characters in


form element name= attributes, and form element name= attributes are


*not*


deprecated.



while I agree that it doesn't break standards - I do find it odd.

and annoying in that it limits the ability of php to  process certain
forms ...

I don't see any benefit of this system - it would be better if php


just


created an array for suitable form data - without requiring that the
element name changes.



How does php know what suitable form data is?

I guess it could look for multiple names in the GET or POST data. But
then that would mean for every variable it goes to create, it would have
to go and look if it's already created one by that name. If it did,
erase the old one and make these two an array now. 

Rather than doing that, it can just look for [] in the name and it knows
to make that an array.


well I think you answered your own query - it could look for multiple 
names ...

this seems to work well in other systems - eg Perl:CGI and Java Servlets 
 - though as these have seperate types for an array - so it works quite 
naturally there.

in fact I have only seen this construct in php - it seems odd to me.

I have worked on several projects where forms have been used to 
communicate between systems under the control of different development 
teams - in this case the requirement to rename the form element for it 
to work as a select multiple has been a pain.

--

Sean




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: Job Opportunity

2003-01-20 Thread Marco Tabini
Don't apologize... pass the job offers around instead ;-)

My Evolution has decided that I don't have a Calendar anymore. No matter
how hard I try. *sigh*

Cheers,


Marco

On Mon, 2003-01-20 at 13:53, Ray Hunter wrote:
 I apologize everyone...evolution is going crazy...
 
 Ray
-- 
Marco Tabini [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Which country?

2003-01-20 Thread -[ Rene Brehmer ]-
Hi Timothy Hitchens (HiTCHO),

Can't you also, atleast in IE, also ask the browser what country the user
is in??? I believe IE has a variable that takes from the regional
settings, which covers language and format info for numbers ... but not
sure you can pull it from the web though  the MSDN library is a bit
foggy in that respect...

Rene

On Mon, 20 Jan 2003 20:35:35 +1000, you wrote about RE: [PHP] Which
country? something that looked like this:

Yes and no... you can use whois information about the IP class or enlist
the services
from a GEO firm that provides database information that includes
information down to
and including Cities etc.

The accuracy of this type of service in some areas of the world is not
exactly accurate
but usable.

Look for PHP whois classes but remember that most registries restrict
the number of requests these
days.

-- 
Rene Brehmer

This message was written on 100% recycled spam.

Come see! My brand new site is now online!
http://www.metalbunny.net

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] pop-up problem

2003-01-20 Thread Mark McCulligh
I was wondering if anyone knows of a way to create a pop-up using PHP or
other language to do the same thing as JavaScript window.open method.  I
have an app that uses the JavaScript popup but now with those popup stopper
it will not always work.  For I am looking for another way of creating
popups.  Does anyone know of a way other then window.open to control the
window's size and remove things like the toolbar, address bar, etc..

Is there a way to control is through PHP and the header information? or I am
look for something that doesn't exist.

Thanks,
Mark.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Sql server -- trusted connection

2003-01-20 Thread Daniel Masson
Hello list.


I need help on this urgently.

I need to connect to a ms sql server usgin windows autentication on a
win 2000 box and IIS 5, i cant switch sql server to windows and sql
authentication, .. I really need to know hot to connect.

Thanks

Daniel E Massón.
Ingeniero de desarrollo
[EMAIL PROTECTED]

Imagine S.A. 
Su Aliado Efectivo en Internet
www.imagine.com.co
(57 1)2182064 - (57 1)6163218
Bogotá - Colombia 

- Soluciones web para Internet e Intranet
- Soluciones para redes
- Licenciamiento de Software
- Asesoría y Soporte Técnico

 




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] pop-up problem

2003-01-20 Thread Chris Shiflett
--- Mark McCulligh [EMAIL PROTECTED] wrote:
 I was wondering if anyone knows of a way to
 create a pop-up using PHP or other language to
 do the same thing as JavaScript window.open
 method. I have an app that uses the JavaScript
 popup but now with those popup stopper it will
 not always work.

That is the point.

 For I am looking for another way of creating
 popups. Does anyone know of a way other then
 window.open to control the window's size and
 remove things like the toolbar, address bar,
 etc..
 
 Is there a way to control is through PHP and the
 header information? or I am look for something
 that doesn't exist.

No, PHP cannot help you here. Controlling client behavior
like that is not something that is within the scope of HTTP
either, so there are no headers that do anything like that.
You must depend on some sort of client-side scripting.

Chris

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Change base url

2003-01-20 Thread Chris Shiflett
--- Jeremías Grunge [EMAIL PROTECTED] wrote:
 I've a few of scrcripts in a directory
 $baseurl/PHP/scripts.PHP
 
 And I want to include these a script in a diferent dir
 example $baseurl/otherDir/otherscript.PHP but the
 includes that are on the $baseurl/PHP/scripts.PHP now
 referrer to $baseurl/otherDir... There is a way to say
 a script wthat is its $baseurl?

I do not think I understand the question. You can change
$baseurl like this:

$baseurl = /something_else;

Chris

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Sql server -- trusted connection

2003-01-20 Thread Lowell Allen
 From: Daniel Masson [EMAIL PROTECTED]
 
 I need help on this urgently.
 
 I need to connect to a ms sql server usgin windows autentication on a
 win 2000 box and IIS 5, i cant switch sql server to windows and sql
 authentication, .. I really need to know hot to connect.

I know very little about Windows, but I successfully made a COM connection
to MS-SQL recently. Here's sample code:

$db_connection = new COM(ADODB.Connection);
$db_connstr = DRIVER={SQL
server};server=xdata;database=sampledb;uid=user;pwd=password;;
@$db_connection-open($db_connstr);
$select_sql = SELECT FieldName1, FieldName2, FieldName3 FROM TableName
ORDER BY FieldName1;
@$rs = $db_connection-execute($select_sql);
if (!$rs) {
echo(trtdUnable to make MS-SQL database selection!/td/tr\n .
/table\n .
/body\n .
/html\n);
exit();
}
$rs_fld0 = $rs-Fields(0);
$rs_fld1 = $rs-Fields(1);
$rs_fld2 = $rs-Fields(2);
while (!$rs-EOF) {
echo(tr bgcolor =
$colortd$rs_fld0-value/tdtd$rs_fld1-value/tdtd$rs_fld2-value/
td/tr\n);
$rs-MoveNext();
}
$rs-Close();
$db_connection-Close();

--
Lowell Allen


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] pop-up problem

2003-01-20 Thread Mark McCulligh
I wish people won't miss use features for people start blocking them.  I am
using the window.open the way it was meant for.  I have a online help
feature.  I am not using it a force people to look at banner after banner.

Mark.

 --- Mark McCulligh [EMAIL PROTECTED] wrote:
  I was wondering if anyone knows of a way to
  create a pop-up using PHP or other language to
  do the same thing as JavaScript window.open
  method. I have an app that uses the JavaScript
  popup but now with those popup stopper it will
  not always work.

 That is the point.

  For I am looking for another way of creating
  popups. Does anyone know of a way other then
  window.open to control the window's size and
  remove things like the toolbar, address bar,
  etc..
 
  Is there a way to control is through PHP and the
  header information? or I am look for something
  that doesn't exist.

 No, PHP cannot help you here. Controlling client behavior
 like that is not something that is within the scope of HTTP
 either, so there are no headers that do anything like that.
 You must depend on some sort of client-side scripting.

 Chris



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: Re: Freshmeat question

2003-01-20 Thread De deco
Thanks Martin.

This is great. :)

I am not new to programming, just to scripting languages. I have seen that Perl has 
some high advanced sintaxes for string processing, for example, but I don't know if 
the same level can also be achieved in PHP...?

As for the script below, could I run it inside a (my) browser? This could be in any 
browser?


---Original Message---

Date: Mon, 20 Jan 2003 15:51:05 +0100
From: Martin Thoma [EMAIL PROTECTED]
Subject: Re: Freshmeat question
To: [EMAIL PROTECTED]

Well, it's quite easy: Just write a php-script and start it with php
myscript.php. Thats all.

You could fetch a web-page with fopen:
$fp = fopen(http://www.mydomain.com/;,
r);
$line = ;
 while(!feof($fp))
 { $line .= fgets($fp, 4096);
 }
 fclose($fp);
 print $line;

If you are new in programming, I think PHP is easyier to learn than
Perl.

Martin
-- 
__
Sign-up for your own FREE Personalized E-mail at Mail.com
http://www.mail.com/?sr=signup

Meet Singles
http://corp.mail.com/lavalife


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] PHP and Sessions?

2003-01-20 Thread John Nichel
But he said that it's working in 4.2.2 (default off), but not working in 
4.1.2 (default on).  If I remember correctly, 
$HTTP_POST_VARS['whatever'] worked before 4.2.x, right?  What about 
things like $_POST $_SERVER, etc. did those work prior to 4.2.0?

Sean Burlington wrote:
Tim Thorburn wrote:


Hi,

I've created a password protected area on the site I'm working on 
using PHP Sessions - I've done this several times before without any 
difficulty.  This time, I've copied my old code - made the necessary 
changes for login/passwd/database names, yet the sessions don't appear 
to be working.

I've been comparing the PHP settings on each server - the server that 
works is using 4.2.2, the one that does not is using 4.1.2.  Other 
than that, the only difference is that on the server that works I've 
changed the path to the PHP include dir (from the server set default 
into my account).

Can anyone offer any suggestions?




This is by far the most FAQ on this list...

what changed
http://www.php.net/manual/en/language.variables.predefined.php

why it changed
http://www.php.net/manual/en/security.registerglobals.php


 In PHP 4.2.0 and later, the default value for the PHP directive 
register_globals is off. This is a major change in PHP. Having 
register_globals off affects the set of predefined variables available 
in the global scope. For example, to get DOCUMENT_ROOT you'll use 
$_SERVER['DOCUMENT_ROOT'] instead of $DOCUMENT_ROOT, or $_GET['id'] from 
the URL http://www.example.com/test.php?id=3 instead of $id, or 
$_ENV['HOME'] instead of $HOME.

For related information on this change, read the configuration entry for 
register_globals, the security chapter on Using Register Globals , as 
well as the PHP 4.1.0 and 4.2.0 Release Announcements.

Using the available PHP Reserved Predefined Variables, like the 
superglobal arrays, is preferred.



--
By-Tor.com
It's all about the Rush
http://www.by-tor.com


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] pop-up problem

2003-01-20 Thread Chris Shiflett
--- Mark McCulligh [EMAIL PROTECTED] wrote:
 I wish people won't miss use features for people start
 blocking them.  I am using the window.open the way it
 was meant for.  I have a online help feature.  I am not
 using it a force people to look at banner after banner.

I know exactly what you mean.

However, I believe window.open still works when used like
this:

a href=# onclick=window.open('foo.php', 'Foo',
'height=480,width=640,status=yes,scrolling=no,scrollbars=no');return
false;Click Here/a

At least, that works with Mozilla's pop-up blocker. As I
understood it, only those annoying automatic popups are
disabled.

Chris

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] pop-up problem

2003-01-20 Thread John Nichel
Right, Mozilla set it up to block pop-ups that were not requested by the 
end user.  I don't know why Netscape 7 didn't include this with their build.

Chris Shiflett wrote:
--- Mark McCulligh [EMAIL PROTECTED] wrote:


I wish people won't miss use features for people start
blocking them.  I am using the window.open the way it
was meant for.  I have a online help feature.  I am not
using it a force people to look at banner after banner.



I know exactly what you mean.

However, I believe window.open still works when used like
this:

a href=# onclick=window.open('foo.php', 'Foo',
'height=480,width=640,status=yes,scrolling=no,scrollbars=no');return
false;Click Here/a

At least, that works with Mozilla's pop-up blocker. As I
understood it, only those annoying automatic popups are
disabled.

Chris




--
By-Tor.com
It's all about the Rush
http://www.by-tor.com


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] pop-up problem

2003-01-20 Thread Mark McCulligh
What does IE do?


John Nichel [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Right, Mozilla set it up to block pop-ups that were not requested by the
 end user.  I don't know why Netscape 7 didn't include this with their
build.

 Chris Shiflett wrote:
  --- Mark McCulligh [EMAIL PROTECTED] wrote:
 
 I wish people won't miss use features for people start
 blocking them.  I am using the window.open the way it
 was meant for.  I have a online help feature.  I am not
 using it a force people to look at banner after banner.
 
 
  I know exactly what you mean.
 
  However, I believe window.open still works when used like
  this:
 
  a href=# onclick=window.open('foo.php', 'Foo',
  'height=480,width=640,status=yes,scrolling=no,scrollbars=no');return
  false;Click Here/a
 
  At least, that works with Mozilla's pop-up blocker. As I
  understood it, only those annoying automatic popups are
  disabled.
 
  Chris
 


 --
 By-Tor.com
 It's all about the Rush
 http://www.by-tor.com




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Cannot show reuploaded image file on page unless manual refresh

2003-01-20 Thread Phil Powell
I am using the following header() functions to force view.php to not cache:

header(Expires: Mon, 26 Jul 1997 05:00:00 GMT);// Date in the past
header(Last-Modified:  . gmdate(D, d M Y H:i:s) .  GMT); 
 // always modified
header(Cache-Control: no-store, no-cache, must-revalidate);  // HTTP/1.1
header(Cache-Control: post-check=0, pre-check=0, false);
header(Pragma: no-cache);  // HTTP/1.0


However, when a user reuploads a file in manage.php, it does a form post onto 
manage.php and reuploads the file (which I verified works).  However, when redirected 
via header() to view.php, they still see their OLD image file, NOT the new one!  
Unless I manually refresh the page, they never see it, until they manually refresh the 
page, then the new image file appears!  

I am handling file uploading this way:  If they select another file to upload, the old 
file is deleted and the new file uploaded.

Any suggestions?

Thanx
Phil



Re: [PHP] How know how many sessions are active?

2003-01-20 Thread Justin French
on 21/01/03 2:07 AM, Jeremías Grunge ([EMAIL PROTECTED]) wrote:

 Another question
 
 Do you know a way to close a session when client closes the explorer?
 Perhaps with a client script?

Apart from what everyone else has said about cookie lifetime, there is
probably some javascript foolery you can do to force the browser to visit
logout.php by popping up a new window when the main window closes.

Justin


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Cannot show reuploaded image file on page unless manual refresh

2003-01-20 Thread Chris Shiflett
--- Phil Powell [EMAIL PROTECTED] wrote:
 I am using the following header() functions to force
 view.php to not cache:
 
 header(Expires: Mon, 26 Jul 1997 05:00:00 GMT);
 header(Last-Modified:  . gmdate(D, d M Y H:i:s) .
  GMT);
 header(Cache-Control: no-store, no-cache,
 must-revalidate);
 header(Cache-Control: post-check=0, pre-check=0,
 false);
 header(Pragma: no-cache);

:-)

I think you killed it.

 However, when a user reuploads a file in manage.php, it
 does a form post onto manage.php and reuploads the file
 (which I verified works).  However, when redirected via
 header() to view.php, they still see their OLD image
 file, NOT the new one!  Unless I manually refresh the
 page, they never see it, until they manually refresh the
 page, then the new image file appears!

Right.

I think you are forgetting that the image is not really
part of the PHP resource. Meaning, this is the series of
events for a PHP script that refernces a single image
called bar.jpg using the img tag:

1. HTTP request sent for foo.php (Web client - Web server)
2. HTTP response sent that includes the output of foo.php
   (Web server - Web client)
3. Web client (browser) notices img tag referenced in
   the HTML.
4. HTTP request sent for bar.jpg (Web client - Web server)
5. HTTP response sent that includes bar.jpg

So, the headers that you are setting only matter for the
resource returned in step 2. Meaning, the HTML output of
foo.php is not cached. The image, since it is returned by
the Web server and not your PHP script, is cached.

Chris

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] PHP and Sessions?

2003-01-20 Thread Justin French
on 21/01/03 8:33 AM, John Nichel ([EMAIL PROTECTED]) wrote:

 But he said that it's working in 4.2.2 (default off), but not working in
 4.1.2 (default on).  If I remember correctly,
 $HTTP_POST_VARS['whatever'] worked before 4.2.x, right?  What about
 things like $_POST $_SERVER, etc. did those work prior to 4.2.0?

the super global arrays ($_POST et al) came in 4.1.0

things like $HTTP_POST_VARS have been working for ages. they are repricated,
but continue to work for a long time IMHO

register_globals defaulted to off in 4.2(.x???) ONLY if you were doing a
clean install... if you were updating, it tried to grab your old value (on).


Justin




 Sean Burlington wrote:
 Tim Thorburn wrote:
 
 Hi,
 
 I've created a password protected area on the site I'm working on
 using PHP Sessions - I've done this several times before without any
 difficulty.  This time, I've copied my old code - made the necessary
 changes for login/passwd/database names, yet the sessions don't appear
 to be working.
 
 I've been comparing the PHP settings on each server - the server that
 works is using 4.2.2, the one that does not is using 4.1.2.  Other
 than that, the only difference is that on the server that works I've
 changed the path to the PHP include dir (from the server set default
 into my account).
 
 Can anyone offer any suggestions?
 
 
 
 
 This is by far the most FAQ on this list...
 
 what changed
 http://www.php.net/manual/en/language.variables.predefined.php
 
 why it changed
 http://www.php.net/manual/en/security.registerglobals.php
 
 
 In PHP 4.2.0 and later, the default value for the PHP directive
 register_globals is off. This is a major change in PHP. Having
 register_globals off affects the set of predefined variables available
 in the global scope. For example, to get DOCUMENT_ROOT you'll use
 $_SERVER['DOCUMENT_ROOT'] instead of $DOCUMENT_ROOT, or $_GET['id'] from
 the URL http://www.example.com/test.php?id=3 instead of $id, or
 $_ENV['HOME'] instead of $HOME.
 
 For related information on this change, read the configuration entry for
 register_globals, the security chapter on Using Register Globals , as
 well as the PHP 4.1.0 and 4.2.0 Release Announcements.
 
 Using the available PHP Reserved Predefined Variables, like the
 superglobal arrays, is preferred.
 
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] simple date question

2003-01-20 Thread Justin French
why not just call date('m') to get the month?

justin


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] ayuda...solo se ve el código cuando ejecuto los script

2003-01-20 Thread Ezequiel Sapoznik
Estás guardando el archivo con extensión php??

Ezequiel

-Mensaje original-
De: Rot Alvarez [mailto:[EMAIL PROTECTED]]
Enviado el: Lunes, 20 de Enero de 2003 02:21 p.m.
Para: [EMAIL PROTECTED]
Asunto: [PHP] ayuda...solo se ve el código cuando ejecuto los script



Subo los script y solo veo código...q puedo hacer ayuda

_
Registra gratis tu cuenta email en http://www.exploraiquique.cl

_
Select your own custom email address for FREE! Get [EMAIL PROTECTED] w/No
Ads, 6MB, POP  more! http://www.everyone.net/selectmail?campaign=tag

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] PHP and Sessions?

2003-01-20 Thread Tim Thorburn
Yes, I've also had this script working on PHP 4.0.6 - basically I'm looking 
for reasons as to why the sessions may not be functioning properly.  Right 
now I'm going line by line through the configuration of PHP on the server 
that works (4.2.2) and the server that doesn't work (4.1.2) - I'm hoping to 
find some difference, otherwise I don't know how to put password protection 
on the site.

Another interesting issue with the site that doesn't work - if I try to add 
a .htaccess file changing the default include directory of PHP (as I've 
done many other times with various hosting companies) suddenly all my .php 
files cease to work and error screens popup.

I wouldn't call myself a newbie, but I wouldn't call myself an expert - I 
think I'm somewhere in the middle ground of moderate user who's clued right 
now ...

Any help on this would be greatly appreciated.

Below I've compiled a list of the differences between the PHP 
configurations - perhaps something in here may shed some light?

PHP 4.2.2 (works fine)

'./configure' '--with-apxs=/usr/local/apache/bin/apxs' '--with-mcrypt' 
'--enable-bcmath' '--enable-calendar' '--with-xml' 
'--with-swf=/usr/local/flash' '--with-gd=../gd-1.8.4' 
'--with-jpeg-dir=/usr/local' 
'--with-imap=../imap-2001.BETA.SNAP-0107112053' '--with-ming=../ming-0.1.1' 
'--enable-magic-quotes' '--with-mysql' '--enable-safe-mode' 
'--enable-track-vars' '--with-ttf' '--enable-versioning' '--with-curl' 
'--with-zlib'

Settings:
allow_call_time_pass_reference ON
extension_dir ./
magic_quotes_gpc ON
register_argc_argv ON
sendmail_from no value
unserialize_callback_func no value
variables_order EGPCS

PHP 4.1.2 (doesn't work)

'./configure' '--prefix=/usr' '--with-apxs=/usr/sbin/apxs' '--with-gd' 
'--with-gettext=/usr' '--enable-safe-mode' 
'--with-config-file-path=/etc/httpd' '--with-exec-dir=/usr/bin' 
'--with-zlib' '--enable-magic-quotes' '--with-regex=system' '--with-ttf' 
'--with-db' '--with-gdbm' '--enable-mbstring' '--enable-mbstr-enc-trans' 
'--enable-track-vars' '--enable-wddx=shared' '--enable-mm=shared' 
'--enable-xml' '--enable-ftp' '--disable-debug' '--with-libdir=/usr/lib' 
'--with-db3' '--with-interbase=shared' '--with-pgsql=shared' '--with-ldap' 
'--with-imap' '--with-curl=shared' '--with-pdflib=shared'

Settings:
allow_call_time_pass_reference OFF
extension_dir /usr/lib/apache/php
magic_quotes_gpc OFF
register_argc_argv OFF
sendmail_from [EMAIL PROTECTED]
variables_order GPCS

Thanks
-Tim



Re: [PHP] How know how many sessions are active?

2003-01-20 Thread Jeremías Grunge
I think that the option of a client script is the best if you save sessions
in a database.

Any examples of call logout.PHP from javascript (I know that's not a
Scripting forum)

Thanks to everybody


Justin French [EMAIL PROTECTED] escribió en el mensaje
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
on 21/01/03 2:07 AM, Jeremías Grunge ([EMAIL PROTECTED]) wrote:

 Another question

 Do you know a way to close a session when client closes the explorer?
 Perhaps with a client script?

Apart from what everyone else has said about cookie lifetime, there is
probably some javascript foolery you can do to force the browser to visit
logout.php by popping up a new window when the main window closes.

Justin




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Which country?

2003-01-20 Thread Timothy Hitchens \(HiTCHO\)
You could rely somewhat of the time zone codes as you refer to them, the
only issue is in some parts of the world
this would include 10 countries at a time.



Timothy Hitchens (HiTCHO)
Open Source Consulting
e-mail: [EMAIL PROTECTED]

 -Original Message-
 From: -[ Rene Brehmer ]- [mailto:[EMAIL PROTECTED]] 
 Sent: Tuesday, 21 January 2003 5:58 AM
 To: [EMAIL PROTECTED]
 Subject: Re: [PHP] Which country?
 
 
 Hi Timothy Hitchens (HiTCHO),
 
 Can't you also, atleast in IE, also ask the browser what 
 country the user is in??? I believe IE has a variable that 
 takes from the regional settings, which covers language and 
 format info for numbers ... but not sure you can pull it from 
 the web though  the MSDN library is a bit foggy in that respect...
 
 Rene
 
 On Mon, 20 Jan 2003 20:35:35 +1000, you wrote about RE: 
 [PHP] Which country? something that looked like this:
 
 Yes and no... you can use whois information about the IP class or 
 enlist the services from a GEO firm that provides database 
 information 
 that includes information down to
 and including Cities etc.
 
 The accuracy of this type of service in some areas of the 
 world is not 
 exactly accurate but usable.
 
 Look for PHP whois classes but remember that most registries 
 restrict 
 the number of requests these days.
 
 -- 
 Rene Brehmer
 
 This message was written on 100% recycled spam.
 
 Come see! My brand new site is now online! http://www.metalbunny.net
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] How know how many sessions are active?

2003-01-20 Thread Justin French
on 21/01/03 9:12 AM, Jeremías Grunge ([EMAIL PROTECTED]) wrote:

 Any examples of call logout.PHP from javascript (I know that's not a
 Scripting forum)

I already told you! Pop-up a new window with javascript on window close,
with the URL 'logout.php'.

If you need more than that, best find a javascript newsgroup or list :)

And remember it won't work for people without javascript or with a pop-up
blocker or anything like that.

Justin


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] files no longer upload!

2003-01-20 Thread Phil Powell
I'm having a day, gang!

I have done nothing to my code and now is_uploaded_file is constantly false, even when 
uploading a file every time.  I dunno what to do, would someone want to look at my 
code and tell me what I did wrong; I'm out of ideas.

Phil



Re: [PHP] Cannot show reuploaded image file on page unless manual refresh

2003-01-20 Thread Chris Shiflett
--- Phil Powell [EMAIL PROTECTED] wrote:
 Chris, that made no sense to me at all!

Sorry. :-)

 How in the world could an HTTP-RESPONSE send back a
 cached .jpg file that no longer exists on the server
 end? That's impossible, unless the entire page is
 cached. Now, how do I ensure that view.php always
 gets the fresh image every time?

I probably explained this poorly. The main point I was
trying to make is that images are completely separate
resources. They are not part of a page as you seem to be
thinking, even though they appear to be once rendered in
your browser.

While a request for view.php results in a response that
includes all of those headers you explicitly set, a request
for blah.jpg gets returned by the Web server directly. It
is probably being cached by the browser.

However, the Web client usually includes an
If-Modified-Since header that will cause the Web server to
return a fresh resource if it has in fact been modified.

Is there a way you can show us the HTTP transactions for
the image in question both before and after it has been
modified?

Chris

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Cannot show reuploaded image file on page unless manualrefresh

2003-01-20 Thread ed

 Aha! Something I can chime in on. I happened across the same scenario a
few months back. The list helped me then so I'll give back.

 Call the image using a random identifier.

$rand = rand(1000, );

echo img src=http://someurl.com/image.jpg?$rand;;

Since the browser will more than likely not have the image file identified
by the random number it must request it again from the server. Works
great where I need it!

Ed

On Mon, 20 Jan 2003, Chris Shiflett wrote:

 --- Phil Powell [EMAIL PROTECTED] wrote:
  I am using the following header() functions to force
  view.php to not cache:
  
  header(Expires: Mon, 26 Jul 1997 05:00:00 GMT);
  header(Last-Modified:  . gmdate(D, d M Y H:i:s) .
   GMT);
  header(Cache-Control: no-store, no-cache,
  must-revalidate);
  header(Cache-Control: post-check=0, pre-check=0,
  false);
  header(Pragma: no-cache);
 
 :-)
 
 I think you killed it.
 
  However, when a user reuploads a file in manage.php, it
  does a form post onto manage.php and reuploads the file
  (which I verified works).  However, when redirected via
  header() to view.php, they still see their OLD image
  file, NOT the new one!  Unless I manually refresh the
  page, they never see it, until they manually refresh the
  page, then the new image file appears!
 
 Right.
 
 I think you are forgetting that the image is not really
 part of the PHP resource. Meaning, this is the series of
 events for a PHP script that refernces a single image
 called bar.jpg using the img tag:
 
 1. HTTP request sent for foo.php (Web client - Web server)
 2. HTTP response sent that includes the output of foo.php
(Web server - Web client)
 3. Web client (browser) notices img tag referenced in
the HTML.
 4. HTTP request sent for bar.jpg (Web client - Web server)
 5. HTTP response sent that includes bar.jpg
 
 So, the headers that you are setting only matter for the
 resource returned in step 2. Meaning, the HTML output of
 foo.php is not cached. The image, since it is returned by
 the Web server and not your PHP script, is cached.
 
 Chris
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] files no longer upload!

2003-01-20 Thread Paul Nicholson
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

sure...we could look at your code if you showed it to us.
Other than seeing it I'd say check 'register_globals'...
HTH!
~Paul

On Monday 20 January 2003 05:27 pm, Phil Powell wrote:
 I'm having a day, gang!

 I have done nothing to my code and now is_uploaded_file is constantly
 false, even when uploading a file every time.  I dunno what to do, would
 someone want to look at my code and tell me what I did wrong; I'm out of
 ideas.

 Phil

- -- 
~Paul Nicholson
Design Specialist @ WebPower Design
[EMAIL PROTECTED]
www.webpowerdesign.net
The webthe way you want it!


It said uses Windows 98 or better, so I loaded Linux!
Registered Linux User #183202 using Register Linux System # 81891
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE+LHibDyXNIUN3+UQRAvo0AKCAoCOjj0laMSUPEhqvH1EyGLvr7gCePfc0
29Eip+/Liu2BlBCxRRkrvZc=
=eSjL
-END PGP SIGNATURE-

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] a regular expression problem - split text

2003-01-20 Thread Juan Pablo Aqueveque
Hi all
I am sorry for the very simple question but I can't doing this.

I have a text like this:

$text= !-- 1 -- this is January !-- 2 -- this is February !-- 3 -- 
this is March !-- 4 -- this is April ;

OK.. i want to show e.g. this is January in my var $sub_text.

How can i doing this using a regular expressions?

?php

ereg((help-me-with-a-regulars-expressions-sentence),text,$sub_text);
echo $sub_text[0];

?

thanks a lot


Juan Pablo Aqueveque [EMAIL PROTECTED]


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Cannot show reuploaded image file on page unless manual refresh

2003-01-20 Thread Phil Powell
Dude, your solution failed! :(  The image STILL caches even though on the
server end it's deleted!! Even with a RANDOM string tacked on it STILL
caches!!!

Phil


[EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...

  Aha! Something I can chime in on. I happened across the same scenario a
 few months back. The list helped me then so I'll give back.

  Call the image using a random identifier.

 $rand = rand(1000, );

 echo img src=http://someurl.com/image.jpg?$rand;;

 Since the browser will more than likely not have the image file identified
 by the random number it must request it again from the server. Works
 great where I need it!

 Ed

 On Mon, 20 Jan 2003, Chris Shiflett wrote:

  --- Phil Powell [EMAIL PROTECTED] wrote:
   I am using the following header() functions to force
   view.php to not cache:
  
   header(Expires: Mon, 26 Jul 1997 05:00:00 GMT);
   header(Last-Modified:  . gmdate(D, d M Y H:i:s) .
GMT);
   header(Cache-Control: no-store, no-cache,
   must-revalidate);
   header(Cache-Control: post-check=0, pre-check=0,
   false);
   header(Pragma: no-cache);
 
  :-)
 
  I think you killed it.
 
   However, when a user reuploads a file in manage.php, it
   does a form post onto manage.php and reuploads the file
   (which I verified works).  However, when redirected via
   header() to view.php, they still see their OLD image
   file, NOT the new one!  Unless I manually refresh the
   page, they never see it, until they manually refresh the
   page, then the new image file appears!
 
  Right.
 
  I think you are forgetting that the image is not really
  part of the PHP resource. Meaning, this is the series of
  events for a PHP script that refernces a single image
  called bar.jpg using the img tag:
 
  1. HTTP request sent for foo.php (Web client - Web server)
  2. HTTP response sent that includes the output of foo.php
 (Web server - Web client)
  3. Web client (browser) notices img tag referenced in
 the HTML.
  4. HTTP request sent for bar.jpg (Web client - Web server)
  5. HTTP response sent that includes bar.jpg
 
  So, the headers that you are setting only matter for the
  resource returned in step 2. Meaning, the HTML output of
  foo.php is not cached. The image, since it is returned by
  the Web server and not your PHP script, is cached.
 
  Chris
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Free PHP Hosting - Answered

2003-01-20 Thread Timothy Hitchens \(HiTCHO\)
We seem to get one every week of people asking about free PHP hosting so
I went looking
for all those people and found this off the link section from php.net:

http://www.oinko.net/freephp/



Timothy Hitchens (HiTCHO)
Open Source Consulting
e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] pop-up problem

2003-01-20 Thread Step Schwarz
on 1/20/03 4:47 PM, Mark McCulligh at [EMAIL PROTECTED] wrote:

 What does IE do?

Hi Mark,

IE, as far as I know, doesn't have any built-in pop-up killer.

Pop-up killers generally only block pop-ups that either weren't requested by
the visitor -- that is, no link was clicked -- or that reside on a different
server than the page opening the pop-up.  I imagine your help system should
be fine unless your visitors have JavaScript disabled (pop-ups won't work
without JavaScript) or there's an error in you JavaScript that's preventing
the pop-up from working on one browser or another.

Hope this helps,
-Step


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Cannot show reuploaded image file on page unless manual refresh

2003-01-20 Thread Jim Lucas
I would add the modification time of the file in question with

filetime($filename);

that way you will be sure to get a unique argurment.

Jim

- Original Message -
From: [EMAIL PROTECTED]
To: Chris Shiflett [EMAIL PROTECTED]
Cc: Phil Powell [EMAIL PROTECTED]; [EMAIL PROTECTED];
[EMAIL PROTECTED]
Sent: Monday, January 20, 2003 10:48 AM
Subject: Re: [PHP] Cannot show reuploaded image file on page unless manual
refresh



  Aha! Something I can chime in on. I happened across the same scenario a
 few months back. The list helped me then so I'll give back.

  Call the image using a random identifier.

 $rand = rand(1000, );

 echo img src=http://someurl.com/image.jpg?$rand;;

 Since the browser will more than likely not have the image file identified
 by the random number it must request it again from the server. Works
 great where I need it!

 Ed

 On Mon, 20 Jan 2003, Chris Shiflett wrote:

  --- Phil Powell [EMAIL PROTECTED] wrote:
   I am using the following header() functions to force
   view.php to not cache:
  
   header(Expires: Mon, 26 Jul 1997 05:00:00 GMT);
   header(Last-Modified:  . gmdate(D, d M Y H:i:s) .
GMT);
   header(Cache-Control: no-store, no-cache,
   must-revalidate);
   header(Cache-Control: post-check=0, pre-check=0,
   false);
   header(Pragma: no-cache);
 
  :-)
 
  I think you killed it.
 
   However, when a user reuploads a file in manage.php, it
   does a form post onto manage.php and reuploads the file
   (which I verified works).  However, when redirected via
   header() to view.php, they still see their OLD image
   file, NOT the new one!  Unless I manually refresh the
   page, they never see it, until they manually refresh the
   page, then the new image file appears!
 
  Right.
 
  I think you are forgetting that the image is not really
  part of the PHP resource. Meaning, this is the series of
  events for a PHP script that refernces a single image
  called bar.jpg using the img tag:
 
  1. HTTP request sent for foo.php (Web client - Web server)
  2. HTTP response sent that includes the output of foo.php
 (Web server - Web client)
  3. Web client (browser) notices img tag referenced in
 the HTML.
  4. HTTP request sent for bar.jpg (Web client - Web server)
  5. HTTP response sent that includes bar.jpg
 
  So, the headers that you are setting only matter for the
  resource returned in step 2. Meaning, the HTML output of
  foo.php is not cached. The image, since it is returned by
  the Web server and not your PHP script, is cached.
 
  Chris
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: Cannot show reuploaded image file on page unless manual refresh

2003-01-20 Thread Philip Hallstrom
I wonder if appending time() would be better... granular to a second and
you save the filesystem lookup effort??

On Mon, 20 Jan 2003, Jim Lucas wrote:

 I would add the modification time of the file in question with

 filetime($filename);

 that way you will be sure to get a unique argurment.

 Jim

 - Original Message -
 From: [EMAIL PROTECTED]
 To: Chris Shiflett [EMAIL PROTECTED]
 Cc: Phil Powell [EMAIL PROTECTED]; [EMAIL PROTECTED];
 [EMAIL PROTECTED]
 Sent: Monday, January 20, 2003 10:48 AM
 Subject: Re:  Cannot show reuploaded image file on page unless manual
 refresh


 
   Aha! Something I can chime in on. I happened across the same scenario a
  few months back. The list helped me then so I'll give back.
 
   Call the image using a random identifier.
 
  $rand = rand(1000, );
 
  echo img src=http://someurl.com/image.jpg?$rand;;
 
  Since the browser will more than likely not have the image file identified
  by the random number it must request it again from the server. Works
  great where I need it!
 
  Ed
 
  On Mon, 20 Jan 2003, Chris Shiflett wrote:
 
   --- Phil Powell [EMAIL PROTECTED] wrote:
I am using the following header() functions to force
view.php to not cache:
   
header(Expires: Mon, 26 Jul 1997 05:00:00 GMT);
header(Last-Modified:  . gmdate(D, d M Y H:i:s) .
 GMT);
header(Cache-Control: no-store, no-cache,
must-revalidate);
header(Cache-Control: post-check=0, pre-check=0,
false);
header(Pragma: no-cache);
  
   :-)
  
   I think you killed it.
  
However, when a user reuploads a file in manage.php, it
does a form post onto manage.php and reuploads the file
(which I verified works).  However, when redirected via
header() to view.php, they still see their OLD image
file, NOT the new one!  Unless I manually refresh the
page, they never see it, until they manually refresh the
page, then the new image file appears!
  
   Right.
  
   I think you are forgetting that the image is not really
   part of the PHP resource. Meaning, this is the series of
   events for a PHP script that refernces a single image
   called bar.jpg using the img tag:
  
   1. HTTP request sent for foo.php (Web client - Web server)
   2. HTTP response sent that includes the output of foo.php
  (Web server - Web client)
   3. Web client (browser) notices img tag referenced in
  the HTML.
   4. HTTP request sent for bar.jpg (Web client - Web server)
   5. HTTP response sent that includes bar.jpg
  
   So, the headers that you are setting only matter for the
   resource returned in step 2. Meaning, the HTML output of
   foo.php is not cached. The image, since it is returned by
   the Web server and not your PHP script, is cached.
  
   Chris
  
   --
   PHP General Mailing List (http://www.php.net/)
   To unsubscribe, visit: http://www.php.net/unsub.php
  
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 



 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: Cannot show reuploaded image file on page unless manual refresh

2003-01-20 Thread Phil Powell
Tried that too, dude.. now the files are replicating themselves in the
/profile/images folder!  I am supposed to delete the old file and replace it
with the new file, but instead I have old file  new file, and the
association between profile and image is incorrect.

Phil

Philip Hallstrom [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I wonder if appending time() would be better... granular to a second and
 you save the filesystem lookup effort??

 On Mon, 20 Jan 2003, Jim Lucas wrote:

  I would add the modification time of the file in question with
 
  filetime($filename);
 
  that way you will be sure to get a unique argurment.
 
  Jim
 
  - Original Message -
  From: [EMAIL PROTECTED]
  To: Chris Shiflett [EMAIL PROTECTED]
  Cc: Phil Powell [EMAIL PROTECTED]; [EMAIL PROTECTED];
  [EMAIL PROTECTED]
  Sent: Monday, January 20, 2003 10:48 AM
  Subject: Re:  Cannot show reuploaded image file on page unless manual
  refresh
 
 
  
Aha! Something I can chime in on. I happened across the same scenario
a
   few months back. The list helped me then so I'll give back.
  
Call the image using a random identifier.
  
   $rand = rand(1000, );
  
   echo img src=http://someurl.com/image.jpg?$rand;;
  
   Since the browser will more than likely not have the image file
identified
   by the random number it must request it again from the server. Works
   great where I need it!
  
   Ed
  
   On Mon, 20 Jan 2003, Chris Shiflett wrote:
  
--- Phil Powell [EMAIL PROTECTED] wrote:
 I am using the following header() functions to force
 view.php to not cache:

 header(Expires: Mon, 26 Jul 1997 05:00:00 GMT);
 header(Last-Modified:  . gmdate(D, d M Y H:i:s) .
  GMT);
 header(Cache-Control: no-store, no-cache,
 must-revalidate);
 header(Cache-Control: post-check=0, pre-check=0,
 false);
 header(Pragma: no-cache);
   
:-)
   
I think you killed it.
   
 However, when a user reuploads a file in manage.php, it
 does a form post onto manage.php and reuploads the file
 (which I verified works).  However, when redirected via
 header() to view.php, they still see their OLD image
 file, NOT the new one!  Unless I manually refresh the
 page, they never see it, until they manually refresh the
 page, then the new image file appears!
   
Right.
   
I think you are forgetting that the image is not really
part of the PHP resource. Meaning, this is the series of
events for a PHP script that refernces a single image
called bar.jpg using the img tag:
   
1. HTTP request sent for foo.php (Web client - Web server)
2. HTTP response sent that includes the output of foo.php
   (Web server - Web client)
3. Web client (browser) notices img tag referenced in
   the HTML.
4. HTTP request sent for bar.jpg (Web client - Web server)
5. HTTP response sent that includes bar.jpg
   
So, the headers that you are setting only matter for the
resource returned in step 2. Meaning, the HTML output of
foo.php is not cached. The image, since it is returned by
the Web server and not your PHP script, is cached.
   
Chris
   
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
   
  
  
   --
   PHP General Mailing List (http://www.php.net/)
   To unsubscribe, visit: http://www.php.net/unsub.php
  
  
 
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] pop-up problem

2003-01-20 Thread Mark McCulligh
Thanks for the advise, I am doing to change the way I call the popup, move
it out of a function, right into the A tag itself. To see if the one
client I have popup killer app lets it happen now.

Thanks again, Mark.

- Original Message -
From: Step Schwarz [EMAIL PROTECTED]
To: Mark McCulligh [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Monday, January 20, 2003 7:07 PM
Subject: Re: [PHP] pop-up problem


 on 1/20/03 4:47 PM, Mark McCulligh at [EMAIL PROTECTED] wrote:

  What does IE do?

 Hi Mark,

 IE, as far as I know, doesn't have any built-in pop-up killer.

 Pop-up killers generally only block pop-ups that either weren't requested
by
 the visitor -- that is, no link was clicked -- or that reside on a
different
 server than the page opening the pop-up.  I imagine your help system
should
 be fine unless your visitors have JavaScript disabled (pop-ups won't work
 without JavaScript) or there's an error in you JavaScript that's
preventing
 the pop-up from working on one browser or another.

 Hope this helps,
 -Step





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Re: Cannot show reuploaded image file on page unless manual refresh

2003-01-20 Thread Jim Lucas
i think you missunderstood what I said.

in the image tag that you create to display the image, you could do this

img src='/path/to/image/myfile.jpg??=filetime($filename)?'

that would make the URL different when each page time the image was
replaced.

I would use filetime() because it would not cause extra downloads if the
file wasn't different.

if someone looked at the file 2 seconds apart and it didn't change, it was
waisted time and bandwidth down loading the file again.

Jim


- Original Message -
From: Philip Hallstrom [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, January 20, 2003 4:11 PM
Subject: [PHP] Re: Cannot show reuploaded image file on page unless manual
refresh


 I wonder if appending time() would be better... granular to a second and
 you save the filesystem lookup effort??

 On Mon, 20 Jan 2003, Jim Lucas wrote:

  I would add the modification time of the file in question with
 
  filetime($filename);
 
  that way you will be sure to get a unique argurment.
 
  Jim
 
  - Original Message -
  From: [EMAIL PROTECTED]
  To: Chris Shiflett [EMAIL PROTECTED]
  Cc: Phil Powell [EMAIL PROTECTED]; [EMAIL PROTECTED];
  [EMAIL PROTECTED]
  Sent: Monday, January 20, 2003 10:48 AM
  Subject: Re:  Cannot show reuploaded image file on page unless manual
  refresh
 
 
  
Aha! Something I can chime in on. I happened across the same scenario
a
   few months back. The list helped me then so I'll give back.
  
Call the image using a random identifier.
  
   $rand = rand(1000, );
  
   echo img src=http://someurl.com/image.jpg?$rand;;
  
   Since the browser will more than likely not have the image file
identified
   by the random number it must request it again from the server. Works
   great where I need it!
  
   Ed
  
   On Mon, 20 Jan 2003, Chris Shiflett wrote:
  
--- Phil Powell [EMAIL PROTECTED] wrote:
 I am using the following header() functions to force
 view.php to not cache:

 header(Expires: Mon, 26 Jul 1997 05:00:00 GMT);
 header(Last-Modified:  . gmdate(D, d M Y H:i:s) .
  GMT);
 header(Cache-Control: no-store, no-cache,
 must-revalidate);
 header(Cache-Control: post-check=0, pre-check=0,
 false);
 header(Pragma: no-cache);
   
:-)
   
I think you killed it.
   
 However, when a user reuploads a file in manage.php, it
 does a form post onto manage.php and reuploads the file
 (which I verified works).  However, when redirected via
 header() to view.php, they still see their OLD image
 file, NOT the new one!  Unless I manually refresh the
 page, they never see it, until they manually refresh the
 page, then the new image file appears!
   
Right.
   
I think you are forgetting that the image is not really
part of the PHP resource. Meaning, this is the series of
events for a PHP script that refernces a single image
called bar.jpg using the img tag:
   
1. HTTP request sent for foo.php (Web client - Web server)
2. HTTP response sent that includes the output of foo.php
   (Web server - Web client)
3. Web client (browser) notices img tag referenced in
   the HTML.
4. HTTP request sent for bar.jpg (Web client - Web server)
5. HTTP response sent that includes bar.jpg
   
So, the headers that you are setting only matter for the
resource returned in step 2. Meaning, the HTML output of
foo.php is not cached. The image, since it is returned by
the Web server and not your PHP script, is cached.
   
Chris
   
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
   
  
  
   --
   PHP General Mailing List (http://www.php.net/)
   To unsubscribe, visit: http://www.php.net/unsub.php
  
  
 
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] pop-up problem

2003-01-20 Thread Jim Lucas
I have found that with the popup stopper that I have installed on my
machine, Pop-up Stopper from Panic Ware, that I can't even start up a new
instance of IE without it killing the new window.  I have netscape 4,6,7 and
mozilla installed on my machine and it won't allow me to start up more then
one copy of netscape or mozilla at a time.

Jim
- Original Message -
From: Step Schwarz [EMAIL PROTECTED]
To: Mark McCulligh [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Monday, January 20, 2003 4:07 PM
Subject: Re: [PHP] pop-up problem


 on 1/20/03 4:47 PM, Mark McCulligh at [EMAIL PROTECTED] wrote:

  What does IE do?

 Hi Mark,

 IE, as far as I know, doesn't have any built-in pop-up killer.

 Pop-up killers generally only block pop-ups that either weren't requested
by
 the visitor -- that is, no link was clicked -- or that reside on a
different
 server than the page opening the pop-up.  I imagine your help system
should
 be fine unless your visitors have JavaScript disabled (pop-ups won't work
 without JavaScript) or there's an error in you JavaScript that's
preventing
 the pop-up from working on one browser or another.

 Hope this helps,
 -Step


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] ayuda...solo se ve el código cuando ejecuto los script

2003-01-20 Thread R B
Tenes el codigo PHP entre ? y ? ... ?

Ej.:
?
echo Hello World;
?




From: Rot Alvarez [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: [PHP] ayuda...solo se ve el código cuando ejecuto losscript
Date: Mon, 20 Jan 2003 09:20:51 -0800 (PST)


Subo los script y solo veo código...q puedo hacer ayuda

_
Registra gratis tu cuenta email en http://www.exploraiquique.cl

_
Select your own custom email address for FREE! Get [EMAIL PROTECTED] w/No 
Ads, 6MB, POP  more! http://www.everyone.net/selectmail?campaign=tag

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


_
MSN Fotos: la forma más fácil de compartir e imprimir fotos. 
http://photos.msn.es/support/worldwide.aspx


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] pop-up problem

2003-01-20 Thread Sean Burlington
Chris Shiflett wrote:

--- Mark McCulligh [EMAIL PROTECTED] wrote:


I wish people won't miss use features for people start
blocking them.  I am using the window.open the way it
was meant for.  I have a online help feature.  I am not
using it a force people to look at banner after banner.



I know exactly what you mean.

However, I believe window.open still works when used like
this:

a href=# onclick=window.open('foo.php', 'Foo',
'height=480,width=640,status=yes,scrolling=no,scrollbars=no');return
false;Click Here/a

At least, that works with Mozilla's pop-up blocker. As I
understood it, only those annoying automatic popups are
disabled.




I would do

a href=foo.php target=Foo onclick=window.open('foo.php', 'Foo',
 'height=480,width=640,status=yes,scrolling=no,scrollbars=no');return
 false;Click Here/a

as this will still work on non-js browsers - albeit without being able 
to size/position the window.

--

Sean


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] login script fix help needed

2003-01-20 Thread Karl James






hey guys,

I was wondering if you can see why i cant insert the info into a table,

right now its 

Warning: Cannot add header information - headers already sent by (output started at /home/virtual/site12/fst/var/www/html/Create_Account.php:8) in /home/virtual/site12/fst/var/www/html/Create_Account.php on line 10

http://www.ultimatefootballleague.com/Create_Account.phps

can anyone help me get this working thanks.
and let me know what i did wrong.

Karl







 IncrediMail - Email has finally evolved - Click Here

Re: [PHP] ayuda...solo se ve el código cuandoejecuto los script

2003-01-20 Thread Tracy Finifter Rotton
También, se tiene que tener esta línea en su fichero httpd.conf:

AddType application/x-httpd-php .php

(donde .php es la extensión que se usa en sus ficheros de PHP)

Si no se tiene acceso al fichero httpd.conf, se necesita pedir a su
webmaster para hacer este cambio.

On 1/20/03 4:39 PM, R B [EMAIL PROTECTED] wrote:

 Tenes el codigo PHP entre ? y ? ... ?
 
 Ej.:
 ?
 echo Hello World;
 ?
 
 
 
 From: Rot Alvarez [EMAIL PROTECTED]
 Reply-To: [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: [PHP] ayuda...solo se ve el código cuando ejecuto losscript
 Date: Mon, 20 Jan 2003 09:20:51 -0800 (PST)
 
 
 Subo los script y solo veo código...q puedo hacer ayuda
 
 _
 Registra gratis tu cuenta email en http://www.exploraiquique.cl
 
 _
 Select your own custom email address for FREE! Get [EMAIL PROTECTED] w/No
 Ads, 6MB, POP  more! http://www.everyone.net/selectmail?campaign=tag
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 _
 MSN Fotos: la forma más fácil de compartir e imprimir fotos.
 http://photos.msn.es/support/worldwide.aspx
 

-- 
Tracy F. Rotton
[EMAIL PROTECTED]
http://www.taupecat.com/

  ... I like the 49ers because they're pure of heart,
  Seattle because they've got something to prove,
  and the Raiders because they always cheat.
 -- Lisa Simpson, Lisa the Greek


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] login script fix help needed

2003-01-20 Thread Timothy Hitchens \(HiTCHO\)
Move this below to after your php logic:

html 
head 
titleAdd a User/title 
meta http-equiv=Content-Type content=text/html; charset=iso-8859-1

/head 

body 



Timothy Hitchens (HiTCHO)
Open Source Consulting
e-mail: [EMAIL PROTECTED] 
-Original Message-
From: Karl James [mailto:[EMAIL PROTECTED]] 
Sent: Monday, 20 January 2003 1:59 PM
To: php
Subject: [PHP] login script fix help needed


hey guys,

I was wondering if you can see why i cant insert the info into a table,

right now its 

Warning: Cannot add header information - headers already sent by (output
started at /home/virtual/site12/fst/var/www/html/Create_Account.php:8)
in /home/virtual/site12/fst/var/www/html/Create_Account.php on line 10


http://www.ultimatefootballleague.com/Create_Account.phps

can anyone help me get this working thanks.
and let me know what i did wrong.

Karl



  IncrediMail - Email has finally evolved - Click Here


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




  1   2   >