Re: [PHP] want to restart session after time out

2003-10-09 Thread Manisha Sathe
thanks all,

If session has to time out  then in that case what shall i do in following
case ?

I have a login page, user logins and starts playing (it is a on line game
site), for each action (he tells something to do), i need to check whether
he is login (i.e session on), if yes, then take all session vars and act
accordingly. So do u mean to say that i need to ask for login again if i do
not find any session? Is it a normal practice to do ?

I always wonder what will happen if the user is half way - running some PHP
script at back which calls another script in turn and session ends in
between? May be this question will be very basic, but i always get confuse.

I know bit of ASP. I remember it is having something like 'On Session End'
event hadler. but  PHP does not have some thing like this ?

Regards,
Manisha



Evan Nemerson [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Comments inline

 On Wednesday 08 October 2003 10:23 pm, Chris Shiflett wrote:
  --- Evan Nemerson [EMAIL PROTECTED] wrote:
   Well you can change the default from 30 mins to something larger,
   but that has security consequences...
 
  I am speaking to myself as much as anyone, but we should all try to
develop
  the habit of explaining any such consequences that we mention. To do
  otherwise doesn't really educate the many people who read these
responses,
  whether now or in an archive. It only adds to the mystery of certain
topics
  (such as security).

 Well, they _can_ always ask if they don't understand. I agree that it's
best
 to give as much information as possible, but that takes a LOT of time. If
we
 don't assume any prior knowledge, answering anything would be a huge pain.

 That being said, I agree that in this case I should have elaborated...
It's
 probably a reach for a lot of list readers.

 If you have long sessions, the likelyhood that someone will be able to
steal
 the session ID and imitate the user increases drastically. It's called
 session hijacking, and any google search (or archive search, probably)
will
 yield a wealth of information.

 
   Sessions are kind of a hack over HTTP, which is pretty much a
   stateless protocol. There's Connection: keep-alive, but not every
   browser supports it, and I don't think there's a way to hook into it
   from PHP.
 
  Well, persistent connections aren't really intended to provide stateful
  transactions (and they don't).

 They most certainly are not, but if they could _theoretically_ be used
that
 way. Practicality, however, forbids it. IMO it's a Bad Idea, but still
worth
 mentioning. Actually, now I'm thinking about writing a POC just to see if
it
 can be done, even in a laboratory setting.

 
  My favorite example to use is Google, because there are two resources
that
  make up the front page: the HTML and the logo. With previous versions of
  HTTP, unless a persistent connection was specifically requested, a
separate
  TCP connection was established for each transaction. This meant two TCP
  connections would be created and destroyed just to render Google.
Imagine
  more elaborate sites, and you can see how this can really cause
performance
  problems. By making persistent connections the default (HTTP/1.1), a
single
  TCP connection can be established, and until all necessary resources are
  received, the same connection is used. This makes much more sense. The
  Connection header allows you to specify the desired behavior.

 Wow they finally have one image! IIRC, for a long time the logo was
several
 small images that looked like a single image. That way, the whitespace
around
 the letters didn't have to be included in the image. IMHO that was a cool
 solution. They still avoid superfluous line breaks, which makes me
happy...

 
  Oh, and every major browser I am aware of does support it, but hopefully
  you can now see that it is not associated with sessions or even stateful
  transactions.

 Okay well then here's another reason not to rely on keep-alive: Users
can't
 copy a URL and paste as an argument to wget -c (or any of the download
 managers). I'm sure there are many, many more reasons, but I sincerely
doubt
 I'd have to convice anyone not to use keep-alive for sessions.

 
  Hope that helps.
 
  Chris
 
  =
  My Blog
   http://shiflett.org/
  HTTP Developer's Handbook
   http://httphandbook.org/
  RAMP Training Courses
   http://www.nyphp.org/ramp

 --
 Evan Nemerson
 [EMAIL PROTECTED]

 --
 Who controls the past controls the future. Who controls the present
controls
 the past.

 -George Orwell

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



[PHP] Multiple PHP modules

2003-10-09 Thread Ryan Thompson
Just a quick question. I don't think it's possible but worth a try

Is it possible to load two different PHP modules in apache having them linked 
to different virtual hosts? I'm hoping I can run one site with PHP 5 and 
another with 4.3.x
-- 
Ryan Thompson
[EMAIL PROTECTED]
http://osgw.sourceforge.net
==
A computer scientist is someone who fixes
 things that aren't broken --Unknown

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



[PHP] Fw: tomcat server

2003-10-09 Thread agus

- Original Message - 
From: agus 
To: [EMAIL PROTECTED] 
Sent: Thursday, October 09, 2003 1:34 PM
Subject: tomcat server


hello everybody,

can anybody tell me how to setting tomcat server to run java beans?


[PHP] Unable to connect to MSSQL server if user is non-admin

2003-10-09 Thread Andres Montiel
Setup:
Windows 2000
Microsoft SQL Server 2000
PHP 4.3.3
IIS 5
AdoDB

On my IIS server, I set it to reject anonymous logins (I need to
eventually get the NT login names). I am able to run PHP scripts on the
defined site (it can run a phpinfo() script).

On another computer, I try to access the page that reads from the
database. If I logon on the remote pc as using the username of the
database admin, I my script runs fine. If I logon as a regular user, I get
the following errors:


Warning: mssql_connect(): Unable to connect to server: datawarehouse,1433
in C:\Inetpub\rr_intra\adodb\drivers\adodb-mssql.inc.php on line 424

Warning: Cannot modify header information - headers already sent by
(output started at
C:\Inetpub\rr_intra\adodb\drivers\adodb-mssql.inc.php:424) in
C:\Inetpub\rr_intra\config\config.php on line 51


Any recommendations? :) I have going at this for 3 days but to no avail.

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



Re: [PHP] Multiple PHP modules

2003-10-09 Thread Evan Nemerson
With a bit of httpd.conf wizardry, I believe so. Just put the the LoadModule 
and AddType stuff inside the VirtualHost containers. PHP5 is libphp5.so, 
PHP4 is libphp4.so

I haven't tried it, but it should work.


On Wednesday 08 October 2003 11:33 pm, Ryan Thompson wrote:
 Just a quick question. I don't think it's possible but worth a try

 Is it possible to load two different PHP modules in apache having them
 linked to different virtual hosts? I'm hoping I can run one site with PHP 5
 and another with 4.3.x

-- 
Evan Nemerson
[EMAIL PROTECTED]

--
If you would be a real seeker after truth, you must at least once in your 
life doubt, as far as possible, all things.

-Rene Descartes

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



Re: [PHP] Fw: tomcat server

2003-10-09 Thread Ryan Thompson
I think you got the wrong mailing list. This is PHP. Not java.

On Thursday 09 October 2003 03:08, agus wrote:
 - Original Message -
 From: agus
 To: [EMAIL PROTECTED]
 Sent: Thursday, October 09, 2003 1:34 PM
 Subject: tomcat server


 hello everybody,

 can anybody tell me how to setting tomcat server to run java beans?

-- 
Ryan Thompson
[EMAIL PROTECTED]
http://osgw.sourceforge.net
==
A computer scientist is someone who fixes
 things that aren't broken --Unknown

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



Re: [PHP] pasted text from word

2003-10-09 Thread David Otton
On Thu, 9 Oct 2003 11:53:51 +1000, you wrote:

Hi all,

I'm interested in alternative solutions (to those found in the comments 
on http://au.php.net/htmlspecialchars) for dealing with text pasted 
into a textarea from Word et al.

I want a way of 'dumbing down' certain characters (like quotes) before 
putting them through my own smart quotes engine, and convert other 
characters to their appropriate HTML entity.

htmlspecialchars() doesn't seem to be converting a few test chars I 
have (like curly quotes)


I'm interested in hearing of a few different methods to overcome the 
evil MS Word text :)

/**
 * XML equivalent of htmlentities() - pound; becomes #163;
 * this function placed here to avoid calling in another include file
 **/
