[PHP] php, javascript

2002-05-31 Thread Gerard Samuel
Just a general question. Is it possible to embed php in pure javascript/dhtml code?? I tried but it didn't work, not sure if it was me or its not possible. Thanks... -- Gerard Samuel http://www.trini0.org:81/ http://dev.trini0.org:81/ -- PHP General Mailing List (http://www.php.net/) To

[PHP] Running Setuid Programs fro PHP?

2002-05-31 Thread Jonathan Rosenberg
From my testing, it seems that PHP (or is it Apache) ignores the setuid bit when executing an external program (e.g., via passthru). is this correct? if so, is there some way to override this, so that the program will run setuid? -- JR -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] Run php function with user click

2002-05-31 Thread Jim lucas
use flash to open a tunnel to the server and run a script, therefor it never has to leave the current page. ::) Jim Lucas - Original Message - From: Michael Sweeney [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: Dave Shacket [EMAIL PROTECTED] Sent: Friday, May 31, 2002 10:36 AM Subject:

Re: [PHP] diplaying the path

2002-05-31 Thread Jim lucas
the bad thing about the BTW seciton is, is that it is not true inside of a function, that is the reason I refered to it as $GLOBALS['HTTP_REFERER'] Jim lucas - Original Message - From: Philip Olson [EMAIL PROTECTED] To: Jim lucas [EMAIL PROTECTED] Cc: Kris Vose [EMAIL PROTECTED]; [EMAIL

RE: [PHP] Running Setuid Programs fro PHP?

2002-05-31 Thread Jonathan Rosenberg
Oops ... never mind. I answered my own question. I had made a typo that was causing the problem. External programs ARE run as setuid from PHP/Apache. -Original Message- From: Jonathan Rosenberg [mailto:[EMAIL PROTECTED]] Sent: Friday, May 31, 2002 4:27 PM To: [EMAIL PROTECTED]

[PHP] Re: [PEAR] [HTML_Form] cant change values in array after getAll()

2002-05-31 Thread Peter TB Brett
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 In the for loop initialisation try changing: $i = count($res) to: $i count($res) Reason: The usual thing that causes that sort of error is an incorrect iteration condition that causes the loop to run forever and so make an infinitely

RE: [PHP] Run php function with user click

2002-05-31 Thread Leotta, Natalie (NCI/IMS)
JavaScript could do a similar thing with onClick. -Natalie -Original Message- From: Jim lucas [mailto:[EMAIL PROTECTED]] Sent: Friday, May 31, 2002 4:21 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Cc: Dave Shacket Subject: Re: [PHP] Run php function with user click use flash to open

Re: [PHP] Re: Parsing file's

2002-05-31 Thread Scott
That's what I mean by starring at this too much :) I tried writting to a seperate file, but is there a way to take an array and split it every so many records within another loop? Let's say the first row contains the first 18 columns which I already parsed, I then want to grab the next 5

Re: [PHP] php, javascript

2002-05-31 Thread Michael Sweeney
On Friday 31 May 2002 13:18, Gerard Samuel wrote: Just a general question. Is it possible to embed php in pure javascript/dhtml code?? I tried but it didn't work, not sure if it was me or its not possible. Thanks... As long as you enclose the PHP code in script delimiters (?php ... ?) and

Re: [PHP] Run php function with user click

2002-05-31 Thread Jim lucas
but that would take you off the current page wouldn't it? or would you return false? Jim Lucas - Original Message - From: Leotta, Natalie (NCI/IMS) [EMAIL PROTECTED] To: 'Jim lucas' [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED] Cc: Dave Shacket [EMAIL PROTECTED] Sent: Friday,

[PHP] Re: [PEAR] [HTML_Form] cant change values in array after getAll()

2002-05-31 Thread Peter TB Brett
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Ooops, incorrect scripts. Let's try again: --script1.php-- // for loop as in Zachery's example ?php $res = array(); for( $i=0; $i=count($res); $i++ ) { $res[$i] = $i; echo $i, \n;

[PHP] new session policy

2002-05-31 Thread Giancarlo
Is it possible that the PHP session features will accept as new any id not generated by the webserver itself? And where's the utility of that? Isn't it an enormous hole? Gian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Run php function with user click

2002-05-31 Thread Leotta, Natalie (NCI/IMS)
If Michael Sweeney is right that you can run PHP in a JS method that would work. I just do all of my instant gratification stuff in JS. I guess it depends on what is in the PHP function that he wants to run - it's possible that he could do it in JS. -Nat -Original Message- From: Jim

[PHP] writting to files

2002-05-31 Thread Jas
Ok, I have been working on this for awhile and cannot seem to get the fwrite function to work. Here is the code: \\ index.php ?php $file_name = 'blank.php'; $open_file = fopen($file_name,rw); if (!$open_file) { die(cannot open $file_name); } else { $read_file = fread($open_file,

Re: [PHP] Re: Parsing file's

2002-05-31 Thread Mark Heintz PHP Mailing Lists
You may have been heading in the right direction originally with array_slice... This is off the top of my head, I don't guaruntee it will work... $start = 34; $interval = 15; $max = 303; // hop across orig. array 15 columns at a time for($offset = $start; $offset $max

Re: [PHP] Running a script to check something before submitting a form. Can this be done?

2002-05-31 Thread Jim lucas
you will have to do this with javascript on the client side with an onClick() call in the submit button. but the bad thing is, you wont be able to check this with the mysql db, unless you load the entire field set into the current page. my suggestion would be to send the form to one single

Re: [PHP] writting to files

2002-05-31 Thread Jason Wong
On Saturday 01 June 2002 04:34, Jas wrote: Ok, I have been working on this for awhile and cannot seem to get the fwrite function to work. Here is the code: \\ index.php ?php $file_name = 'blank.php'; $open_file = fopen($file_name,rw); Looks like you're using fopen() incorrectly. Try:

RE: [PHP] writing to files

2002-05-31 Thread Jonathan Rosenberg
Looks like you're using fopen() incorrectly. Try: fopen($file_name,r+); How about just fopen($file_name, r+); instead. No need for the surrounding s. -- JR -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] new session creation policy is trust user input ?

2002-05-31 Thread Giancarlo
What are the benefits of trusting any id provided by the user, when creating a new session? Why should we allow users to create their own session id, and maybe pass them around? Or being driven to some session faked/created by someone else? Can we control that a new session id has been

Re: [PHP] Running a script to check something before submitting a form. Can this be done?

2002-05-31 Thread Kevin Stone
I wouldn't use header() in this case, unless you plan to create an ungodly looking URL to pass with it.. All you really need to do is point the form to a PHP script that validates the information. Then at the end of that script either include() the form hander if it's valid, or print an error

[PHP] Speed comparison of PHP vs. PERL (not conclusive)

2002-05-31 Thread Daniel Grace
This all started in a little debate between me and a friend of mine who I think is as much a PERL zealot as I am a PHP zealot (I was briefly pondering the idea of a Win32 API extension for PHP), and the results were rather surprising -- to me, at least.. It all started when I asked him what PERL

[PHP] Re: Speed comparison of PHP vs. PERL (not conclusive)

2002-05-31 Thread Daniel Grace
I made an oops! when I wrote: prime.pl: #!/usr/bin/perl # print 2\n; my $num; for ($num = 3; $num 1; $num+=2) { my $prime = 1; for $check ( 2 .. int($num/2) ) { if ($num % $check == 0) { $prime = 0;

Re: [PHP] Speed comparison of PHP vs. PERL (not conclusive)

2002-05-31 Thread Rasmus Lerdorf
Not very surprising. Perl's looping code has always ben faster than PHP's. Highly iterative loops is really not what PHP is geared for. You are not going to write a Mandelbrot algorithm in PHP. You write it in C and drop in a super-quick extension into PHP and call mandelbrot(). -Rasmus On

[PHP] Re: apache2filter.dll

2002-05-31 Thread PHPGeek
It's moved to the sapi directory in the most recent release instead of the experimental directory. Michael Davey wrote: It is called php4apache2.dll Mikey Herman Pool [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi all, I have downloaded PHP4.2.1

Re: [PHP] Speed comparison of PHP vs. PERL (not conclusive)

2002-05-31 Thread Ilia A.
Does this mean that running a comparison benchmarks between PHP and any other language would in many cases show PHP to be slower simply because it's looping code is slow? Unless, timing is done on a speed of PHP being able to spew out webpages via the webserver with a webserver benchmark tool

Re: [PHP] Speed comparison of PHP vs. PERL (not conclusive)

2002-05-31 Thread Rasmus Lerdorf
Sure, you could put it that way. When benchmarking something you really should benchmark stuff that you actually care about. Benchmark PHP spewing out a web page after making a couple of SQL queries, for example. That's typical usage, so that is what you should benchmark. Very few PHP scripts

Re: [PHP] Speed comparison of PHP vs. PERL (not conclusive)

2002-05-31 Thread Daniel Grace
Rasmus Lerdorf [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Sure, you could put it that way. When benchmarking something you really should benchmark stuff that you actually care about. Benchmark PHP spewing out a web page after making a couple of SQL

Re: [PHP] Speed comparison of PHP vs. PERL (not conclusive)

2002-05-31 Thread Ilia A.
I agree that in most cases it makes more sence at seing the webpages per second benchmark rather then a timing of some artibtrary benchmarks that for example seeing how long it take to pick prime numbers. Since in the end it matters how quickly you can get the data to the user, in case of perl

[PHP] Finding what headers and content were already been sent

2002-05-31 Thread Noor Dawod
Hello, I need to find out, at any point in a PHP script, which headers and what content (HTML or other) have been sent already. I know I can use output buffering, but in my case, this is not going to work. By the way, I know that PHP's phpinfo() function lists headers received and headers sent,

[PHP] Re: Speed comparison of PHP vs. PERL (not conclusive)

2002-05-31 Thread Manuel Lemos
Hello, On 05/31/2002 06:36 PM, Daniel Grace wrote: The results: [dewin@ulysses profiling]$ time ./prime.php /dev/null real0m14.465s user0m8.610s sys 0m0.070s [dewin@ulysses profiling]$ time ./prime.pl /dev/null real0m5.302s user0m3.180s sys 0m0.000s

Re: [PHP] Finding what headers and content were already been sent

2002-05-31 Thread Rasmus Lerdorf
I need to find out, at any point in a PHP script, which headers and what content (HTML or other) have been sent already. I know I can use output buffering, but in my case, this is not going to work. You really have no way of knowing since it is the web server that decides which http headers

RE: [PHP] Finding what headers and content were already been sent

2002-05-31 Thread Noor Dawod
And how do I KNOW which $HTTP_ variables are being set? Also, does $HTTP_ACCEPT_LANGUAGE mean that Accept-Language command has been sent by the browser? In my Windows configuration, using CGI version for example, I don't see also the headers sent by the server... Noor -Original

[PHP] seesion_register() with arrays

2002-05-31 Thread Douglas - IG
Hi All, I´m trying to register into a session an array which has returned from a mysql_fetch_array function. But when I call $array it returns empty or something like this. Do you know how can I do this operation? Regards! Here go my scripts: ? # script1.php4 session_start(); $sql = select

RE: [PHP] Finding what headers and content were already been sent

2002-05-31 Thread Rasmus Lerdorf
You can loop through $GLOBALS and check for vars that start with HTTP_, but yes, you typically know which things you are interested in. And no, $HTTP_* are only the request headers. For the Apache module version there is of course also getallheaders() -Rasmus On Sat, 1 Jun 2002, Noor Dawod

RE: [PHP] Finding what headers and content were already been sent

2002-05-31 Thread Noor Dawod
Ok, I understand about the request headers. While searching the archives, I've seen many requests from many people asking similar questions. You even answered some. The thing is that while there's a function to get request headers (getallheaders() or the $HTTP_ vars), there's no function to list

RE: [PHP] Finding what headers and content were already been sent

2002-05-31 Thread Rasmus Lerdorf
Ok, I have added apache_response_headers() which returns the current set of headers that Apache either knows about at this point (before the headers are sent) or the set of sent headers once they have actually gone out. This will be in 4.3 -Rasmus On Sat, 1 Jun 2002, Noor Dawod wrote: Ok, I

[PHP] cache control and cookies...

2002-05-31 Thread Gerard Samuel
I dont know too much about cache control, but some of the users who use my script, has problems with cookies. They are able to log in and the cookie is set and they click a link and get booted out. This past week, we noticed that when we commented out header (Expires: Mon, 26 Jul 1997

Re: [PHP] diplaying the path

2002-05-31 Thread Philip Olson
the bad thing about the BTW seciton is, is that it is not true inside of a function, that is the reason I refered to it as $GLOBALS['HTTP_REFERER'] That's not bad, it's a feature of PHP :) All variables (even predefined variables) follow standard PHP variable scope rules (except

RE: [PHP] seesion_register() with arrays

2002-05-31 Thread John Holmes
$array only contains one of the result rows, not all of them. At least it's that way in your script. Try to register the variable before you start assigning values to it and you'll have to add each row into an array in order to save the entire result set. ---John Holmes... -Original

RE: [PHP] Writing Files (Unix, Apache, PHP 4.0.X) [Newbie Alert]

2002-05-31 Thread John Holmes
Does the file already exist? It's not enough to change the directory permissions, you also have to change it on the file if it exists, and all of the folders above it, so that apache can get to the file. In order for PHP to open or create this file, the user that apache runs as must have

Re: [PHP] Form content type missing, how to fetch variables?

2002-05-31 Thread Simon Troup
Thanks Dan, but I don't think I'm explaining well. Submitting that form will produce, from most browsers, a request that has in one of it's headers: content-type: x-www-form-urlencoded ... the variable $Foo will automatically be available within PHP for use in any script that form is directed

RE: [PHP] Form content type missing, how to fetch variables?

2002-05-31 Thread John Holmes
So is it even a web page that's returned? Or is it more like a text file? Will getallheaders() help you at all? www.php.net/getallheaders ---John Holmes... -Original Message- From: Simon Troup [mailto:[EMAIL PROTECTED]] Sent: Friday, May 31, 2002 8:23 PM To: [EMAIL PROTECTED]

Re: [PHP] Form content type missing, how to fetch variables?

2002-05-31 Thread Simon Troup
This non form is a posted response from a commercial server quoting the results of various transactions as pretty much a basic text dump. Weird I know, and it is their problem/fault, however, I'm still left having to work with it until such a time as they fix it (4 weeks, who knows why!). Also,

[PHP] Apache, html, php and global variables

2002-05-31 Thread Peter Goggin
I do not know whether this is a question for this list, but if not perhaps someone can tell me where to raise it. I am designing a web site which has a number of pages. One of these provides the facility for the user to log onto a mysql database. Other web pages allow the user to query and

Re: [PHP] Apache, html, php and global variables

2002-05-31 Thread Stuart Dallas
On Saturday, June 1, 2002 at 2:42:40 AM, you wrote: Is there any way of caryying the login information from one web page to the next in global variables so that the username and password entered in the login screen is available to all other web pages in the site or do I have to ask the user

[PHP] Folio Infobase Parser/Converter

2002-05-31 Thread Richard Lynch
Please cc me on replies. Thanks. Anybody happen to have any leads to a Folio (4.1) reader/parser/converter to something PHP integrates with? folio2xml folio2CSV folio2sql . . . A client's client needs to be able to upload Folio files and have them converted/integrated to the web. They

RE: [PHP] Re: Parsing file's

2002-05-31 Thread Scott
Mark- Trying it now, I think I understand what you doing with the code below. I'll let you know. Thank you! -Scott -Original Message- From: Mark Heintz PHP Mailing Lists [mailto:[EMAIL PROTECTED]] Sent: Friday, May 31, 2002 4:43 PM To: Scott Cc: [EMAIL PROTECTED] Subject: Re: [PHP]

Re: [PHP] Apache, html, php and global variables

2002-05-31 Thread Peter Goggin
I am not certain how this helps me, since it appears the data is only carried to pages called directly from where it is set. The page where the user logs onto the database does not link to other pages. This is done from the top frame of the form. The top frame of the inital page contains the

RE: [PHP] Apache, html, php and global variables

2002-05-31 Thread John Holmes
You still have to connect to a database every time a script is run, whether it's loaded in a frame or run by itself. If you start a session and save the username and password in it, then you can use that login and password on every other page that you call session_start() on. ---John Holmes...

Re: [PHP] Speed comparison of PHP vs. PERL (not conclusive)

2002-05-31 Thread Jason Wong
On Saturday 01 June 2002 06:20, Daniel Grace wrote: language would in many cases show PHP to be slower simply because it's looping code is slow? [...] It is typical usage, yes, but the conversation that gave me the idea to do the quick speed comparison was the idea that PHP can be used

<    1   2