[PHP] php & performance

2002-05-14 Thread Michal Dvoracek
Hello, what is better syntax (for perfomance option, not code-style) e.g. html code out of php tags text or '; while (...) $table .= ''.$something.'text'; $table .= ''; ?> Thank you. Regards, Michal Dvoracek [EMA

Re: [PHP] PhP 4.2.1 (and various)

2002-05-14 Thread Analysis & Solutions
On Wed, May 15, 2002 at 07:34:13AM +0100, Olav Bringedal wrote: > > First of all my pbpBB 2.0 forums stopped working Do they use variables straight up, rather than via the new superglobals such as $_POST? Simple solution, change your php.ini to have register_globals = on. > (http://utge.dynd

[PHP] More 4.2.1 (Note to myself:think before pressing send!)

2002-05-14 Thread Olav Bringedal
Sorry about this, but i forgot one thing in my last post. With 4.2.1 (as opposed to 4.2.0), gd2 stopped working. When i run the server I get "could not find freetype.dll(? Still not on the actual machine)" and then "gd2.dll(?) module could not be found". phpinfo at http://jaggu.org/info.php I

[PHP] PhP 4.2.1 (and various)

2002-05-14 Thread Olav Bringedal
Hi! I've recently upgraded to 4.2.1, but i have gotten a lot of problems with it. First of all my pbpBB 2.0 forums stopped working (http://utge.dyndns.org/phpbb2/index.php). When you try to log in i get an error, malfomed header request? (im not on the actual machine now :)). I also have prob

Re: [PHP] Cool PHP Tricks/Features ?

2002-05-14 Thread Girish Nath
Hi John You *can* control on a a page-by-page basis as i'm doing now. I have some pages admin pages that are getting a lot of hits and i'm using the compression to reduce them from 52K to 7K and 153K to 17K! The majority of the users are accessing via 56K modem/ISDN so i'm willing to trade a tin

[PHP] Strange Delay with Swf file (newbie)

2002-05-14 Thread simos
Hi All I have the following problem .. A web page which has a flash swf file 100K with .html extenstion need less than 1 sec to refresh if its cashed ''. The same web page with .php extention makes a delay 5-7'' ?? Why ??? Thanks in advance for your help simos

Re: [PHP] Apache does not work with PHP

2002-05-14 Thread Rasmus Lerdorf
First of all, PHP 4.0.4 is over 2 years old now. Upgrade! Then let us know if you have any problems. -Rasmus On Wed, 15 May 2002, Vivek Kumar Agrawal wrote: > Dear Folks, > > I am trying to set up Suse Linux Server with sybase and PHP. > While configuring my computer with these software I am

[PHP] Apache does not work with PHP

2002-05-14 Thread Vivek Kumar Agrawal
Dear Folks, I am trying to set up Suse Linux Server with sybase and PHP. While configuring my computer with these software I am getting some problem. Actually, I have done following steps: - first of all I Installed the SuSE 7.0 Linux (then apache is installed by default) - then Sybase-ase-11.0

Re: [PHP] PHP 4.2x changes

2002-05-14 Thread Rasmus Lerdorf
Try it. $_SERVER[...] will work fine inside your class. -Rasmus On Wed, 15 May 2002, Weston Houghton wrote: > > Thanks for the link. Everything there makes sense, and I'm not sure if I > need to turn register_globals on to make this work. Is there a way to get > either: > > $_SERVER["PATH_TRAN

[PHP] Collecting data from sockets

2002-05-14 Thread Demitrious Kelly
Firstly I would like to say that this is NOT a request for help, but rather the answer I found to the question I had asked more then a week ago, but got no response. From the lack of response I would assume that a) nobody cared that I had a problem, or b) that nobody knew the answer... I hope the

Re: [PHP] PHP 4.2x changes

2002-05-14 Thread Weston Houghton
Thanks for the link. Everything there makes sense, and I'm not sure if I need to turn register_globals on to make this work. Is there a way to get either: $_SERVER["PATH_TRANSLATED"] Or $HTTP_SERVER_VARS["SCRIPT_FILENAME"] (perhaps??) Without turning register_globals on? Oh, and I am doing th

Re: [PHP] PHP 4.2x changes

2002-05-14 Thread Rasmus Lerdorf
http://www.php.net/manual/en/security.registerglobals.php On Wed, 15 May 2002, Weston Houghton wrote: > > Ok, makes sense based on previous threads I have gleaned over. Can you point > me to any reading material that fills in the details on all of this though? > Would like to know more about why

