Re: [PHP] dynamic -> static

2003-10-07 Thread Ryan Thompson
Do you mean something like taking a snapshot of the CMS every 24 hours or so?? If I understand you right you might want to look at a different language like perl or shell scripting. I would think they'd be more useful for that sort of thing. On Wednesday 08 October 2003 03:56, Veniamin Goldin w

[PHP] session expire

2003-10-07 Thread redips
I know that if I set a session, by default it will expire when the browser closes. Can I also set a timeout? For example, if the session is idle for 30 minutes it will expire or if the user closes the browser, it will also expire. I know I can do one or the other, but what about both? Thanks.

Re: [PHP] Re: PHP & CSS

2003-10-07 Thread Raquel Rice
On Tue, 7 Oct 2003 17:06:13 -0500 "erythros" <[EMAIL PROTECTED]> wrote: > you probably just want what everyone wants... a seperation of > design from content. > > as for applying the variables to the style sheet it depends on > what youre trying to do. what are the variables for? to request a > s

Re: [PHP] do I need a database

2003-10-07 Thread Justin French
Your options for permanent, server-side storage is pretty much either a flat file or a database. Ultimately, your choice is dependant on what you need to do with the data later on. Personally, since my host includes a free MySQL db with every account, I tend not to bother with flat files for t

[PHP] dynamic -> static

2003-10-07 Thread Veniamin Goldin
Dear All, Does anybody have any solutions, which makes possible to produce static pages of all dynamic cms once a day and can be easily integrated into already made site? Thank you.

Re: [PHP] preg question

2003-10-07 Thread Curt Zirzow
* Thus wrote Mike J ([EMAIL PROTECTED]): > I want to pull the title (example) of a webpage out of some text. The > end result being "example". What preg function should I use and can someone give me > the the code that will do it? > preg_match is what you want. And if you poke around the preg_*

[PHP] preg question

2003-10-07 Thread Mike J
I want to pull the title (example) of a webpage out of some text. The end result being "example". What preg function should I use and can someone give me the the code that will do it? J. PS. I've been on php.net trying to figure it out. -- ___ Get

RE: [PHP] do I need a database

