[PHP] PHP SESSION DURATION.....

2003-11-25 Thread Keith
Hi,
How do I go about making a session last longer that the duration of the
browser?
Say I wanted to make a session last for 1 month, so that I could close the
browser as often I wanted, and the session would still be there. I found the
explanations of the session function on PHP.net quite confusing. G...
Oh for good documentation!!!

Should I use session_cache_expire? Well, php.net says: The cache expire is
reset to the default value of 180 stored in session.cache_limiter at request
startup time.
What about session_set_cookie_params? But php.net says the effect of this
function only lasts for the duration of the script?

Are session variables stored server-side or does that apply to cookies only?
And what about session cookies? Are session cookies stored with the client?

Please help

Many thanks
Keith

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



[PHP] Re: PHP SESSION DURATION.....

2003-11-25 Thread Keith
Correction: I meant to say: Are session variables stored server-side or
client-side like cookies?

"Keith" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi,
> How do I go about making a session last longer that the duration of the
> browser?
> Say I wanted to make a session last for 1 month, so that I could close the
> browser as often I wanted, and the session would still be there. I found
the
> explanations of the session function on PHP.net quite confusing. G...
> Oh for good documentation!!!
>
> Should I use session_cache_expire? Well, php.net says: The cache expire is
> reset to the default value of 180 stored in session.cache_limiter at
request
> startup time.
> What about session_set_cookie_params? But php.net says the effect of this
> function only lasts for the duration of the script?
>
> Are session variables stored server-side or does that apply to cookies
only?
> And what about session cookies? Are session cookies stored with the
client?
>
> Please help
>
> Many thanks
> Keith

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



[PHP] How does one run PHP scripts in 'silent mode' ???

2003-12-04 Thread Keith
Hi all,
I need to know how to run a php script without it popping open a browser
window.
$cmd = 'start http://www.somedomain.com/somedir/somefile.php &'
exec( $cmd );
I have tried using exec & system with '&' at the end of the command but that
does not seem to work.
It always opens a browser window even though the script has no echo/print
statements in it.

Any advice would be appreciated

Thanks
Keith

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



[PHP] I need a script for deleting mail from mail boxes...

2003-12-09 Thread Keith
Hi All,

I need to know how to write a script for deleting mail from a Linux server.
Essentially I need to be able to delete all mail with a date-stamp less than
some threshold date.
Then I want this script to run from a regular cron job. I am not sure if
this is doable in PHP or whether I must write a shell script, but either way
I need some pointers on how to go about it.

Any help would be much appreciated.

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



[PHP] [OTHER TOPIC - Please Help] Looking for file sync software (Linux)

2003-12-11 Thread Keith
Hi all,

[Apologies for the off-topic question. Hope you will bear with me]

Given that this is a PHP General newsgroup I figured there's a good chance
someone here would know the answer to this question. Can anyone here
recommend a file-sync application/package for Linux servers that has the
following features:

1. Enables file sync across 2 drives on same server.
2. Enables file-sync between remote and host servers.
3. Enables file-sync for whole drives as well as for selected folders.
4. Includes some aspect of GUI for easy task management.
5. Includes function for restoring (again, whole drives or just selected
folders).

I have come across the likes of 'rsync' and 'unison' but they both seem to
be command line intensive and I can't find much in the way of descent
documentation for them. For instance I don't understand if or how they
achieves 'Data Restore', and for my purposes the ability to restore is a
prerequisite.

Any advice would be most appreciated.

Thank you
Keith

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



[PHP] simple I'm sure

2001-03-14 Thread Keith

Following loop works fine !
but I don't want $art_nr_1 (which is 4564)
I want to have $art_nr_$i
but if you use it you just get 1,2,3,4

for ($i=1; $i<50; $i++) :
$varid = "quant".$i ;
if ($$varid != "") {
echo
"

 ";

}
endfor; 


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




Re: [PHP] simple I'm sure

2001-03-14 Thread Keith

It's bizarre it should work but I get back just 1, 2 or 3
Although with this just to test  it works fine
and i get back 

And really weird it this version
for ($i=1; $i<50; $i++) :
$quantid = "quant".$i ;
if ($$quantid != "") {
 $artid = "art_nr_".$i;
 echo "
 
 
 
 ";
}
endfor;
which gives me back
 
 

I can't spot the problem at all ?

At 10:19 14/03/01 -0500, Jack Dempsey wrote:
>try this...didn't test it, but i think it'll do the trick:
>
>for($i=1;$i<50;$i++){
> $varid = "quant".$i;
> if($$varid != ""){
> echo '';
> echo '';
> }
>}
>
>jack
>
>Keith wrote:
> >
> > Following loop works fine !
> > but I don't want $art_nr_1 (which is 4564)
> > I want to have $art_nr_$i
> > but if you use it you just get 1,2,3,4
> >
> > for ($i=1; $i<50; $i++) :
> > $varid = "quant".$i ;
> > if ($$varid != "") {
> > echo
> > "
> > 
> >  ";
> >
> > }
> > endfor;
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]


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




Re: [PHP] PHP Help

2002-03-02 Thread Keith

You aren't going to be able to build a php application with frontpage or
any other WYSIWYG HTML editor. You are going to have to type it out, the
PHP that is. If this is something that you need done right away, I suggest
you hire an experienced PHP programmer. If you don't know much about MySQL
or PHP you aren't going to be able to build anything worthwhile, at least
not in the next 3 months.

 On Sat, 2 Mar 2002, Josiah Wallingford wrote:

> I do not know very much about MySql or PHP but need to build a pretty
> complex database and script. I need a program like (I hate to say this)
> Front Page or UltraDev that will allow me to do it visually. I am on a
> Mac but can run the software on a PC. I hate Front Page so I hope nobody
> says that. Anybody know of anything like that? I have the whole project
> in my head and can explain it in detail if I need to. If this program is
> written in php that would be awsome!
> Thanks.
>
>
>

-- 
K E I T H  V A N C E
Software Programmer
http://www.vanceconsulting.net
[EMAIL PROTECTED]


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




[PHP] hope someone can help !

2001-08-20 Thread Keith

Clean Suse Linux install !

Get the following from phpinfo.php

PHP Version 4.0.4pl1

'./configure' '--prefix=/usr' '--bindir=/usr/bin' '--libdir=/usr/lib' 
'--with-config-file-path=/etc' '--with-exec-dir=%{libdir}/php/bin' 
'--with-pgsql=/usr' '--with-mysql=/usr' '--with-gd=yes' 
'--with-tiff-dir=/usr' '--with-jpeg-dir=/usr' '--with-png-dir=/usr' 
'--with-xpm-dir=/usr/X11R6' '--with-pdflib=/usr' '--with-ldap=yes' 
'--with-imap=yes' '--with-imap-ssl' '--with-zlib=yes' '--with-bz2' 
'--with-xml' '--with-ttf' '--with-t1lib' '--with-mcal=/usr/include/mcal/' 
'--with-sablot' '--with-readline' '--with-ftp' '--with-ndbm' '--with-gdbm' 
'--with-mcrypt' '--with-gettext' '--with-curl' '--with-mm' '--with-gd=yes' 
'--with-qtdom=/usr/lib/qt-2.2.1/' '--enable-versioning' '--enable-yp' 
'--enable-bcmath' '--enable-trans-sid' '--enable-inline-optimization' 
'--enable-track-vars' '--enable-magic-quotes' '--enable-safe-mode' 
'--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-shmop' 
'--enable-calendar' '--enable-exif' '--enable-ftp' '--enable-memory-limit' 
'--enable-wddx' '--enable-filepro' '--enable-dbase' '--enable-ctype' 
'--enable-debug' '--enable-force-cgi-redirect' '--enable-discard-path' 
'--enable-sigchild' '--enable-gd-imgstrttf' '--with-openssl' 
'--with-swf=./dist/' '--with-apxs=/usr/sbin/apxs' 'i386-suse-linux-gnu'

so why when I try ImageTTFText do I get call to unknown function php must 
be compiled with ttf ??


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




[PHP] Suse Apache

2001-08-28 Thread Keith

would like to build/compile php as a dso !
Linux version is Suse 7.2
apache is version 1.3.19 already compiled with mod.so.c
but I don't seem to have an apache/bin and I can't find apxs which should be
there ???

Is this a Suse problem or what ??
do I have to de-install apache and re-install a normal version ??

or how do I use dso's in this one ??
cause when i try "apxs -i -a -c mod_foo.c" i just get command not found !


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




[PHP] Any conflict with $_POST when 2 users concurrently submitting the same form using POST method?

2009-06-09 Thread Keith
Let's say user A and user B submitting purchase order form with "order.php" 
at the same time, with method=post action='confirmation.php'.


(1)   Will $_POST['order'] submitted by user A replaced by $_POST['order'] 
submitted by user B, and the both user A & B getting the same order, which 
is made by user B? Why?


(2)Since $_POST['xxx'] is superglobal array, will $_POST['order'] read 
by users other than A & B? In shared hosting server environment, are all 
domains hosted within that server using the same $_POST array? Can $_POST 
array accessible by all domains even if not from the originating domain?


Thx for clarification!

Keith 



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



Re: [PHP] Any conflict with $_POST when 2 users concurrently submitting the same form using POST method?

2009-06-09 Thread Keith

Craige, Marc, Nitsan,Bastien,
Thanks for your reply!
This is my understanding and comment from your replies:

(1) If the web server do have assign anonymous request ID to each HTTP 
request from client browser, and assign $_POST to each request ID and works 
within request ID scope, this is fine with session or without session.


(2) If the above is not the case, then session is required. However web 
server still need to provide each session ID a $_POST array and works within 
this scope.


(3) If the web server does not work in case(1) neither case(2), then include 
user ID into $_POST is appropriate, e.g.

$_POST[userID][input_submitted_name][input_submitted_value]
instead of just
$_POST][input_submitted_name][input_submitted_value].

So, which of the 3 cases above is appropriate?

Thanks!

"Craige Leeder"  wrote in message 
news:4a2e85b3@gmail.com...
While yes $_POST is a supergloabal, even a superglobal has it's own scope. 
The scope of $_POST is to the call of the user to the web server. 
Therefor, no User A's information will not be overwritten by User B's 
information.


Hope this helps. Let me know if you want any further clarification. This 
was just a very simplified answer.


Keith wrote:
Let's say user A and user B submitting purchase order form with 
"order.php" at the same time, with method=post action='confirmation.php'.


(1)   Will $_POST['order'] submitted by user A replaced by 
$_POST['order'] submitted by user B, and the both user A & B getting the 
same order, which is made by user B? Why?


(2)Since $_POST['xxx'] is superglobal array, will $_POST['order'] 
read by users other than A & B? In shared hosting server environment, are 
all domains hosted within that server using the same $_POST array? Can 
$_POST array accessible by all domains even if not from the originating 
domain?


Thx for clarification!

Keith



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



[PHP] Re: Any conflict with $_POST when 2 users concurrently submitting the same form using POST method?

2009-06-10 Thread Keith

Thanks! Peter.
I’m very clear now.

"Peter Ford"  wrote in message 
news:bd.38.16665.07c6f...@pb1.pair.com...

Keith wrote:

Let's say user A and user B submitting purchase order form with
"order.php" at the same time, with method=post action='confirmation.php'.

(1)   Will $_POST['order'] submitted by user A replaced by
$_POST['order'] submitted by user B, and the both user A & B getting the
same order, which is made by user B? Why?

(2)Since $_POST['xxx'] is superglobal array, will $_POST['order']
read by users other than A & B? In shared hosting server environment,
are all domains hosted within that server using the same $_POST array?
Can $_POST array accessible by all domains even if not from the
originating domain?

Thx for clarification!

Keith


Other posters have explained, but I'm not sure their explanations are 
clear.

Think of it like this:

User A posts to "confirmation.php". When the server receives the request, 
it
starts up a Process and fills the $_POST array with whatever came in, then 
runs

confirmation.php with that information.

User B posts to "confirmation.php". When the server receives the request, 
it
starts up a Process and fills the $_POST array with whatever came in, then 
runs

confirmation.php with that information.

The KEY thing is that the process in each case is entirely separate. Each 
makes

it's own copy of the script in its own bit of memory, and each has its own
version of $_POST in its own bit of memory.

The two posts can happen at the same time and they will still be 
completely

independent.

The fact that $_POST is called "superglobal" does not mean that it is 
shared by
separate requests - it is not even shared by requests in the same session. 
It
just means that it is already declared and you don't need to use the 
"global"

keyword to access it in your PHP pages.

--
Peter Ford  phone: 01580 89
Developer   fax:   01580 893399
Justcroft International Ltd., Staplehurst, Kent 



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



[PHP] Is there limitation for switch case: argument's value?

2009-08-20 Thread Keith

Hi,
I encounter a funny limitation here with switch case as below:
The value for $sum is worked as expected for 1 to 8, but not for 0.
When the $sum=0, the first case will be return, which is "sum=8".
Is there any limitation / rules for switch case? Thanks for advice!

Keith

$sum=0; 
switch($sum)
{
   case ($sum==8):
   echo "sum=8";
   break;
   case ($sum==7 || $sum==6):
   echo "sum=7 or 6";
   break;
   case ($sum==2 || $sum==1):
   echo "sum=2 or 1";
   break;
   case 0:
   echo "sum=0";
   break;
   default:
   echo "sum=3/4/5";
   break;   
} 


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



Re: [PHP] Is there limitation for switch case: argument's value?

2009-08-22 Thread Keith

Thanks! Torben.
I got the point now and it works! :-)
I'm doing this because the statements of each cases is quite long, and I 
wish to have minimum coding without repetition.



"Lars Torben Wilson"  wrote in message 
news:36d4833b0908202323p3c858b5fn6a1d6775aa7f8...@mail.gmail.com...

2009/8/20 Keith :

Hi,
I encounter a funny limitation here with switch case as below:
The value for $sum is worked as expected for 1 to 8, but not for 0.
When the $sum=0, the first case will be return, which is "sum=8".
Is there any limitation / rules for switch case? Thanks for advice!

Keith


Hi Keith,

Try replacing 'switch($sum)' with 'switch(true)'.

Note that unless you have very good reasons for using a switch
statement like this, and know exactly why you're doing it, it's often
better just to use it in the normal fashion. i.e.:

  switch ($sum)
   {
   case 8:
   break;
   case 7:
   case 6:
   break;
   case 2:
   case 1:
   break;
   case 0:
   break;
default:
   break;
   }

Some people like the syntax you've presented but honestly, there's
usually a better way to do it.

This is also somewhat faster too, although you may only notice the
difference in very tight loops where you're counting every nanosecond.


Regards,

Torben


$sum=0;
switch($sum)
{
  case ($sum==8):
  echo "sum=8";
  break;
  case ($sum==7 || $sum==6):
  echo "sum=7 or 6";
  break;
  case ($sum==2 || $sum==1):
  echo "sum=2 or 1";
  break;
  case 0:
  echo "sum=0";
  break;
  default:
  echo "sum=3/4/5";
  break;
}
--
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] Is there limitation for switch case: argument's value?

2009-08-22 Thread Keith

Thanks! Adam.
It works now!
Actually I thought that switch block is compatible with if/elseif/else block 
but more efficient if the cases is >3.
Because I like to have short coding without repetition, so I group the 
similar cases together.
Thanks for your explanation! I know where is my mistake already and I've 
learnt a lesson today!


"Adam Randall"  wrote in message 
news:b6d6f8360908202319n240bba5al6c02edb6e890b...@mail.gmail.com...

I've never understood why people use switch statements like this as in
reality you are using it more like an if/else block, but anyway.