function xmlentities ($string, $quote_style = ENT_COMPAT) {
static $trans; // using a static variable avoids repeatedly creating the
translation table
if (!is_array ($trans)) {
$trans = get_html_translation_table (HTML_ENTITIES, $quote_style);
$trans[chr(128)] = 'euro;';
$trans[chr(130)] = 'sbquo;';
$trans[chr(131)] = 'fnof;';
$trans[chr(132)] = 'bdquo;';
$trans[chr(133)] = 'hellip;';
$trans[chr(134)] = 'dagger;';
$trans[chr(135)] = 'Dagger;';
$trans[chr(136)] = 'circ;';
$trans[chr(137)] = 'permil;';
$trans[chr(138)] = 'Scaron;';
$trans[chr(139)] = 'lsaquo;';
$trans[chr(140)] = 'OElig;';
$trans[chr(145)] = 'lsquo;';
$trans[chr(146)] = 'rsquo;';
$trans[chr(147)] = 'ldquo;';
$trans[chr(148)] = 'rdquo;';
$trans[chr(149)] = 'bull;';
$trans[chr(150)] = '#45;';
$trans[chr(151)] = 'mdash;';
$trans[chr(152)] = 'tilde;';
$trans[chr(153)] = 'trade;';
$trans[chr(154)] = 'scaron;';
$trans[chr(155)] = 'rsaquo;';
$trans[chr(156)] = 'oelig;';
$trans[chr(159)] = 'Yuml;';
array_walk ($trans, create_function ('$a, $b', '$a = # . ord
($b) . ;;'));
}
return (strtr ($string, $trans));
}

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



Re: [PHP] want to restart session after time out

2003-10-09 Thread Manisha Sathe
oh god, I was so confused, I was under impression that it is 30 mins in
total, but it is 30  mins inactive time,

Keep in mind that this is 30 minutes of
 inactivity, not 30 minutes total. The user can be logged in for hours, so
 long as they are using the session.

Just this sentence and it solved all my problems, i was making round and
round only because of this wrong impression. It is a  stupid newbie
question, i hope u r used to it. btw, i did not find this in documentation.
Any docs please ?

Any way thanks a lot..lot..lot.

Regards
Manisha


Evan Nemerson [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 On Wednesday 08 October 2003 11:23 pm, Manisha Sathe wrote:
  thanks all,
 
  If session has to time out  then in that case what shall i do in
following
  case ?

 Just have them log-in again.

 
  I have a login page, user logins and starts playing (it is a on line
game
  site), for each action (he tells something to do), i need to check
whether
  he is login (i.e session on), if yes, then take all session vars and act
  accordingly. So do u mean to say that i need to ask for login again if i
do
  not find any session? Is it a normal practice to do ?

 Yes. Users rarely complain about coming back to their computer an hour
later
 and having been logged out. Keep in mind that this is 30 minutes of
 inactivity, not 30 minutes total. The user can be logged in for hours, so
 long as they are using the session.

 
  I always wonder what will happen if the user is half way - running some
PHP
  script at back which calls another script in turn and session ends in
  between? May be this question will be very basic, but i always get
confuse.

 Sorry I don't see what you're asking... could you try to re-phrase it?

 
  I know bit of ASP. I remember it is having something like 'On Session
End'
  event hadler. but  PHP does not have some thing like this ?

 I'm assuming that just lets you provide code to execute after the session
 ends. To the best of my knowledge, it doesn't. Then again, I don't think
it
 would be a good idea. Lots of extra overhead, and you shouldn't need a
 cleanup function if you write the code correctly. Data should be written
to
 the DB periodically throughout the session, not at the end. What exactly
 would you have this code do?

 
  Regards,
  Manisha
 
 
 
  Evan Nemerson [EMAIL PROTECTED] wrote in message
  news:[EMAIL PROTECTED]
 
   Comments inline
  
   On Wednesday 08 October 2003 10:23 pm, Chris Shiflett wrote:
--- Evan Nemerson [EMAIL PROTECTED] wrote:
 Well you can change the default from 30 mins to something larger,
 but that has security consequences...
   
I am speaking to myself as much as anyone, but we should all try to
 
  develop
 
the habit of explaining any such consequences that we mention. To
do
otherwise doesn't really educate the many people who read these
 
  responses,
 
whether now or in an archive. It only adds to the mystery of certain
 
  topics
 
(such as security).
  
   Well, they _can_ always ask if they don't understand. I agree that
it's
 
  best
 
   to give as much information as possible, but that takes a LOT of time.
If
 
  we
 
   don't assume any prior knowledge, answering anything would be a huge
   pain.
  
   That being said, I agree that in this case I should have elaborated...
 
  It's
 
   probably a reach for a lot of list readers.
  
   If you have long sessions, the likelyhood that someone will be able to
 
  steal
 
   the session ID and imitate the user increases drastically. It's called
   session hijacking, and any google search (or archive search, probably)
 
  will
 
   yield a wealth of information.
  
 Sessions are kind of a hack over HTTP, which is pretty much a
 stateless protocol. There's Connection: keep-alive, but not every
 browser supports it, and I don't think there's a way to hook into
it
 from PHP.
   
Well, persistent connections aren't really intended to provide
stateful
transactions (and they don't).
  
   They most certainly are not, but if they could _theoretically_ be used
 
  that
 
   way. Practicality, however, forbids it. IMO it's a Bad Idea, but still
 
  worth
 
   mentioning. Actually, now I'm thinking about writing a POC just to see
if
 
  it
 
   can be done, even in a laboratory setting.
  
My favorite example to use is Google, because there are two
resources
 
  that
 
make up the front page: the HTML and the logo. With previous
versions
of HTTP, unless a persistent connection was specifically requested,
a
 
  separate
 
TCP connection was established for each transaction. This meant two
TCP
connections would be created and destroyed just to render Google.
 
  Imagine
 
more elaborate sites, and you can see how this can really cause
 
  performance
 
problems. By making persistent connections the default (HTTP/1.1), a
 
  single
 
TCP connection can be established, and until all necessary resources
are 

RE: [PHP] shell_exec question - Solved

2003-10-09 Thread Chris Blake
To all who contributed to this thread, many thanks...

I tried all the suggestions offered but still had the same problem.
Today I copied php.ini-dist over to /etc, restarted Apache and
everything works. This process was repeated many times during the last
day or so, so I don`t know what happened to make it work this time.

Anyhowze, my shell_exec`s are working now, so I`m a happy camper...

Thanks again to all who assisted, muchly apreciated.

-- 
Chris Blake
Support Consultant
Office : (011) 782-0840
Fax: (011) 782-0841
Mobile : 083 985 0379
Website: http://www.pbpc.co.za

THE LESSER-KNOWN PROGRAMMING LANGUAGES #10: SIMPLE

SIMPLE is an acronym for Sheer Idiot's Monopurpose Programming Language
Environment.  This language, developed at the Hanover College for
Technological Misfits, was designed to make it impossible to write code
with errors in it.  The statements are, therefore, confined to BEGIN,
END and STOP.  No matter how you arrange the statements, you can't make
a syntax error.  Programs written in SIMPLE do nothing useful.  Thus
they achieve the results of programs written in other languages without
the tedious, frustrating process of testing and debugging.

10:29:53 up 22 days,  1:59,  3 users,  load average: 0.52, 0.19, 0.13

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



[PHP] ImageCreate / ImageCopyResized Path?

2003-10-09 Thread [-^-!-%-
Hello everyone!

Is it possible to define a path for ImageCreate and/or ImageCopyResize ?
I have an image gallery script that uploads images to the server. I would
like to automatically create thumbnails of the image [as soon as it is
uploaded  and saved in a sub-directory. Is this possible with
ImageCreate/ImageCopyResize, or the other functions?


 My directory structure is

 ../media
   /images
/thumbs/

I have an upload script that upload images to the media/images/ directory.
But, I would like to automatically create a thumbnail of the same image,
but saved in the media/images/thumbs directory.

Is that possible?

The final result would like:

../media/images/
   |_image1.jpg
   |_image2.jpg
   |_thumbs
  |_thumb-image1.jpg
  |_thumb-image2.jpg

Any suggestions?

FYI:
 I currently have:

$thumb = imagecreate ($w, $h);
$image = ImageCreateFromJpeg($img);
$imagedata = getimagesize($img);
imagecopyresized ($thumb, $image, 0, 0, 0, 0, $w, $h,
$imagedata[0], $imagedata[1]);
imagejpeg($thumb, $img);


This works, but it overwrites the original [uploaded] image with the
thumbnail. I want to save the thumbnails in another directory.

Am I missing something?

Please advise.

_john

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



Re: [PHP] ImageCreate / ImageCopyResized Path?

2003-10-09 Thread Jason Wong
You have started a new thread by taking an existing posting and replying to
it while you changed the subject.

That is bad, because it breaks threading. Whenever you reply to a message,
your mail client generates a References: header that tells all recipients
which posting(s) your posting refers to. A mail client uses this information
to build a threaded view (tree view) of the postings.

With your posting style you successfully torpedoed this useful feature; your
posting shows up within an existing thread it has nothing to do with.

Always do a fresh post when you want to start a new thread. To achieve this,
click on New message instead of Reply within your mail client, and enter
the list address as the recipient. You can save the list address in your
address book for convenience.


On Thursday 09 October 2003 16:57, [-^-!-%- wrote:

 Is it possible to define a path for ImageCreate and/or ImageCopyResize ?
 I have an image gallery script that uploads images to the server. I would
 like to automatically create thumbnails of the image [as soon as it is
 uploaded  and saved in a sub-directory. Is this possible with
 ImageCreate/ImageCopyResize, or the other functions?

[snip]

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
Folks playing leapfrog must complete all jumps
-- Murphy's Laws on Sex n47
*/

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



RE: [PHP] or return problem

2003-10-09 Thread Ford, Mike [LSS]
On 08 October 2003 17:20, Chris Shiflett wrote:

  The internals developers probably didn't see a need to provide
  support for return in conditionals since it can't return a value
  to the conditional.
 
 Ugh. This is the same misconception, again. Let's try some different
 code: 
 
 ?
 function foo()
 {
  echo foo\n;
 }
 
 function bar()
 {
  return true;
 }
 
 bar() or foo();
 
  
 
 The return of foo() does not matter. It is not evaluated.

Semantically, that is true -- but syntactically it still has to *have* a potential 
value (since bar() *might* return false), so PHP will barf at the compilation stage if 
instead of foo() you have a construct which *cannot* return a value.  The distinction 
is not whether the construct on the right of or is actually executed or not for any 
given combination of input values, but whether it is *capable* of returning a value, 
should it be called upon to do so.

 I do not
 understand why this is still unclear. Consider this:
 
 if (!bar())
 {
  foo();
 }
 
 Does it seem like foo() is involved in the conditional when expressed
 like this? I hope not.

No -- but expressed like this, foo() is not required to have a return value -- it only 
needs to be executable.  In

   bar() or foo()

it must actually be *capable* of returning a value, even if that value can never be 
used.

In short, it's a compile-time question (can this construct return a value if required 
to do so?) vs a run-time question (does this construct need to be evaluated?).

Cheers!

Mike

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

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



RE: Re[2]: [PHP] Re: PHP CSS

2003-10-09 Thread esctoday.com | Wouter van Vliet
For compatibility among browsers, you might want to call a  

header('Content-type: text/css');

On top of the css-file-to-be.

Wouter
-Original Message-
From: Curt Zirzow [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 09, 2003 2:03 AM
To: [EMAIL PROTECTED]
Subject: Re: Re[2]: [PHP] Re: PHP  CSS

On Wed, 8 Oct 2003 09:44:53 -0700, Raquel Rice raquel- 
[EMAIL PROTECTED] wrote:

 On Thu, 9 Oct 2003 02:00:20 +1000
 Tom Rogers [EMAIL PROTECTED] wrote:


 You don't need to call your style sheets .css they can be just as
 easily called.php and even have a querystring attached like
 subsite.php?user=fred

 That way just use php as normal and return a style sheet just as
 you would a html page.

 Thank you!  I think that is exactly what I needed!

Hello Raquel..

Browse your site with the included php file that generates the css, and
watch your web logs.  If the browser is requesting that file with a 
response status of 200 everytime, I would strongly suggest you fix that.


Curt.
-- 
sig-less

-- 
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] Returning a reference

2003-10-09 Thread Wouter van Vliet
Hi Folks,
 
I've been using the passing arguments by reference thingie for a while
now. But what I want to do know is something I'm used to using in perl,
returning a reference. 
 
Situation is as follows.

  3 ?php
  4  # EXAMPLE
  5 Class Foo {
  6 function Foo() {
  7 }
  8
  9 function SomeThing() {
 10 $this-Changed = sure;
 11 }
 12
 13 };
 14
 15 Class Bar {
 16 function Bar() {
 17
 18 }
 19
 20 function AddFoo() {
 21 $Ref = $this-Foos[];
 22 $Ref = new Foo();
 23 return $Ref;
 24 }
 25 };
 26
 27 $Bar = new Bar();
 28 $Foo = $Bar-AddFoo();
 29 $Foo-SomeThing();
 30
 31 print_r($Bar);
 32 print_r($Foo);
 33 ?

And this is the output:

bar Object
(
[Foos] = Array
(
[0] = foo Object
(
)

)

)
foo Object
(
[Changed] = sure
)

The $Foo-SomeThing() call changes the $Foo instance, and what I want it to
do is change the instance of Foo that is nested within $Bar. So that the
output would be like:

bar Object
(
[Foos] = Array
(
[0] = foo Object
(
[Changed] = sure
)

)

)
foo Object
(
[Changed] = sure
)

Sure hope to find any help in here .. Been breaking my head on this matter
for a while.

Thanks!
Wouter

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



[PHP] session not working in IE 5

2003-10-09 Thread Binay
Hi all !

My session is not working in IE 5+ but working well with IE 6+. Is there some problem 
with IE 5+.

Please let me know as this being continuous pain for me.

Thanks in advance

Binay


Re: [PHP] session not working in IE 5

2003-10-09 Thread Marek Kilimajer
Binay wrote:
Hi all !

My session is not working in IE 5+ but working well with IE 6+. Is there some problem with IE 5+.

Please let me know as this being continuous pain for me.

Thanks in advance

Binay

Are you using cookies for storing the session id? Does IE 5 accept this 
cookie?

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


[Fwd: Re: [PHP] Returning a reference]

2003-10-09 Thread Fabrizio Balliano
 Do as follows:

   9 function SomeThing() {
  10 $this-Changed = sure;
  11 }

Regards
-- 
Fabrizio Balliano


CREALABS
Viale dei Mughetti, 13/A - 10151 Torino - Italy
Tel. +39-011-735645 - Fax +39-011-735645
http://www.crealabs.it - mailto:[EMAIL PROTECTED]

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



[PHP] Installing PHP on XP

2003-10-09 Thread Rinal Patel
Hello
 I am trying to install PHP on my personal computer, which runs Microsoft 
XP, but have had trouble installing it.  I have an apache server(it came 
with the oracle database I installed).
Could you please help me?  I would appreciate a quick response

Thank you
-rinal
_
Tired of spam? Get advanced junk mail protection with MSN 8.  
http://join.msn.com/?page=features/junkmail

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


RE: [PHP] Installing PHP on XP

2003-10-09 Thread Jonathan Wilkes
I wrote a simple guide to doing this under Windows 2000 and it should be roughly the 
same under XP.

You can find it on www.xfcpro.com under the Library section, can't remember the name 
of the article though..

regards,
Jonathan

-Original Message-
From: Rinal Patel [mailto:[EMAIL PROTECTED]
Sent: 09 October 2003 04:06
To: [EMAIL PROTECTED]
Subject: [PHP] Installing PHP on XP


Hello
  I am trying to install PHP on my personal computer, which runs Microsoft 
XP, but have had trouble installing it.  I have an apache server(it came 
with the oracle database I installed).
Could you please help me?  I would appreciate a quick response

Thank you
-rinal

_
Tired of spam? Get advanced junk mail protection with MSN 8.  
http://join.msn.com/?page=features/junkmail

-- 
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] Installing PHP on XP

2003-10-09 Thread Fernando Melo
Are you installing the CGI or the ISAPI?

-Original Message-
From: Rinal Patel [mailto:[EMAIL PROTECTED] 
Sent: 09 October 2003 05:06
To: [EMAIL PROTECTED]
Subject: [PHP] Installing PHP on XP

Hello
  I am trying to install PHP on my personal computer, which runs Microsoft 
XP, but have had trouble installing it.  I have an apache server(it came 
with the oracle database I installed).
Could you please help me?  I would appreciate a quick response

Thank you
-rinal

_
Tired of spam? Get advanced junk mail protection with MSN 8.  
http://join.msn.com/?page=features/junkmail

-- 
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] enable FTP support

2003-10-09 Thread Jay Blanchard
I am trying to enable FTP support on one of our test servers running PHP
4.2.2 

1. rm config.cache
2. ./configure --enable-ftp --prefix=/usr --with-apxs=/usr/sbin/apxs
--with-gd=/usr/local/ --with-jpeg-dir=/usr/local/
--with-zlib=/usr/local/ --with-png-dir=/usr/local/
3. make clean
4. make
5. make install

All goes well until the last section and the following is returned...

Making install in .
make[1]: Entering directory `/usr/local/php-4.2.1'
make[1]: *** [install-sapi] Error 1
make[1]: Leaving directory `/usr/local/php-4.2.1'
make: *** [install-recursive] Error 1

I have RTFM, STFW, STFA and have not been able to pinpoint a solution to
this problem. Can anyone shed some light on this?

Thanks!

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



Re: [PHP] Returning a reference

2003-10-09 Thread Curt Zirzow
* Thus wrote Wouter van Vliet ([EMAIL PROTECTED]):
 Hi Folks,
  
 I've been using the passing arguments by reference thingie for a while
 now. But what I want to do know is something I'm used to using in perl,
 returning a reference. 
  
 Situation is as follows.
 
  19
  20 function AddFoo() {

Need to let php know this is returning a reference:

function AddFoo() {


  21 $Ref = $this-Foos[];
  22 $Ref = new Foo();
  23 return $Ref;

I'm surprized this even works, its kind of confusing, i'd rather do
something like: 

$foo = new Foo();
$this-Foos[] = $foo;
return $foo;

  26
  27 $Bar = new Bar();
  28 $Foo = $Bar-AddFoo();

And then let php know you want this as a reference:

$Foo = Bar-AddFoo();


Curt
-- 
My PHP key is worn out

  PHP List stats since 1997: 
  http://zirzow.dyndns.org/html/mlists/

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



Re: [PHP] enable FTP support

2003-10-09 Thread Ray Hunter
Can you send what lines you have before the make[1] there should be some
additional error information?

--
BigDog

On Thu, 2003-10-09 at 09:03, Jay Blanchard wrote:
 I am trying to enable FTP support on one of our test servers running PHP
 4.2.2 
 
 1. rm config.cache
 2. ./configure --enable-ftp --prefix=/usr --with-apxs=/usr/sbin/apxs
 --with-gd=/usr/local/ --with-jpeg-dir=/usr/local/
 --with-zlib=/usr/local/ --with-png-dir=/usr/local/
 3. make clean
 4. make
 5. make install
 
 All goes well until the last section and the following is returned...
 
 Making install in .
 make[1]: Entering directory `/usr/local/php-4.2.1'
 make[1]: *** [install-sapi] Error 1
 make[1]: Leaving directory `/usr/local/php-4.2.1'
 make: *** [install-recursive] Error 1
 
 I have RTFM, STFW, STFA and have not been able to pinpoint a solution to
 this problem. Can anyone shed some light on this?
 
 Thanks!

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



RE: [PHP] enable FTP support

2003-10-09 Thread Jay Blanchard
[snip]
Can you send what lines you have before the make[1] there should be some
additional error information?
[/snip]

There are no other errors mentioned until this point. The section
immediately preceeding this is

Making install in regex
make[1]: Entering directory `/usr/local/php-4.2.1/regex'
make[2]: Entering directory `/usr/local/php-4.2.1/regex'
make[2]: Nothing to be done for `install-p'.
make[2]: Leaving directory `/usr/local/php-4.2.1/regex'
make[1]: Leaving directory `/usr/local/php-4.2.1/regex'

followed by

Making install in .
make[1]: Entering directory `/usr/local/php-4.2.1'
make[1]: *** [install-sapi] Error 1
make[1]: Leaving directory `/usr/local/php-4.2.1'
make: *** [install-recursive] Error 1
 

Thanks!

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



[PHP] Alter the Loop Timeout limit???

2003-10-09 Thread Scott Fletcher
Argh

I can't find the PHP function at www.php.net where I can alter the loop
timeout in seconds for the loop that exceed 30 seconds...  Yes, I know there
is a setting in the php.ini for that but that affect every webpages.  I only
need the php function only for just one webpage, that is a 'Billing'
webpage.  It is not surprising that it take longer when there is more
customers...

Thanks,
 Scott F.

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



RE: [PHP] Alter the Loop Timeout limit???

2003-10-09 Thread Jay Blanchard
[snip]
Argh
[/snip]

set_time_limit(n);

Where n is an integer in seconds

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



[PHP] Another file retrieval tact ...

2003-10-09 Thread Jay Blanchard
Alrighty then, if I cannot get FTP going on the one server then perhaps
there is another way to skin the cat that my flu infested mind cannot
remember at the moment.

I have a server on the network where some files live in some folders
that I can retrieve to another server on the network if I can connect to
the other server and do directory type operations on. I cannot get the
FTP thingie enabled because of compile errors. Would someone please so
kind as to nudge this fool in the proper direction.

Much thanks!

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



[PHP] problem transferring a variable using POST

2003-10-09 Thread Davy Campano
I am having a problem with a form.  I am trying to have a form pass a
variable so that I can update an item.  I think the problem is that the
variable (ticketed) is being read as text instead of a number.  These
are the tests I have run.  
 
This statement works:
$sql = 'UPDATE wo SET status = 1 WHERE ticket = 1'
 
This statement does not:
$sql = 'UPDATE wo SET status = 1 WHERE ticket =
$HTTP_POST_VARS[ticketed]'
 
Any suggestions...
 
If I do echo $HTTP_POST_VARS[ticketed]; 
It returns a 1


RE: [PHP] problem transferring a variable using POST

2003-10-09 Thread Jay Blanchard
[snip]
I am having a problem with a form.  I am trying to have a form pass a
variable so that I can update an item.  I think the problem is that the
variable (ticketed) is being read as text instead of a number.  These
are the tests I have run.  
 
This statement works:
$sql = 'UPDATE wo SET status = 1 WHERE ticket = 1'
 
This statement does not:
$sql = 'UPDATE wo SET status = 1 WHERE ticket =
$HTTP_POST_VARS[ticketed]'
 
Any suggestions...
 
If I do echo $HTTP_POST_VARS[ticketed]; 
It returns a 1
[/snip]

There is your cluedouble quotes in your last example, but single
quotes in your query. To be verbose...

$sql = UPDATE wo SET status = 1 WHERE ticket = ' .
$HTTP_POST_VARS['ticketed'] . ' ;

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



RE: [PHP] problem transferring a variable using POST

2003-10-09 Thread Bertrand Moulard
you might try to do some processing on the value
get the HTTP_POST_VARS[...], put it in a variable and see its type
(gettype()). Might give you some hints.

-Original Message-
From: Davy Campano [mailto:[EMAIL PROTECTED]
Sent: 09 October 2003 16:57
To: [EMAIL PROTECTED]
Subject: [PHP] problem transferring a variable using POST


I am having a problem with a form.  I am trying to have a form pass a
variable so that I can update an item.  I think the problem is that the
variable (ticketed) is being read as text instead of a number.  These
are the tests I have run.

This statement works:
$sql = 'UPDATE wo SET status = 1 WHERE ticket = 1'

This statement does not:
$sql = 'UPDATE wo SET status = 1 WHERE ticket =
$HTTP_POST_VARS[ticketed]'

Any suggestions...

If I do echo $HTTP_POST_VARS[ticketed];
It returns a 1

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



Re: [PHP] problem transferring a variable using POST

2003-10-09 Thread Tom Rogers
Hi,

Friday, October 10, 2003, 1:56:43 AM, you wrote:
DC I am having a problem with a form.  I am trying to have a form pass a
DC variable so that I can update an item.  I think the problem is that the
DC variable (ticketed) is being read as text instead of a number.  These
DC are the tests I have run.  
 
DC This statement works:
DC $sql = 'UPDATE wo SET status = 1 WHERE ticket = 1'
 
DC This statement does not:
DC $sql = 'UPDATE wo SET status = 1 WHERE ticket =
DC $HTTP_POST_VARS[ticketed]'
 
DC Any suggestions...
 
DC If I do echo $HTTP_POST_VARS[ticketed]; 
DC It returns a 1

if you put variables in the string you need to use double quotes to get PHP to
do the substitution or get out of the string and use the dot operator.

$sql = UPDATE wo SET status = 1 WHERE ticket = $HTTP_POST_VARS[ticketed];
$sql = 'UPDATE wo SET status = 1 WHERE ticket = '.$HTTP_POST_VARS[ticketed];

The other good habit is to put the value in single quotes:

$sql = UPDATE wo SET status = 1 WHERE ticket = '$HTTP_POST_VARS[ticketed]';
$sql = UPDATE wo SET status = 1 WHERE ticket = '.$HTTP_POST_VARS[ticketed].';

-- 
regards,
Tom

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



RE: [PHP] problem transferring a variable using POST

2003-10-09 Thread Chris W. Parker
Davy Campano mailto:[EMAIL PROTECTED]
on Thursday, October 09, 2003 8:57 AM said:

 This statement works:
 $sql = 'UPDATE wo SET status = 1 WHERE ticket = 1'
 
 This statement does not:
 $sql = 'UPDATE wo SET status = 1 WHERE ticket =
 $HTTP_POST_VARS[ticketed]'
 
 Any suggestions...
 
 If I do echo $HTTP_POST_VARS[ticketed];
 It returns a 1

First of all you should be using $_POST and not $HTTP_POST_VARS (that is
of course if your version of php supports it).

Secondly, it's not working because (1) you are wrapping the sql
statement in single quotes which does not evaluate variables, it's a
string literal. You should change all those ' to , and (2) arrays are
treated differently than regular variables inside a string. They MUST be
wrapped with { } to be evaluated.

Third, it's a bad practice to not properly quote your array references.
In other words, the word ticketed should have single quotes around it.

Applying all these things your line should look like this:

$sql = UPDATE wo SET status = 1 WHERE ticket = {$_POST['ticketed']};


hth.
chris.

p.s. it's a Very Bad Idea(tm) to grab data directly from $_GET or $_POST
and put it to work before doing any validation on it.

p.p.s. I'm not positive about this but I'd be willing to bet that every
value gathered from $_GET or $_POST is considered a string and not
numeric. Think about it, how would $_POST know that ticketed is meant
to be an integer or a string?


-- 
Don't like reformatting your Outlook replies? Now there's relief!
http://home.in.tum.de/~jain/software/outlook-quotefix/

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



[PHP] *SOLVED* [PHP] problem transferring a variable using POST

2003-10-09 Thread Davy Campano
It worked.  Thank you very much everyone for the quick responses.  I am
just learning PHP and mySQL so I appreciate the suggestions.  I only
wish that I would have written this email an hour ago!

-Original Message-
From: Chris W. Parker [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 09, 2003 12:08 PM
To: Davy Campano; [EMAIL PROTECTED]
Subject: RE: [PHP] problem transferring a variable using POST

Davy Campano mailto:[EMAIL PROTECTED]
on Thursday, October 09, 2003 8:57 AM said:

 This statement works:
 $sql = 'UPDATE wo SET status = 1 WHERE ticket = 1'
 
 This statement does not:
 $sql = 'UPDATE wo SET status = 1 WHERE ticket =
 $HTTP_POST_VARS[ticketed]'
 
 Any suggestions...
 
 If I do echo $HTTP_POST_VARS[ticketed];
 It returns a 1

First of all you should be using $_POST and not $HTTP_POST_VARS (that is
of course if your version of php supports it).

Secondly, it's not working because (1) you are wrapping the sql
statement in single quotes which does not evaluate variables, it's a
string literal. You should change all those ' to , and (2) arrays are
treated differently than regular variables inside a string. They MUST be
wrapped with { } to be evaluated.

Third, it's a bad practice to not properly quote your array references.
In other words, the word ticketed should have single quotes around it.

Applying all these things your line should look like this:

$sql = UPDATE wo SET status = 1 WHERE ticket = {$_POST['ticketed']};


hth.
chris.

p.s. it's a Very Bad Idea(tm) to grab data directly from $_GET or $_POST
and put it to work before doing any validation on it.

p.p.s. I'm not positive about this but I'd be willing to bet that every
value gathered from $_GET or $_POST is considered a string and not
numeric. Think about it, how would $_POST know that ticketed is meant
to be an integer or a string?


-- 
Don't like reformatting your Outlook replies? Now there's relief!
http://home.in.tum.de/~jain/software/outlook-quotefix/

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



Re: [PHP] Another file retrieval tact ...

2003-10-09 Thread Marek Kilimajer
Jay Blanchard wrote:
Alrighty then, if I cannot get FTP going on the one server then perhaps
there is another way to skin the cat that my flu infested mind cannot
remember at the moment.
I have a server on the network where some files live in some folders
that I can retrieve to another server on the network if I can connect to
the other server and do directory type operations on. I cannot get the
FTP thingie enabled because of compile errors. Would someone please so
kind as to nudge this fool in the proper direction.
Much thanks!

www.php.net/fsockopen

You're wellcome.

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


[PHP] Re: Installing PHP on XP

2003-10-09 Thread Shadow
Go here
http://www.digitalamit.com/?DA=89ce4fe3aff0c02a99a796c3ba994482
Shadow

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



RE: [PHP] problem transferring a variable using POST

2003-10-09 Thread Bertrand Moulard
Applying all these things your line should look like this:

$sql = UPDATE wo SET status = 1 WHERE ticket = {$_POST['ticketed']};

$_POST['ticketed'] : this is not an array but value isn't it ?

.b

-Original Message-
From: Chris W. Parker [mailto:[EMAIL PROTECTED]
Sent: 09 October 2003 17:08
To: Davy Campano; [EMAIL PROTECTED]
Subject: RE: [PHP] problem transferring a variable using POST


Davy Campano mailto:[EMAIL PROTECTED]
on Thursday, October 09, 2003 8:57 AM said:

 This statement works:
 $sql = 'UPDATE wo SET status = 1 WHERE ticket = 1'
 
 This statement does not:
 $sql = 'UPDATE wo SET status = 1 WHERE ticket =
 $HTTP_POST_VARS[ticketed]'
 
 Any suggestions...
 
 If I do echo $HTTP_POST_VARS[ticketed];
 It returns a 1

First of all you should be using $_POST and not $HTTP_POST_VARS (that is
of course if your version of php supports it).

Secondly, it's not working because (1) you are wrapping the sql
statement in single quotes which does not evaluate variables, it's a
string literal. You should change all those ' to , and (2) arrays are
treated differently than regular variables inside a string. They MUST be
wrapped with { } to be evaluated.

Third, it's a bad practice to not properly quote your array references.
In other words, the word ticketed should have single quotes around it.

Applying all these things your line should look like this:

$sql = UPDATE wo SET status = 1 WHERE ticket = {$_POST['ticketed']};


hth.
chris.

p.s. it's a Very Bad Idea(tm) to grab data directly from $_GET or $_POST
and put it to work before doing any validation on it.

p.p.s. I'm not positive about this but I'd be willing to bet that every
value gathered from $_GET or $_POST is considered a string and not
numeric. Think about it, how would $_POST know that ticketed is meant
to be an integer or a string?


-- 
Don't like reformatting your Outlook replies? Now there's relief!
http://home.in.tum.de/~jain/software/outlook-quotefix/

-- 
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] configuration class - skeleton code for first OOP adventure

2003-10-09 Thread anders thoresson
This will not work. For example if you have:

option1 = value;
option2 = value2;
then ereg_replace('value', 'changed', $contents); will make it:

option1 = changed;
option2 = changed2;
 My plan is to have option1 = value; as old value and option1 = 
changed; as new value. Not only the change value.

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


RE: [PHP] problem transferring a variable using POST

2003-10-09 Thread Chris W. Parker
Bertrand Moulard mailto:[EMAIL PROTECTED]
on Thursday, October 09, 2003 9:20 AM said:

 $_POST['ticketed'] : this is not an array but value isn't it ?

Try print_r($_POST); and see what you get.


c.

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



Re: [PHP] configuration class - skeleton code for first OOP adventure

2003-10-09 Thread anders thoresson
Save yourself a lot of headache learn how to use PEAR and OOP all in one 
fell swoop by using PEAR::Config
 I've already had a look at it, but it's to big for me to get. Though 
learning by doing would be a better way.

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


RE: [PHP] problem transferring a variable using POST

2003-10-09 Thread Bertrand Moulard
fair enough, $_POST is an array, but what about $_POST['ticketed'] ? Just
want to make sure about this {} thingie

.b

-Original Message-
From: Chris W. Parker [mailto:[EMAIL PROTECTED]
Sent: 09 October 2003 17:22
To: Bertrand Moulard; Davy Campano; [EMAIL PROTECTED]
Subject: RE: [PHP] problem transferring a variable using POST


Bertrand Moulard mailto:[EMAIL PROTECTED]
on Thursday, October 09, 2003 9:20 AM said:

 $_POST['ticketed'] : this is not an array but value isn't it ?

Try print_r($_POST); and see what you get.


c.

--
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] enable FTP support

2003-10-09 Thread Jason Wong
On Thursday 09 October 2003 23:13, Jay Blanchard wrote:

 Making install in .
 make[1]: Entering directory `/usr/local/php-4.2.1'
 make[1]: *** [install-sapi] Error 1
 make[1]: Leaving directory `/usr/local/php-4.2.1'
 make: *** [install-recursive] Error 1

stab in the dark
Do you have permissions to install stuff into /usr/local/bin (the default 
destination dir for php-cli)?
/stab in the dark

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
Never try to teach a pig to sing.  It wastes your time and annoys the pig.
-- Lazarus Long, Time Enough for Love
*/

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



RE: [PHP] problem transferring a variable using POST

2003-10-09 Thread Ford, Mike [LSS]
On 09 October 2003 16:57, Davy Campano wrote:

 I am having a problem with a form.  I am trying to have a form pass a
 variable so that I can update an item.  I think the problem
 is that the
 variable (ticketed) is being read as text instead of a number.  These
 are the tests I have run. 
 
 This statement works:
 $sql = 'UPDATE wo SET status = 1 WHERE ticket = 1'
 
 This statement does not:
 $sql = 'UPDATE wo SET status = 1 WHERE ticket =
 $HTTP_POST_VARS[ticketed]'
 
 Any suggestions...
 
 If I do echo $HTTP_POST_VARS[ticketed];
 It returns a 1

variables are not interpolated in single-quoted strings -- you need double quotes in 
your assignment statement, too:

   $sql = UPDATE wo SET status = 1 WHERE ticket = $HTTP_POST_VARS[ticketed];

or (my preference):

   $sql = UPDATE wo SET status = 1 WHERE ticket = {$HTTP_POST_VARS['ticketed']};

(And, of course, if your PHP is 4.2.0 or later, you should probably prefer to use 
$_POST rather than $HTTP_POST_VARS.)

Cheers!

Mike

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

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



RE: [PHP] problem transferring a variable using POST

2003-10-09 Thread Chris W. Parker
Bertrand Moulard mailto:[EMAIL PROTECTED]
on Thursday, October 09, 2003 9:24 AM said:

 fair enough, $_POST is an array, but what about $_POST['ticketed'] ?
 Just want to make sure about this {} thingie

?php

echo This is the password $_POST['password'];
echo This is THE password {$_POST['password']};

?

The output of this page is the following:


Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE,
expecting T_STRING or T_VARIABLE or T_NUM_STRING in
/home/cparker/public_html/oop/loginp.php on line 30

It's choking on the first echo statement.

Does that make sense now?



chris.

-- 
Don't like reformatting your Outlook replies? Now there's relief!
http://home.in.tum.de/~jain/software/outlook-quotefix/

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



RE: [PHP] enable FTP support

2003-10-09 Thread Jay Blanchard
[snip]
 Making install in .
 make[1]: Entering directory `/usr/local/php-4.2.1'
 make[1]: *** [install-sapi] Error 1
 make[1]: Leaving directory `/usr/local/php-4.2.1'
 make: *** [install-recursive] Error 1

stab in the dark
Do you have permissions to install stuff into /usr/local/bin (the
default 
destination dir for php-cli)?
/stab in the dark
[/snip]

I am root, the owner of the file is rootbut the group is
bincould that be the problem?

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



RE: [PHP] problem transferring a variable using POST

2003-10-09 Thread Bertrand Moulard
it does, thanks

-Original Message-
From: Chris W. Parker [mailto:[EMAIL PROTECTED]
Sent: 09 October 2003 17:28
To: Bertrand Moulard; Davy Campano; [EMAIL PROTECTED]
Subject: RE: [PHP] problem transferring a variable using POST


Bertrand Moulard mailto:[EMAIL PROTECTED]
on Thursday, October 09, 2003 9:24 AM said:

 fair enough, $_POST is an array, but what about $_POST['ticketed'] ?
 Just want to make sure about this {} thingie

?php

echo This is the password $_POST['password'];
echo This is THE password {$_POST['password']};

?

The output of this page is the following:


Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE,
expecting T_STRING or T_VARIABLE or T_NUM_STRING in
/home/cparker/public_html/oop/loginp.php on line 30

It's choking on the first echo statement.

Does that make sense now?



chris.

-- 
Don't like reformatting your Outlook replies? Now there's relief!
http://home.in.tum.de/~jain/software/outlook-quotefix/

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



Re: [PHP] Alter the Loop Timeout limit???

2003-10-09 Thread Scott Fletcher
Thanks!!!

Jay Blanchard [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
[snip]
Argh
[/snip]

set_time_limit(n);

Where n is an integer in seconds

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



RE: [PHP] Another file retrieval tact ...

2003-10-09 Thread Jay Blanchard
[snip]
 I have a server on the network where some files live in some folders
 that I can retrieve to another server on the network if I can connect
to
 the other server and do directory type operations on. I cannot get the
 FTP thingie enabled because of compile errors. Would someone please so
 kind as to nudge this fool in the proper direction.
 
 Much thanks!
 

www.php.net/fsockopen

You're wellcome.
[/snip]

brain dead no-sleep flu guy thanks you

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



RE: [PHP] enable FTP support

2003-10-09 Thread Jay Blanchard
[snip]
 Making install in .
 make[1]: Entering directory `/usr/local/php-4.2.1'
 make[1]: *** [install-sapi] Error 1
 make[1]: Leaving directory `/usr/local/php-4.2.1'
 make: *** [install-recursive] Error 1

stab in the dark
Do you have permissions to install stuff into /usr/local/bin (the
default 
destination dir for php-cli)?
/stab in the dark
[/snip]

Okie dokie, could this be it...I just noticed this but would not know
how to correct this. It say that make[1] is entering
/usr/local/php-4.2.1 which is where make is being run from. Is this
where the recursive error is coming from?

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



[PHP] Get the name of the form

2003-10-09 Thread bertrand moulard
Hello

does anyone know if the name of a form is stored somewhere in the predefined
variables ($_POST, $_REQUEST, whatever)

cheers

.b

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



RE: [PHP] Get the name of the form

2003-10-09 Thread Jay Blanchard
[snip]
does anyone know if the name of a form is stored somewhere in the
predefined
variables ($_POST, $_REQUEST, whatever)
[/snip]

So much testing, so little time. It would be in either the GET or POST
array I would imagine, dependent on the form method.

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



RE: [PHP] Get the name of the form

2003-10-09 Thread Bertrand Moulard
it is a POST, didn't find anything in the doc about that. I reckon php
doesn't handle that as the name is more a html id than part of the form, but
need to make sure before telling my work mates to come up with another
proposal ;-)

.b

-Original Message-
From: Jay Blanchard [mailto:[EMAIL PROTECTED]
Sent: 09 October 2003 18:02
To: bertrand moulard; [EMAIL PROTECTED]
Subject: RE: [PHP] Get the name of the form


[snip]
does anyone know if the name of a form is stored somewhere in the
predefined
variables ($_POST, $_REQUEST, whatever)
[/snip]

So much testing, so little time. It would be in either the GET or POST
array I would imagine, dependent on the form method.

--
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] Get the name of the form

2003-10-09 Thread Robert Cummings
On Thu, 2003-10-09 at 13:03, Bertrand Moulard wrote:
 it is a POST, didn't find anything in the doc about that. I reckon php
 doesn't handle that as the name is more a html id than part of the form, but
 need to make sure before telling my work mates to come up with another
 proposal ;-)

I don't think you can can get the form name unless you pass it along
yourself in a hidden field.

Cheers,
Rob.

 
 .b
 
 -Original Message-
 From: Jay Blanchard [mailto:[EMAIL PROTECTED]
 Sent: 09 October 2003 18:02
 To: bertrand moulard; [EMAIL PROTECTED]
 Subject: RE: [PHP] Get the name of the form
 
 
 [snip]
 does anyone know if the name of a form is stored somewhere in the
 predefined
 variables ($_POST, $_REQUEST, whatever)
 [/snip]
 
 So much testing, so little time. It would be in either the GET or POST
 array I would imagine, dependent on the form method.
 
 --
 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
 
 
-- 
..
| 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



Re: Re[2]: [PHP] dynamic - static

2003-10-09 Thread Jim Lucas
Ok, here's a question for you.

I went and did this to my current development site.

I have the following configuration.

Redhat 8.0
  Apache/2.0.40 (stock redhat install)
  PHP 4.2.2 (stock redhat install)

What I get when I try and run this is an Object Not Found.

Same as the ERROR 404 page not found.

The URL looks like this

/index.php/var1/val1/var2/val2

I try this on a different development server running Apache 1.3.28, and it
runs fine.

I couldn't even start to find the differences, since they are
completely different version.

Any ideas would be helpful.

Thanks

Jim Lucas

- Original Message - 
From: Mike Migurski [EMAIL PROTECTED]
To: Veniamin Goldin [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Wednesday, October 08, 2003 12:23 PM
Subject: Re[2]: [PHP] dynamic - static


 As I wrote already this issue is mainly because of search engines
 incompatibility with dynamic content sites (to be more exact - with urls
 containing get parameters, in my case ex. index.shtml?lang=enmenu_id=23)
 
 Which of your described solution would you suggest for my situation ?
 
 Turck MMCache already installed. Now I need to do something with my urls.
 There are also problem emulating search engine friendly urls using /
 instead of  because I use SSI, so I can not use post method in forms,
 while using GET it will be a bit difficult to handle all params
 correctly, or I'm wrong ?

 If all you need to do is change your URLs, the easiest method by far is to
 change them all to something like 'index.php/lang/en/menu_id/23' -- you'd
 need to add a parser function at the beginning, though.

 Try isolating the '/lang/en...' by comparing $_SERVER['SCRIPT_NAME']
 against $_SERVER['REQUEST_URI'] and then exploding the result and setting
 your request variables accordingly.

 I have never tried this with SSI, so I have no idea what sort of problems
 you may run into - you may be better off going with PHP includes all the
 way through. I have also recently read (on a different list)  that Google
 in fact does crawl URLs with GET parameters, but I have not verified this
 and tend to avoid it as a matter of superstition.

 -
 michal migurski- contact info and pgp key:
 sf/cahttp://mike.teczno.com/contact.html

 -- 
 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] Get the name of the form

2003-10-09 Thread Bertrand Moulard
Damn that's what I was thinking... thanks you

.b

-Original Message-
From: Robert Cummings [mailto:[EMAIL PROTECTED]
Sent: 09 October 2003 18:06
To: Bertrand Moulard
Cc: Jay Blanchard; PHP-General
Subject: RE: [PHP] Get the name of the form


On Thu, 2003-10-09 at 13:03, Bertrand Moulard wrote:
 it is a POST, didn't find anything in the doc about that. I reckon php
 doesn't handle that as the name is more a html id than part of the form,
but
 need to make sure before telling my work mates to come up with another
 proposal ;-)

I don't think you can can get the form name unless you pass it along
yourself in a hidden field.

Cheers,
Rob.


 .b

 -Original Message-
 From: Jay Blanchard [mailto:[EMAIL PROTECTED]
 Sent: 09 October 2003 18:02
 To: bertrand moulard; [EMAIL PROTECTED]
 Subject: RE: [PHP] Get the name of the form


 [snip]
 does anyone know if the name of a form is stored somewhere in the
 predefined
 variables ($_POST, $_REQUEST, whatever)
 [/snip]

 So much testing, so little time. It would be in either the GET or POST
 array I would imagine, dependent on the form method.

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


--
..
| 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] Get the name of the form

2003-10-09 Thread Marek Kilimajer
Bertrand Moulard wrote:
it is a POST, didn't find anything in the doc about that. I reckon php
doesn't handle that as the name is more a html id than part of the form, but
need to make sure before telling my work mates to come up with another
proposal ;-)
You are right, form name is not submited by browser. What value it would 
have anyway? But you can use
form name=updateForm action=script.php?formname=updateForm

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


RE: [PHP] enable FTP support

2003-10-09 Thread Jay Blanchard
[snip]
./configure --enable-ftp --prefix=/usr --with-apxs=/usr/sbin/apxs
--with-gd=/usr/local/ --with-jpeg-dir=/usr/local/
--with-zlib=/usr/local/ --with-png-dir=/usr/local/
[/snip]

Guess what? I changed the order of the congfigure statement (for giggles
as I was reminded of the changing of the order of the statements when
cinfiguring php to work with gd) from the one above to the one below...

./configure --prefix=/usr --with-apxs=/usr/sbin/apxs
--with-gd=/usr/local/ --with-jpeg-dir=/usr/local/
--with-zlib=/usr/local/ --with-png-dir=/usr/local/ --enable-ftp 

And it worked. Go figure.

Thanks for everyone's help!

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



Re: [PHP] Get the name of the form

2003-10-09 Thread Robert Cummings
On Thu, 2003-10-09 at 13:15, Marek Kilimajer wrote:
 Bertrand Moulard wrote:
  it is a POST, didn't find anything in the doc about that. I reckon php
  doesn't handle that as the name is more a html id than part of the form, but
  need to make sure before telling my work mates to come up with another
  proposal ;-)
  
 
 You are right, form name is not submited by browser. What value it would 
 have anyway? But you can use
 form name=updateForm action=script.php?formname=updateForm

The form name has a LOT of value when performing form validation in a
site that uses multiple forms for which values are validated and
remembered without binding the logic to the page itself. For instance,
InterJinn provides a powerful form interface for creating forms,
manipulating forms, and validating form input. For this to occur
properly the form name is paramount, otherwise it would have no idea
what data to give the user when they request a form field object, or
when they validate a form's data -- be it a single page form or a multi
page form with complex conditional logic.

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



RE: [PHP] enable FTP support

2003-10-09 Thread Jay Blanchard
[snip]
Guess what? I changed the order of the congfigure statement (for giggles
as I was reminded of the changing of the order of the statements when
cinfiguring php to work with gd) from the one above to the one below...

./configure --prefix=/usr --with-apxs=/usr/sbin/apxs
--with-gd=/usr/local/ --with-jpeg-dir=/usr/local/
--with-zlib=/usr/local/ --with-png-dir=/usr/local/ --enable-ftp 

And it worked. Go figure.
[/snip]

So close, but yet so far. The configure, make cycle went OK. When I
restarted Apache though the php was not configured any differently. Back
to the drawing board.

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



Re: [PHP] enable FTP support

2003-10-09 Thread Jason Wong
On Friday 10 October 2003 01:20, Jay Blanchard wrote:
 [snip]
 Guess what? I changed the order of the congfigure statement (for giggles
 as I was reminded of the changing of the order of the statements when
 cinfiguring php to work with gd) from the one above to the one below...

 ./configure --prefix=/usr --with-apxs=/usr/sbin/apxs
 --with-gd=/usr/local/ --with-jpeg-dir=/usr/local/
 --with-zlib=/usr/local/ --with-png-dir=/usr/local/ --enable-ftp

 And it worked. Go figure.
 [/snip]

 So close, but yet so far. The configure, make cycle went OK. When I
 restarted Apache though the php was not configured any differently. Back
 to the drawing board.

In cases like this you should untar a fresh copy of the source and configure 
again.

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
It's no longer a question of staying healthy.  It's a question of finding
a sickness you like.
-- Jackie Mason
*/

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



[PHP] session experation

2003-10-09 Thread Sam Folk-Williams
Hi,

I want to extend the length of a session based on the existance of a
variable beyond the closing of the browser. Basically, I've got a restricted
intranet where staff have to log-in and I want to add a remember me
option. If they check off the remember me box, then the session will be set
to expire in one year instead of as soon as the browser closes. Is there a
way to do this without altering the php.ini file? (I'm in a shared hosting
env and don't think I can alter that file).

Or, is there a better way to acheive this result?

Thanks,

Sam

-- 
Sam Folk-Williams
Service Team Leader/Webmaster
Rise, Inc -- Creative Partnerships South
(952) 884 8330 (V);  (952) 884 8371 (F)
www.rise.org

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



Re: Re[2]: [PHP] dynamic - static

2003-10-09 Thread Eugene Lee
On Thu, Oct 09, 2003 at 10:09:19AM -0700, Jim Lucas wrote:
: 
: I have the following configuration.
: 
: Redhat 8.0
:   Apache/2.0.40 (stock redhat install)
:   PHP 4.2.2 (stock redhat install)
: 
: What I get when I try and run this is an Object Not Found.
: 
: Same as the ERROR 404 page not found.
: 
: The URL looks like this
: 
: /index.php/var1/val1/var2/val2
: 
: I try this on a different development server running Apache 1.3.28,
: and it runs fine.
: 
: I couldn't even start to find the differences, since they are
: completely different version.

If I was Apache, I would try to serve the file:

/index.php/var1/val1/var2/val2/index.php
or
/index.php/var1/val1/var2/val2/index.html

or whatever files your DirectoryIndex is set to load.  In other words,
Apache thinks (and rightly so) that there is a directory val2 in the
directory var2 in the directory val1 in the directory var1 in the
directory index.php.

If your URL is working on a different development server, it's probably
configured via mod_rewrite to do so.

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



Re: [PHP] enable FTP support

2003-10-09 Thread Curt Zirzow
On Thu, 9 Oct 2003 12:20:46 -0500, Jay Blanchard 
[EMAIL PROTECTED] wrote:

[snip]
Guess what? I changed the order of the congfigure statement (for giggles
as I was reminded of the changing of the order of the statements when
cinfiguring php to work with gd) from the one above to the one below...
./configure --prefix=/usr --with-apxs=/usr/sbin/apxs
--with-gd=/usr/local/ --with-jpeg-dir=/usr/local/
--with-zlib=/usr/local/ --with-png-dir=/usr/local/ --enable-ftp
And it worked. Go figure.
[/snip]
So close, but yet so far. The configure, make cycle went OK. When I
restarted Apache though the php was not configured any differently. Back
to the drawing board.
If you have mulitple versions of apache (or upgraded) php might be putting 
the libphp4.so in the wrong place.

On my system I have 3 apache's (arrghh.) and I have to properly put 
libphp4.so
in the correct apache/libexec dir.

HTH,

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


[PHP] RE: Congratulations You Win

2003-10-09 Thread Rob A. Brahier
I much preferred that email asking for my help to transfer some dead african
warlord's funds.  At least then I could believe I was about to be screwed
over for a good cause. :)

-Rob

-Original Message-
From: Francis Weeny [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 08, 2003 10:30 PM
To: [EMAIL PROTECTED]
Subject: Congratulations You Win


SUNSWEETWIN PROMO LOTTERY,THE NETHERLANDS.
ALFONSTRAAT B56,
1002 BS AMSTERDAM, THE NETHERLANDS.
TO THE MANAGER
FROM: THE DESK OF THE PROMOTIONS MANAGER,
INTERNATIONAL PROMOTIONS/PRIZE AWARD DEPARTMENT,
REF: OYL /26510460037/02
BATCH: 24/00319/IPD
ATTENTION:
RE/ AWARD NOTIFICATION; FINAL NOTICE
We are pleased to inform you of the announcement
today,  7th October2003 of winners of the SUNSWEETWIN PROMO
LOTTERY,THE
NETHERLANDS/ INTERNATIONAL, PROGRAMS held on 28th August 2003

Your company,is attached to ticket number
023-0148-790-459, with serial number 5073-11 drew
the lucky numbers 43-11-44-37-10-43, and consequently
won the lottery in the 3rd category.
You have therefore been approved for a lump sum pay
out of US$5,500.000.00 in cash credited to file REF
NO. OYL/25041238013/02. This is from total prize money
of
US$80,400,000.00 shared among the seventeen
international winners in
this category. All participants were selected through
a computer
ballot
system drawn form 25,000 names from Australia, New
Zealand, America, Europe, North America and Asia as
part of
International Promotions Program, which is conducted
annually.
CONGRATULATIONS!
Your fund is now deposited with a Security company
insured in your name. Due to the mix up of
some numbers and names, we ask that you keep this
award strictly
from
public notice until your claim has
been processed and your money remitted to your
account.
This is part of our security protocol to avoid
double claiming or unscrupulous acts by participants
of
this program.
We hope with a part of you prize, you will
participate in our end of year high stakes US$1.3
billion
International Lottery.
To begin your claim, please contact your claim
agent; Mr Francis weeny at this email address below.
[EMAIL PROTECTED]
For due processing and remittance of your prize
money to a designated account of your choice.
Remember, all prize money must be claimed not later
than 17th October 2003. After this date, all funds will
be returned as unclaimed.
NOTE: In order to avoid unnecessary delays and
complications, please remember to quote your
reference and batch numbers in every one of your
orrespondences with your agent.
Furthermore, should there be any
change of your address, do inform your claims agent
as soon as possible.
Congratulations again from all our staff and thank
you for being part of our promotions program.

Sincerely,
Clark Wood
THE PROMOTIONS MANAGER, SUNSWEETWIN PROMO LOTTERY,THE
NETHERLANDS.
NB. Any breach of confidentiality on the part of
the winners will result to disqualification.
SORRY FOR THE LATE INFORMATION THANKS
CLARK  WOOD

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



RE: [PHP] enable FTP support

2003-10-09 Thread Jay Blanchard
[snip]
If you have mulitple versions of apache (or upgraded) php might be
putting 
the libphp4.so in the wrong place.

On my system I have 3 apache's (arrghh.) and I have to properly put 
libphp4.so
in the correct apache/libexec dir.
[/snip]

Its here; /usr/libexec/libphp4.so and addressed properly in httpd.conf

There is another apache installation here though, something I was not
aware of. Total of 2 apache's.

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



Re: Re[2]: [PHP] dynamic - static

2003-10-09 Thread Jim Lucas
I would think the same thing, but it works on all the servers that I have
tried it on.

But again, they are all running pre apache 2.0 stuff.

Anybody have any idea what config settings in Apache might make it try and
find a page with that entire path?

Jim Lucas

- Original Message - 
From: Eugene Lee [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, October 09, 2003 10:32 AM
Subject: Re: Re[2]: [PHP] dynamic - static


 On Thu, Oct 09, 2003 at 10:09:19AM -0700, Jim Lucas wrote:
 :
 : I have the following configuration.
 :
 : Redhat 8.0
 :   Apache/2.0.40 (stock redhat install)
 :   PHP 4.2.2 (stock redhat install)
 :
 : What I get when I try and run this is an Object Not Found.
 :
 : Same as the ERROR 404 page not found.
 :
 : The URL looks like this
 :
 : /index.php/var1/val1/var2/val2
 :
 : I try this on a different development server running Apache 1.3.28,
 : and it runs fine.
 :
 : I couldn't even start to find the differences, since they are
 : completely different version.

 If I was Apache, I would try to serve the file:

 /index.php/var1/val1/var2/val2/index.php
 or
 /index.php/var1/val1/var2/val2/index.html

 or whatever files your DirectoryIndex is set to load.  In other words,
 Apache thinks (and rightly so) that there is a directory val2 in the
 directory var2 in the directory val1 in the directory var1 in the
 directory index.php.

 If your URL is working on a different development server, it's probably
 configured via mod_rewrite to do so.

 -- 
 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] enable FTP support

2003-10-09 Thread Jay Blanchard
[snip]
...
[/snip]

Some other oddities. The phpinfo page says PHP 4.2.2, but the only
installation of php I can find on the server is 4.2.1

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



[PHP] Rgular Expression - 1st alternative

2003-10-09 Thread \[cz\]Emo
Hi all.

I've got one problem with %subj%. I need to get 1st appearance of any
alternative pattern, but my regexp get last.

in $out[2] (input) is columns FROM tables WHERE  conditions ORDER BY sth
DESC  LIMIT 1 OFFEST 0

preg_match(/[[:space:]]*(.*)[[:space:]]+from[[:space:]]+(.*)[[:space:]]+whe
re[[:space:]]+(.*)[[:space:]]+(order by|group by|having|limit)(.*)/is,
$out[2], $out);

This will produce:
Array
(
[0] = columns FROM tables WHERE  conditions ORDER BY sth DESC  LIMIT 1
OFFEST 0
[1] = columns
[2] = tables
[3] = conditions ORDER BY sth DESC
// but here I need only conditions
[4] = LIMIT
// and here shloud be ORDER BY sth DESC LIMIT
[5] =  1 OFFEST 0
)

I was searchnig web and forums long time, but didn't found working advice.
I tried to use '?' and other pieces of regexp pattern, but I can't write
functional regexp.

Thanx for any advices.

Emo

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



[PHP] Need Charting Utility

2003-10-09 Thread rick rice
Can anyone suggest a good charting utility for PHP running on a freeBSD box?
We need to put line/bar charts on our web pages.

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



Re: [PHP] Need Charting Utility

2003-10-09 Thread Nathan Taylor
Look into JpGraph, it rocks my world.

http://www.aditus.nu/jpgraph/ 

Nathan
  - Original Message - 
  From: rick rice 
  To: [EMAIL PROTECTED] 
  Sent: Thursday, October 09, 2003 2:30 PM
  Subject: [PHP] Need Charting Utility


  Can anyone suggest a good charting utility for PHP running on a freeBSD box?
  We need to put line/bar charts on our web pages.

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



Re: Re[2]: [PHP] dynamic - static

2003-10-09 Thread Mike Migurski
: I have the following configuration.
:
: Redhat 8.0
:   Apache/2.0.40 (stock redhat install)
:   PHP 4.2.2 (stock redhat install)
:
: What I get when I try and run this is an Object Not Found.

If I was Apache, I would try to serve the file:

   /index.php/var1/val1/var2/val2/index.php
or
   /index.php/var1/val1/var2/val2/index.html

Interesting - I must admit I have never used Apache 2.anything (my
understanding is that it's a pointles upgrade if you're on unix), so the
slash-syntax method has only been reliably tested by me on Apache 1.3.x,
where it works with no configuration modifications to the default.

I guess for 2.0, you could start using mod_rewrite or mod_alias to rewrite
the URLs in a non-problematic format. :\

-mike.

-
michal migurski- contact info and pgp key:
sf/cahttp://mike.teczno.com/contact.html

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



Re: Re[2]: [PHP] dynamic - static

2003-10-09 Thread Jim Lucas
Did a little more googling and found the answer.

In Apache 2.0, by default is does not allow this type of URL.

But I found a few article on it that explained that if I modified this

in httpd.conf modify, or add, this line.

  AcceptPathInfo On

Don't know what it does, but it fixes the problem.

Jim Lucas

- Original Message - 
From: Mike Migurski [EMAIL PROTECTED]
To: Eugene Lee [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Thursday, October 09, 2003 11:33 AM
Subject: Re: Re[2]: [PHP] dynamic - static


 : I have the following configuration.
 :
 : Redhat 8.0
 :   Apache/2.0.40 (stock redhat install)
 :   PHP 4.2.2 (stock redhat install)
 :
 : What I get when I try and run this is an Object Not Found.
 
 If I was Apache, I would try to serve the file:
 
  /index.php/var1/val1/var2/val2/index.php
 or
  /index.php/var1/val1/var2/val2/index.html

 Interesting - I must admit I have never used Apache 2.anything (my
 understanding is that it's a pointles upgrade if you're on unix), so the
 slash-syntax method has only been reliably tested by me on Apache 1.3.x,
 where it works with no configuration modifications to the default.

 I guess for 2.0, you could start using mod_rewrite or mod_alias to rewrite
 the URLs in a non-problematic format. :\

 -mike.

 -
 michal migurski- contact info and pgp key:
 sf/cahttp://mike.teczno.com/contact.html

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



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



[PHP] Re: Rgular Expression - 1st alternative

2003-10-09 Thread Curt Zirzow
On Thu, 9 Oct 2003 19:54:09 +0200, Emo [EMAIL PROTECTED] wrote:

Hi all.

I've got one problem with %subj%. I need to get 1st appearance of any
alternative pattern, but my regexp get last.
Remember .* is greedy by default you need to use .*?  also instead of using
[[:space:]] I might suggest using \s, it will make it shorter
in $out[2] (input) is columns FROM tables WHERE  conditions ORDER BY sth
DESC  LIMIT 1 OFFEST 0
preg_match(/[[:space:]]*(.*)[[:space:]]+from[[:space:]]+(.*) 
[[:space:]]+whe
re[[:space:]]+(.*)[[:space:]]+(order by|group by|having|limit)(.*)/is,
$out[2], $out);
/^\s*(.*?)\s+from\s+(.*?)\s+where\s+(.*?)\s+(order by|group 
by|having|limit)(.*)/is

This will produce:
Array
(
[0] = columns FROM tables WHERE  conditions ORDER BY sth DESC  LIMIT 1
OFFEST 0
[1] = columns
[2] = tables
[3] = conditions ORDER BY sth DESC
// but here I need only conditions
[4] = LIMIT
// and here shloud be ORDER BY sth DESC LIMIT
[5] =  1 OFFEST 0
)
I'm not entirely clear how you want to capture the order by|group by| etc..

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


Re: [PHP] Need Charting Utility

2003-10-09 Thread Evan Nemerson
JPGraph does pretty much anything you could ever want.


On Thursday 09 October 2003 11:30 am, rick rice wrote:
 Can anyone suggest a good charting utility for PHP running on a freeBSD
 box? We need to put line/bar charts on our web pages.

-- 
Evan Nemerson
[EMAIL PROTECTED]

--
First they came for the Communists, and I didn't speak up, because I wasn't a 
Communist. Then they came for the Jews, and I didn't speak up, because I 
wasn't a Jew. Then they came for the Catholics, and I didn't speak up, 
because I was a Protestant. Then they came for me, and by that time there was 
no one left to speak up for me.

-Martin Niemoller

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



Re: Re[2]: [PHP] dynamic - static

2003-10-09 Thread Mike Migurski
Did a little more googling and found the answer.

In Apache 2.0, by default is does not allow this type of URL.

But I found a few article on it that explained that if I modified this

in httpd.conf modify, or add, this line.

  AcceptPathInfo On

Don't know what it does, but it fixes the problem.

AcceptPathInfo:

This directive controls whether requests that contain trailing pathname
information that follows an actual filename (or non-existent file in an
existing directory) will be accepted or rejected.  The trailing pathname
information can be made available to scripts in the PATH_INFO environment
variable.

For example, assume the location /test/ points to a directory that
contains only the single file here.html.  Then requests for
/test/here.html/more and /test/nothere.html/more both collect /more as
PATH_INFO.

...from: http://httpd.apache.org/docs-2.0/mod/core.html#acceptpathinfo


-
michal migurski- contact info and pgp key:
sf/cahttp://mike.teczno.com/contact.html

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



RE: [PHP] enable FTP support - SOLVED

2003-10-09 Thread Jay Blanchard
[snip]
...several hours of brain dead operations...
[/snip]

just went with the whole upgrade scenario, latest version of php etc.

Thanks!

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



Re: Re[2]: [PHP] dynamic - static

2003-10-09 Thread Cristian Lavaque
Veniamin Goldin wrote:
 Hello Mike,

 Thank you for your help,

 As I wrote already this issue is mainly because of search engines
 incompatibility with dynamic content sites (to be more exact - with
 urls containing get parameters, in my case ex.
 index.shtml?lang=enmenu_id=23)

 Which of your described solution would you suggest for my situation ?

 Turck MMCache already installed. Now I need to do something with my
 urls. There are also problem emulating search engine friendly urls
 using / instead of  because I use SSI, so I can not use post
 method in
 forms, while using GET it will be a bit difficult to handle all params
 correctly, or I'm wrong ?

 Thanks again.

I'm working on a solution for this problem myself, having a php bbs that
wasn't being indexed. The first thing I did was change these '?', '=', ';'
and '' in the urls. That raised the number of indexed pages in google from
30 to 600. Then I made the urls in anchors, all relative. That raised the
indexed results to 2900. Now I'm making the urls shorter, which I believe
will raise the number many thousands.

So an anchor with a url like this
http://www.example.com/directory/script.php?variable1=value1;variable2=2;,
is rewritten to this script.php/variable1-value1_variable2-value2. You
have to parse that url at the beginning of your script so it can get the
variables and their values. Here's the code I wrote for this:

?php
#get vars from friendly ulr
$arr1 = explode('/', $PATH_INFO);
$arr2 = explode('_', $arr1['1']);
foreach($arr2 as $element) {
 list($key, $value) = explode('-', $element);
 $$key = $value;
}
?

And you have to include the base tag to the html head, so that the
relative urls work correctly, or they'll be wrong because of the extra
directories and confuse the location of the real script. In this example,
it'd be base href=http://www.example.com/directory/script.php; /. Of
course, you may have to change this a bit if there's several scripts working
in your webpage, in my bbs case, it's only one script to show every content
depending on the values in the query.

What I'm doing now, is remove as many variables as possible from the url to
make it shorter and making it look like a file. Following the example,
they'll look more or less like this:
http://www.example.com/directory/script.php/12314-123.php;, the first
number for variable1 and the second one to variable2. Of course, you'll have
to design your url depending on your particular case, this works for me.

Another think I plan to add later, is some mod_rewrite rules to make them
even shorter and normal. With this, the las url I showed as and example, can
be changed to this http://www.example.com/directory-12314-123.php; or
whatever you choose. Making that url relative in the anchors, would change
it to this /directory-12314-123.php or .htm if you prefer it. That's a
pretty static, normal looking url, for a dynamic page. And it's in the root,
so it'll have more relevance in the search results.

The way I change the urls is not in the scripts, I use output buffering and
preg_replace the urls with the new version. I found preg_replace_callback
very comfortable for this, cause I find a url in the buffer, send it to a
function to do the modifications and return the new modified url to the same
place the old one was. I wrote different functions for this: one to change
the symbols in the urls, another to make them relative, another to use a
shorter version of the url.

I'm still new to this, so I may have written something wrong, but most of
the above I've tested and works, so you should be able to figure it out. I
hope you find something useful in what I've written. If there is something
wrong in my approach, please let me know so I improve a little. Thanks :)

Good luck.

Cristian

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



[PHP] Testing string length within FTP

2003-10-09 Thread Jay Blanchard
for($i = 0; $i  $countList; $i++){
$strDirName = substr($arrList[$i], 47, 8);
if(strlen(chop($strDirName)) == 8){
echo $theDirectory.$strDirName.br;
}
}

I am trying to check for $strDirName length, but the echo returns all
file names within the directory regardless of length (was going to use
is_dir, but cannot on remote file system). I know that all remote
directory names are 8 characters in length, but returning this is not
working. I hope I am making sense. TIA!

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



RE: [PHP] Testing string length within FTP

2003-10-09 Thread Jay Blanchard
[snip]
for($i = 0; $i  $countList; $i++){
$strDirName = substr($arrList[$i], 47, 8);
if(strlen(chop($strDirName)) == 8){
echo $theDirectory.$strDirName.br;
}
}

[/snip]

Never mind. I am making them all 8 wide, just saw it. *slaps feverish
forhead*

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



Re: [PHP] session experation

2003-10-09 Thread Daniel Guerrier
The session will die on browser close.  What you are
asking for is how to use cookies.
You can set a cookie and use the information in that
to determine user functionality

http://us2.php.net/manual/en/function.setcookie.php

--- Sam Folk-Williams [EMAIL PROTECTED] wrote:
 Hi,
 
 I want to extend the length of a session based on
 the existance of a
 variable beyond the closing of the browser.
 Basically, I've got a restricted
 intranet where staff have to log-in and I want to
 add a remember me
 option. If they check off the remember me box, then
 the session will be set
 to expire in one year instead of as soon as the
 browser closes. Is there a
 way to do this without altering the php.ini file?
 (I'm in a shared hosting
 env and don't think I can alter that file).
 
 Or, is there a better way to acheive this result?
 
 Thanks,
 
 Sam
 
 -- 
 Sam Folk-Williams
 Service Team Leader/Webmaster
 Rise, Inc -- Creative Partnerships South
 (952) 884 8330 (V);  (952) 884 8371 (F)
 www.rise.org
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


__
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com

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



[PHP] variables passed through URL

2003-10-09 Thread Frank Tudor
If I have have set a url to be displayed like this:

www.mysite.com/some_page.php?value=this
and wanted to tag on another value what would I seperate the
dtwo with/

Also since it is now displayed in the url and I need the value
in some area on my form.

How would I populate the value in a form tag?

input type=text value=?echo (what goes here);?
name=something

Thanks,


__
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com

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



RE: [PHP] Returning a reference [pretty much SOLVED]

2003-10-09 Thread esctoday.com | Wouter van Vliet
Thanks Curt.

This solution works indeed. BUT, there's one but. Isn't there a way to not
have to tell PHP that I want the return of $this-AddFoo() as a reference?
In the actual code I want to worry as little as possible about specific
things like this. Isn't it a little strange that you have to both let php
know it's returning a reference as well as let it know that it's expecting a
reference as return value?

Wouter

-Original Message-
From: Curt Zirzow [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 09, 2003 5:13 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Returning a reference

* Thus wrote Wouter van Vliet ([EMAIL PROTECTED]):
 Hi Folks,
  
 I've been using the passing arguments by reference thingie for a while
 now. But what I want to do know is something I'm used to using in perl,
 returning a reference. 
  
 Situation is as follows.
 
  19
  20 function AddFoo() {

Need to let php know this is returning a reference:

function AddFoo() {


  21 $Ref = $this-Foos[];
  22 $Ref = new Foo();
  23 return $Ref;

I'm surprized this even works, its kind of confusing, i'd rather do
something like: 

$foo = new Foo();
$this-Foos[] = $foo;
return $foo;

  26
  27 $Bar = new Bar();
  28 $Foo = $Bar-AddFoo();

And then let php know you want this as a reference:

$Foo = $Bar-AddFoo(); -- don't forghet the $ sign


Curt
-- 
My PHP key is worn out

  PHP List stats since 1997: 
  http://zirzow.dyndns.org/html/mlists/

-- 
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: Re[2]: [PHP] dynamic - static

2003-10-09 Thread Jim Lucas
Thanks for the info.

Jim Lucas

- Original Message - 
From: Mike Migurski [EMAIL PROTECTED]
To: Eugene Lee [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Thursday, October 09, 2003 11:33 AM
Subject: Re: Re[2]: [PHP] dynamic - static


 : I have the following configuration.
 :
 : Redhat 8.0
 :   Apache/2.0.40 (stock redhat install)
 :   PHP 4.2.2 (stock redhat install)
 :
 : What I get when I try and run this is an Object Not Found.
 
 If I was Apache, I would try to serve the file:
 
  /index.php/var1/val1/var2/val2/index.php
 or
  /index.php/var1/val1/var2/val2/index.html

 Interesting - I must admit I have never used Apache 2.anything (my
 understanding is that it's a pointles upgrade if you're on unix), so the
 slash-syntax method has only been reliably tested by me on Apache 1.3.x,
 where it works with no configuration modifications to the default.

 I guess for 2.0, you could start using mod_rewrite or mod_alias to rewrite
 the URLs in a non-problematic format. :\

 -mike.

 -
 michal migurski- contact info and pgp key:
 sf/cahttp://mike.teczno.com/contact.html

 -- 
 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] variables passed through URL

2003-10-09 Thread Chris W. Parker
Frank Tudor mailto:[EMAIL PROTECTED]
on Thursday, October 09, 2003 1:48 PM said:

 How would I populate the value in a form tag?
 
 input type=text value=?echo (what goes here);?
 name=something

You need to go here
http://us4.php.net/manual/en/language.variables.external.php and read
up.


hth,
chris.

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



Re: [PHP] Credit Card Validation

2003-10-09 Thread Burhan Khalid
Nathan Taylor wrote:

My question is pretty obvious, I was wondering what the process for
validating a credit cards with both preprocessing by the form to
determine the pattern validity and post processing by a bank to 
 confirm the actual card validity.

Well since you asked about the /process/ ... and everyone else replied 
with hey, here is some code that does it for you... I'll be different 
and explain the process.

The process starts off with the consumer hitting submit on a secure form 
with a credit card number.

It would be best if you did some common validating yourself (for 
example, all Visa numbers start with 4, etc.), and such things as the 
expiry date isn't before the due date (don't think that hasn't happened 
before).

Once you have taken care of these cursory requirements, you then send 
the credit card information off to your payment gateway. This would be 
someone like Paypal, Authorize.net, Paysystems, Worldpay, etc. The API 
for each gateway is different, but generally it consists of you 
submitting a POST request to a https:// address.  In this POST request, 
you include the credit card number, the billing address, amount of 
purchase, the details of your account with the payment processor, and 
depending on transaction, a few different types of transaction codes 
(authorize, charge, credit, recurring, etc.).

The payment gateway then takes the transaction details and verifies the 
authenticity of the information.  It will then return the status of the 
transaction to you. Generally this is done via some callback URL that 
you specify in your account with the payment gateway. Some gateways 
(like Paypal) ... will take the consumer to their webpage and display 
the status of the transaction.

Authorize.net for example has a whole host of return codes that it can 
return. Everything from address doesn't match ... to stolen card, 
etc.  Your application will have to read these codes and deal with them 
appropriately.

Assuming the transaction was authorized, the funds are transferred from 
the card issuer's account to either your account with the gateway (as is 
the case with Paypal), or directly to your account ... minus the 
transcation fees.  Some gateways allow you to subscribe to a flat rate 
per period, in which you can have unlimited transactions, others charge 
a percentage of each transaction.

That's a rediculously simplified version of the transcation process :)

You can download the APIs for the gateways and see what kind of requests 
and responses your application can expect.  Authorize.net's is quite 
comprehensive (I have it printed out -- gotta love Kinkos).

--
Burhan Khalid
phplist[at]meidomus[dot]com
http://www.meidomus.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Apache not auto running index.php

2003-10-09 Thread David Erickson
Question for those with Apache 2 and PHP.. I installed a forum to my server
but when I try to hit  http://localhost/phpBB2/admin/ or
http://localhost/phpBB2/ instead of running the index.php in those folders
it returns a folder listing.. how can I tell apache to execute the index.php
in directories instead of giving a listing?
Thanks!
-David

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



Re: [PHP] Apache not auto running index.php

2003-10-09 Thread David Erickson
Scratch that I figured it out.  DirectoryIndex index.html index.php
index.html.var

-David

- Original Message - 
From: David Erickson [EMAIL PROTECTED]
To: PHP General Mailing List [EMAIL PROTECTED]
Sent: Thursday, October 09, 2003 4:00 PM
Subject: [PHP] Apache not auto running index.php


 Question for those with Apache 2 and PHP.. I installed a forum to my
server
 but when I try to hit  http://localhost/phpBB2/admin/ or
 http://localhost/phpBB2/ instead of running the index.php in those folders
 it returns a folder listing.. how can I tell apache to execute the
index.php
 in directories instead of giving a listing?
 Thanks!
 -David

 -- 
 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] Returning a reference [pretty much SOLVED]

2003-10-09 Thread Curt Zirzow
On Thu, 9 Oct 2003 22:50:10 +0200, Esctoday.Com | Wouter Van Vliet 
[EMAIL PROTECTED] wrote:

Thanks Curt.

This solution works indeed. BUT, there's one but. Isn't there a way to 
not
have to tell PHP that I want the return of $this-AddFoo() as a 
reference?
In the actual code I want to worry as little as possible about specific
things like this. Isn't it a little strange that you have to both let php
know it's returning a reference as well as let it know that it's 
expecting a
reference as return value?

well you do need to worry about it somewhere, and i would think that the 
function
declaration:
  function AddFoo()

Would take care of this, but I think there is some strange things going on 
with the
class. IIRC, issuing a

 $foo = $bar-AddFoo();

Doesn't return a reference.

Hopefully someone here can mabey give some more insite as to why there has 
to be both the declaration and the call references.

  function AddFoo()
 -and-
  $foo = $bar-AddFoo();
Curt.

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


Re: [PHP] Installing PHP on XP

2003-10-09 Thread Burhan Khalid
Rinal Patel wrote:

Hello
 I am trying to install PHP on my personal computer, which runs 
Microsoft XP, but have had trouble installing it.  I have an apache 
server(it came with the oracle database I installed).
Could you please help me?  I would appreciate a quick response
Rinal :

 This is my contribution to the php apache on windows xp tutorial pot
 http://www.meidomus.com/node/view/3
Best of luck :)

--
Burhan Khalid
phplist[at]meidomus[dot]com
http://www.meidomus.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Recomended Shopping Carts

2003-10-09 Thread Adrian Esteban Madrid
I need to setup a shopping cart (SP) for a client and time/budget calls 
for a premade SP. I've checked hotscripts.com and google and it seems to 
me that there are as many SP in PHP as CMS or Frameworks in PHP, in 
other words, too many to review. I've heard complaints about osCommerce 
as being nice but too hard to modify to your needs. Are there any 
recomendations on SP that you actually use in medium to large projects 
and you were happily surprised?

Thanks in advance,

--
-
Adrian Esteban Madrid
HyperXMedia, Developer

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


RE: [PHP] session experation

2003-10-09 Thread Vail, Warren
Sam,

There is a way to keep a session active beyond the death of the browser, but the odds 
are that this will not do exactly what you want either, since killing the session on 
browser close is the customary setting.

In my case I expected closing the browser to kill the session (or more correctly cause 
the browser to drop the cookie for the session ID).  php.ini parameter 
session.cookie_lifetime was set to a value other than zero, and my sessions remained 
active even after the browser was closed (probably had other things going on as well), 
so that opening a new browser picked up the same session key (not too cool for my app) 
;-).

I'm not sure you want to deal with other aspects of this, like manually opening a new 
browser and using the session key (same cookie) of a browser already open?  Just be 
careful.

Warren Vail

-Original Message-
From: Daniel Guerrier [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 09, 2003 1:23 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] session experation


The session will die on browser close.  What you are
asking for is how to use cookies.
You can set a cookie and use the information in that
to determine user functionality

http://us2.php.net/manual/en/function.setcookie.php

--- Sam Folk-Williams [EMAIL PROTECTED] wrote:
 Hi,
 
 I want to extend the length of a session based on
 the existance of a
 variable beyond the closing of the browser.
 Basically, I've got a restricted
 intranet where staff have to log-in and I want to
 add a remember me
 option. If they check off the remember me box, then
 the session will be set
 to expire in one year instead of as soon as the
 browser closes. Is there a
 way to do this without altering the php.ini file?
 (I'm in a shared hosting
 env and don't think I can alter that file).
 
 Or, is there a better way to acheive this result?
 
 Thanks,
 
 Sam
 
 -- 
 Sam Folk-Williams
 Service Team Leader/Webmaster
 Rise, Inc -- Creative Partnerships South
 (952) 884 8330 (V);  (952) 884 8371 (F)
 www.rise.org
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


__
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.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] Recomended Shopping Carts

2003-10-09 Thread Richard Baskett
on 10/9/03 15:27, Adrian Esteban Madrid at [EMAIL PROTECTED] wrote:

 I need to setup a shopping cart (SP) for a client and time/budget calls
 for a premade SP. I've checked hotscripts.com and google and it seems to
 me that there are as many SP in PHP as CMS or Frameworks in PHP, in
 other words, too many to review. I've heard complaints about osCommerce
 as being nice but too hard to modify to your needs. Are there any
 recomendations on SP that you actually use in medium to large projects
 and you were happily surprised?
 
 Thanks in advance,

I really like eShox, check it out at http://www.eshox.com, it's based on
osCommerce, but it's quite a lot better.. actually a whole lot better!  It's
$299 and the support you get for it is amazing also.. Every person that I
know of that has used their support has been more than pleased.. almost
embarrassingly pleased :)

Cheers!

Rick

If a man is called to be a streetsweeper, he should sweep streets even as
Michelangelo painted, or Beethoven composed music, or Shakespeare composed
poetry. He should sweep streets so well that all the hosts of heaven and
earth will pause to say, Here lived a great streetsweeper who did his job
well. - Dr. Martin Luther King, Jr. 

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



[PHP] Free web space

2003-10-09 Thread phpziobudda
Hi, I'm searching for a free web space that supports php/mysql.
Someone knows something about?
Thanks too much


Re: [PHP] Free web space

2003-10-09 Thread John Nichel
[EMAIL PROTECTED] wrote:
Hi, I'm searching for a free web space that supports php/mysql.
Someone knows something about?
Thanks too much
Oh, look, right there on the php web site

http://us3.php.net/links.php

Down at the bottom.

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


[PHP] Creating a Search field

2003-10-09 Thread richard cook
Sorry all I know this isnt really a 100% PHP matter but someone may be in
the know here.

Ive been trying for ages without success to create a search field for my
mysql database using php.

I need to create a feature that allows users to enter certain words that can
be searched ie

search = 'red lion'

this would return all data found with the words red and lion.


Any ideas?


Thanks

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



[PHP] Need secure login

2003-10-09 Thread Manisha Sathe
Hi,

I have a client. He does not want member login by just giving password and
login id. He says anybody can give this info to his friend and his friend
can access the site.

One way is to make use of cookie on his computer. So only from one computer
he can access the site. But the thing is that user needs to accept it, and i
believe I need to provide some method too in case they delete the cookie.

Is there any other solution for this ?  Is there any third party software
for this ?

Regards
Manisha

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



[PHP] Video Streaming

2003-10-09 Thread Manisha Sathe
Client's site will be on PHP/Linux. They want to add Videos on site. But
they say they want to make use of Video Straming. I am very new to this
part. I searched web, I found some third party softwares (one of this is
videolan which is open source). But not sure how to integrate this with PHP.

Is there any special newgroup for this ?

Regards
Manisha

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



Re: [PHP] Creating a Search field

2003-10-09 Thread Larry E . Ullman
I need to create a feature that allows users to enter certain words 
that can
be searched ie
search = 'red lion'
this would return all data found with the words red and lion.
If you're using MySQL 4.0, you can take advantage of its FULL TEXT 
searching (it's actually available in earlier versions but much better 
in MySQL 4). See the MySQL manual for more information.

Otherwise, you'll need to parse the search box data to break it up into 
individual words, then create a query like...

WHERE column LIKE '%$var1%' AND column LIKE '%var2%%'...

This will be slow, so make sure your database uses indexes.

Again, see the MySQL manual for more.

Larry

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


Re: [PHP] Need secure login

2003-10-09 Thread Justin French
This first rule is never trust the client-side.
The second rule is never trust the client-side.
This means that relying on...
a) the user accepting the cookie
b) the user always using the same computer
c) the user not deleting the cookie
... is a BAD idea.
Frankly, if you force me to use a single computer to access your site, 
I'll just leave and never return.  I have 3 desktops and a laptop, all 
of which I use at different times.  Telling me I can only use one of 
them to access your site is like telling me I have to be wearing green 
socks whilst visiting your site.  It should be about MY preference, not 
yours.

Likewise, you can't tie a member to a mac address, or to an IP address.

I don't really have a solution to your problem, and anything you DO 
implement will be a pain in the arse to users (otherwise Amazon et al 
would have already implemented it), but here's some thought starters\ 
-- all of which are deterrents NOT solutions.

1.  Make sure that a user can't login from two different places at 
once, if the user does, generate an email report of the problem, so 
that you can keep an eye on users who might be abusing the system.

2.  Randomly ask the user an additional question on login (DOB, pet's 
name, shoe size, postcode, etc) and compare it to Q's asked earlier.

3.  Tell them repeatedly that sharing a userid/pass is against your 
acceptable terms, and that any members caught doing so will have their 
account closed without refund -- usually the idea of getting caught is 
a good enough deterrent.

4.  Perhaps implement a rolling password system -- if this thing needs 
to be bullet proof.  Each time they login, or once a month, or at 
random intervals, you could reset their password.  Again, this ins't a 
solution, but it's a deterrent, because the user would have to keep 
their friends updated.

Most of the above is guaranteed to frustrate users though.  Is your 
site worth enough to your users to frustrate them?  Is the content your 
protecting really that important?  I doubt it :)