2003-10-07 Thread Martin Towell
Hi Sudheer, Depends on what you want to do with the data afterwards. Maybe a flat file would be enough? Martin -Original Message- From: Sudheer Palaparambil [mailto:[EMAIL PROTECTED] Sent: Wednesday, 8 October 2003 2:50 PM To: [EMAIL PROTECTED] Subject: [PHP] do I need a database Hi,

[PHP] do I need a database

2003-10-07 Thread Sudheer Palaparambil
Hi, I am planning a static site. But I need to capture some data (username, address, telephone and email only), do I need a database for recording this data ? Or is there any other way to record this data ? The volume may be high. Thank you. Sudheer _

Re: [PHP] killing server process online

2003-10-07 Thread Michael P. Carel
yes i'm running this in a web server, is there any thing i can for this. I want to kill a server process in a web browser. > I'm guessing you're attempting to run this from the web server (hence > the tags). Probably the web server doesn't own the process your > attempting to kill. > > Cheers,

Re: [PHP] Sessions

2003-10-07 Thread Chris Wanstrath
You probably have transparent sessions turned on in your config. Turn that off and the session ID will disappear from the url. On Tue, 2003-10-07 at 08:09, Webmaster wrote: > Hi! > > I started to use the php own session functions today. > > Now I am getting such lines in the address bar: > > /

Re: [PHP] killing server process online

2003-10-07 Thread Robert Cummings
I'm guessing you're attempting to run this from the web server (hence the tags). Probably the web server doesn't own the process your attempting to kill. Cheers, Rob. On Tue, 2003-10-07 at 23:09, Michael P. Carel wrote: > Hi to all, > > I'm trying to create a script that will kill a server proc

Re: [PHP] Memory usage of variables in Functions/Methods

2003-10-07 Thread Gerard Samuel
Robert Cummings wrote: On Tue, 2003-10-07 at 22:44, Gerard Samuel wrote: The question is what happens to local variables when the code leaves a function/method as far as memory is concerned. Does it *silently* unset (free the allocated memory) the local variables, or does it make sense to har

[PHP] killing server process online

2003-10-07 Thread Michael P. Carel
Hi to all, I'm trying to create a script that will kill a server process via PID, but as i run the script it doesnt kill the process . And yet I want to add some error mesage. Here's my sample script: alert("Process Killed")alert("Kill Error: kp; ?>") Is there something wrong w

Re: [PHP] Memory usage of variables in Functions/Methods

2003-10-07 Thread Robert Cummings
On Tue, 2003-10-07 at 22:44, Gerard Samuel wrote: > The question is what happens to local variables when the code leaves a > function/method > as far as memory is concerned. > Does it *silently* unset (free the allocated memory) the local > variables, or does it make sense to hardcode > unset() t

Re: [PHP] Sessions

2003-10-07 Thread John W. Holmes
Webmaster wrote: Hi! I started to use the php own session functions today. Now I am getting such lines in the address bar: /pages/news.php?option=1015&PHPSESSID=PHPSESSID=d117dba208d4b205cd4e521f606b b44e#result Why do I get "PHPSESSID=PHPSESSID=" ? Probably because you have /pages/news.php?opt

[PHP] Memory usage of variables in Functions/Methods

2003-10-07 Thread Gerard Samuel
The question is what happens to local variables when the code leaves a function/method as far as memory is concerned. Does it *silently* unset (free the allocated memory) the local variables, or does it make sense to hardcode unset() to garbage these local variables? Thanks function foo() { $

Re: [PHP] Re: PHP & CSS

2003-10-07 Thread erythros
you probably just want what everyone wants... a seperation of design from content. as for applying the variables to the style sheet it depends on what youre trying to do. what are the variables for? to request a specific css file? or are they to supplement the ccs file (ie: use value x for width o

Re: [PHP] Limits and php...

2003-10-07 Thread Curt Zirzow
* Thus wrote Jay Blanchard ([EMAIL PROTECTED]): > [snip] > I have been trying to understand how to write a simple code that will > let me limit the number of files view to 10 records, but I need to > under how php can look at a number of records and then caculates how > many pages it needs to s

Re: [PHP] IRC & SOCKETS

2003-10-07 Thread Jason Sheets
If you do this on the server side with PHP you will need to reload or keep a connection open all the time to a web server process. Try using one of the many and free java IRC applets (http://www.freshmeat.net and search for java irc applet). Jason Paulo Nunes wrote: I am trying to implement

RE: [PHP] mysql_fetch_array() not working as expected

2003-10-07 Thread Chris W. Parker
Marek Kilimajer on Tuesday, October 07, 2003 12:26 PM said: > (c.id) You can make the query: > SELECT c.id > , cc.id AS ccid > , cc.prod_id > , p.name doh! how obvious! thanks. c. -- PHP General Mailing List (http://www.php.net/) To unsubscrib

Re: [PHP] HTML Printing problem.

2003-10-07 Thread Robert Cummings
On Tue, 2003-10-07 at 17:09, php coder wrote: > If I could fiqure out how css can get me the same effect as the tbody and > thead tags and have it easily converted to pcl or pdf then great but I > haven't been able to do this nor am I sure that it can be done. > Sounds like you need an intermed

Re: [PHP] or return problem

2003-10-07 Thread Robert Cummings
On Tue, 2003-10-07 at 16:53, Pat Carmody wrote: > > On Tue, 7 Oct 2003, Curt Zirzow wrote: > > >> function istrue() { > >> return true; > >> } > >> function retor_test() { > >> istrue() or return( "False" ); > >> return "True"; > >> } > > > return (istrue()? 'True': 'False'); > > > >hmm..

Re: [PHP] HTML Printing problem.

2003-10-07 Thread php coder
If I could fiqure out how css can get me the same effect as the tbody and thead tags and have it easily converted to pcl or pdf then great but I haven't been able to do this nor am I sure that it can be done. From: Robert Cummings <[EMAIL PROTECTED]> To: php coder <[EMAIL PROTECTED]> CC: PHP-Ge

Re: [PHP] or return problem

2003-10-07 Thread Pat Carmody
On Tue, 7 Oct 2003, Curt Zirzow wrote: >> function istrue() { >> return true; >> } >> function retor_test() { >> istrue() or return( "False" ); >> return "True"; >> } > return (istrue()? 'True': 'False'); > >hmm.. less typing, easier to understand and logically readable. This doesn't an

Re: [PHP] or return problem

2003-10-07 Thread Chris Shiflett
--- Curt Zirzow <[EMAIL PROTECTED]> wrote: > I wouldn't call this lazy, more like sloppy and confusing. > > return (istrue()? 'True': 'False'); > > hmm.. less typing, easier to understand and logically readable. Well, that is arguable. :-) I'm not a big fan of the ternary operator when it co

Re: [PHP] or return problem

2003-10-07 Thread Curt Zirzow
* Thus wrote Pat Carmody ([EMAIL PROTECTED]): > > > Calling the following retor_test() function causes a "Parse error: parse > error, unexpected T_RETURN" message when the script is run: > > function istrue() { > return true; > } > function retor_test() { > istrue() or return( "False" ); >

Re: [PHP] HTML Printing problem.

2003-10-07 Thread Robert Cummings
On Tue, 2003-10-07 at 16:13, php coder wrote: > Issue: > HTML files are to large to print from the browser. We are creating reports > that are ++5 mg in size. This is a real problem for the browser. We are on a > network and can print directly from the server but this means we must > convert the

Re: [PHP] HTML Printing problem.

2003-10-07 Thread php coder
Are there any packages developed in php or any use of the php print tags that might solve this problem? From: Leif K-Brooks <[EMAIL PROTECTED]> To: php coder <[EMAIL PROTECTED]> CC: "Php-General (E-mail)" <[EMAIL PROTECTED]> Subject: Re: [PHP] HTML Printing problem. Date: Tue, 07 Oct 2003 16:18:

Re: [PHP] HTML Printing problem.

2003-10-07 Thread Leif K-Brooks
php coder wrote: HTML files are to large to print from the browser. We are creating reports that are ++5 mg in size. This is a real problem for the browser. We are on a network and can print directly from the server but this means we must convert the html to some printer friendly format. We ar

[PHP] HTML Printing problem.

2003-10-07 Thread php coder
Issue: HTML files are to large to print from the browser. We are creating reports that are ++5 mg in size. This is a real problem for the browser. We are on a network and can print directly from the server but this means we must convert the html to some printer friendly format. We are using many

Re: [PHP] or return problem

2003-10-07 Thread Robert Cummings
On Tue, 2003-10-07 at 15:35, Leif K-Brooks wrote: > Robert Cummings wrote: > > > Generally it doesn't look like a function since you can do: > > > >return 'foo' > > > >which has no parenthesis. The parenthesis are optional and only used to > >return the result of an expression. > > > The same

Re: [PHP] or return problem

2003-10-07 Thread Chris Shiflett
--- Leif K-Brooks <[EMAIL PROTECTED]> wrote: > The same is true of exit/die. Right, Robert mentioned this earlier. :-) So, in summation, someone asked why return wasn't given the same support as exit (of which die is an alias), and a lot of discussion that didn't answer this question followed. :-

Re: [PHP] or return problem

2003-10-07 Thread Leif K-Brooks
Robert Cummings wrote: Generally it doesn't look like a function since you can do: return 'foo' which has no parenthesis. The parenthesis are optional and only used to return the result of an expression. The same is true of exit/die. -- The above message is encrypted with double rot13 encodi

RE: [PHP] Limits and php...

2003-10-07 Thread Jay Blanchard
[snip] I have been trying to understand how to write a simple code that will let me limit the number of files view to 10 records, but I need to under how php can look at a number of records and then caculates how many pages it needs to show all records. Is there some sample code that shows how

Re: [PHP] mysql_fetch_array() not working as expected

2003-10-07 Thread Marek Kilimajer
Chris W. Parker wrote: Hey peeps. Let me make this simple. I've got the following sql query in a function: SELECT c.id , cc.id , cc.prod_id , p.name , cc.price , cc.qty FROM cart AS c INNER JOIN cart_contents AS cc ON cc.cart_id = c.id INNER

RE: [PHP] or return problem

2003-10-07 Thread Roger B.A. Klorese
> Generally it doesn't look like a function since you can do: > > return 'foo' > > which has no parenthesis. True enough. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] or return problem

2003-10-07 Thread Robert Cummings
On Tue, 2003-10-07 at 15:08, Chris Shiflett wrote: > --- Robert Cummings <[EMAIL PROTECTED]> wrote: > > Given that die() and exit() works just means they have been given > > support for this context. > > I think you now understand the original poster's question. From my > interpretation, he simply

RE: [PHP] or return problem

2003-10-07 Thread Robert Cummings
On Tue, 2003-10-07 at 15:05, Roger B.A. Klorese wrote: > > Sounds to me that if it looks like a function, quacks like a function, etc., > only a broken language definition would treat it differently from a > function... Generally it doesn't look like a function since you can do: return 'foo'

Re: [PHP] or return problem

2003-10-07 Thread Chris Shiflett
--- Robert Cummings <[EMAIL PROTECTED]> wrote: > Given that die() and exit() works just means they have been given > support for this context. I think you now understand the original poster's question. From my interpretation, he simply wanted to know why return was not given the same support. :-)

RE: [PHP] or return problem

2003-10-07 Thread Roger B.A. Klorese
> I would say the real issue at hand here is that the return > statement is > not a fucntion, but rather a language construct, thus it > cannot be used > as a function unless explicitly stated as so. The reason a parse error > is occurring is because this particular construct has no support for >

Re: [PHP] or return problem

2003-10-07 Thread Chris Shiflett
--- Robert Cummings <[EMAIL PROTECTED]> wrote: > The original post came from someone being lazy, that appears to be > influencing my take on the thread :) Understandable. :-) > Also given the above code, it's completely pointless since the first > operand is true and so it is impossible for retur

Re: [PHP] or return problem

2003-10-07 Thread Robert Cummings
On Tue, 2003-10-07 at 15:00, Jason Wong wrote: > > The example given by Leif does not even run. You get a parse error. So all the > discussion about return exiting immediately and the left expression > evaluating to whatever is (IMHO) moot. Apparently PHP does not allow you to > use return like

Re: [PHP] or return problem

2003-10-07 Thread Robert Cummings
On Tue, 2003-10-07 at 14:51, Robert Cummings wrote: > > The original post came from someone being lazy, that appears to be > influencing my take on the thread :) Also given the above code, it's > completely pointless since the first operand is true and so it is > impossible for return( 'foo' ) to e

Re: [PHP] or return problem

2003-10-07 Thread Jason Wong
On Wednesday 08 October 2003 02:51, Robert Cummings wrote: > The original post came from someone being lazy, that appears to be > influencing my take on the thread :) Also given the above code, it's > completely pointless since the first operand is true and so it is > impossible for return( 'foo'

Re: [PHP] or return problem

2003-10-07 Thread Robert Cummings
On Tue, 2003-10-07 at 14:45, Chris Shiflett wrote: > --- Robert Cummings <[EMAIL PROTECTED]> wrote: > > > >Directly from the docs: > > > > > > > >http://ca3.php.net/manual/en/function.return.php > > > > > > > >First line: > > > > > > > >"If called from within a function, the return() statem

Re: [PHP] or return problem

2003-10-07 Thread Chris Shiflett
--- Robert Cummings <[EMAIL PROTECTED]> wrote: > > >Directly from the docs: > > > > > >http://ca3.php.net/manual/en/function.return.php > > > > > >First line: > > > > > >"If called from within a function, the return() statement > > > immediately ends execution of the current function" >

RE: [PHP] or return problem

2003-10-07 Thread Robert Cummings
On Tue, 2003-10-07 at 14:40, Roger B.A. Klorese wrote: > > How can you possibly test, in a conditional, the return value of the > > return statement itself when it has no value to return and even causes > > the current scope to exit IMMEDIATELY?? > > Per the logic, if it returns immediately, isn't

RE: [PHP] or return problem

2003-10-07 Thread Roger B.A. Klorese
> How can you possibly test, in a conditional, the return value of the > return statement itself when it has no value to return and even causes > the current scope to exit IMMEDIATELY?? Per the logic, if it returns immediately, isn't the value irrelevant? That is, assuming that the truth of the f

Re: [PHP] or return problem

2003-10-07 Thread Leif K-Brooks
Robert Cummings wrote: How can you possibly test, in a conditional, the return value of the return statement itself when it has no value to return and even causes the current scope to exit IMMEDIATELY?? Ok, that explains it. Thanks. -- The above message is encrypted with double rot13 encoding

Re: [PHP] or return problem

2003-10-07 Thread Robert Cummings
On Tue, 2003-10-07 at 14:29, Leif K-Brooks wrote: > Robert Cummings wrote: > > >Directly from the docs: > > > >http://ca3.php.net/manual/en/function.return.php > > > >First line: > > > >"If called from within a function, the return() statement > > immediately ends execution of the curr

[PHP] mysql_fetch_array() not working as expected

2003-10-07 Thread Chris W. Parker
Hey peeps. Let me make this simple. I've got the following sql query in a function: SELECT c.id , cc.id , cc.prod_id , p.name , cc.price , cc.qty FROM cart AS c INNER JOIN cart_contents AS cc ON cc.cart_id = c.id INNER JOIN products AS p

Re: [PHP] or return problem

2003-10-07 Thread Leif K-Brooks
Robert Cummings wrote: Directly from the docs: http://ca3.php.net/manual/en/function.return.php First line: "If called from within a function, the return() statement immediately ends execution of the current function" Important concept: IMMEDIATELY returns. Learn to read. What

Re: [PHP] or return problem

2003-10-07 Thread Robert Cummings
> Why won't any of you give a good reason why it won't work? How come this > works: > > function foo() { > 2+2==4 or die("The world is ending, or at least your processor!"); > } > > But this doesn't: > > function foo() { > 2+2==4 or return("The world is ending, or at least your processo

Re: [PHP] or return problem

2003-10-07 Thread Leif K-Brooks
Chris Sherwood wrote: Well Unfortunately pat You are going to have to be an unlazy man and use an if statement Why won't any of you give a good reason why it won't work? How come this works: function foo() { 2+2==4 or die("The world is ending, or at least your processor!"); } But this does

RE: [PHP] Singleton Was: [PHP] OO parent/child relationship

2003-10-07 Thread Andy Crain
One quick thought: You might want to add the following to your if statement: else { $this->_cache[$key] = new $key; return $this->_cache[$key]; } Andy > -Original Message- > From: Gerard Samuel [mailto:[EMAIL PROTECTED] > Sent: Monday, October 06, 2003 5:36 PM > To: 'PHP

Re: [PHP] or return problem

2003-10-07 Thread Eugene Lee
On Tue, Oct 07, 2003 at 01:02:36PM -0400, Pat Carmody wrote: : : Calling the following retor_test() function causes a "Parse error: parse : error, unexpected T_RETURN" message when the script is run: : : function istrue() { : return true; : } : function retor_test() { : istrue() or return( "F

Re: [PHP] or return problem

2003-10-07 Thread Robert Cummings
I already said "Your laziness is causing you problems", this refers back to your original statement about being lazy. You should be able to infer form your own wrods the root of your problem. Rob. On Tue, 2003-10-07 at 13:14, Pat Carmody wrote: > > So far everyone is telling me that it won't wor

Re: [PHP] or return problem

2003-10-07 Thread Pat Carmody
So far everyone is telling me that it won't work, but no one is telling me why. (btw I did search extensively for the answer to this question but so far have found nothing). Robert, could you be more specific in your reference to the http://www.php.net documentation? I see nothing on the basic s

Re: [PHP] or return problem

2003-10-07 Thread Robert Cummings
Incidentally your post probably caused you more work than to have tested it yourself. So much for your laziness even being optimal laziness. *pt*. I thought making stupid posts was covered in the newbie guide!?! Rob. On Tue, 2003-10-07 at 13:06, Robert Cummings wrote: > On Tue, 2003-10-07 at

Re: [PHP] or return problem

2003-10-07 Thread Chris Sherwood
Well Unfortunately pat You are going to have to be an unlazy man and use an if statement Chris > > Calling the following retor_test() function causes a "Parse error: parse > error, unexpected T_RETURN" message when the script is run: > > function istrue() { > return true; > } > function retor_

Re: [PHP] or return problem

2003-10-07 Thread Robert Cummings
On Tue, 2003-10-07 at 13:02, Pat Carmody wrote: > > > Calling the following retor_test() function causes a "Parse error: parse > error, unexpected T_RETURN" message when the script is run: > > function istrue() { > return true; > } > function retor_test() { > istrue() or return( "False" ); >

Re: [PHP] faxing from php

2003-10-07 Thread Jason Wong
On Wednesday 08 October 2003 00:59, Nicolas Claus wrote: > is there an easy way to send faxes from PHP? Short answer, no. > Please explain as you would have to explain it to your grandmother (I'm > rather new with PHP, you know). Longer answer, you need to install some kind of fax software (Hyl

Re: [PHP] faxing from php

2003-10-07 Thread Robert Cummings
On Tue, 2003-10-07 at 12:59, Nicolas Claus wrote: > Hi all, > > is there an easy way to send faxes from PHP? > > Please explain as you would have to explain it to your grandmother (I'm > rather new with PHP, you know). Sorry grandmother, I just don't have the time to explain all this to you. Ch

[PHP] or return problem

2003-10-07 Thread Pat Carmody
Calling the following retor_test() function causes a "Parse error: parse error, unexpected T_RETURN" message when the script is run: function istrue() { return true; } function retor_test() { istrue() or return( "False" ); return "True"; } The problem is with the "or return" part. Any id

[PHP] faxing from php

2003-10-07 Thread Nicolas Claus
Hi all, is there an easy way to send faxes from PHP? Please explain as you would have to explain it to your grandmother (I'm rather new with PHP, you know). Thanx in advance ! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Verry strange GET behaviour

2003-10-07 Thread Robert Cummings
On Tue, 2003-10-07 at 12:53, John Wilcox wrote: > > P.S. If anyone has any other ideas of how to get a PHP > script to run as a specific user/group under a Virtual > Host, I'm all ears.. All I need is for the script to > be able to mkdir as a specific user/group, but this is > proving to be more

Re: [PHP] GET globals REQUEST the plot thickens

2003-10-07 Thread Leif K-Brooks
Marek Kilimajer wrote: Has you mention what php version are you running? Superglobals are available only since 4.1.0 If $_GET works, then his PHP version must support superglobals. -- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be pros

Re: [PHP] Verry strange GET behaviour

2003-10-07 Thread John Wilcox
--- Chris Shiflett <[EMAIL PROTECTED]> wrote: > --- John Wilcox <[EMAIL PROTECTED]> wrote: > > On the topic of passing args, can someone please > explain to me why > > I'm unable to use $_GET or $_POST if my php script > is run as a .cgi? > What you may want to do is to have the Web server > inte

[PHP] Command line parameters

2003-10-07 Thread Willem Bison
Passing arguments to php bin like this used to work in older versions: # /usr/local/bin/php test.php '&arg=test' but now it doesn't: $arg has no value within test.php It's not in $GLOBALS either. How to pass parameters to the script (apart from argv/argc) ? # /usr/local/bin/php -v PHP 4.3.2 (

Re: [PHP] GET globals REQUEST the plot thickens

2003-10-07 Thread Marek Kilimajer
Has you mention what php version are you running? Superglobals are available only since 4.1.0 Ben Edwards wrote: From what I have $_REQUEST douse NOT work. As I said vars are being passed on the URL. My code: echo "sec=".$_REQUEST["_section"]."req=$REQUEST_URI"; the output sec= req=/adultdy

Re: [PHP] Verry strange GET behaviour

2003-10-07 Thread Jason Wong
On Tuesday 07 October 2003 23:04, Ben Edwards wrote: > Been having a problem accessing a variable that is passed on a URL. > I've been developing PHP for years and this makes no seance. > > The variable I am trying to access in the script is $_section. I put > the following code at the beginning (

[PHP] GET globals REQUEST the plot thickens

2003-10-07 Thread Ben Edwards
>From what I have $_REQUEST douse NOT work. As I said vars are being passed on the URL. My code: echo "sec=".$_REQUEST["_section"]."req=$REQUEST_URI"; the output sec= req=/adultdyslexia.org/quiz.php?_menu=TOP&issue=1&_section=QUIZ&gen=Y if I change the request to GET it works fine! Ben --

Re: [PHP] Verry strange GET behaviour

2003-10-07 Thread Marek Kilimajer
Ben Edwards wrote: what I don't understand is if $_GET is being used people can just change the URL anyway so why is it an issue? Ben All that it is about that if you have code like this: if($user=='admin' && $pwd=='secretpassword') { $admin=true; } and register_globals on someone can pass

Re: [PHP] Verry strange GET behaviour

2003-10-07 Thread Chris Shiflett
--- Ben Edwards <[EMAIL PROTECTED]> wrote: > what I don't understand is if $_GET is being used people can just > change the URL anyway so why is it an issue? It is only an issue in the sense that it hides the origin of data. An attacker can leverage this fact to exploit weaknesses in your applicat

Re: [PHP] Verry strange GET behaviour

2003-10-07 Thread Chris Shiflett
--- John Wilcox <[EMAIL PROTECTED]> wrote: > On the topic of passing args, can someone please explain to me why > I'm unable to use $_GET or $_POST if my php script is run as a .cgi? I believe this is because you are using the #! method to define the interpreter, which means your Web server simply

Re: [PHP] Verry strange GET behaviour

2003-10-07 Thread Ben Edwards
> Do you have register_globals on or off? If it works in hundreds or other > places, it should work fine. In /etc/php4/apache/php.ini 'register_globals = On'. This is my point, I understand about the global issue but dont have the time to change all my code. > Also, you can use $_REQUEST if y

Re: [PHP] Verry strange GET behaviour

2003-10-07 Thread Daniel Guerrier
you need to configure your webserver recognize .cgi as a file to run the php interpreter against. i.e do whatever you did to make .php work again for .cgi --- John Wilcox <[EMAIL PROTECTED]> wrote: > On the topic of passing args, can someone please > explain to me why I'm unable to use $_GET or $

Re: [PHP] Verry strange GET behaviour

2003-10-07 Thread John Wilcox
On the topic of passing args, can someone please explain to me why I'm unable to use $_GET or $_POST if my php script is run as a .cgi? Basically, I have a simple html input form that has: and a simple php script in a file called test.cgi which looks like: #!/usr/local/bin/php Now, if I

Re: [PHP] Verry strange GET behaviour

2003-10-07 Thread Leif K-Brooks
Chris Shiflett wrote: You have register_globals disabled, and if you are asking this question, you need to leave register_globals disabled. Use $_GET['_section'] to access your variable. But he says $REQUEST_URI works. -- The above message is encrypted with double rot13 encoding. Any unauthorize

Re: [PHP] Verry strange GET behaviour

2003-10-07 Thread Brad Pauly
Ben Edwards wrote: On Tue, 2003-10-07 at 16:14, Brad Pauly wrote: Probably because you have register_globals turned off. You can use $_GET['_section']. You can also turn it on. But it works in hundreds of other places on the server. I don't really want to use $_GET because I sometimes switch

Re: [PHP] Verry strange GET behaviour

2003-10-07 Thread Chris Shiflett
--- Paul van Schayck <[EMAIL PROTECTED]> wrote: > Don't tell them about that option! People are forced to script safe > that way. That is a bit of an exaggeration, don't you think? Leaving register_globals disabled certainly doesn't force people to "script safe[ly]". It does, however, force them t

Re: [PHP] Verry strange GET behaviour

2003-10-07 Thread Chris Shiflett
--- Ben Edwards <[EMAIL PROTECTED]> wrote: > Been having a problem accessing a variable that is passed on a URL. This question is asked several times a week. You have register_globals disabled, and if you are asking this question, you need to leave register_globals disabled. Use $_GET['_section']

Re: [PHP] New to PHP form attributes

2003-10-07 Thread Chris Shiflett
--- Matthew Oatham <[EMAIL PROTECTED]> wrote: > I am new to PHP and am more used to JSP. My question is - if I > submit a form to a php3 page using action=="" for > some processing all is well I can see that form data. After the > processing the page is redisplayed - but the data originally sent >

Re: [PHP] Verry strange GET behaviour

2003-10-07 Thread Ben Edwards
> Ben, with register globals off hackers can change variables you don't want > to be changed theirself. Don't really have time to go through all our sites and change every variable option, then retest all the sites. Still dont understand why everything else works. Will probably start using $_GE

Re: [PHP] Verry strange GET behaviour

2003-10-07 Thread Paul van Schayck
Hello, [EMAIL PROTECTED] (Brad Pauly) wrote > Probably because you have register_globals turned off. You can use > $_GET['_section']. You can also turn it on. > > http://us3.php.net/register_globals Don't tell them about that option! People are forced to script safe that way. Ben, with regis

Re: [PHP] Verry strange GET behaviour

2003-10-07 Thread Brad Pauly
Ben Edwards wrote: Been having a problem accessing a variable that is passed on a URL. I've been developing PHP for years and this makes no seance. The variable I am trying to access in the script is $_section. I put the following code at the beginning (before anything else apart from echo "!

[PHP] Verry strange GET behaviour

2003-10-07 Thread Ben Edwards
Been having a problem accessing a variable that is passed on a URL. I've been developing PHP for years and this makes no seance. The variable I am trying to access in the script is $_section. I put the following code at the beginning (before anything else apart from http://gurtlush.org.uk * * We

Re: [PHP] allowing access to php page by IP

2003-10-07 Thread Chris Boget
> certain webpage and keep everyone else out. I have written code to figure > out what someone's IP is, but am not sure about how I should verify > whether the IP is in the range of 10.8.4.* or 10.8.5.*. Any suggestions? $ipArray = explode( '.', $ipAddress ); if(( $ipArray[0] == 10 ) &&

[PHP] Re: allowing access to php page by IP

2003-10-07 Thread Paul van Schayck
Hello, [EMAIL PROTECTED] (Adam Williams) wrote > I want to allow access to a php page but am not sure how I should > verify the IP once I get it. I want to allow 10.8.4.* and 10.8.5.* to > access a certain webpage and keep everyone else out. I have written > code to figure out what someone's IP

[PHP] Limits and php...

2003-10-07 Thread Payne
Hi, I have been trying to understand how to write a simple code that will let me limit the number of files view to 10 records, but I need to under how php can look at a number of records and then caculates how many pages it needs to show all records. Is there some sample code that shows how t

Re: [PHP] allowing access to php page by IP

2003-10-07 Thread Tom Rogers
Hi, Wednesday, October 8, 2003, 12:23:16 AM, you wrote: AW> Hello, AW> I want to allow access to a php page but am not sure how I should verify AW> the IP once I get it. I want to allow 10.8.4.* and 10.8.5.* to access a AW> certain webpage and keep everyone else out. I have written code to fi

[PHP] allowing access to php page by IP

2003-10-07 Thread Adam Williams
Hello, I want to allow access to a php page but am not sure how I should verify the IP once I get it. I want to allow 10.8.4.* and 10.8.5.* to access a certain webpage and keep everyone else out. I have written code to figure out what someone's IP is, but am not sure about how I should verify

Re: [PHP] Modifying OPTIONS header response

2003-10-07 Thread Marek Kilimajer
Did you restart apache? It works for me. Before: Allow: GET, HEAD, OPTIONS, TRACE After: Allow: GET, HEAD, POST, OPTIONS, TRACE, PROPFIND, COPY, MOVE, LOCK options.php: header('Allow: GET, HEAD, POST, OPTIONS, TRACE, PROPFIND, COPY, MOVE, LOCK'); ?> Oscar F wrote: Hey Marek, Thanks for the r

[PHP] Re: Sessions

2003-10-07 Thread Paul van Schayck
Hello, [EMAIL PROTECTED] (Webmaster) wrote > Now I am getting such lines in the address bar: > > /pages/news.php?option=1015&PHPSESSID=PHPSESSID=d117dba208d4b205cd4e521 > f606b b44e#result Do you set them manual, does the server auto start a session? What are the settings for session in your in

Re: [PHP] Modifying OPTIONS header response

2003-10-07 Thread Oscar F
Hey Marek, Thanks for the reply. Nope, doesn't do anything... O. On Tue, 2003-10-07 at 09:19, Marek Kilimajer wrote: > Just a wild guess, but try this in apache config: > Script OPTIONS /options.php > > Oscar F wrote: > > > Hello all, > > > > I'm working on a php/dav server and I'm having a

Re: [PHP] Modifying OPTIONS header response

2003-10-07 Thread Marek Kilimajer
Just a wild guess, but try this in apache config: Script OPTIONS /options.php Oscar F wrote: Hello all, I'm working on a php/dav server and I'm having a problem. When the client sends an OPTIONS request to see what methods are allowed, they only get "Allow: GET, HEAD, POST, OPTIONS, TRACE" back f

Re: [PHP] php&javascript live-clock

2003-10-07 Thread Eugene Lee
On Tue, Oct 07, 2003 at 03:48:27PM +0200, Alex Ciurea wrote: : : is it possible to show the live-clock from the server machine, using : php and javascript, without having to make refresh of that page? AFAIK, no. PHP scripts get their time information from the server. JavaScript can get its time

[PHP] Modifying OPTIONS header response

2003-10-07 Thread Oscar F
Hello all, I'm working on a php/dav server and I'm having a problem. When the client sends an OPTIONS request to see what methods are allowed, they only get "Allow: GET, HEAD, POST, OPTIONS, TRACE" back from apache. This seems to me a problem since it does not include PROPFIND, COPY, MOVE, LOCK,

Re: [PHP] php&javascript live-clock

2003-10-07 Thread Chris Hayes
At 15:48 7-10-03, you wrote: hello, is it possible to show the live-clock from the server machine, using php and javascript, without having to make refresh of that page? That would be a 99% javascript job. Find an existing javascript that works. When the page is loaded let PHP feed the javascript

  1   2   >