The reason why your code is not working is that you are passing into
the switch the value of 0, or false, which means that when any of
those $sum == N conditionals comes up as false (say $sum == 8 ), then
that is what is returned because they match up. In PHP's eyes, 0 ==
false in switch statements.

To fix your code, change the switch( $sum ) to switch( true ):

switch( true )
{
case ($sum == 8):
echo "sum=8\n";
break;
case ($sum == 7 || $sum == 6):
echo "sum=7 or 6\n";
break;
case ($sum == 2 || $sum == 1):
echo "sum=2 or 1\n";
break;
case ($sum == 0):
echo "sum=0\n";
break;
default:
echo "sum=3/4/5\n";
break;
}

Or, write your switch like this:

switch( $sum )
{
case 8:
echo "sum=8\n";
break;
case 6:
case 7:
echo "sum=7 or 6\n";
break;
case 1:
case 2:
echo "sum=2 or 1\n";
break;
case 0:
echo "sum=0\n";
break;
default:
echo "sum=3/4/5\n";
break;
}

Regards,

Adam.

On Thu, Aug 20, 2009 at 8:40 PM, Keith wrote:

Hi,
I encounter a funny limitation here with switch case as below:
The value for $sum is worked as expected for 1 to 8, but not for 0.
When the $sum=0, the first case will be return, which is "sum=8".
Is there any limitation / rules for switch case? Thanks for advice!

Keith

$sum=0;
switch($sum)
{
  case ($sum==8):
  echo "sum=8";
  break;
  case ($sum==7 || $sum==6):
  echo "sum=7 or 6";
  break;
  case ($sum==2 || $sum==1):
  echo "sum=2 or 1";
  break;
  case 0:
  echo "sum=0";
  break;
  default:
  echo "sum=3/4/5";
  break;
}
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php






--
Adam Randall
http://www.xaren.net
AIM: blitz574 



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



Re: [PHP] Is there limitation for switch case: argument's value?

2009-08-22 Thread Keith
Hahaha! Actually this is my first time coding, so I still adapting the 
correct way to do it.
FYI, for the sake of minimizing the coding and viewing space occupied of the 
code, I even replace the switch block with array if the cases are just 
merely selecting pool of variables/categories/parameters!

I'm still learning the best practice for coding. :-)

""Daevid Vincent""  wrote in message 
news:fef58898dc3544e3872458cd64661...@mascorp.com...

Whoa! I didn't even know you could use a switch statement like that. In 20
years of coding, I've never ever used a switch like that first "if/else"
style. PHP never ceases to amaze me in it's flexibility (and ability to
shoot yourself in the foot ;-p )

And remember, all your base are belong to Adam.


-Original Message-
From: Adam Randall [mailto:randa...@gmail.com]
Sent: Thursday, August 20, 2009 11:20 PM
To: Keith
Cc: php-general@lists.php.net
Subject: Re: [PHP] Is there limitation for switch case:
argument's value?

I've never understood why people use switch statements like this as in
reality you are using it more like an if/else block, but anyway.

The reason why your code is not working is that you are passing into
the switch the value of 0, or false, which means that when any of
those $sum == N conditionals comes up as false (say $sum == 8 ), then
that is what is returned because they match up. In PHP's eyes, 0 ==
false in switch statements.

To fix your code, change the switch( $sum ) to switch( true ):

switch( true )
{
case ($sum == 8):
echo "sum=8\n";
break;
case ($sum == 7 || $sum == 6):
echo "sum=7 or 6\n";
break;
case ($sum == 2 || $sum == 1):
echo "sum=2 or 1\n";
break;
case ($sum == 0):
echo "sum=0\n";
break;
default:
echo "sum=3/4/5\n";
break;
}

Or, write your switch like this:

switch( $sum )
{
case 8:
echo "sum=8\n";
break;
case 6:
case 7:
echo "sum=7 or 6\n";
break;
case 1:
case 2:
echo "sum=2 or 1\n";
break;
case 0:
echo "sum=0\n";
break;
default:
echo "sum=3/4/5\n";
break;
}

Regards,

Adam.

On Thu, Aug 20, 2009 at 8:40 PM,
Keith wrote:
> Hi,
> I encounter a funny limitation here with switch case as below:
> The value for $sum is worked as expected for 1 to 8, but not for 0.
> When the $sum=0, the first case will be return, which is "sum=8".
> Is there any limitation / rules for switch case? Thanks for advice!
>
> Keith
>
> $sum=0;
> switch($sum)
> {
>   case ($sum==8):
>   echo "sum=8";
>   break;
>   case ($sum==7 || $sum==6):
>   echo "sum=7 or 6";
>   break;
>   case ($sum==2 || $sum==1):
>   echo "sum=2 or 1";
>   break;
>   case 0:
>   echo "sum=0";
>   break;
>   default:
>   echo "sum=3/4/5";
>   break;
> }
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>



--
Adam Randall
http://www.xaren.net
AIM: blitz574

--
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] Is there limitation for switch case: argument's value?

2009-08-24 Thread Keith

Oh I see. I missed out one thing too.
There is no need to put the same code under both case 7 & 6 separately, but 
just under case 6 will do.

This is simpler in fact!
Thanks Tedd and Torben!
I'll fix to this style from now onwards.


"tedd"  wrote in message 
news:p06240800c6b84328c...@[192.168.1.100]...

At 9:44 PM -0700 8/22/09, Lars Torben Wilson wrote:

Hi Keith,

Glad it works! I'm not sure how inverting the case statement helps you
minimize the code in each case. As both I and Adam showed, you can do
the same thing more efficiently (and IMHO much more readably) like
this:

switch ($sum)
{
case 8:

   break;
case 7:
case 6:
   break;
case 2:
case 1:
   break;
case 0:
   break;
default:
   break;
}



Additionally, I would argue there's nothing different below other than 
it's even more easier to read and understand:


switch ($sum)
   {
case 0:
break;

case 1:
case 2:
break;

case 6:
case 7:
break;

case 8:
break;

default:
break;
   }

Cheers,

tedd
--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com 



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



[PHP] phpmailer send() always return true even the email address is invalid

2009-08-27 Thread Keith
Due to my web hosting server implement SMTP authentication, I couldn't do it 
with PHP mail() function, so I opt for PHPMailer.
However, the $mail->Send() method always return true even I've set the 
$mail->AddAddress with invalid email address.

I've tried with valid address. It's good and I've received the email.
Then I set it with invalid x...@gmail.com, the return value is true, and I 
have received email from mailer daemon that gmail has rejected the email.
Then I set the $mail->Address with invalid name & invalid domain. This time, 
the $mail->Send() still return as true, however, I didn't receive email from 
mailer daemon this time.


Any idea why this happened? Any solution for me or suggestion to use other 
send mail class/function that support SMTP authentication?


Thanks!
Keith 



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



Re: [PHP] phpmailer send() always return true even the emailaddress is invalid

2009-08-27 Thread Keith

Ash, Viktor, Thanks!
Yes, validate the email is the preliminary solution. However, it is still 
possible that the email address is valid but is not exist in the target 
email provider.

I wish to know also if the email can reach the recipient or not.
Actually, I have tested with localhost in my computer, with ArGoSoft Mail 
Server, I'm just using php mail() function.
When the email server was off, or invalid email account of localhost, or 
sending to external email provider (which I have yet to configured the DNS, 
so ArGoSoft cannot resolve it), I'll receive false from the mail() function.
I need to use this info to inform my user whether the mail is successfully 
sent out or not.

Any idea why PHP mail() function can do this in my computer?
Thanks for your valuable advice!


"Viktor Popov"  wrote in message 
news:4a9682af.7050...@neterra.net...

Ashley Sheridan wrote:

On Thu, 2009-08-27 at 20:38 +0800, Keith wrote:
Due to my web hosting server implement SMTP authentication, I couldn't 
do it with PHP mail() function, so I opt for PHPMailer.
However, the $mail->Send() method always return true even I've set the 
$mail->AddAddress with invalid email address.

I've tried with valid address. It's good and I've received the email.
Then I set it with invalid x...@gmail.com, the return value is true, and 
I have received email from mailer daemon that gmail has rejected the 
email.
Then I set the $mail->Address with invalid name & invalid domain. This 
time, the $mail->Send() still return as true, however, I didn't receive 
email from mailer daemon this time.


Any idea why this happened? Any solution for me or suggestion to use 
other send mail class/function that support SMTP authentication?


Thanks!
Keith


The return code only informs you that the mail was sent successfully,
not that it was received, so you can have invalid email addresses and
still have the function return true.

Thanks,
Ash
http://www.ashleysheridan.co.uk




Exactly, you should validate the e-mail addresses before sending the mail.

Something like this:

http://php.dzone.com/news/php-email-validator-email-mx-d 



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



[PHP] Error when execute header('location: otherpage.php') after email been sent out. Any Workaround?

2009-08-28 Thread Keith
I have a user sign up page that collects sign up information from user with 
form.
This form will then be submitted to another process.php page for setting up 
the user account and send email to the user.
After the email been sent out, the user will be directed back to homepage 
with header("location: index.php").
However, error happen with warning: [Cannot modify header information - 
headers already sent by...]

Any workaround for this?

Thanks for help!
Keith



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



Re: [PHP] Error when execute header('location: otherpage.php') after email been sent out. Any Workaround?

2009-08-28 Thread Keith

Hi all,
Yes, you are right, it was due to echo for testing purpose not been 
commented out prior to header().
However, there is hidden root cause too --  PHPMailer will echo invalid 
address to the screen.
When I have tested with 1 valid email address and 1 invalid with 
someth...@locahost, PHPMailer will echo out the invalid someth...@localhost.
However, in this case, $mail->send() still will return value of TRUE as long 
as at least 1 email been sent out.
After I have commented out all these [echo], no more header issue occur 
again.


It's works too using Floyd's recommended javascript! However, the message 
will echoed out first before redirect to index.php, but this is fast enough 
to be neglectable.


I have one more question regarding error logging.
I have set as below:

ini_set('log_errors', 1);
ini_set('error_log', "http://domain.com/log/logfile.txt";);
ini_set('error_reporting', 'E_ALL');
ini_set('error_append_string', '\r\n');

I have simulated an error which can be displayed on screen because I've put 
ini_set('display_errors',1).

However, the error was not been logged.

Which format should I used for log file? *.log or *.txt?

Since I'm using third party web hosting, I can only access web directory, 
should I use

[http://domain.com/log/logfile.*] or
[C:\some_path\domain.com\log\logfile.*] or just
[/log/logfile.*]?

Thanks!
Keith


"Floyd Resler"  wrote in message 
news:a536e452-54a2-4f55-8ae0-28e875a59...@adex-intl.com...
Another solution would be to use JavaScript.  In your process.php  script 
you could do this:

print<<
window.location.href="index.php"

here;

Not strictly a PHP solution but it works.

Take care,
Floyd

On Aug 28, 2009, at 5:34 AM, Ashley Sheridan wrote:


On Fri, 2009-08-28 at 17:32 +0800, Keith wrote:
I have a user sign up page that collects sign up information from  user 
with

form.
This form will then be submitted to another process.php page for 
setting up

the user account and send email to the user.
After the email been sent out, the user will be directed back to 
homepage

with header("location: index.php").
However, error happen with warning: [Cannot modify header  information -
headers already sent by...]
Any workaround for this?

Thanks for help!
Keith





You don't need a workaround. The header("Location...") thing will only
work if you have not sent any content to the browser yet. That  includes
even a single space or newline.

It looks like in your process.php page, something is being output to  the
browser. Are you able to do a code dump of that page?

Thanks,
Ash
http://www.ashleysheridan.co.uk




--
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] Re: Best way to test for form submission?

2009-08-28 Thread Keith

I've encountered issue with checking $_POST['submit']
   if(isset($_POST['submit'])) {}

If the form consists of checkbox/radio and text field, some of my forms can 
be submitted by just press [ENTER] at the end of one of the text field. In 
this case, the $_POST['submit'] is set even the  submit button was not 
clicked.
However, in some of my forms, $_POST['submit'] will not be set if I submit 
the form by pressing [ENTER] in one of the text field.
So, if the later case happen, I need to remind the user to explicitly click 
the [Submit] button.
I don't know why or in what condition that pressing [ENTER] will not submit 
the whole form include the $_POST['submit'].


Keith


"Ashley Sheridan"  wrote in message 
news:1251467419.27899.106.ca...@localhost...

On Thu, 2009-08-27 at 23:21 -0400, Adam Jimerson wrote:

On 08/27/2009 11:09 PM, Adam Jimerson wrote:
> This question might give away the fact that I am a php noob, but I am
> looking for the best way to test for form submission in PHP.  I know in
> Perl this can be done with
>
> if (param)
>
> but I don't know if that will work with PHP.  I have read the Learning
> PHP 5 book and the only thing that was mentioned in the book was the 
> use

> of something like this
>
> print "Hello ".$_POST['username']."";

Sorry copied and pasted the wrong line (long day)

if (array_key_exists('username',$_POST))
>
> I'm sure that this is not the best/recommended way to do this but I'm
> hoping someone here will point me in the right direction.




The best way I've found is to do something like this:

if(isset($_POST['submit']))
{}

Note that in-place of submit you can put the name of any form element. I
chose submit here, because every form should have a submit button. Note
also that this will only work if you have given your submit button a
name:



Thanks,
Ash
http://www.ashleysheridan.co.uk





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



Re: [PHP] Error when execute header('location: otherpage.php') after email been sent out. Any Workaround?

2009-08-28 Thread Keith

Ash, Ben, Thanks!

For my web server, I can access to:
./httpdocs
./httpsdocs

all the http documents are stored inside httpdocs and SSL documents inside 
httpsdocs.
The web root you mean here is referred to ./httpdocs and ./httpsdocs or the 
parent directory of them?
If I  put the logfile inside ./log/logfile.txt where ./log is same level as 
./httpdocs, can the web users access it?


Thanks!
Keith


"Ashley Sheridan"  wrote in message 
news:1251477059.27899.117.ca...@localhost...

On Fri, 2009-08-28 at 09:28 -0700, Ben Dunlap wrote:

> Which format should I used for log file? *.log or *.txt?

Doesn't matter to PHP -- but you do need to provide a local path, not a 
URL.


> [http://domain.com/log/logfile.*] or

No...

> [C:\some_path\domain.com\log\logfile.*] or just

Yes!

Ben


You should try and put the log somewhere that is not in the web root, to
prevent anyone from accessing it and getting information which could
help a hack.


Thanks,
Ash
http://www.ashleysheridan.co.uk





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



[PHP] session.gc_ : maxlifetime vs probability/divisor : which has higher priority?

2010-07-22 Thread Keith
From what I read, the session will remain even after maxlifetime until the 

next round session garbage clearance.
This is fine for me.
1) However, will the garbage clearance delete the session whose maxlifetime 
not reach yet?
2) maxlifetime is referrenced to most recent script execution time which has 
session_start() statement or the first time this session id been created?


3)What does the statement below mean?
"If different scripts have different values of session.gc_maxlifetime but 
share the same place for storing the session data then the script with the 
minimum value will be cleaning the data."


Does this mean that each script file called within same session, can have 
different maxlifetime? I thought each time each script been called for a 
particular session will overwrite the previous setting if I have I set it 
with ini_set().


Does the selection of minimum value of the statement above applied to 
individual session, or refer to all session within the same folder?


4) How to make sure that the PHP session remained as long as user not 
logout, and if the maxlifetime reach, I can prompt user to decide whether to 
continue the session or abort it.


Thanks for advice. 



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



[PHP] Error on Signing & Encrypting PayPal Website Payment Button with openssl_