Re: [PHP] PHP 4.2x changes

2002-05-14 Thread Weston Houghton
Ok, makes sense based on previous threads I have gleaned over. Can you point me to any reading material that fills in the details on all of this though? Would like to know more about why I am doing this, and if I should change my coding based on how PHP is progressing. Thanks! Wes > Turn on re

[PHP] php and jpgraph

2002-05-14 Thread Maciej Przybycien
Hi, I am using php-4.1.2 and jpgraph-1.6.1 and I would like to generate in my program one filenam.php that would contain several not superimposed histograms(eg. jpgraph LinePlot). I would like to draw on one page eg. 20 different histograms. Can it be done? Thank you, Maciek

Re: [PHP] WTF

2002-05-14 Thread Rasmus Lerdorf
Turn on register_globals in your php.ini file. On Tue, 14 May 2002, mail-list wrote: > This is bothering the hell out of me. The first file is a simple form, > passing the information to the second file (send_request.php). For some > reason the variables are not passing through to the second pag

[PHP] WTF

2002-05-14 Thread mail-list
This is bothering the hell out of me. The first file is a simple form, passing the information to the second file (send_request.php). For some reason the variables are not passing through to the second page. I have tried this on my desktop (Win2k, php4.latest, apache, etc.) and it will work correc

Re: [PHP] Using PHP on Windows for the first time

2002-05-14 Thread Steve Buehler
Either put the following line at the top of your php script: error_reporting(E_ALL & ~(E_NOTICE | E_USER_NOTICE | E_WARNING | E_COMPILE_WARNING | E_CORE_WARNING | E_USER_WARNING) ); Or change the error reporting in your php.ini file. Steve At 08:48 AM 5/14/2002, Bob Strasser wrote: >Anyone kno

Re: [PHP] PHP 4.2x changes

2002-05-14 Thread Philip Olson
On Tue, 14 May 2002, Rasmus Lerdorf wrote: > Turn on register_globals in your php.ini file and things should start > working again. That reply was way too short and easy ;) > On Tue, 14 May 2002, Weston Houghton wrote: > > > > > All, > > > > I've recently upgraded from 4.1.2 to 4.2.0. And of c

Re: [PHP] Uploading JPEG's - Security Issues?

2002-05-14 Thread Rasmus Lerdorf
Have a look at the getimagesize() function. This function looks at the actual file data, not the mime type nor the file's extension but the data itself and tells you what sort of image file it is. And no, it wouldn't really be after the fact because because stores the file with a temporary rando

Re: [PHP] Cool PHP Tricks/Features ?

2002-05-14 Thread Sqlcoders.com Programming Dept
I've seen real-life examples of 100k pages going down to around 30k, considering that decrease in size, when you remember that CPU time is relatively cheap compared to bandwidth, it's worth the processing overhead in my opinion. Small (<20k) pages probably aren't worth it, for anything larger the

[PHP] Uploading JPEG's - Security Issues?

2002-05-14 Thread Andre Dubuc
My question will probably expose my woeful lack understanding of security breaches, but perhaps someone can enlighten me. On my site, registered members will be allowed to upload jpg/jpeg pictures. I'm concerned about possible security problems. First, is there a way to ensure that a picture (

Re: [PHP] Using PHP on Windows for the first time

2002-05-14 Thread Justin French
unregistered variable message means that you're doing something like: if($address == "foo") { // something } if $address isn't set, then it's an unregistered var. this *might* solve it: if(isset($address)) { if($address == "foo") { // do something } } the

RE: [PHP] Using PHP on Windows for the first time