Justin





On Friday, October 10, 2003, at 11:44  AM, Manisha Sathe wrote:

Hi,

I have a client. He does not want member login by just giving password 
and
login id. He says anybody can give this info to his friend and his 
friend
can access the site.

One way is to make use of cookie on his computer. So only from one 
computer
he can access the site. But the thing is that user needs to accept it, 
and i
believe I need to provide some method too in case they delete the 
cookie.

Is there any other solution for this ?  Is there any third party 
software
for this ?

Regards
Manisha
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
---
[This E-mail scanned for viruses]

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


Re: [PHP] Returning a reference [pretty much SOLVED]

2003-10-09 Thread Robert Cummings
If I recall correctly, the reason that the function needs to indicate it
returns a reference AND you need to declare it when assigning variables
is because the function will return a reference when instructed;
however, you then need to inform the binary assignment operator that it
should assign a reference. Essentially assignment usually assigns a copy
of whatever it receives, whether it be a value or a reference. This
might seem like inefficiency, but since data containers aren't actually
copied until the data is modified, there is only the overhead of copying
the container itself and not its data. I agree though, it would have
been nice if the language could have figured it out itself, which should
have been possible.

Cheers,
Rob.


On Thu, 2003-10-09 at 18:13, Curt Zirzow wrote:
 On Thu, 9 Oct 2003 22:50:10 +0200, Esctoday.Com | Wouter Van Vliet 
 [EMAIL PROTECTED] wrote:
 
  Thanks Curt.
 
  This solution works indeed. BUT, there's one but. Isn't there a way to 
  not
  have to tell PHP that I want the return of $this-AddFoo() as a 
  reference?
  In the actual code I want to worry as little as possible about specific
  things like this. Isn't it a little strange that you have to both let php
  know it's returning a reference as well as let it know that it's 
  expecting a
  reference as return value?
 
 
 well you do need to worry about it somewhere, and i would think that the 
 function
 declaration:
function AddFoo()
 
 Would take care of this, but I think there is some strange things going on 
 with the
 class. IIRC, issuing a
 
   $foo = $bar-AddFoo();
 
 Doesn't return a reference.
 
 
 Hopefully someone here can mabey give some more insite as to why there has 
 to be both the declaration and the call references.
 
function AddFoo()
   -and-
$foo = $bar-AddFoo();
 
 
 Curt.
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 
-- 
..
| 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] email certain people

2003-10-09 Thread Davy Campano
I am making a webpage, and I want to be able to email certain people that are selected 
by a checkbox when I click the submit button.  I am trying to figure out what the best 
way is to do this.  There are four people on the page and they each start with their 
name checked (so they should receive an email when I click submit).  How would I go 
writing a script to check if these checkboxes are marked and then emailing each 
person???  Thanks for any help!


  1   2   >