2010-07-24 Thread Keith

Hi, anyone has experience creating PayPal Encrypted Website Payment button?
I follow PayPal SDK example but the encrypted value is not correct.

I think the error should be with openssl_pkcs7_sign() since PayPal can 
decrypt it with PayPal private key but does not recognize my signed data. 
PayPal also told me that it is my encryption error.


Please kindly advice on the code below.

Thanks!
Keith
___
//$buttonParams is key=value pair string with \n separation between each 
key=value pair

$mypub = 'file://'.realpath('./mypubcert.pem');
$myprv = 'file://'.realpath('./myprvkey.pem');
$paypalpubcert= 'file://'.realpath('./paypal_cert_pem.pem');

$dataStrFile  = realpath(tempnam('./tmp', 'pp_'));
$fd = fopen($dataStrFile, 'w');
fwrite($fd, $buttonParams);
fclose($fd);

$signedDataFile = realpath(tempnam('./tmp', 'pp_'));
openssl_pkcs7_sign($dataStrFile, $signedDataFile, $mypub, $myprv,array(), 
PKCS7_BINARY);

unlink($dataStrFile);

$signedData = file_get_contents($signedDataFile);
$signedDataArray = explode("\n\n", $signedData);  //I don't understand why 
this code, just follow example only.
$signedData = base64_decode($signedDataArray[1]);  //I don't understand why 
this code, just follow example only.

unlink($signedDataFile);

$decodedSignedDataFile = realpath(tempnam('./tmp', 'pp_'));
$fd = fopen($decodedSignedDataFile, 'w');fwrite($fd, 
$signedData);

fclose($fd);

$encryptedDataFile = realpath(tempnam('./tmp', 'pp_'));
openssl_pkcs7_encrypt($decodedSignedDataFile, $encryptedDataFile, 
$paypalpubcert, array(), PKCS7_BINARY);

unlink($decodedSignedDataFile);

$encryptedData = file_get_contents($encryptedDataFile);
unlink($encryptedDataFile);

$encryptedDataArray = explode("\n\n", $encryptedData);
$encryptedData = trim(str_replace("\n", '', $encryptedDataArray[1])); //why 
this?


$encryptedData = "-BEGIN PKCS7-".$encryptedData."-END 
PKCS7-";
$encryptedBtn = "action='https://www.sandbox.paypal.com/cgi-bin/webscr' method='post'>type='hidden' name='cmd' value='_s-xclick'>NAME='encrypted' VALUE='$encryptedData'>src='https://www.sandbox.paypal.com/en_US/i/btn/btn_paynowCC_LG.gif' 
border='0' name='submit' alt='PayPal - The safer, easier way to pay 
online!'>src='https://www.sandbox.paypal.com/en_US/i/scr/pixel.gif' width='1' 
height='1'>";


echo $encryptedBtn ;
_




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



[PHP] intermittent problems using ftp_get ...Help!

2004-04-13 Thread Keith
Hi all

Can anyone tell me what would cause intermittent problems downloading files
using ftp_get.
I have a php file that regularly connects to a number of servers in turn
using php's (ftp functions) and downloads files using ftp_get(...). This
usually works but often it just fails to download a file and ends up giving
a timeout error. Also it seems it can be any file.

I just cannot understand why when I run the script a number of times in
sucsession this will sometimes but not others. Any ideas?

p.s. The files I am downloading are '.sql' text files.

Thanks
K

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



Re: [PHP] intermittent problems using ftp_get ...Help!

2004-04-13 Thread Keith
Hi Red
Thanks, I had wondered about connection limitations, but frankly I'd be
surprised if that were the problem.
But as we are on this subject, I use proftpd and the MaxClients value is not
set yet. As I understand it I can set MaxClients to 'none' which removes any
maximum restriction. But what is the default number of connections allowed?

My proftpd version 1.2.5
Server = Cobalt Raq4

Thanks again
K



"Red Wingate" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Maybe the max number of connections to the FTP server is reached? My
> provider allows only up to 3 FTP connections at the same time which causes
> similar problems to my scripts :-)
>
>   -- red
>
> [...]
> > Can anyone tell me what would cause intermittent problems downloading
files
> > using ftp_get.
> > I have a php file that regularly connects to a number of servers in turn
> > using php's (ftp functions) and downloads files using ftp_get(...). This
> > usually works but often it just fails to download a file and ends up
giving
> > a timeout error. Also it seems it can be any file.
> >
> > I just cannot understand why when I run the script a number of times in
> > sucsession this will sometimes but not others. Any ideas?
> [...]

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



Re: [PHP] intermittent problems using ftp_get ...Help!

2004-04-13 Thread Keith
Well the servers do indeed have firewalls! But why would this be
intermittent and how can I get around this WITHOUT removing the firewall :)

Thanks
K


"Raditha Dissanayake" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Keith wrote:
>
> >Hi all
> >
> >Can anyone tell me what would cause intermittent problems downloading
files
> >using ftp_get.
> >I have a php file that regularly connects to a number of servers in turn
> >using php's (ftp functions) and downloads files using ftp_get(...). This
> >usually works but often it just fails to download a file and ends up
giving
> >a timeout error. Also it seems it can be any file.
> >
> >
> an offending firewall is a possibility
>
>
> -- 
> Raditha Dissanayake.
> -
> http://www.radinks.com/print/upload.php
> SFTP, FTP and HTTP File Upload solutions

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



Re: [PHP] intermittent problems using ftp_get ...Help!

2004-04-13 Thread Keith
But that's just it , I am using ftp_pasv($idconn, true) and yes I have
placed it after the connection and login statement.

Any other ideas?
K

"Curt Zirzow" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> * Thus wrote Keith ([EMAIL PROTECTED]):
> > Well the servers do indeed have firewalls! But why would this be
> > intermittent and how can I get around this WITHOUT removing the firewall
:)
>
> ftp servers behind firwalls tend to require PASV to be on. check
> out http://php.net/ftp_pasv
>
>
> Curt
> -- 
> "I used to think I was indecisive, but now I'm not so sure."

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



[PHP] URL Rewrite???

2006-06-13 Thread Keith
Hi all

Not really a php issue per se - sorry.
But I'm sure someone here is bound to know the answer. :-)

I have a main site that is accessible at say 
"http://www.somedomain.com/somedir/"; but I want visitors to be able to 
access the site using simply "http://www.somedomain.com"; AND for the 
resulting URL displayed to STILL say "http://www.somedomain.com";  and not 
"http://www.somedomain.com/somedir/";.

Should this be possible using the .htaccess file and some mod_rewrite rule? 
Toyed around with that but couldn't get it to work.

ANY help would be greatly appreciated, thanks

P.S. Platform: Linux RedHat (running Apache)

scorpy 

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



Re: [PHP] Confirm message box

2002-11-27 Thread Keith Sauvant
Hi Wilmar,

> And when the user hits the Delete link a pop up dialog box (javascript

> style) asks for confirmation.

Not a big deal. Your PHP script has to generate Links like:

delete

where xy is the id of your record. The link will be followed after a
positive conformation, "myscript.php" can delete the record.

Good luck
Keith


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




RE: [PHP] Problem uploading files other than text/plain ones

2002-12-02 Thread Keith Sauvant
You know about the php.ini option "upload_max_filesize"? Perhaps its
default value is not enough for your task?

Greeting from
Keith
Aachen, Germany


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




RE: [PHP] Whimper, help :)

2002-12-04 Thread Keith Sauvant
> Like I said, I can run the same SQL in PHPMyAdmin...

Be careful when testing SQL statements containing (double)quotes in
PHPMyAdmin, as I remember, it automatically masks them! Try the same
statement on mysqls commandline.

Good luck
Keith


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




[PHP] LOGOUT - Reset Session

2003-01-30 Thread Keith Spiller
Hello Everyone,

I'm trying to create a Logout Function and Link.  My site uses a standard
htaccess file for its authentication method.  After the brower requests the
username and password they have access to the protected site.

Then users can jump to a special Messaging section where I wrote a php
script that retieves the $REMOTE_USER value and checks it against a message
database.

My problem is that I'd like to have a logout link that will dump the values
the user had entered for their username and password so that they can no
longer access the messages, neither with a back button nor just by going
back to the site url.  But since I am retrieving the $REMOTE_USER value
using PHP4, it seems some how it remebers the username and password.  Is
that because I need to destroy the session and remove or replace the session
cookies?  I do not know what the session name is, nor how to check it.

Here is what I have tried so far:

function logout() {

session_start();
session_destroy();
setcookie("SES_NAME","","","/");
header("Location: http://www.yahoo.com";);
exit;
}

My results were that everytime I click the logout link, I can just press
back on the browser and go back where I was and continue using the Messaging
application.

Thank you for any help you might provide...


Larentium
[EMAIL PROTECTED]


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




[PHP] short_open_tags = On

2003-03-04 Thread Keith Mastin
I was asked to change this in the php.ini file by a user to "make it
easier to use php on the server". Before doing so, I thought I better ask
if there's any know security implications. I checked the wiki, and it
showed that there are 31 instances of this, but didn't actually show any.
:)

The server is on the web and has a number of domains. The user in question
writes a lot of websites using php for maybe 1/2 of the domains.

TIA

-- 
Keith Mastin
BeechTree Information Technology Services Inc.
Toronto, Canada
(416)696-6070





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



RE: [PHP] text area question

2003-08-22 Thread Keith Higgs
Only if you're concerned about those few whitespace characters increasing your file 
size. Granted, there mey be PHP output related issues to a multi-line whitespace 
within an echo or print operation but, so far as the actual HTML is concerned, white 
space is white space and it should all be ignored by the browser's  rendering engine.

The suggested correction DOES do a lot for programming style by eliminating the 
superfluous space, and the possibility that you may introduce errors by inserting 
other code in that area.

D. Keith Higgs <mailto:[EMAIL PROTECTED]> 216-368-0559
 Case Western Reserve University, Webmaster / Database Analyst - University Library
 Additional Information at http://www.cwru.edu/UL/ and http://keith.cwru.edu/
"Never overestimate the sanity of your sysadmin."

 No trees were killed in the creation of this message. 
 However, many electrons were terribly inconvenienced.

> -Original Message-
> From: Marek Kilimajer [mailto:[EMAIL PROTECTED] 
> Sent: Friday, August 22, 2003 07:08 AM
> To: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP] text area question
> 
> 
> Your textarea should be:
> 
> 
> and not
> 
> 
> 
> 
> 
> 
> 
> 
> Angelo Zanetti wrote:
> 
> > 
> > Hi this is slightly off topic but i hope i will be forgived.
> > 
> > I have a textarea and whenever my page loads and I click in 
> it the cursor
> > nevers starts at the very beginning and I have to push the 
> backspace buttton
> > until i get to the start. is there a property or something 
> to fix this??
> > 
> > thanx in advance
> > angelo
> > 
> > 
> > 
> 
> 
> -- 
> 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] Apache to compile PHP and Ruby languages in the same document?

2003-06-11 Thread Keith Hamilton
Hello,

I'm trying to create one document with PHP and Ruby scripts in
the same document.  Is this possible?  I've tried to configure mod_ruby
to compile php documents as well but when I do that PHP doesn't work.
Is it possible to have 2 languages in the same document?

-- Keith


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



[PHP] Exploding Zip Codes! (Using PHP's explode function)

2002-08-12 Thread Keith Posehn

I have a huge block of zip codes I need to seperate into their constituent
parts for a query of a database. The block looks like this (in part):

|  36310  ABBEVILLE  |
|  35440  ABERNANT  |
|  35005  ADAMSVILLE  |
|  35540  ADDISON  |
|  35006  ADGER  |
|  35441  AKRON  |

I need to use eplode (probably) to seperate this all out into two arrays,
one of codes, the other of names--presumably named $zips[] and $cities[]
with the rest of the data dumped.

I have gone and looked at the various functions docs at php.net, but they
haven't really helped to answer my question as much as I would like. Any
information is appreciated.

Thanks



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




[PHP] [Followup] Exploding Zip Codes! (Using PHP's explode function)

2002-08-13 Thread Keith Posehn

Final question on this (I hope).

I have the code together now to put it all the zip codes into and array--but
now I need to add those zip codes to a sql statement for the WHERE clause.
Example:

SELECT * FROM [table]
WHERE zip="[all the darn zips listed here]"

(or something like that)

How would I set it to loop all the zip codes into this statement? I'm not
worried about the SQL syntax, I can figure that out without a problem, but
the php code is the question. This is in MySQL btw, and I have looked
through the docs there and at php for this, but need some help from all you
guru's out there.

Thanks for the help!

(Previous message here)

> I have a huge block of zip codes I need to seperate into their constituent
> parts for a query of a database. The block looks like this (in part):
>
> |  36310  ABBEVILLE  |
> |  35440  ABERNANT  |
> |  35005  ADAMSVILLE  |
> |  35540  ADDISON  |
> |  35006  ADGER  |
> |  35441  AKRON  |
>
> I need to use eplode (probably) to seperate this all out into two arrays,
> one of codes, the other of names--presumably named $zips[] and $cities[]
> with the rest of the data dumped.
>
> I have gone and looked at the various functions docs at php.net, but they
> haven't really helped to answer my question as much as I would like. Any
> information is appreciated.
>
> Thanks




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




Re: [PHP] Are sessions affected by Unix user changes?

2002-08-28 Thread Keith Soares

To clarify, session files ARE being created still, but they all have a length of 0.
So it seems that the permissions to create a file are ok, but something else is wrong.

Any idea why the file could be created, but would be empty?
I'm perplexed.
K.

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




Re: [PHP] SESSION ARRAY

2002-08-29 Thread Keith Vance

$_SESSION is a predefined variable, session_start()
session_register('BILLARRAY') should work though :)

Keith Vance
Vance Consulting LLC
www.vanceconsulting.net
(206) 355-2399

Try my open source PHP authentication system, Rampart by visiting 
http://rampart.sourceforge.net/. Commercial support is available at, 
http://www.vanceconsulting.net/support/.

On Fri, 30 Aug 2002, Todd Pasley wrote:

> > What is the proper syntax for storing an array in a session?
> >
> > is it $_SESSION["BILLARRAY"]=$ARRAY?
>
> Yep,  providing youre using session_start() and session_register("_SESSION")
> you can assign any type of data, just like a regular hash.
>
> Todd.
>
> - Original Message -
> From: "Randy Johnson" <[EMAIL PROTECTED]>
> To: "phplist" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Sent: Friday, August 30, 2002 9:08 AM
> Subject: [PHP] SESSION ARRAY
>
>
> > What is the proper syntax for storing an array in a session?
> >
> > is it $_SESSION["BILLARRAY"]=$ARRAY?
> >
> >
> > Randy
> >
> >
> >
> > --
> > 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] Running a PHP script automatically?

2002-09-21 Thread Keith Vance

On the Linux box compile PHP as CGI (i.e. don't configure it as an apache
mod). Then you can just run your script from the the command-line.

For example:
#!/usr/local/bin/php -q


The -q suppresses the html crap that gets spit out. I don't know jack
about Redhat (Debian rocks), you might be able to get an RPM that will
install the php executable for you.

To do the crontab:
RUN THIS COMMAND
crontab -e

TYPE THIS
15,30,45,0 * * * * name_of_your_script

THEN
ESC
:wq

Keith Vance
Vance Consulting LLC
www.vanceconsulting.net
(206) 355-2399

Try my open source PHP authentication system, Rampart by visiting 
http://rampart.sourceforge.net/. Commercial support is available at, 
http://www.vanceconsulting.net/support/.