2002-05-14 Thread John Holmes
Your error_reporting is probably set to different levels. www.php.net/error_reporting ---John Holmes... > -Original Message- > From: Bob Strasser [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, May 14, 2002 9:48 AM > To: [EMAIL PROTECTED] > Subject: [PHP] Using PHP on Windows for the first

RE: [PHP] Cool PHP Tricks/Features ?

2002-05-14 Thread John Holmes
Yes, it can be useful. I don't dispute that. All I'm saying is that it's not the "save-all" or whatever. Look at how much traffic it's going to save you, look at how much extra processing power you're taking from your CPU, look at the connections and computers of your clients, etc. Maybe it's not

[PHP] Using PHP on Windows for the first time

2002-05-14 Thread Bob Strasser
Anyone know a simple explanation of how to use forms using the post method on PHP for Windows. I use PHP on Linux and I don't have any problems. I do the same thing on Windows and I get an unregistered variable message on Windows. I assume I've missed something. Global variables is on. Why

RE: [PHP] PHP 4.2x changes

2002-05-14 Thread Matthew Walker
Actually, it is $PHP_SELF. Try $_SERVER['PHP_SELF'] Matthew Walker Senior Software Engineer ePliant Marketing -Original Message- From: Weston Houghton [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 14, 2002 6:14 PM To: [EMAIL PROTECTED] Subject: [PHP] PHP 4.2x changes All, I've rece

RE: [PHP] Cool PHP Tricks/Features ?

2002-05-14 Thread SP
Well if his normal page is 100k and he can cut the size down to 50k with gzip then instead of having a monthly transfer of 100 GB for example, he would only be paying for 50 GB. Seems like it's useful for extremely large sites. -Original Message- From: John Holmes [mailto:[EMAIL PROTEC

RE: [PHP] Sessions Without Cookies or SID Passing...

2002-05-14 Thread David Freeman
> You're missing one method - using the user's IP address > It's not a guaranteed fool-proof method, but if you don't > want to use cookies or the URL, then this sorta works. Unless there's a firewall using NAT or a proxy cache involved. I know for a fact that our internal network only ever

RE: [PHP] Sessions Without Cookies or SID Passing...

2002-05-14 Thread Matthew Walker
Blah. That's a really ugly choice, but I suppose we may end up having to do that. I'd give my kingdom for always-on cookies. Ah well. I'll look into this some more once my current project is finished. Thanks for your advice. (And thanks to everyone else too) Matthew Walker Senior Software Engine

[PHP] Accented characters in Emails

2002-05-14 Thread Jean-Francois Lavoie
I retrieve text with accented characters from a textarea and prepare the message headers using some user-defined functions and send it using the php mail() function. The accented characters are kept nicely Here's the importants headers i'm receiving from this message Content-Type: text/plain;

[PHP] Re: inserting PHP code into PHP document

2002-05-14 Thread David Robley
In article <000c01c1fba6$12a4aed0$0101@pawel>, [EMAIL PROTECTED] says... > Hi All: > > Many of my pages has similar lines of code that I would like to group > and have it inserted when required: > > if ($HTTP_SESSION_VARS[first_name]){ > $header='...'; > > } else { >

RE: [PHP] Sessions Without Cookies or SID Passing...

2002-05-14 Thread Vail, Warren
Especially if they come through a gateway, or use internet connection sharing, you can't tell them apart using IP Addresses. Warren Vail Tools, Metrics & Quality Processes (415) 667-7814 Pager (877) 774-9891 215 Fremont 02-658 -Original Message- From: Mark Charette [mailto:[EMAIL PROTE

Re: [PHP] Load data infile

2002-05-14 Thread Dennis Moore
You may want to check permissions within your database. The web server user may not have permissions to perform this action. /dkm - Original Message - From: <[EMAIL PROTECTED]> To: "Philip Hallstrom" <[EMAIL PROTECTED]> Cc: "Peter J. Schoenster" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>

RE: [PHP] Sessions Without Cookies or SID Passing...

2002-05-14 Thread Mark Charette
If it ain't foolproof then only a fool would use it ... IP addresses are just about the worst way to identify anyone. -Original Message- From: Martin Towell [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 14, 2002 8:17 PM To: 'Rasmus Lerdorf'; Matthew Walker Cc: [EMAIL PROTECTED] Subject:

Re: [PHP] PHP 4.2x changes

2002-05-14 Thread Rasmus Lerdorf
Turn on register_globals in your php.ini file and things should start working again. On Tue, 14 May 2002, Weston Houghton wrote: > > All, > > I've recently upgraded from 4.1.2 to 4.2.0. And of course my script has > stopped working. I know a lot with the globals has changed, but to be > honest,

RE: [PHP] Sessions Without Cookies or SID Passing...

2002-05-14 Thread Rasmus Lerdorf
> Could you explain how this could be accomplished, because I'm not > understanding how to do it. > > As I understand HTTP Authentication (correct me if I'm wrong), the > user's computer still has to send a 'username/password' pair to perform > the authentication. I can't see how this could be use

RE: [PHP] Sessions Without Cookies or SID Passing...

2002-05-14 Thread Rasmus Lerdorf
No, it doesn't work at all. All sorts of people are behind proxies. Every AOL user, for example. All these people end up showing up as the same, or at least one of a pool of a few dozen ips. If you use this methods millions of users will end up sharing the same shopping cart. That's probably no

RE: [PHP] Sessions Without Cookies or SID Passing...

2002-05-14 Thread Matthew Walker
Could you explain how this could be accomplished, because I'm not understanding how to do it. As I understand HTTP Authentication (correct me if I'm wrong), the user's computer still has to send a 'username/password' pair to perform the authentication. I can't see how this could be used to mainta

[PHP] inserting PHP code into PHP document

2002-05-14 Thread PR
Hi All: Many of my pages has similar lines of code that I would like to group and have it inserted when required: if ($HTTP_SESSION_VARS[first_name]){ $header='...'; } else { $header='...'; }; I placed the code in separate file and tried implode but

RE: [PHP] Sessions Without Cookies or SID Passing...

2002-05-14 Thread Martin Towell
You're missing one method - using the user's IP address It's not a guaranteed fool-proof method, but if you don't want to use cookies or the URL, then this sorta works. -Original Message- From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 15, 2002 10:04 AM To: Matthew Wa

[PHP] php fgets()

2002-05-14 Thread arnaud gonzales
Hi, I'm newbie in php and i would like to clearly understand how can i use: LENGTH in string fgets ( int fp [, int length]) "Returns a string of up to length - 1 bytes read from the file pointed to by fp. Reading ends when length - 1 bytes have been read, on a newline (which is included in t

[PHP] PHP 4.2x changes

2002-05-14 Thread Weston Houghton
All, I've recently upgraded from 4.1.2 to 4.2.0. And of course my script has stopped working. I know a lot with the globals has changed, but to be honest, I am not sure how or why. Can anyone give me an initial lead as to what I should look for first? I know I use the following elements: $_SER

RE: [PHP] Sessions Without Cookies or SID Passing...

2002-05-14 Thread Miguel Cruz
On Tue, 14 May 2002, Matthew Walker wrote: > The sites are not dynamic, but the shopping cart /is/. The problem is, > if people don't have cookies on, when they return to the site to order > more products, they loose the SID that has been appended to the links > inside the cart, and thus loose the

Re: [PHP] Storing a object in the session??

2002-05-14 Thread Brad Hubbard
On Wed, 15 May 2002 04:02, Peter Atkins did align ASCII characters thusly: > All, > > I really need help on this one... I have a class called "Profile" and I > want to store the properties of this class in the session after I give them > values shown below: > > Step 1: > > // set properties of cla

RE: [PHP] Sessions Without Cookies or SID Passing...

2002-05-14 Thread Rasmus Lerdorf
I am understanding the problem perfectly. HTTP is stateless. You want to maintain state accross requests. This is done in 3 different ways. 1. Cookies 2. URL Mangling 3. HTTP Authentication You said you did not want to do 1 or 2. That only leaves you with HTTP Authentication. HTTP Authentic

RE: [PHP] Sessions Without Cookies or SID Passing...

2002-05-14 Thread Matthew Walker
You're not understanding the problem. This is not an authentication situation. We are using sessions to track information about what a customer's OrderID is, and other related information. Matthew Walker Senior Software Engineer ePliant Marketing -Original Message- From: Rasmus Lerdorf

RE: [PHP] Sessions Without Cookies or SID Passing...

2002-05-14 Thread Matthew Walker
The sites are not dynamic, but the shopping cart /is/. The problem is, if people don't have cookies on, when they return to the site to order more products, they loose the SID that has been appended to the links inside the cart, and thus loose the contents of their shopping cart. Matthew Walker S

Re: [PHP] Sessions Without Cookies or SID Passing...

2002-05-14 Thread Miguel Cruz
On Tue, 14 May 2002, Matthew Walker wrote: > Many of the people who will be shopping on our sites have cookies > disabled, which presents a problem when using sessions. Now, I am aware > of the fact that we could append the SID constant to every URL, but this > will not work for us. None of our si

Re: [PHP] Sessions Without Cookies or SID Passing...

2002-05-14 Thread Rasmus Lerdorf
Use standard HTTP authentication over SSL - that's the only other way. On Tue, 14 May 2002, Matthew Walker wrote: > We have a shopping cart product we're developing in PHP, and I've > recently come across I dilemma that I need to find a reliable solution > to. > > Many of the people who will be

[PHP] Sessions Without Cookies or SID Passing...

2002-05-14 Thread Matthew Walker
We have a shopping cart product we're developing in PHP, and I've recently come across I dilemma that I need to find a reliable solution to. Many of the people who will be shopping on our sites have cookies disabled, which presents a problem when using sessions. Now, I am aware of the fact that w

RE: [PHP] Cool PHP Tricks/Features ?

2002-05-14 Thread John Holmes
Why do you think this is useful to you? I remember reading an article on this and its conclusion was that zipping the output was only beneficial for large data between fast computers over a slow pipe. You have to look at who your clients are and if it's beneficial to have their machine use up extr

Re: [PHP] Re: Question about string replace -PHP

2002-05-14 Thread Jason Wong
On Wednesday 15 May 2002 05:20, Josh & Valerie McCormack wrote: > I didn't ask the question about this, but I have a related issue. I'm > trying to do a replace, and am using str_replace, but the outcome is not > what I expected. > > Here's my code: > > $fp = fopen("new_data.csv", "r"); > $te

[PHP] Re: Question about string replace -PHP

2002-05-14 Thread Josh & Valerie McCormack
I didn't ask the question about this, but I have a related issue. I'm trying to do a replace, and am using str_replace, but the outcome is not what I expected. Here's my code: Here's the text file it's working on: John Smith Peter Cooper Mike Brown Lisa Crow Here's the outcom

Re: [PHP] Destroying a session!!!

2002-05-14 Thread Kevin Stone
Gabor, after some searching I discovered some wonderful user comments in the session_destroy() page you might want to check out. You have to get dirty with cookies but it may be possible after all. :) http://www.php.net/manual/en/function.session-destroy.php -Kevin - Original Message

Re: [PHP] Genus who came up with "Self Destruct Code" & "Copy Pro tection"

2002-05-14 Thread Jason Wong
On Wednesday 15 May 2002 03:24, 1LT John W. Holmes wrote: > > Does anyone see any flaws in this? > > As long as you realize that any method like this is just going to be > retrieving a string, basically. You don't get any PHP code back, you just > get the results of the PHP code. So in your examp

Re: [PHP] Direction to file-upload ?

2002-05-14 Thread Miguel Cruz
On Tue, 14 May 2002 [EMAIL PROTECTED] wrote: > after studying and searching manual/archives, > I didn't find the explanation to upload multiple files > from a "single ". > What I want is to let the user select multiple files > from the files-box appearing in the browser and let him/her > upload th

Re: [PHP] Genus who came up with "Self Destruct Code" & "Copy Pro tection"

2002-05-14 Thread Miguel Cruz
On Tue, 14 May 2002, 1LT John W. Holmes wrote: > - Original Message - > From: "Miguel Cruz" <[EMAIL PROTECTED]> >> On Tue, 14 May 2002, Collins, Robert wrote: >>> $core_functions = >>> "http://www.domain.com/path/to/file/core_functions.php";; >>> require_once($core_function

Re: [PHP] Direction to file-upload ?

2002-05-14 Thread 1LT John W. Holmes
You can't do that. You have to provide a seperate box for each file. ---John Holmes... - Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, May 14, 2002 4:20 PM Subject: [PHP] Direction to file-upload ? Hi Folks, after studying and searching manual/arch

Re: [PHP] Genus who came up with "Self Destruct Code" & "Copy Pro tection"

2002-05-14 Thread 1LT John W. Holmes
- Original Message - From: "Miguel Cruz" <[EMAIL PROTECTED]> > On Tue, 14 May 2002, Collins, Robert wrote: > > $core_functions = > > "http://www.domain.com/path/to/file/core_functions.php";; > > require_once($core_functions); > > 1) You'd have to eval() it rather than requi