On Sat, 21 Sep 2002, Joseph Szobody wrote:

> Folks, I have a PHP script that needs to be executed automatically every 15 minutes. 
>I have the option of doing this on a RedHat linux box, or on Windows 2000 Server.
>
> How would I do this (on either platform) and which would be easier?
>
> I believe somehow I could create a cron job on linux, but I'm a bit confused how 
>that would work. Would I just call the php script using Lynx? If so, does the Lynx 
>process die when the php script is finished? Will I have dozens of Lynx processes 
>still running at the end of the day?
>
> In Windows, I believe I could use the task scheduler, or something like that. But 
>again, how exactly would I call the script? I certainly don't want a new browser 
>window to open every 15 minutes, especially if it doesn't close again.
>
> Any insight? Thanks!
>
> Joseph
>
>
> --
> 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] displaying a select number of rows from a sql query

2002-10-09 Thread Keith Posehn

Ok, here is the question:

I have a sql query, nothing special. It has 3 variables. I have created the
php code to display the variables in context with the html code. I need it
to loop a select number of times, most likely twice, and therefore display
the first two rows of the query.

In other words, querying the database for a set of rows, it needs to display
the first two of the rows on the page.

Here is the code I have tried so far, which has either looped continuosly or
displayed the top row twice (edited for security):





What's New?

_<

?>


">









Thanks for any help you can provide.

-Keith Posehn



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




[PHP] Re: displaying a select number of rows from a sql query

2002-10-10 Thread Keith Posehn

I tried this code, and it still just keeps 'a loopin'...

What is wierd is that I have some if the code I tried in my site on other
pages, and it functions without a problem...any thoughts?

Thanks for the help.

-Keith Posehn

"Owen Prime" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> With the line:
>
> while (list($link, $title, $content) = mysql_fetch_array($result)) {
>
> The php docs don't actually say what the list() function returns, but
since
> your getting an infinite loop i would say that it probably evaluates to
> true no matter whats on the right hand side of the assignment. I would
> suggest that you use:
>
> while ($tmp = mysql_fetch_array($result)) {
> list($link, $title, $content) = $tmp;
>
> Cheers,
>
> Owen Prime
> http://www.noggin.com.au
>
>
> Keith Posehn wrote:
>
> > Ok, here is the question:
> >
> > I have a sql query, nothing special. It has 3 variables. I have created
> > the php code to display the variables in context with the html code. I
> > need it to loop a select number of times, most likely twice, and
therefore
> > display the first two rows of the query.
> >
> > In other words, querying the database for a set of rows, it needs to
> > display the first two of the rows on the page.
> >
> > Here is the code I have tried so far, which has either looped
continuosly
> > or displayed the top row twice (edited for security):
> >
> >  >
> >
> >  $sql  = "SELECT * FROM [database] ORDER BY [collumn] LIMIT 2";
> >  $result = mysql_query($sql) or die("problem with $sql");
> >  // list($title) = mysql_fetch_array($result);
> > ?>
> >
> > 
> >
> > What's New?
> >
> >  >
> > /* It tried this: */ while(list($link, $title, $content) =
> > mysql_fetch_array($result)){
> >
> > /* And this: */ while($row = mysql_fetch_array($result) and
> > (($count++)<2)){
> >
> > // The first kept looping infinitely, the second displayed the top row
> > twice. Grr... >_<
> >
> > ?>
> >
> > 
> > "> > mysql_result($result,0,"title"); ?>
> > 
> > 
> > 
> > 
> >
> >  > }
> > ?>
> >
> > 
> >
> > Thanks for any help you can provide.
> >
> > -Keith Posehn
>
>



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




Re: Fw: Re: [PHP] Simple HTML-Form Question

2002-10-13 Thread Keith Vance

I would quote get in method="get" and end the  for starters.

Keith Vance
Vance Consulting LLC
www.vanceconsulting.net
(206) 355-2399

Try my open source PHP authentication system, Rampart by visiting 
http://rampart.sourceforge.net/. Commercial support is available at, 
http://www.vanceconsulting.net/support/.

On Sun, 13 Oct 2002, Chip Wiegand wrote:

> Yep, I've been going over this with John off-list, I learned something
> new tonite. One thing about his script - it doesn't print the text
> entered in the box, it only prints the work Hallo. To fix that would
> require adding
> . "$name";
> to the end of the echo statement.
> Regards,
> --
> Chip
>
> @ Edwin wrote this stuff back on Mon, 14 Oct 2002 11:55:28 +0900:
>
> > Hello,
> >
> > Just for the sake of the argument...
> >
> > On Monday, October 14, 2002 10:44 AM
> > Chip Wiegand wrote:
> >
> > > Sascha Cunz wrote this stuff back on Mon, 14 Oct 2002 01:13:53
> > > +0200:
> > >
> > > > This beautifies it (even makes it a bit more secure), but one
> > > > doesn't need it really; should have worked without these changes,
> > > > too. (Of course, it's better to include these changes)
> > > >
> > > > Sascha
> > >
> > > No it shouldn't have worked the way you had it originally. The isset
> > > statement HAS to have the same value as the submit buttom name or it
> > > won't work at all.
> >
> > Yes it will. Try it. ;)
> >
> > Of course, I didn't mean to say that it will work the way you want it.
> > I just wanted to say that it would still work even though the isset
> > statement doen't have the same value with the submit button. Remember,
> > isset() is basically a function to check if something is set or not...
> >
> > So, changing this
> >
> > > > > if (isset($_GET['submit']))
> >
> > to this
> >
> > > > > if (isset($_GET['name']))
> >
> > will have a similar result (for the short code discussed here).
> >
> > - E
> >
> > PS
> > Typo: (should be $_GET['name'])
> > > > >  echo "Hallo ".$GET['name'];
> >
> > > As for the beautify part, that's just the way I write
> > > my code, that doesn't matter at all to whether or not the script
> > > will work.
> > >
> > > --
> > > Chip
> > >
> > > > > The value of name for the submit button is wrong - it should be
> > > > > the same as the value you gave the isset statement, in this case
> > > > > it should be
> > > > > Better yet is to use isset($submit) and the value for the submit
> > > > > statement is also name="submit" -
> > > > > 
> > > > > of course value is optional. So you end up with this -
> > > > >
> > > > >  > > > > if (isset($_GET['submit']))
> > > > > {
> > > > >  echo "Hallo ".$GET['name'];
> > > > > }
> > > > > else
> > > > > {
> > > > > echo "
> > > > > 
> > > > >  ";
> > > > > }
> > > > > ?>
> > > >
> > > >
> > > > --
> > > > 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] why can't i do this?

2002-10-16 Thread Keith Vance

Because that's not the way PHP works. You aren't comparing anything on the
second half of the elseif statement.

Keith Vance
Vance Consulting LLC
www.vanceconsulting.net
(206) 355-2399

Try U.M.A. at http://uma.sourceforge.net/


On Thu, 17 Oct 2002, Peter Houchin wrote:

> howdy
>
> can some one please tell me why i can't do this
>
> elseif ($_POST['cost'] <=4 && >=20001){...}
>
> but i can do this
>
> elseif ($_POST['cost'] <=4 && $_POST['cost'] >=20001){...}
>
>
>
> Cheers
>
> Peter
> "the only dumb question is the one that wasn't asked"
>
>
> --
> 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] explode didn't work well

2002-10-31 Thread Keith Vance
echo ($pieces[2]);
instead of
echo ($pieces [2]);



Keith Vance
Vance Consulting LLC
www.vanceconsulting.net
(206) 355-2399

Try U.M.A. at http://uma.sourceforge.net/


On Thu, 31 Oct 2002, ppf wrote:

>
> Hi all:
> I had tried to split the string into an array of
> string using explode but the result isn't displaying
> anything
> I tried the example from document its its not showing
> anything, pls point out where i went wrong
> **
> $pizaa="piece1 piece2 piece3 piece4 piece5 piece6";
> $pieces = explode(' ', $pizza);
> echo $pizaa;
> echo ($pieces [2]);
> 
>  Thanks in advance
>   Prad
>
> __
> Do you Yahoo!?
> HotJobs - Search new jobs daily now
> http://hotjobs.yahoo.com/
>
> --
> 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] explode didn't work well

2002-10-31 Thread Keith Vance
And that too.

Keith Vance
Vance Consulting LLC
www.vanceconsulting.net
(206) 355-2399

Try U.M.A. at http://uma.sourceforge.net/


On Thu, 31 Oct 2002, Rasmus Lerdorf wrote:

> Because you can't spell pizza, I bet.
>
> On Thu, 31 Oct 2002, ppf wrote:
>
> >
> > Hi all:
> > I had tried to split the string into an array of
> > string using explode but the result isn't displaying
> > anything
> > I tried the example from document its its not showing
> > anything, pls point out where i went wrong
> > **
> > $pizaa="piece1 piece2 piece3 piece4 piece5 piece6";
> > $pieces = explode(' ', $pizza);
> > echo $pizaa;
> > echo ($pieces [2]);
> > 
> >  Thanks in advance
> >   Prad
> >
> > __
> > Do you Yahoo!?
> > HotJobs - Search new jobs daily now
> > http://hotjobs.yahoo.com/
> >
> > --
> > 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] Php Form Issue

2002-11-16 Thread Keith Spiller
Hello,

I've managed to get a series of javascripts to work exactly as I wanted.
They check all and uncheck all checkboxes with a single click of a control checkbox.

Unfortunately, the information has to be sent to php.  As soon as I add the [] 
brackets to
an input name, the javascript no longer functions.  I'll look up a javascript mailing 
list next,
but I figured there must be some other way to get php to recieve the data and convert 
it
to an array.

Does anyone have an idea how I can make the php script gather all the multiple
&browser=lynx&browser=mosaic&browser=explorer
instead of only the last entry?

Thanks for any help,


Keith



[PHP] Cannot parse html pages in php

2002-07-18 Thread Keith Roberts

I am running into a situation where I need some serious help.  My
environment is:

Workstation - W2k, Frontpage
Server - Cobalt RaQ4i, Linux, Apache

Problem:  I need to access MySQL to display inventory information on the web
page.  When I have modified the httpd.conf file to parse html files through
php, the embedded php code works.  However, FrontPage no longer works and a
Web statisics application will not work (Webalizer).  I know I am not
setting something correctly, but dang if I know what it is.

I really need some help on this.  Please realize that I am relatively new to
internet programming, linux, php, etc.  I have done okay so far, but this is
beyond me at this point.  Any help will be greatly appreciated.



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




[PHP] Cannot parse html pages in php

2002-07-18 Thread Keith Roberts

I am running into a situation where I need some serious help.  My
environment is:

Workstation - W2k, Frontpage
Server - Cobalt RaQ4i, Linux, Apache

Problem:  I need to access MySQL to display inventory information on the web
page.  When I have modified the httpd.conf file to parse html files through
php, the embedded php code works.  However, FrontPage no longer works and a
Web statisics application will not work (Webalizer).  I know I am not
setting something correctly, but dang if I know what it is.

I really need some help on this.  Please realize that I am relatively new to
internet programming, linux, php, etc.  I have done okay so far, but this is
beyond me at this point.  Any help will be greatly appreciated.





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




[PHP] php and html

2002-07-18 Thread Keith Roberts

I am running into a situation where I need some serious help.  My
environment is:

Workstation - W2k, Frontpage
Server - Cobalt RaQ4i, Linux, Apache

Problem:  I need to access MySQL to display inventory information on the web
page.  When I have modified the httpd.conf file to parse html files through
php, the embedded php code works.  However, FrontPage no longer works and a
Web statisics application will not work (Webalizer).  I know I am not
setting something correctly, but dang if I know what it is.

I really need some help on this.  Please realize that I am relatively new to
internet programming, linux, php, etc.  I have done okay so far, but this is
beyond me at this point.  Any help will be greatly appreciated.






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




[PHP] php and html

2002-07-18 Thread Keith Roberts

I am running into a situation where I need some serious help.  My
environment is:

Workstation - W2k, Frontpage
Server - Cobalt RaQ4i, Linux, Apache

Problem:  I need to access MySQL to display inventory information on the web
page.  When I have modified the httpd.conf file to parse html files through
php, the embedded php code works.  However, FrontPage no longer works and a
Web statisics application will not work (Webalizer).  I know I am not
setting something correctly, but dang if I know what it is.

I really need some help on this.  Please realize that I am relatively new to
internet programming, linux, php, etc.  I have done okay so far, but this is
beyond me at this point.  Any help will be greatly appreciated.








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




[PHP] Form Passed Multidimension Array

2003-09-25 Thread Keith Spiller
Hello,

I am trying to find out how to pass a multidimensional array within a hidden input of 
a form.
Would it be something like this?

  

Any advice would be forever appreciated...


Keith


[PHP] php "Losing" apache environment vars

2003-11-10 Thread Keith Greene
Greetings list,
I have run into a problem that has me at my wits end. We run an affiliate 
program, and have forum software (phpBB) wrapped in our menu system.
There are 2 sides to the site, Affiliates and Admin, and I have 2 installs 
of the board using the same database. This all works fine.

The mind-boggling problem is that while the board works perfectly from the 
Affiliate side of the site, it exhibits some strange behavior from the Admin
side of the site. In particular, we are using an apache environment 
variable to point to our includes directory, and any time an http post is 
made from
the admin side of the board, php "loses" the environment vars and throws 
all kinds of errors about not being able to find the includes.
The only difference between the Affiliate and Admin sides is the include 
used for the actual menu, though the only difference in those files is
the actual links that make up the menu.

I have never seen this behavior, and was wondering if anyone has seen 
anything like it before, and possibly found a solution.
We are running php 4.3.2, Apache 1.3.26 on FreeBSD 4.5.

Any help would be very appreciated.

Keith

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


Re: [PHP] php "Losing" apache environment vars

2003-11-10 Thread Keith Greene
After restarting apache, the error is gone. Still not sure what was causing 
it. The site was running fine to begin with, and the environment vars
have been in use for over a year throughout the site.

Keith

At 12:56 PM 11/10/2003, Keith Greene wrote:
Greetings list,
I have run into a problem that has me at my wits end. We run an affiliate 
program, and have forum software (phpBB) wrapped in our menu system.
There are 2 sides to the site, Affiliates and Admin, and I have 2 installs 
of the board using the same database. This all works fine.

The mind-boggling problem is that while the board works perfectly from the 
Affiliate side of the site, it exhibits some strange behavior from the Admin
side of the site. In particular, we are using an apache environment 
variable to point to our includes directory, and any time an http post is 
made from
the admin side of the board, php "loses" the environment vars and throws 
all kinds of errors about not being able to find the includes.
The only difference between the Affiliate and Admin sides is the include 
used for the actual menu, though the only difference in those files is
the actual links that make up the menu.

I have never seen this behavior, and was wondering if anyone has seen 
anything like it before, and possibly found a solution.
We are running php 4.3.2, Apache 1.3.26 on FreeBSD 4.5.

Any help would be very appreciated.

Keith

--
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] What is "white space"

2003-11-15 Thread Keith Greene
It's not a bug. Anything (including spaces, newlines etc) that is not 
inside  is output directly to the browser.

At 03:49 PM 11/15/2003, you wrote:
Robert Cummings wrote:

FYI, if you're woprried about the "header cannot be sent due to
output..." error, then if your file only has code and no HTML, then you
can omit the ?> tag at the end of your script. This solves countless
issues with there being a space, a tab, a newline, or any whitespace
after the closing tag.
And when that bug is fixed?

--
The above message is encrypted with double rot13 encoding.  Any 
unauthorized attempt to decrypt it will be prosecuted to the full extent 
of the law.

--
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] Re: Alternet row colors

2003-11-15 Thread Keith Greene
It's so much easier to use the mod (%) operator:

using the mod operator, you can check if a variable is divisible by some 
other number without leaving a remainder.
For this example, we want to change every other row, so we would compare 
our $count against 2 to see if it leaves a remainder:
$bg = ($count%2==0) ? "#00" : "FF";

What this line does is FIRST, it checks to see if $count/2 leaves no 
remainder. If this is true, it sets the $bg var to "#00"
If it is false, it sets $bg to "#FF"

It only requires the addition of one line of code, and to replace your row 
background color with a php variable.
Also, you don't need to use printf(), since you aren't specifying any 
formatting.

See code below:

code:---
$result = mysql_query("SELECT * FROM albums where id <15");
$Count = @mysql_num_rows($result);

 echo "\n";
   echo "IDARTISTTITLELABELPRICE\n";

 for ($count = 0; $count < $Count; $count++) {
   // Extract post details from database
$myrow = mysql_fetch_array($result);
   $id = $myrow ['id'];
   $artist = $myrow ['artist'];
 $title = $myrow ['title'];
 $label = $myrow ['label'];
 $price = $myrow ['price'];
$bg = ($count%2==0) ? "#00" : "FF";
   echo "$id$artist$title$label£$price\n";
}
 echo "\n";



At 01:08 PM 11/15/2003, you wrote:
Well, first of all Ill just scrap you script since this one is so easy
its better to do it from scratch.
OK, somewhere in your script you have the code that accually
aoutputs the tables you are working with. Im refferring to lines
here, and Im meaning the bottom of this document which is
the scipt you posted, and I have numbered the lines.
Overview of your script.
Line 5 - we print out the table header
Line 11 - 23 is the loop which prints out all the lines, or rows.
Line 24 closes the table.
So what we have to do?

First we need to declare the values we want to use as backround
colours, lets use logical names :
(fig a)
$backcolor1="#fafafa";
$backcolor2="#c0c0c0";
$backcolor=$backcolor1;// we assign color 1
This code has to be written before the loop starts, so somewhere
before line 11.
In the loop (11-23) we need to switch between the colours where
we write the colour of the . So we write something like :
(fig b)
echo '';
// continue with the rest of  here
// which is -> your code.
This will print out the first background color, nice. Now we need it
to switch color, so we need to add a little logic. This will be inserted
right before the loop ends (infact, you can put it where ever you like
aslong as its in the loop).
(fig c)
if($backcolor=backcolor1)
$backcolor=$backcolor2;
else
$backcolor=$backcolor1;
As you see above the logic is quite simple, if the color is 1 -> we set it
to 2,
else we set it to 1. If you think of it, if you process this logic over and
over again
you will infact get 1, 2, 1, 2, 1, 2, 1, 2 all the time, :) Nice!
There you have it, and I hope you got the hang of it.

To take your code and implement my colorswither all you need to do is,

1. On line 21 replace #00 width $backcolor
2. Insert the logic (figc), all lines, into line 19
3. Place fig a in line 4.
--
Kim Steinhaug
---
There are 10 types of people when it comes to binary numbers:
those who understand them, and those who don't.
---
The code for return the top ten result is :
1 $result = mysql_query("SELECT * FROM albums where id <15");
2
3 $Count = @mysql_num_rows($result);
4
5  echo "\n";
7echo "IDARTISTTITLELABELPRICE\n";
10
11 for ($count = 0; $count < $Count; $count++) {
12   // Extract post details from database
13$myrow = mysql_fetch_array($result);
14   $id = $myrow ['id'];
15   $artist = $myrow ['artist'];
16 $title = $myrow ['title'];
17 $label = $myrow ['label'];
18 $price = $myrow ['price'];
19
20   printf("$id$artist$title$label
22£$price\n");
23}
24 echo "\n";
--
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] What is "white space"

2003-11-15 Thread Keith Greene
Yep. It allows you to only use php where needed, and use HTML for the rest.

At 04:02 PM 11/15/2003, you wrote:
On Sat, 2003-11-15 at 18:49, Leif K-Brooks wrote:
> Robert Cummings wrote:
>
> >FYI, if you're woprried about the "header cannot be sent due to
> >output..." error, then if your file only has code and no HTML, then you
> >can omit the ?> tag at the end of your script. This solves countless
> >issues with there being a space, a tab, a newline, or any whitespace
> >after the closing tag.
> >
> >
> And when that bug is fixed?
Isn't that a feature?

Rob.
--
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'
--
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] What is "white space"

2003-11-15 Thread Keith Greene
Ok, you're getting into semantics now. 
http://www.php.net/manual/en/language.basic-syntax.php doesn't say whether 
it is acceptable or not, but as Robert pointed out, if your script is 
purely php, omitting it is a good way of eliminating the headache of 
trailing white spaces that may interfere with headers.

Keith

At 04:41 PM 11/15/2003, Leif K-Brooks wrote:
Keith Greene wrote:

That's not a bug either. Leaving out the ?> is simply telling the php 
parser that it has to parse the rest of the script.
Where's the manual page saying that's allowed?

--
The above message is encrypted with double rot13 encoding.  Any 
unauthorized attempt to decrypt it will be prosecuted to the full extent 
of the law.

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


[PHP] PHP & Mysql programmers wanted

2003-11-26 Thread Keith Atkinson
Gentlemen(& Ladies):

I'm looking for experienced PHP & Mysql programmers. They must possess
mathematical skills, for SQL stored procedure, or PHP scripts that do the
math for reporting, plus Java Scripting and html experience a real plus.
This is contract work, and working off site is OK.

Please respond to:

Keith Atkinson
[EMAIL PROTECTED]

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



[PHP] Php FAQ, Q&A or Knowledge Base

2001-01-19 Thread Keith Spiller

Can anyone recommend a good FAQ, Q&A or Knowledge Base script written in PHP?
Preferably one with an administration section and a queue for questions to be answered.

Larentium



[PHP] Join causing Error?

2001-02-25 Thread Keith Spiller