[PHP] Direction to file-upload ?

2002-05-14 Thread heinisch
Hi Folks, after studying and searching manual/archives, I didn“t find the explanation to upload multiple files from a "single ". What I want is to let the user select multiple files from the files-box appearing in the browser and let him/her upload this selection. If I put a second '' then a secon

RE: [PHP] Genus who came up with "Self Destruct Code" & "Copy Pro tection"

2002-05-14 Thread Miguel Cruz
On Tue, 14 May 2002, Collins, Robert wrote: > $core_functions = > "http://www.domain.com/path/to/file/core_functions.php";; > require_once($core_functions); 1) You'd have to eval() it rather than requiring it. 2) lynx -source -dump http://www.domain.com/path/to/file/core_functi

RE: [PHP] help with undefined variables, please

2002-05-14 Thread Luc Saint-Elie
At 21:57 14/05/2002 +0200, Luc Saint-Elie wrote: > > 4.1 => isset() returns false if the variable is not set OR if the > variable is empty typo.. wanted to say : > 4.1 isset() returns true if the variable is set ORT if the variable is empty Luc -- PHP General Mailing List (http://www.php.n

Re: [PHP] Genus who came up with "Self Destruct Code" & "Copy Protection"

2002-05-14 Thread Miguel Cruz
On Wed, 15 May 2002, Jason Wong wrote: > That's exactly what you need :) Have some core functions that are remotely > accessed. > > for example: > > $result = file("http://www.myserver.com/functions/square_root.php?input=4";); > > Then at www.myserver.com the square_root.php file would contain

RE: [PHP] help with undefined variables, please

2002-05-14 Thread Luc Saint-Elie
At 12:49 14/05/2002 -0600, Matthew Walker wrote: >I prefer to use isset(), not empty(). It's more accurate, in that it >knows the difference between a variable that just isn't set, and one >that has an empty value (which may be valid). hello, You may want to do some tests. last time i did that

RE: [PHP] css sheets in designs

2002-05-14 Thread Miguel Cruz
On Tue, 14 May 2002, Jay Blanchard wrote: >> CSS sheets have to be in the document root somewhere, don't they? > > Nope. You just have to be able to refer to them in the LINK REL tag in the > sheet(s) to be styled. But the browser can't follow that reference if it's not below the document root o

Re: [PHP] Destroying a session!!!

2002-05-14 Thread Kevin Stone
The cookie that stores the session id will live until the browser window is closed. You can apply a different lifetime to the cookie by using session_set_cookie_params() but I doubt that'll do what you want. Just use the session_id() function to change the session id manually when you register

Re: [PHP] Accessing Variables by Name

2002-05-14 Thread Miguel Cruz
On Tue, 14 May 2002, Steven Walker wrote: > I couldn't find this in the documentation or on marc... Is there a way > to access a variable by name using a string value? For example: > > $myvariable = 10; > $stringdata = "myvariable"; > $[$stringdata] == $myvariable; > > Obviously the last line i

Re: [PHP] Accessing Variables by Name

2002-05-14 Thread Philip Olson
These are called variable variables, and can be read about here: http://uk.php.net/manual/en/language.variables.variable.php Replace your [ ] with { } and you'll be good to go. Regards, Philip Olson On Tue, 14 May 2002, Steven Walker wrote: > Hi, > > I couldn't find this in the documenta

[PHP] Accessing Variables by Name

2002-05-14 Thread Steven Walker
Hi, I couldn't find this in the documentation or on marc... Is there a way to access a variable by name using a string value? For example: $myvariable = 10; $stringdata = "myvariable"; $[$stringdata] == $myvariable; Obviously the last line is invalid, but is there a way to do this? I know abo

Re: [PHP] Re: One more Regular Expression Question...

2002-05-14 Thread Miguel Cruz
On Tue, 14 May 2002, Brad Melendy wrote: > I'm going to check out preg_match(). What if there are more than one > instance of and in my string, but I know that I want the last two > occurances at the end. Can I tell it to check starting at the end of the > string and work forwards? Thanks agai

Re: [PHP] XML: Similiar Multiple Tags With Different Data

2002-05-14 Thread Analysis & Solutions
Yo, Sebastian: On Tue, May 14, 2002 at 07:26:30PM +0200, Sebastian A. wrote: > > function startElement($parser, $name, $attrs='') { > global $tag, $Data, $p; > array_push( $tag, $name ); > while ( list($Key,$Val) = each($attrs) ) { > $p->attr_data["$name:$Key"] = tr

Re: [PHP] How to stop site flipping?

2002-05-14 Thread Miguel Cruz
On Tue, 14 May 2002, Kirk Babb wrote: > I have a listing of department alumni which calls up their email address > when one of the form buttons (letters of the alphabet) is clicked. The > emails are not hard-coded; the form sends the $letter to a php script which > handles all the usual stuff (th

Re: [PHP] Genus who came up with "Self Destruct Code" & "Copy Pro tection"

2002-05-14 Thread 1LT John W. Holmes
[snip] > That's exactly what you need :) Have some core functions that are remotely > accessed. > > for example: > > $result = file("http://www.myserver.com/functions/square_root.php?input=4";); > > Then at www.myserver.com the square_root.php file would contain: >echo sqrt($input); > ?> > > D

[PHP] Use of an array element

2002-05-14 Thread Liam Gibbs
Is there any way of using an array element in the same line as it is filled? For instance, here's what I have: Say I want the image width of a pic, I have to: $f = getimagesize("certainpic.jpg"); print("$f[0]"); After this, I never use $f anymore. There's no reason to have it hanging around. Is

Re: [PHP] array_search in 2-d arrays

2002-05-14 Thread Pushkar Pradhan
Regarding my recent post, I am sorry $key is not undefined it is just "0" or "FALSE". > I've a 2 D array and would like to search for vals. in the first dimension > only i.e. > myArray[0][0] > myArray[1][0] > myArray[2][0] > myArray[3][0] > . > . > . > and not in the elements myArray[0][1] > >

[PHP] array_search in 2-d arrays

2002-05-14 Thread Pushkar Pradhan
I've a 2 D array and would like to search for vals. in the first dimension only i.e. myArray[0][0] myArray[1][0] myArray[2][0] myArray[3][0] . . . and not in the elements myArray[0][1] CODE: for($l = 0; $l < count($layer); $l++) { $key = array_search($layer[$l], $layerDes); // $layerDes

RE: [PHP] Load data infile

2002-05-14 Thread Jay Blanchard
[snip] Is it possible to do the load data info mysql command via PHP I get an access denied error from mysql when i try to do that. [/snip] Are the permissions granted properly for the PHP user in the connection statement? Jay -- PHP General Mailing List (http://www.php.net/) To unsubscribe

[PHP] Load data infile

2002-05-14 Thread php
Hello, Is it possible to do the load data info mysql command via PHP I get an access denied error from mysql when i try to do that. Thanks Randy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] help with undefined variables, please

2002-05-14 Thread Matthew Walker
I prefer to use isset(), not empty(). It's more accurate, in that it knows the difference between a variable that just isn't set, and one that has an empty value (which may be valid). Matthew Walker Senior Software Engineer ePliant Marketing -Original Message- From: Philip Olson [mailt

[PHP] output_compression refuses to work

2002-05-14 Thread Nathan
I've done some research on this and I'm a bit baffled as to why I can't get zlib.output_compression to work. I have two machines I've tried this on, and neither one wants to compress anything. The machines are RH 7.1 and 7.2, both running Apache 1.3.24 and PHP 4.2.0, though I couldn't get it wo

Re: [PHP] variable for $_GET or $_POST

2002-05-14 Thread Jeff Bearer
$_REQUEST, sorry didn't see it the first time. On Tue, 2002-05-14 at 14:04, Jeff Bearer wrote: > Quick question if I'm programming with register globals off, and want to > get a variable that is allowed to be set with either a GET or POST > method, is there 1 variable that will contain the value

[PHP] Destroying a session!!!

2002-05-14 Thread Gabor Niederlaender
Hi all! I have seen a couple of discussions on the same topic, but even so I do not really know how to destroy sessions. I would like to achieve, that a second login after a logout generates a wholly new session, with a new session id. I have tried: session_unset(); session_destroy(); an

Re: [PHP] variable for $_GET or $_POST

2002-05-14 Thread Philip Olson
see also: $_REQUEST, extract() and/or import_request_variables() Regards, Philip Olson On 14 May 2002, Jeff Bearer wrote: > Quick question if I'm programming with register globals off, and want to > get a variable that is allowed to be set with either a GET or POST > method, is there 1 variabl

Re: [PHP] help with undefined variables, please

2002-05-14 Thread Philip Olson
> PHP Notice: Undefined variable: action in > C:\Apache\htdocs\easyletter2\easyletter.php on line 73 > > Why do I get an undefined variable error for $action, $pw, $disp, > $found when they do not have to be declared in the script? > if ($action=="sign"){ At this point, $action was not set.

[PHP] variable for $_GET or $_POST

2002-05-14 Thread Jeff Bearer
Quick question if I'm programming with register globals off, and want to get a variable that is allowed to be set with either a GET or POST method, is there 1 variable that will contain the value? Or do I have to find it like with something like this? if($_GET[test]) $test=$_GET[test]; else $tes

[PHP] Storing a object in the session??

2002-05-14 Thread Peter Atkins
All, I really need help on this one... I have a class called "Profile" and I want to store the properties of this class in the session after I give them values shown below: Step 1: // set properties of class $objProfile = new Profile('1', 'John', 'Doe') ; // store object in session

[PHP] fgetcsv With a String?

2002-05-14 Thread Jonathan Rosenberg
Is there any way that I can use fgetcsv, but have it get its input from a string, instead of using a file pointer? >From the online docs, there doesn't seem to be a way, but I thought I'd check with the list. -- JR -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http:

Re: [PHP] help with undefined variables, please

2002-05-14 Thread The Gabster
thanks a lot gabi "Jerome Houston" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > hi- > > it is not REQUIRED for variables to be initialized in PHP, but if your error > reporting is on too high, it will tell you, just to make sure you know. to > turn

Re: [PHP] Newbie challenge to brainiacs

2002-05-14 Thread David Jackson
Jay Blanchard wrote: > The burning issue that begs to be answered is, why reinvent the wheel? There is a least a dozen blogs on freshmeat for PHP along... Unless your doing it just for kicks, which is OK. David > [snip] > > I want to try to find the hour that has the most hits > > The day o

[PHP] Re: Compatiblity: Zend-1.20 + PHP4.2.1

2002-05-14 Thread J Smith
Basically, the Zend Engine is kind of like a macro scripting engine that PHP runs on top of. You can actually remove the Zend Engine and use it in other applications, like a macro engine for a work processing app, for instance. The Zend Optimizer isn't a part of the Zend Engine or PHP; it's an

Re: [PHP] Problems compiling php4.2.1 (lex command not found)

2002-05-14 Thread andy
thanx, works "Rasmus Lerdorf" <[EMAIL PROTECTED]> schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > You don't really need to know what flex is. Just install the flex rpm. > > On Tue, 14 May 2002, andy wrote: > > > does that mean that I can fix it anyhow, or this is a bug on

Re: [PHP] help with undefined variables, please

2002-05-14 Thread Jerome Houston
hi- it is not REQUIRED for variables to be initialized in PHP, but if your error reporting is on too high, it will tell you, just to make sure you know. to turn your error reporting to a different level, you can change your php.ini: http://www.php.net/manual/en/configuration.php#ini.error-rep

Re: [PHP] changing language on fly

2002-05-14 Thread Yura
Here are two possible solutions: 1. 2. Make link to "indexr.php?" THank you for help =)) I just was too lazy=( Youri > You might want to use the format: > >http://www.body-builders.org/index.php.en?links=1 >http://www.body-builders.org/index.php.ru?links=1 > > so that you can take

RE: [PHP] XML: Similiar Multiple Tags With Different Data

2002-05-14 Thread Sebastian A.
Ok well that function is the character_data_handler function. Here is the Start Element function: function startElement($parser, $name, $attrs='') { global $tag, $Data, $p; array_push( $tag, $name ); while ( list($Key,$Val) = each($attrs) ) { $p->attr_data["$name:

[PHP] Max execution time error after script ends

2002-05-14 Thread Fred
I am using PHP 4.1.2 in standalone (cgi binary) mode on linux so that I can use PHP for shell scripts related to large socket and database operations. In php.ini I have max_execution_time set to 0 and memory limit set to 104857600 (100MB). The script successfully fills a very large array with i

[PHP] help with undefined variables, please

2002-05-14 Thread The Gabster
Hello all! I have a newsletter script that works fine but I receive some undefined variables errors in Apache's error log: PHP Notice: Undefined variable: action in C:\Apache\htdocs\easyletter2\easyletter.php on line 73 PHP Notice: Undefined variable: action in C:\Apache\htdocs\easyletter2\e

Re: [PHP] Calculating the bandwith usage

2002-05-14 Thread Jason Wong
On Wednesday 15 May 2002 01:14, Bogdan Stancescu wrote: > Depends on the traffic on that server - and the traffic on those > specific pages. It may be too complicated to parse the logs of a busy > site for just a couple of pages. He may use output control functions and > use ob_get_length() to get

Re: [PHP] Calculating the bandwith usage

2002-05-14 Thread Bogdan Stancescu
Depends on the traffic on that server - and the traffic on those specific pages. It may be too complicated to parse the logs of a busy site for just a couple of pages. He may use output control functions and use ob_get_length() to get the job done - a little complicated, I must admit, but it m

RE: [PHP] Changes in 4.2.1

2002-05-14 Thread Steve Buehler
Yes, short tags were/are on. I had installed from: PHP_4.2.1_installer I now reinstalled with: PHP_4.2.1_zip_package and it is working finefor the moment. I think I had a problem like this on the old version that I used too. I guess that I just have to use the zip package instead. Probab

RE: [PHP] Changes in 4.2.1

2002-05-14 Thread Jon Haworth
Hi Steve, > Your right. I should give more specifics. Ok. I have a page called > main.php. The only thing in it is: > echo "hi"; > ?> > That's it. I tried to run it and it gave me an "HTTP 500 - Internal server > error". Are you sure you've got short tags turned on? What happens if you

  1   2   >