Can anyone tell me why this:
  Line 282mysql_select_db("centraldb",$db);
  Line 283$qorder++; 
  Line 284$result = mysql_query("SELECT q.questid, q.question, q.answer, q.qorder, 
q.depart, q.catid, 
  q.active, q.global, q.adate, q.author, q.authoremail, q.askemail, 
c.catid, c.category, c.under, 
  c.corder, c.active FROM central_groupfaqq q, central_groupfaqcat c 
WHERE q.active = '1' AND 
  q.global = '1' AND c.active = '1' ORDER BY c.under, c.order, 
q.qorder",$db);
  Line 285while ($myrow = mysql_fetch_row($result))

Would cause this error:
  Warning: Supplied argument is not a valid MySQL result resource in faqbody.php3 on 
line 285

When changing the same SELECT statement to:
  Line 284$result = mysql_query("SELECT * FROM central_groupfaqq WHERE active = 
'1' ORDER BY
   qorder",$db);

Works perfectly?


Keith Spiller
a.k.a. Larentium




[PHP] Get text between

2001-03-05 Thread Keith Mayo

I need some help with a program, I need to get every
instance of text between  GET TEXT HERE
 and save the results in a variable. Does anyone
have some example code of how to do it along with how
to put the results into just one variable? 


__
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/

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




[PHP] create a directory NOT owned by the webserver user

2001-03-09 Thread Keith Vance

How do I create a directory which is owned by a user other than the user
which is running the webserver?

The "other" user will change all the time. So I need to be able to set the
ownership of a directory, on-the-fly.

I have searched the Internet and I have run across things like creating c
wrappers and perl scripts using suidperl. I really really want to stay in
the PHP world for this, so does anyone have any suggestions of what I can
do to make this happen. I don't have a problem with using other languages
to accomplish this, I would just prefer to stick with PHP on this one.

I am running the latest everything, PHP and Apache on Linux of course.

Keith


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




Re: [PHP] Advanced PHP

2001-03-09 Thread Keith Vance

What came first the chicken or the egg?

Keith

On Fri, 9 Mar 2001, Kath wrote:

> Yeah.  I even see some PHP book authors, like Julie Meloni here on this
> list.
>
> There is never a question, no matter how retarded, that this list or #php on
> irc.openprojects.net has never been able to answer.
>
> - Kath
>
>
> - Original Message -
> From: "Krznaric Michael" <[EMAIL PROTECTED]>
> To: "'Rick St Jean'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Sent: Friday, March 09, 2001 5:11 PM
> Subject: RE: [PHP] Advanced PHP
>
>
> > If I'm not mistaken, the big boys keep an eye out over here.
> >
> > Mike
> >
> >
> > -Original Message-
> > From: Rick St Jean [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, March 09, 2001 4:54 PM
> > To: [EMAIL PROTECTED]
> > Subject: [PHP] Advanced PHP
> >
> >
> > Does anyone know of any other lists that are a little more advanced,
> > And has a little less traffic?  I am not the end all be all by any means
> of
> > programming or PHP.  I just want to know where the big boys hang out
> > and learn some secrets that require some understanding.
> >
> > Rick
> > ##
> > #  Rick St Jean,
> > #  [EMAIL PROTECTED]
> > #  President of Design Shark,
> > #  http://www.designshark.com/
> > #  Quick Contact:  http://www.designshark.com/messaging.ihtml
> > #  Tel: 905-684-2952
> > ##
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


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




RE: [PHP] Advanced PHP

2001-03-09 Thread Keith Vance

Where did the chicken come from, God?

Keith

On Fri, 9 Mar 2001, Jerry Lake wrote:

> The chicken did.
>
> as the Chicken is an actual chicken
> and the egg is a potential chicken.
> Actuality precedes potentiality
>
> Jerry Lake- [EMAIL PROTECTED]
> Web Designer
> Europa Communications - http://www.europa.com
> Pacifier Online   - http://www.pacifier.com
>
>
> -Original Message-
> From: Keith Vance [mailto:[EMAIL PROTECTED]]
> Sent: Friday, March 09, 2001 3:14 PM
> To: Kath
> Cc: Krznaric Michael; 'Rick St Jean'; [EMAIL PROTECTED]
> Subject: Re: [PHP] Advanced PHP
>
>
> What came first the chicken or the egg?
>
> Keith
>
> On Fri, 9 Mar 2001, Kath wrote:
>
> > Yeah.  I even see some PHP book authors, like Julie Meloni here on this
> > list.
> >
> > There is never a question, no matter how retarded, that this list or #php
> on
> > irc.openprojects.net has never been able to answer.
> >
> > - Kath
> >
> >
> > - Original Message -
> > From: "Krznaric Michael" <[EMAIL PROTECTED]>
> > To: "'Rick St Jean'" <[EMAIL PROTECTED]>;
> <[EMAIL PROTECTED]>
> > Sent: Friday, March 09, 2001 5:11 PM
> > Subject: RE: [PHP] Advanced PHP
> >
> >
> > > If I'm not mistaken, the big boys keep an eye out over here.
> > >
> > > Mike
> > >
> > >
> > > -Original Message-
> > > From: Rick St Jean [mailto:[EMAIL PROTECTED]]
> > > Sent: Friday, March 09, 2001 4:54 PM
> > > To: [EMAIL PROTECTED]
> > > Subject: [PHP] Advanced PHP
> > >
> > >
> > > Does anyone know of any other lists that are a little more advanced,
> > > And has a little less traffic?  I am not the end all be all by any means
> > of
> > > programming or PHP.  I just want to know where the big boys hang out
> > > and learn some secrets that require some understanding.
> > >
> > > Rick
> > > ##
> > > #  Rick St Jean,
> > > #  [EMAIL PROTECTED]
> > > #  President of Design Shark,
> > > #  http://www.designshark.com/
> > > #  Quick Contact:  http://www.designshark.com/messaging.ihtml
> > > #  Tel: 905-684-2952
> > > ##
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> > >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
>


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




RE: [PHP] Advanced PHP

2001-03-09 Thread Keith Vance

You don't think all living creatures could evolved on this planet,
simply because the Earth has water and oxygen and sunlight to support
life? I beleive in God, but let's be realistic here. Do you really think
God just waved his hand and there appeared a chicken?

Open your mind to other possibilities.

Keith

On Fri, 9 Mar 2001, Rick St Jean wrote:

> Of course... where did you think they came from... monkeys?
>
>
>
> At 04:01 PM 3/9/01 -0800, Keith Vance wrote:
> >Where did the chicken come from, God?
> >
> >Keith
> >
> >On Fri, 9 Mar 2001, Jerry Lake wrote:
> >
> > > The chicken did.
> > >
> > > as the Chicken is an actual chicken
> > > and the egg is a potential chicken.
> > > Actuality precedes potentiality
> > >
> > > Jerry Lake- [EMAIL PROTECTED]
> > > Web Designer
> > > Europa Communications - http://www.europa.com
> > > Pacifier Online   - http://www.pacifier.com
> > >
> > >
> > > -Original Message-
> > > From: Keith Vance [mailto:[EMAIL PROTECTED]]
> > > Sent: Friday, March 09, 2001 3:14 PM
> > > To: Kath
> > > Cc: Krznaric Michael; 'Rick St Jean'; [EMAIL PROTECTED]
> > > Subject: Re: [PHP] Advanced PHP
> > >
> > >
> > > What came first the chicken or the egg?
> > >
> > > Keith
> > >
> > > On Fri, 9 Mar 2001, Kath wrote:
> > >
> > > > Yeah.  I even see some PHP book authors, like Julie Meloni here on this
> > > > list.
> > > >
> > > > There is never a question, no matter how retarded, that this list or #php
> > > on
> > > > irc.openprojects.net has never been able to answer.
> > > >
> > > > - Kath
> > > >
> > > >
> > > > - Original Message -
> > > > From: "Krznaric Michael" <[EMAIL PROTECTED]>
> > > > To: "'Rick St Jean'" <[EMAIL PROTECTED]>;
> > > <[EMAIL PROTECTED]>
> > > > Sent: Friday, March 09, 2001 5:11 PM
> > > > Subject: RE: [PHP] Advanced PHP
> > > >
> > > >
> > > > > If I'm not mistaken, the big boys keep an eye out over here.
> > > > >
> > > > > Mike
> > > > >
> > > > >
> > > > > -Original Message-
> > > > > From: Rick St Jean [mailto:[EMAIL PROTECTED]]
> > > > > Sent: Friday, March 09, 2001 4:54 PM
> > > > > To: [EMAIL PROTECTED]
> > > > > Subject: [PHP] Advanced PHP
> > > > >
> > > > >
> > > > > Does anyone know of any other lists that are a little more advanced,
> > > > > And has a little less traffic?  I am not the end all be all by any
> > means
> > > > of
> > > > > programming or PHP.  I just want to know where the big boys hang out
> > > > > and learn some secrets that require some understanding.
> > > > >
> > > > > Rick
> > > > > ##
> > > > > #  Rick St Jean,
> > > > > #  [EMAIL PROTECTED]
> > > > > #  President of Design Shark,
> > > > > #  http://www.designshark.com/
> > > > > #  Quick Contact:  http://www.designshark.com/messaging.ihtml
> > > > > #  Tel: 905-684-2952
> > > > > ##
> > > > >
> > > > >
> > > > > --
> > > > > PHP General Mailing List (http://www.php.net/)
> > > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > > > To contact the list administrators, e-mail:
> > [EMAIL PROTECTED]
> > > > >
> > > > > --
> > > > > PHP General Mailing List (http://www.php.net/)
> > > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > > > To contact the list administrators, e-mail:
> > [EMAIL PROTECTED]
> > > > >
> > > >
> > > >
> > > > --
> > > > PHP General Mailing List (http://www.php.net/)
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> > > >
> > > >
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> > >
> > >
> > >
> >
> >
> >--
> >PHP General Mailing List (http://www.php.net/)
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
> ##
> #  Rick St Jean,
> #  [EMAIL PROTECTED]
> #  President of Design Shark,
> #  http://www.designshark.com/
> #  Quick Contact:  http://www.designshark.com/messaging.ihtml
> #  Tel: 905-684-2952
> ##
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


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




RE: [PHP] Advanced PHP

2001-03-09 Thread Keith Vance

Just for the record, the theory evolution doesn't say that "every" living
creature evolved from monkeys, just as silly humanoids.

I would like to apologize to everyone on the list for creating the
discussion, it's a wee bit off topic.

Keith

On Fri, 9 Mar 2001, Jeff Oien wrote:

> LOL.
>
> The evolutionists will tell you they came from worms. So
> according to them the worm came first and it "evolved" into
> something else. Tough to know where the egg came into
> the picture according to that theory.
> Jeff Oien
>
> > Of course... where did you think they came from... monkeys?
> >
> >
> >
> > At 04:01 PM 3/9/01 -0800, Keith Vance wrote:
> > >Where did the chicken come from, God?
> > >
> > >Keith
> > >
> > >On Fri, 9 Mar 2001, Jerry Lake wrote:
> > >
> > > > The chicken did.
> > > >
> > > > as the Chicken is an actual chicken
> > > > and the egg is a potential chicken.
> > > > Actuality precedes potentiality
> > > >
> > > > Jerry Lake    - [EMAIL PROTECTED]
> > > > Web Designer
> > > > Europa Communications - http://www.europa.com
> > > > Pacifier Online   - http://www.pacifier.com
> > > >
> > > >
> > > > -Original Message-
> > > > From: Keith Vance [mailto:[EMAIL PROTECTED]]
> > > > Sent: Friday, March 09, 2001 3:14 PM
> > > > To: Kath
> > > > Cc: Krznaric Michael; 'Rick St Jean'; [EMAIL PROTECTED]
> > > > Subject: Re: [PHP] Advanced PHP
> > > >
> > > >
> > > > What came first the chicken or the egg?
> > > >
> > > > Keith
> > > >
> > > > On Fri, 9 Mar 2001, Kath wrote:
> > > >
> > > > > Yeah.  I even see some PHP book authors, like Julie Meloni here on this
> > > > > list.
> > > > >
> > > > > There is never a question, no matter how retarded, that this list or #php
> > > > on
> > > > > irc.openprojects.net has never been able to answer.
> > > > >
> > > > > - Kath
> > > > >
> > > > >
> > > > > - Original Message -
> > > > > From: "Krznaric Michael" <[EMAIL PROTECTED]>
> > > > > To: "'Rick St Jean'" <[EMAIL PROTECTED]>;
> > > > <[EMAIL PROTECTED]>
> > > > > Sent: Friday, March 09, 2001 5:11 PM
> > > > > Subject: RE: [PHP] Advanced PHP
> > > > >
> > > > >
> > > > > > If I'm not mistaken, the big boys keep an eye out over here.
> > > > > >
> > > > > > Mike
> > > > > >
> > > > > >
> > > > > > -Original Message-
> > > > > > From: Rick St Jean [mailto:[EMAIL PROTECTED]]
> > > > > > Sent: Friday, March 09, 2001 4:54 PM
> > > > > > To: [EMAIL PROTECTED]
> > > > > > Subject: [PHP] Advanced PHP
> > > > > >
> > > > > >
> > > > > > Does anyone know of any other lists that are a little more advanced,
> > > > > > And has a little less traffic?  I am not the end all be all by any
> > > means
> > > > > of
> > > > > > programming or PHP.  I just want to know where the big boys hang out
> > > > > > and learn some secrets that require some understanding.
> > > > > >
> > > > > > Rick
> > > > > > ##
> > > > > > #  Rick St Jean,
> > > > > > #  [EMAIL PROTECTED]
> > > > > > #  President of Design Shark,
> > > > > > #  http://www.designshark.com/
> > > > > > #  Quick Contact:  http://www.designshark.com/messaging.ihtml
> > > > > > #  Tel: 905-684-2952
> > > > > > ##
> > > > > >
> > > > > >
> > > > > > --
> > > > > > PHP General Mailing List (http://www.php.net/)
> > > > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > > > > To contact the list administrators, e-mail:
> > > [EM

Re: [PHP] exist?

2001-03-14 Thread Keith Vance

You must not have searched to hard on the site,
http://www.php.net/file_exists

Keith

On Wed, 14 Mar 2001, Kenneth R Zink II wrote:

> How would I go about checking to see if a file exist from php?
>
> I didn't find anything on php.net when I did a search for exist.
>
> basically, I'm trying to accomplish this.
>
> if $file exist {
> do something;
> }else{
> echo "$file doesn't exist";
> }
>
> thanks in advance.
>
> Kenneth R Zink II [EMAIL PROTECTED]ICQ# 5095094
> '87 2.8L TBI GMC S-15 Ext. Cab (Hurricane) ...524 in the works !!!  
>http://www.s-series.org/htm/windstorm/project-windstorm.htm
> '85 3.4L Carbed Chevy S-10 Blazer (FireStorm) ...Soon to be 3.4L SFI DIS !!!  
>http://www.s-series.org/htm/firestorm/firestorm.htm
> Racing by the Grace of God!!
>


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




Re: [PHP] How upload files to protected directories?

2001-03-14 Thread Keith Vance

You should be able to do something using PHP, try looking here,
http://www.php.net/manual/cs/features.file-upload.php
I think there is just a communication problem between you and your hosting
company. They don't allow ftp uploads, but as long as you are doing it
through http, it should work fine. There is also some good stuff about
this on http://www.phpbuilder.com. I do it all the time and my hosting
company couldn't care less, but your's may be different and you may have
to switch or should switch to someone else if you can't get the http
upload to work.

Keith

On Wed, 14 Mar 2001, Mig wrote:

> Hello
>
> I post my question here because I can't understand what host support is trying to 
>say to me:
>
> I use paid host with PHP and MySql facilities, all working fine for me (both PHP and 
>MySql).
> I offer to customers ability for storing updating and retrieving MySql records using 
>  HTML commands. My problem begins when I want customers also be 
>allowed to upload images (.GIF and .JPG files) linked to their records.
> If possible, I would prefer store these images into BLOB MySql fields and then show 
>image stream using PHP GD functions, but this appears difficult because host PHP 
>doesn't have GD library.
>
> Next solution is to store GIF/JPG files into some directory and then use html 
>commands to show pictures. But POST commands are denied on this host (as well as ftp 
>commands) because they don't want somebody uploading trojan programs there.
>
> Support said to me: "the only way around this is to write a cgi script which 
>uploads/writes to a file - there are commercial products that do this safely or maybe 
>you can find a free script on one of the many cgi script sites - most commercial 
>classified ad scripts have a function such as this."
>
> Does somebody know what this means?. If ftp commands and all PHP filesystem commands 
>are disallowed, how could CGI script solve it? And also, what are 'classified ad 
>scripts'?
> Sorry I live in Brazil and don't catch all english expressions: are these scripts to 
>post classified ads?
>
> Any other solution will be welcome.
>
> Thanks in advance
>
> Mig
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


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




Re: [PHP] How upload files to protected directories?

2001-03-15 Thread Keith Vance

Can you set, in your script, where the files are uploaded so that the
files can be uploaded into a directory that allows you to do a copy.

Keith

On Wed, 14 Mar 2001, Mig wrote:

> Keith Vance wrote:
>
> > You should be able to do something using PHP, try looking here,
> > http://www.php.net/manual/cs/features.file-upload.php
> > I think there is just a communication problem between you and your hosting
> > company. They don't allow ftp uploads, but as long as you are doing it
> > through http, it should work fine. There is also some good stuff about
> > this on http://www.phpbuilder.com. I do it all the time and my hosting
> > company couldn't care less, but your's may be different and you may have
> > to switch or should switch to someone else if you can't get the http
> > upload to work.
> >
> > Keith
>
> Hello Keith, thanks very much. Sorry because I forgot explain following: picture 
>files really are uploaded to host server, because I check temp file and they are ok 
>(I check $userfile_temp variable). My problem is: I can't move, copy, rename or 
>anything else other than 'open and read' this file. Whenever I try exec copy commands 
>I receive 'copy command denied for /web/.'.
> You know temp files will be deleted when script terminates, so I die with my 
>pictures in hand.
>
> Thanks again
>
> Mig
>
>


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




Re: [PHP] POST Method.

2001-03-15 Thread Keith Vance

You could can "forward" posted data the same way if you wanted to. I don't
know what you mean by forwarding. But if you had one script that was a
form and the action was set to a script called action.php and then you
wanted to pass that data to yet another script, you could pass the values
in the url or a session variable or hidden fields in another form.

Keith

On Thu, 15 Mar 2001, Nick Davies wrote:

>
> How do i forward POST data from a php script.  Obviously GET is simple
> (just script.php?$QUERY_STRING) but how does it work with post?
>
>
> Thanks.
>
> Nick.
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


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




Re: [PHP] php editors

2001-03-15 Thread Keith Vance

I think this discussion just took place, try searching the mailing list
archives for "good php editor"

Keith

On Thu, 15 Mar 2001, McShen wrote:

> I am looking for good php editors. Currently, i am using PHP coder. It
> highlights syntax and checks my syntax. It's also executes my PHP codes. Are
> there any editors like that? I just want a editor that highlights my code
> and check my syntax.
>
> regards
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


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




RE: [PHP] Help! Can't redeclare already declared function in

2001-03-15 Thread Keith Vance

how about

if (!$included[filename])


On Thu, 15 Mar 2001, ..s.c.o.t.t.. [gts] wrote:

> try using include_once() and require_once()
> in place of include() and require()
>
> also, make sure you havent defined any functions
> that match PHP internal funcs.
>
>
> > -Original Message-
> > From: Johnson, Kirk [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, March 15, 2001 3:29 PM
> > To: php
> > Subject: RE: [PHP] Help! Can't redeclare already declared function in
> >
> >
> > Are the functions declared in an include()'d file? Is this file being
> > include()'d more than once? That's how I usually provoke this error :)
> >
> > Kirk
> >
> > > -Original Message-
> > > From: Jack Sasportas [mailto:[EMAIL PROTECTED]]
> > > Sent: Thursday, March 15, 2001 1:25 PM
> > > To: php
> > > Subject: [PHP] Help! Can't redeclare already declared function in
> > >
> > >
> > > I just finished coding everything on a project it was working (all
> > > nighter), and now something I just changed is causing this error
> > >
> > > "Can't redeclare already declared function in "
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


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




RE: [PHP] Re: How do you keep your scripts secure?

2001-03-15 Thread Keith Vance

The Zend encoder seems cool, but for $2400? What happened to the Zend
Compiler, is that what the Zend Encoder is? The Zend Encoder would
definetly be worth it if you were selling your code, but I haven't tried
it out.

Keith

On Thu, 15 Mar 2001, ..s.c.o.t.t.. [gts] wrote:

> since PHP is executed before any otuput is shown to the browser,
> all you have to do is keep a server between your code and
> the other person.
>
> unless i am horribly mistaken, you can turn off options to
> allow people to view PHP source code via their browser.
>
>
>
> > -Original Message-
> > From: Richard Lynch [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, March 15, 2001 5:02 PM
> > To: Murph; [EMAIL PROTECTED]
> > Subject: [PHP] Re: How do you keep your scripts secure?
> >
> >
> > > So, I've written all this nifty code and I'd like to do what I can from
> > > having it pilfered.
> > >
> > > What do you do to keep your stuff safe?
> >
> > You could buy the Zend Encoder:
> >
> > http://www.zend.com/store/products/zend-encoder.php
> >
> > Either stand-alone or as part of the Developer Suite package deal.
> >
> > You run your scripts through that, and replace your source files with
> > Encoded files.  They're essentially binary dumps of compiled PHP code.
> > About as comprehensible to a human as an .exe or .so file.
> >
> > You can mix-and-match your encoded/source files, so configuration files can
> > be left as editable by the end-user.
> >
> > There's a free trial that dumps out the Zend logo (this tromps on headers
> > and FRAME pages) and it also intentionally makes the encoded files about
> > half as fast as the real product, but you can still get a pretty good idea
> > of what the product does.
> >
> > There are also discounts for non-profits, educational, etc.
> >
> > You'll still want a clear licensing agreement with any clients/customers, of
> > course.
> >
> > --
> > Visit the Zend Store at http://www.zend.com/store/
> > Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
> > Volunteer a little time: http://chatmusic.com/volunteer.htm
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


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




Re: [PHP] I can't install PHP4

2001-03-15 Thread Keith Vance

make a file called, test.php
with these lines in it:


stick it into your web server directory and point a browser at it, if it
doesn't work send error messages.

Keith

On Thu, 15 Mar 2001, Norberto Rojas wrote:

> Hi:
>
>I've trying to install PHP4 without good results:
>   The steps i follow were:
>
> 1:  gzip -d  <  php-4.0.4pl1.tar.gz   | tar xvf -
> 2: cd php-4.0.4pl1
> 3: ./configure --with-nsapi=/usr/netscape/server4/ --enable-tracks-vars
> --enable-libgcc (because i want to uset with iplanet web server)
> 4: make
> 5: make install
> 6: add command lines into the files: obj.conf  & mime.type of the iPlanet
> 7: what else  thats all 
>
> I hoped to find an executable file (maybe "php") or something like that.
>
> I'll appreciate if somebody help me, because  i need to resolve this
> problems just today.
> I'm really desperated, so please help me !!
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


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




Re: [PHP] How do you keep your scripts secure?

2001-03-15 Thread Keith Vance

"... hate to think that someone could come along and just use it all for
free" So you don't really care to contribute to the Open Source community?
We would love to have your passwords. I would highly recommend setting an
include path outside the web server document root and store you files with
passwords in there. If you don't have access to the php.ini file, you can
set the include_path in your scripts.

K E I T H  V A N C E
Software Engineer
n-Link Corporation

On Thu, 15 Mar 2001, Murph wrote:

> > if someone knew the name of your include file, and it was under the
> > webserver root (for instance, the same folder) then yes, its like any
> > other file..you can get around this by changing your php.ini
> > include_path variables and putting the files there, outside the
> > webserver directory
>
> I'd agree except that I don't leave any code lying around with anything
> other than a *.php extension so, like you said, that'd be parsed by the
> server before being sent to the browser, right?
>
> I would take this to mean that my code *should* be safe...? 
>
> I ask because I'm such a jealous S.O.B. I've done such hard work that I'd
> hate to think that someone could come along and just use it all for free.
> Plus, there's that nastiness of having passwords in there and all that.
>
> Murph
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


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




Re: [PHP] FAQ

2001-03-15 Thread Keith Vance

How many times are people going to complain about no-brainer questions
being posted to the list. The fact of the matter is people are going to
post things on the list without reading the manual or the FAQ. It goes
with the territory. It annoys me too, but there is no good solution for
the problem. There is the fact that a lot of people are new and don't
really know where to go to find answers. Even if they go to the web site,
they still may not know that they need to be looking for information on
naming variables with variables or that fopen opens a file or whatever.


K E I T H  V A N C E
Software Engineer
n-Link Corporation

On Fri, 16 Mar 2001, David Robley wrote:

> On Fri, 16 Mar 2001 03:34, Rick St Jean wrote:
> > It is there a list of most frequently asked questions?
> > It seems that people ask the same questions, again and again,
> > they do not READ THE MANUAL.  Yes I have asked 2 stupid
> > questions, but I really did search and I am reading my manuals,
> > the PHP and the book that I bought.
>
> Seems to me that a significant number of questions arise from people who
> don't have any idea of the concepts behind 'programming', if I may
> overload that term. 'How do I make a loop work' 'How can I print the
> numbers 1 to 5'.
>
> > Also I would like to know if there would be a demand for an
> > experienced mailing list?  I am just frustrated by the same 3
> > questions that pop up about once a day. The rest of the posts
> > are great.
>
> As has been noted before, there is little purpose in splitting the list
> like that. If the 'newbies' all go to the 'inexperienced' list, from
> whence do they gain wisdom? And then the 'newbies' learnn about the
> 'experienced' list and go there and we're back to square one. :-)
>
> Check the archives for _extended_ discussion on that topic.
>
>
> --
> David Robley| WEBMASTER & Mail List Admin
> RESEARCH CENTRE FOR INJURY STUDIES  | http://www.nisu.flinders.edu.au/
> AusEinet| http://auseinet.flinders.edu.au/
> Flinders University, ADELAIDE, SOUTH AUSTRALIA
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


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




RE: [PHP] FAQ

2001-03-16 Thread Keith Vance

I agree with everything you have said. I just don't think there is a good
way to get people from asking these types of questions, without someone
sitting there reading every message and filtering them according to topic.
We are stuck with a high-volume list where lots of newbies come to ask us
questions. If PHP wasn't so damn good and so popular we wouldn't be having
this conversation.

K E I T H  V A N C E
Software Engineer
n-Link Corporation

On Thu, 15 Mar 2001, Jason Lotito wrote:

> > How many times are people going to complain about no-brainer questions
> > being posted to the list. The fact of the matter is people are going to
> > post things on the list without reading the manual or the FAQ. It goes
> > with the territory. It annoys me too, but there is no good solution for
> > the problem. There is the fact that a lot of people are new and don't
> > really know where to go to find answers. Even if they go to the web site,
> > they still may not know that they need to be looking for information on
> > naming variables with variables or that fopen opens a file or whatever.
> >
> > K E I T H  V A N C E
>
> I think the argument has less to do with people asking questions about PHP
> and how it works, and more about people asking basica programming questions
> without knowing it.  Fundamental programming concepts, like the scope of a
> variable, passing by reference or by value, or even looping are things
> newbie's simply do not understand.  Why?  Because they don't know they need
> to learn the concepts and theories of programming before learning to
> program.  It sounds odd, but that is the way it is.
>
> People asking questions about how a loop works are not usually asking how a
> PHP loop works.  The same for arrays.  They are really saying: "This is the
> first real programming language I am out to learn, and I don't understand
> the concept behind a For/Next Loop."  This isn't a bad thing, heck, we were
> all newbies at one point, and in a sense, we are all newbies at something.
>
> I think the argument is that their are many people who don't want to learn
> how and why a For/Next Loop works, but instead simply want someone to fix
> the problem for them.  That isn't programming.  Programming (and yes, I
> know, PHP is technically a scripting language, but lets not jump that fence
> as well) is about trial and error, logic, and creativity, but most
> importantly, problem solving.  Most of the newbies get into PHP expecting a
> tutorial on every topic.  If they can't find a tutorial on how to print out
> 5 numbers, they expect someone to show them how to do it.  They don't try
> and solve the problem themselves, and that is a problem.  I don't mind
> assisting where I can, however, I don't like rewriting a script for someone
> when they don't even take the time to try and learn the fundamentals.  Most
> newbies I have met fall into two categories.  The majority start out wanting
> to learn PHP because someone said it was easy to learn, which it is, from a
> programmers point of view.  However, when in the second week of learning
> their first programming language they can't program that PHP Database
> Content Management System with Instant Yahoo News Retrival complete with
> User Database, Forums, and Real Time Foo, they start getting upset and say
> that PHP sucks.  Those same people may also complain because they can't find
> a tutorial on how to create a Forum Database, and all they can find are
> tutorials on the basics of Database Design.
>
> I think this is the real problem.  Try to run before they have learned to
> crawl and walk.
>
> Jason Lotito
> www.NewbieNetwork.net
> Where those who can, teach;
> and those who can, learn.
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


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




Re: [PHP] Trouble Setup !!!!!!!!!

2001-05-02 Thread Keith Elder

Another good place that explains how to roll your own is:

http://www.fluidthoughts.com/howto/config-webserver/

Keith

* Andrew Hill ([EMAIL PROTECTED]) wrote:
> Date: Wed, 2 May 2001 20:00:37 -0400
> From: Andrew Hill <[EMAIL PROTECTED]>
> Cc: [EMAIL PROTECTED], [EMAIL PROTECTED]
> To: [EMAIL PROTECTED]
> X-Mailer: Apple Mail (2.388)
> Subject: Re: [PHP] Trouble Setup !
> 
> Hi Luis,
> 
> I recommend you 'roll your own'.  There are some straightforward steps 
> for a install on Unix in the manual:
> http://www.php.net/manual/en/install.unix.php
> 
> Best regards,
> Andrew
> 
> Andrew Hill - OpenLink Software
> Directory of Technology Evangelism
> Internet Data Integration Technology
> http://www.openlinksw.com
> 
> On Wednesday, May 2, 2001, at 10:56 PM, Luis wrote:
> 
> > Hi all I was wondering if someone could help me out with a little 
> > problem
> > I'm having ..
> >
> > I donwloaded the php tarball today. I will be installing it on my linux 
> > bo
> > x.
> >
> > But the problem is that I already have apache running on my box. (
> >
> > I installed the rpm apache-1.3.12-25 a while back. I just ran the
> > ./configuration out of php folder.but i notice that i need to copy a 
> > php.ini file to my user/locar/lib
> > folder. I guess it going to over right the old file. but theres no 
> > php.ini
> > file in there. how do i setup php (tar) with apache-1.3.12-25 (rpm ) 
> > file
> > that I installed ..
> >
> >
> > Lusi
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
> >
> 


###
  Keith Elder
   Email: [EMAIL PROTECTED] 
Mobile/Pager: 1-734-507-1438
 Text Messaging (145 characters): [EMAIL PROTECTED]
  Web: http://www.zorka.com (Howto's, News, and More!)
  
  "Confuscious Say: Confusion Can Often be Confusing"
###

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




[PHP] PHP Training Course Offered - June 25th

2001-05-03 Thread Keith Elder


Do you need to get your staff up to speed on PHP?  Are you a PHP programmer, looking 
for a hands on approach to learning PHP? If you fit any of these conditions or just 
want to learn more about building dynamic web sites with PHP, then consider taking our 
PHP training course this coming June.  Space is limited so be sure to act fast!

PHP TRAINING COURSE OFFERED JUNE 25TH-29TH 2001

WHO CAN ATTEND?
The course is open to the general public who wish to get a more indepth look at PHP.

WHEN AND WHERE
June 25th-29th.  The course is an all day course (8 hours) and will be a hands on 
course.  The course will be held at the Eagle Crest Resort in Ypsilanti, Michigan

MORE INFORMATION
For more detailed information in regards to the course and course information, please 
visit the following link:

http://www.tapinternet.com/lc/index/bcbc1e/html/training.html

or call:

Tap Internet, Inc.
Keith Elder
Phone: 734-482-1371
Toll Free: 866-745-3660
Email: [EMAIL PROTECTED]
Web: http://www.tapinternet.com



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




Re: [PHP] multiline text areas and mysql doesn't work :(

2001-05-13 Thread Keith Ng

In reply to [EMAIL PROTECTED]:

> Return-Path: <[EMAIL PROTECTED]>
> Received: from toye.php.net (va.php.net [198.186.203.51])
> by cobalt1.intermedia.com.sg (8.10.2/8.10.2) with SMTP id f4DGDXZ25935
> for <[EMAIL PROTECTED]>; Mon, 14 May 2001 00:13:39 +0800
> Received: (qmail 12864 invoked by uid 1013); 13 May 2001 16:15:49 -
> Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
> Precedence: bulk
> list-help: <mailto:[EMAIL PROTECTED]>
> list-unsubscribe: <mailto:[EMAIL PROTECTED]>
> list-post: <mailto:[EMAIL PROTECTED]>
> Delivered-To: mailing list [EMAIL PROTECTED]
> Received: (qmail 12848 invoked by uid 9); 13 May 2001 16:15:49 -
> To: [EMAIL PROTECTED]
> From: "Ciaron Nixon" <[EMAIL PROTECTED]>
> Date: Sun, 13 May 2001 17:22:28 +0100
> Lines: 9
> Message-ID: <9dmbvl$chc$[EMAIL PROTECTED]>
> X-Priority: 3
> X-MSMail-Priority: Normal
> X-Newsreader: Microsoft Outlook Express 5.50.4133.2400
> X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
> Subject: [PHP] multiline text areas and mysql doesn't work :(
> X-UIDL: ;GH!!Oa4!!_P6"!Z&K!!

> I'm trying to insert the conents of a submitted textarea into a field of a
> db but it seems to be stripping the control characters or not fomatting them
> properly. The record updates fine but when I display it all the newlines are
> gone ie the whole field appears on 1 line.
> Any ideas how to get it to store the control chars?

> -Ciaron




Use nl2br() to format the display properly in HTML.
Goto www.php.net/nl2br for more info.

So this would work well:



Updating the record works because you probably did something like this:




Regards,
Keith Ng
___
Co-founder
K-Designs Incorporated
[EMAIL PROTECTED]

http://www.k-designs.com.sg/


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




[PHP] PDF

2001-05-16 Thread Keith Ng

Hi all,

With regards to the PDF library, I'm wondering if there are any
generators that generate the code for the pdf document instead of
manually hard-coding everything. Or is there an easy way out by
converting an already designed pdf document into the code which pdflib
recognises?

Thanks very much.


Regards,
Keith Ng
___
Senior Web Developer
K-Systems & Services
[EMAIL PROTECTED]

http://www.k-systems.com.sg/


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




Re: [PHP] How can I enable magic_quotes_gpc without editing PHP.ini

2001-05-16 Thread Keith Ng

In reply to [EMAIL PROTECTED]:

> Return-Path: <[EMAIL PROTECTED]>
> Received: from toye.php.net (va.php.net [198.186.203.51])
> by cobalt1.intermedia.com.sg (8.10.2/8.10.2) with SMTP id f4GEsVZ09896
> for <[EMAIL PROTECTED]>; Wed, 16 May 2001 22:54:31 +0800
> Received: (qmail 7963 invoked by uid 1013); 16 May 2001 14:57:06 -
> Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
> Precedence: bulk
> list-help: <mailto:[EMAIL PROTECTED]>
> list-unsubscribe: <mailto:[EMAIL PROTECTED]>
> list-post: <mailto:[EMAIL PROTECTED]>
> Delivered-To: mailing list [EMAIL PROTECTED]
> Received: (qmail 7957 invoked from network); 16 May 2001 14:57:06 -
> Reply-To: <[EMAIL PROTECTED]>
> From: "SED" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Date: Wed, 16 May 2001 15:00:23 -
> Message-ID: <[EMAIL PROTECTED]>
> MIME-Version: 1.0
> Content-Type: text/plain;
> charset="iso-8859-1"
> Content-Transfer-Encoding: 7bit
> X-Priority: 3 (Normal)
> X-MSMail-Priority: Normal
> X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0)
> X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
> In-Reply-To: <9du3pi$te4$[EMAIL PROTECTED]>
> Importance: Normal
> Subject: [PHP] How can I enable magic_quotes_gpc without editing PHP.ini
> X-UIDL: BlS"!FI`"!LJI"!a2_!!

> Hi,

> I need to enable magic_quotes_qpc for one session (or a script) but I can no
> access to the php.ini on the server. Is it possible to do it? And if so,
> how?

> Regards,
> Sumarlidi Einar Dadason

> SED - Graphic Design

> --
> Phone:   (+354) 4615501
> Mobile:  (+354) 8960376
> Fax: (+354) 4615503
> E-mail:  [EMAIL PROTECTED]
> Homepage:www.sed.is <- New Homepage!
> --



set_magic_quotes_runtime();


Regards,
Keith Ng
___
Co-founder
K-Designs Incorporated
[EMAIL PROTECTED]

http://www.k-designs.com.sg/


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




[PHP] Barcode in PDF.

2001-05-17 Thread Keith Ng

Hi,

Does anyone know how to go about drawing a barcode in PDFLIB?

Regards,
Keith Ng
___
Co-founder
K-Designs Incorporated
[EMAIL PROTECTED]

http://www.k-designs.com.sg/


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




Re: [PHP] Parse error..help!

2001-05-18 Thread Keith Ng

In reply to [EMAIL PROTECTED]:

> Return-Path: <[EMAIL PROTECTED]>
> Received: from toye.php.net (va.php.net [198.186.203.51])
> by cobalt1.intermedia.com.sg (8.10.2/8.10.2) with SMTP id f4IDicZ30638
> for <[EMAIL PROTECTED]>; Fri, 18 May 2001 21:44:39 +0800
> Received: (qmail 23365 invoked by uid 1013); 18 May 2001 13:47:20 -
> Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
> Precedence: bulk
> list-help: <mailto:[EMAIL PROTECTED]>
> list-unsubscribe: <mailto:[EMAIL PROTECTED]>
> list-post: <mailto:[EMAIL PROTECTED]>
> Delivered-To: mailing list [EMAIL PROTECTED]
> Received: (qmail 23359 invoked from network); 18 May 2001 13:47:20 -
> Reply-To: <[EMAIL PROTECTED]>
> From: "Taline Makssabo" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Date: Fri, 18 May 2001 09:49:35 -0400
> Message-ID: <[EMAIL PROTECTED]>
> MIME-Version: 1.0
> Content-Type: text/plain;
> charset="iso-8859-1"
> Content-Transfer-Encoding: 7bit
> X-Priority: 3 (Normal)
> X-MSMail-Priority: Normal
> X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)
> Importance: Normal
> X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700
> Subject: [PHP] Parse error..help!
> X-UIDL: #l6"!fL$#!:Bj"!n1f!!

> Here is another error i keep on getting, this is suppose to send me an email
> each time someone enters in my website but i keep on gettong this error
> message:



> Parse error: parse error in
> /home/virtual/ppcu/home/httpd/html/php2/login.php on line 8
> I don't see anything wrong, please help.



>  SetLogging(1);

> Function AccessHit
> (

> $NL = (\n);


> $H = getLastHost();


> $R = getLastRef();

> $To = "[EMAIL PROTECTED]";


> $Sub = "Page Accessed";


> $D = Date("D d M y h:ia",time());

> $Msg = $H + $NL + $R + $NL + $D;

> mail($To,$Sub,$Msg);
> );
> AccessHit();

?>>

$NL = (\n)?

It should be $NL = "\n";


Regards,
Keith Ng
___
Co-founder
K-Designs Incorporated
[EMAIL PROTECTED]

http://www.k-designs.com.sg/


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




Re: [PHP] Parse error..help!

2001-05-18 Thread Keith Ng

In reply to [EMAIL PROTECTED]:

> Return-Path: <[EMAIL PROTECTED]>
> Received: from toye.php.net (va.php.net [198.186.203.51])
> by cobalt1.intermedia.com.sg (8.10.2/8.10.2) with SMTP id f4IDicZ30638
> for <[EMAIL PROTECTED]>; Fri, 18 May 2001 21:44:39 +0800
> Received: (qmail 23365 invoked by uid 1013); 18 May 2001 13:47:20 -
> Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
> Precedence: bulk
> list-help: <mailto:[EMAIL PROTECTED]>
> list-unsubscribe: <mailto:[EMAIL PROTECTED]>
> list-post: <mailto:[EMAIL PROTECTED]>
> Delivered-To: mailing list [EMAIL PROTECTED]
> Received: (qmail 23359 invoked from network); 18 May 2001 13:47:20 -
> Reply-To: <[EMAIL PROTECTED]>
> From: "Taline Makssabo" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Date: Fri, 18 May 2001 09:49:35 -0400
> Message-ID: <[EMAIL PROTECTED]>
> MIME-Version: 1.0
> Content-Type: text/plain;
> charset="iso-8859-1"
> Content-Transfer-Encoding: 7bit
> X-Priority: 3 (Normal)
> X-MSMail-Priority: Normal
> X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)
> Importance: Normal
> X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700
> Subject: [PHP] Parse error..help!
> X-UIDL: #l6"!fL$#!:Bj"!n1f!!

> Here is another error i keep on getting, this is suppose to send me an email
> each time someone enters in my website but i keep on gettong this error
> message:



> Parse error: parse error in
> /home/virtual/ppcu/home/httpd/html/php2/login.php on line 8
> I don't see anything wrong, please help.



>  SetLogging(1);

> Function AccessHit
> (

> $NL = (\n);


> $H = getLastHost();


> $R = getLastRef();

> $To = "[EMAIL PROTECTED]";


> $Sub = "Page Accessed";


> $D = Date("D d M y h:ia",time());

> $Msg = $H + $NL + $R + $NL + $D;

> mail($To,$Sub,$Msg);
> );
> AccessHit();

?>>

Right... so all in all the code should be:

---

---

Regards,
Keith Ng
___
Co-founder
K-Designs Incorporated
[EMAIL PROTECTED]

http://www.k-designs.com.sg/


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




[PHP] unhandled exception processing the ISAPI

2002-05-12 Thread Keith AY

Hi all, I got a problem when using PHP

Server: win2000(sp2)
Version: 4.2.0
Application use: ODBC, sessions, oci8, oracle.

I tried PHP ISAPI version (4.2.0)
I am using generic client socket(i.e. fsockopen()) to communicate with a
server. It work fine at the begin, but I found that if the server
suddenly shutdown. The follow error
occur:

The HTTP server encountered an unhandled exception while processing the
ISAPI Application '
php4ts!zend_strndup + 0x2B
 + 0xA05E5983

and I have to reboot the system because IIS won't work!!!

Would u please give me some help or advice? thx!!!!

Keith AY



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




[PHP] Finding Hostname of Browser Client.

2002-02-22 Thread Keith Sloan

I have a friend with a PhotoLibrary web site.

I am trying to automate some of his work. I tried to create a PHP
script/program? that
would check for missing files and upload. I am testing on my laptop with
loopback.

It all works if I give the ftp routine that does the ftp_connect a hostname
i.e. Localhost
or the name of my machine. But if I use 127.0.0.1 it fails to connect.
Ideally I would
like to use $HTTP_REMOTE_ADDR to set the address but as it insist on the
name
I am stuck. Ideally I would like to run the script and have the ftp server
on the machine that
he uses to dial into the ISP i.e. Dynamically allocated IP address. I
suspect that his ISP
is not going to resolve an address to such a machine.

Any ideas ?

Thanks Keith

--
Keith , Jenny & Family Sloan
[EMAIL PROTECTED]
http://web.ukonline.co.uk/keith.sloan/



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




[PHP] Re: mail() & getenv() problems (after 4.1.2 update)...

2002-03-08 Thread Keith Waters

I'm having the same problem -

I've been using the mail() command for quite some time now and it's been
working 100% and executing immediately.

Suddenly, this morning, it is taking about 60 seconds to send mail, delaying
the display of the php web page by that same amount of time.

I have checked the mail server and sending mail from the command prompt
(linux) and there is no delay there.

Does anybody have any clue? I even momentarily downgraded to 4.1.0 to make
sure it wasnt a bug in 4.1.2


"Paul" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Can nobody help?  This is so frustrating.  I cannot see what's wrong, open
> to ANY suggestions!
>
> Thanks.
>
> Paul
> "Paul" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > Hello,
> >
> > I wonder if anyone can help me with a problem I have.  I have some sites
> > hosted on a Cobalt Raq4 server (not sure if this is relevant).  I
recently
> > upgraded PHP from a package at www.pkgmaster.com, and since making this
> > upgrade I have problems with PHP that I cannot find the solution to.
> >
> > I have conacted their 'team' who have thus far offered no explanation,
> > saying it must be something else causing these issues with PHP, but I
> > haven't made any more changes, just installed the new PHP version.
> >
> > The problems are with the mail() function taking an AGE to excecute, and
> > environmental HTTP header information not being sent/recieved by
getenv().
> >
> > Some examples follow..
> >
> > For example, as an extremely basic example of the mail function going
> slow,
> > this simple script:
> >  > mail("[EMAIL PROTECTED]", "Test subject", "Test message");
> > print "finished!";
> > ?>
> >
> > Which can be found at http://www.clicktolearn.co.uk/test/mail.php in
> action,
> > ran (as it should do) extremely fast the week before I made the upgrade
> from
> > the packages.  Now, as you will see, it runs dog slow.
> >
> > Secondly, the following script shows the lack of headers:
> > http://www.clicktolearn.co.uk/test/  (click the link, so there's a
referer
> > to the script page)...
> >
> >  > function get_http_headers($url, $proto="HTTP/1.0", $timeout=10) {
> > $return = false;
> > if (substr($url,0,7)=="http://";) {
> > $url = substr($url,7);
> > }
> >
> > $parts = parse_url("http://".$url);
> >
> > $ips = gethostbynamel($parts["host"]);
> >
> > if ($ips[0]) {
> > $ip = $ips[0];
> > $host = $parts["host"];
> > $path = ($parts["path"]) ? $parts["path"] : "/";
> > $port = ($parts["port"]) ? $parts["port"] : 80;
> >
> > $start = time();
> > $timeout = $timeout + $start;
> >
> > if($sock = fsockopen($host, $port)) {
> > set_socket_blocking($sock, 0);
> > switch($proto) {
> > case "HTTP/1.1":
> > set_socket_blocking($sock, 1);
> > fputs($sock, sprintf("HEAD %s
> %s\n",
> > $path, $proto));
> > fputs($sock, sprintf("Host:
> %s\n\n",
> > $host));
> > break;
> > default:
> > fputs($sock, sprintf("HEAD %s
> > %s\n\n", $path, $proto));
> > }
> >
> > while(!feof($sock) && $t<$timeout) {
> > $line .= fgets($sock,1);
> > $t = time();
> > }
> > fclose($sock);
> > $end = time();
> >
> > if ($t>=$timeout) {
> > $http = parse_output($line);
> > $http["result"] = 502;
> > $http["message"] = "Timed Out";
> > $http["time_used"] = $end - $start;
> > $return = $http;
> > } elseif($line) {
> > $http = parse_output($line);
> > $http["time_used"] = $end - $start;
> > $return = $http;
> > }
> > }
> > }
> > return $return;
> > }
> >
> > function parse_output($line) {
> > $lines = explode("\n", $line);
> > if(substr($lines[0],0,4)=="HTTP") {
> > list($http["protocol"], $http["result"], $http["message"]) =
> > split("[[:space:]]+",$lines[0],3);
> > } else if(substr($lines[0],0,7)=="Server:") {
> > $http["server"] = substr($lines[0],8);
> > }
> > for ($i=1; $i > list($key, $val) = split(":[[:space:]]*", $lines[

[PHP] Re: mail() & getenv() problems (after 4.1.2 update)...

2002-03-11 Thread Keith Waters

Just to report back to the group, the mail() delay problem was solved by
putting entries into /etc/hosts to speed up reverse DNS lookups.  (Worked
fine before 4.1.2, but I guess there's some new code in there somewhere!)

Paul's getenv() problem was a simple one, he forgot the double-quotes!

Keith

"Keith Waters" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I'm having the same problem -
>
> I've been using the mail() command for quite some time now and it's been
> working 100% and executing immediately.
>
> Suddenly, this morning, it is taking about 60 seconds to send mail,
delaying
> the display of the php web page by that same amount of time.
>
> I have checked the mail server and sending mail from the command prompt
> (linux) and there is no delay there.
>
> Does anybody have any clue? I even momentarily downgraded to 4.1.0 to make
> sure it wasnt a bug in 4.1.2
>
>
> "Paul" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > Can nobody help?  This is so frustrating.  I cannot see what's wrong,
open
> > to ANY suggestions!
> >
> > Thanks.
> >
> > Paul
> > "Paul" <[EMAIL PROTECTED]> wrote in message
> > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > > Hello,
> > >
> > > I wonder if anyone can help me with a problem I have.  I have some
sites
> > > hosted on a Cobalt Raq4 server (not sure if this is relevant).  I
> recently
> > > upgraded PHP from a package at www.pkgmaster.com, and since making
this
> > > upgrade I have problems with PHP that I cannot find the solution to.
> > >
> > > I have conacted their 'team' who have thus far offered no explanation,
> > > saying it must be something else causing these issues with PHP, but I
> > > haven't made any more changes, just installed the new PHP version.
> > >
> > > The problems are with the mail() function taking an AGE to excecute,
and
> > > environmental HTTP header information not being sent/recieved by
> getenv().
> > >
> > > Some examples follow..
> > >
> > > For example, as an extremely basic example of the mail function going
> > slow,
> > > this simple script:
> > >  > > mail("[EMAIL PROTECTED]", "Test subject", "Test
message");
> > > print "finished!";
> > > ?>
> > >
> > > Which can be found at http://www.clicktolearn.co.uk/test/mail.php in
> > action,
> > > ran (as it should do) extremely fast the week before I made the
upgrade
> > from
> > > the packages.  Now, as you will see, it runs dog slow.
> > >
> > > Secondly, the following script shows the lack of headers:
> > > http://www.clicktolearn.co.uk/test/  (click the link, so there's a
> referer
> > > to the script page)...
> > >
> > >  > > function get_http_headers($url, $proto="HTTP/1.0", $timeout=10) {
> > > $return = false;
> > > if (substr($url,0,7)=="http://";) {
> > > $url = substr($url,7);
> > > }
> > >
> > > $parts = parse_url("http://".$url);
> > >
> > > $ips = gethostbynamel($parts["host"]);
> > >
> > > if ($ips[0]) {
> > > $ip = $ips[0];
> > > $host = $parts["host"];
> > > $path = ($parts["path"]) ? $parts["path"] : "/";
> > > $port = ($parts["port"]) ? $parts["port"] : 80;
> > >
> > > $start = time();
> > > $timeout = $timeout + $start;
> > >
> > > if($sock = fsockopen($host, $port)) {
> > > set_socket_blocking($sock, 0);
> > > switch($proto) {
> > > case "HTTP/1.1":
> > > set_socket_blocking($sock, 1);
> > > fputs($sock, sprintf("HEAD %s
> > %s\n",
> > > $path, $proto));
> > > fputs($sock, sprintf("Host:
> > %s\n\n",
> > > $host));
> > > break;
> > > default:
> > >   

[PHP] Curl output to an array -- HELP!!

2002-03-19 Thread Keith Posehn

Ok, lets say I have some code here:

$result = array();

$ch = curl_init ("https://www.myverificationplace.com/verify.asp";);

curl_setopt ($ch, CURLOPT_POST, 1);
curl_setopt ($ch, CURLOPT_POSTFIELDS, $args);
curl_setopt ($ch, CURLOPT_TIMEOUT, 120); // Set the timeout, in seconds.
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
$result = curl_exec ($ch);

curl_close ($ch);

Now that we see that, how can I make it so that the output from curl, which
is in the variable $result, will be an array, for each line of output?

Some of the line of output looks like this:

ssl_result_message=APPROVED
ssl_txn_id=----
ssl_approval_code=00

I need each of the lines to be turned into a variable. Any ideas as to how I
might go about this?

Thanks,

Keith Posehn





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




[PHP] Curl output to an array -- HELP!! -- Appended

2002-03-19 Thread Keith Posehn

This is an revision of my previous message:

Ok, lets say I have some code here:

$result = array();

$ch = curl_init ("https://www.myverificationplace.com/verify.asp";);

curl_setopt ($ch, CURLOPT_POST, 1);
curl_setopt ($ch, CURLOPT_POSTFIELDS, $args);
curl_setopt ($ch, CURLOPT_TIMEOUT, 120); // Set the timeout, in seconds.
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
$result = curl_exec ($ch);

curl_close ($ch);

Now that we see that, how can I make it so that the output from curl, which
is in the variable $result, will be an array, for each line of output?

Some of the line of output looks like this:

ssl_result_message=APPROVED
ssl_txn_id=----
ssl_approval_code=00

I need each of the lines to be turned into a variable.

Example:

name the variable 'ssl_result_message', the value being 'APPROVED'

Any ideas as to how I might go about this?

Thanks,

Keith Posehn




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




[PHP] php, pdf's and restricting access

2002-04-03 Thread Keith Posehn

Ok, here's my question:

I have a set of pdf files that I am selling. I want the users of my site,
when they buy the files to be able to only view them if they are acquired,
so I need to restrict access to them. Could I set the permissions on them so
they are not publicly viewable, and then make a php page that would actually
view the files as a specific user? Is there some way to include a pdf file
in the page?

Any ideas appreciated.

Keith Posehn



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




[PHP] session variables between http and https servers.

2002-04-10 Thread Keith Posehn

Okay, here is my dilemma:

I have one page, (non-secure), which sets session variables for the users
address, items, prices, etc. I have the next page which is secure, and
cannot get the session variables from the previous page. Is there a way to
pass the variables between the secure and non-secure servers? I cannot send
the information in my session variables in the url (that information needs
to remain in the session).

I have searched the php mailing lists about this and have not found anything
that will answer this question.

Any and all help, verbose if possible, is appreciated.

Thanks!

Keith



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




[PHP] pages will not refresh publically

2001-12-02 Thread Keith Kwasigroch

I have a W2k box setup with IIS and PHP.  It works fine, well almost.  I can
create a .php page and it works great.  But, when I edit that page, the old
page still shows up pubically.  The page is updated if I open it from within
the private network.  For instance:  www.domain.com displays old page, but
192.168.x.x displays updated page.



Thanks in advance for any help.



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




[PHP] Turn-key output compression support in 4.1.0

2001-12-11 Thread Keith Waters

Hi All - I see this feature mentioned in the release notes - It could be a
nice alternative to mod_gzip if it is what I think it is, but there doesnt
seem to be any documentation on it.  Does anybody out there have an idea?

Regards,
Keith




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




Re: [PHP] Header Problem

2001-03-21 Thread Keith Vance

What happens when it doesn't work, any error messages?
Try:
header ("Location: http://www." . $URL . "/members/index.php");

or

$loc = "Location: http://www." . $URL . "/members/index.php";
header ($loc);

The first suggestion should work.

K E I T H  V A N C E
Software Engineer
n-Link Corporation

On Wed, 21 Mar 2001, almir wrote:

> are you using cookies together with header , i had problems with that
> -almir
>
> <[EMAIL PROTECTED]> schrieb im Newsbeitrag
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > Hi,
> >
> > I`m having whats probably a very basic problem but just can`t get my head
> > around it this late in the day, anyone have any idea why this won`t work?
> >
> > $URL="domain.com";
> >
> > header ("Location: Http://www.$URL/members/index.php");
> >
> > $URL changes so I can`t write it directly into the header line, anyone?
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


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




  1   2   >