RE: [PHP] Genus who came up with Self Destruct Code Copy Protection

2002-05-14 Thread Miguel Cruz
Step 1: Run the files through a prettyprinter. That instantly restores the indentation and line breaks. Step 2: Open up in a text editor like TextPad that has multi-file search-and-replace and rename all the functions back from their garbled names as you determine what they do. Unless it was

Re: [PHP] Generating PINs

2002-05-14 Thread Evan Nemerson
Usually software uses a specific serial number format, rather than a remote database of valid numbers. for instance, the fifth character must be the third % tenth. Something like that. 3HH5R could be random, and E59VB and 7SX99 would be determined by a complex algorithm operating on the five

Re: [PHP] Generating PINs

2002-05-14 Thread Miguel Cruz
On Tue, 14 May 2002, Alvin Tan wrote: This is not really a PHP question, but seeing that the final application will be in PHP, I figured this'll be the best place to start. I have a client who wants to release a unique PIN for each product they sell which works as a key to get more goodies

Re: [PHP] Problem on fread!

2002-05-14 Thread Miguel Cruz
On Tue, 14 May 2002, Jack wrote: I had a problem with fread function! I had a text file containning a date, so inside the text file, it was something look like this : 05032002 then now i want to read this file but want to seperate the dd -mm-, so i want to get the first two digit as the

Re: [PHP] Enabling Java in a web browser using PHP script

2002-05-14 Thread Miguel Cruz
On Tue, 14 May 2002, Michael P. Carel wrote: How could i automatically enable Java in a Web browser to execute java script using PHP. I have some javascripts line's in my PHP script and im worried that it will not work if the browser was not java enabled. Or is there any why to execute a java

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

2002-05-14 Thread Miguel Cruz
Preg is more flexible than ereg. if (preg_match('/\a.*?\(.+?)\\/a/', $string1, $matches)) print Matched: {$matches[1]}; That'll just get what's between the a and /a. http://php.net/preg_match for more info. miguel On Mon, 13 May 2002, Brad Melendy wrote: Thanks Philip. This gives me

RE: [PHP] Problem with the double quotes

2002-05-14 Thread Miguel Cruz
On Tue, 14 May 2002, Manisha wrote: The file is HTML file. Actually I am sending email with message as this HTML file's content. I changed the header of email to accommodate HTML. Reading the file in array and putting array values as a message - whether still double quotes will not give

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

2002-05-14 Thread Miguel Cruz
On Mon, 13 May 2002, SHEETS,JASON (Non-HP-Boise,ex1) wrote: Yes even if you take some steps to protect your code it may still be distributed, but it WILL be distributed if you don't. Think about security, as a sysadmin I can't just not apply security updates, you apply every security update

RE: [PHP] Problem with the double quotes

2002-05-14 Thread Manisha
Thanks to all who gave me reply. manisha At 02:40 AM 5/14/02 -0500, Miguel Cruz wrote: On Tue, 14 May 2002, Manisha wrote: The file is HTML file. Actually I am sending email with message as this HTML file's content. I changed the header of email to accommodate HTML. Reading the file in

Re: [PHP] template logic problem

2002-05-14 Thread Miguel Cruz
By default, PHP can start sending output before it's all been generated. This results in faster results for web site visitors. On the other hand, it's not compatible with deciding late in the game that you want a few extra headers. If you want to do this sort of thing, read about output

[PHP] RE: An array of objects?

2002-05-14 Thread Tim Ward
$_SESSION[rooms][1] = array(room_name=Bob's Room, room_status=1) $_SESSION [rooms][2] = array(room_name=Jeff's Room, room_status=0) etc. then for a given room_id ... echo($_SESSION [$room_id][room_name]) and so on Tim Ward Internet Chess www.chessish.com http://www.chessish.com

[PHP] mysql to .csv file

2002-05-14 Thread Amit Singh
Hi Folks, I m trying to export data from mysql using 'SELECT * INTO OUTFILE...' query into a '.csv' file. It does happen successfully but I don't get the field values (having commas or enter characters)enclosed in double/single quotes. Is there a way out to accomplish this? If yes, please

[PHP] Re: mysql to .csv file

2002-05-14 Thread Jochem
Try MysqlAdmin!! Amit Singh [EMAIL PROTECTED] schreef in bericht [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi Folks, I m trying to export data from mysql using 'SELECT * INTO OUTFILE...' query into a '.csv' file. It does happen successfully but I don't get the field values (having

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

2002-05-14 Thread SP
Well I've never tried it but I've gone through some of the big open source apps out there trying to learn their techniques and I can tell you I hate going through my code let anyone someone else's. -Original Message- From: Miguel Cruz [mailto:[EMAIL PROTECTED]] Sent: May 14, 2002 2:55

Re: [PHP] template logic problem

2002-05-14 Thread David Robley
In article 001f01c1fae4$5291f830$0d01a8c0@avex, [EMAIL PROTECTED] says... HI miguel, thanks for your answer. I was hoping i could do something like you suggested. Cold Fusion has a tag called cfhtmlhead that will include anything within the head tags. You can call this function even

[PHP] Re: version differences

2002-05-14 Thread David Robley
In article [EMAIL PROTECTED], [EMAIL PROTECTED] says... Hi all, Can anyone tell me whether or not the sprintf function existed in php 4.12? I have the following line: $order_value=sprintf('%.2f', floatval($quantity)*7.0); Which works at home on my version 4.2 of php but whne i upload

[PHP] PHP 4.2.1 release announcement

2002-05-14 Thread Derick Rethans
Hello, PHP 4.2.1 is released today, it's a bug fix release which addresses some serious bugs (and a lot of other little bugs) in 4.2.0. The full release announcement follows below: This bug fix release solves a few bugs found in PHP 4.2.0. PHP 4.2.1 includes the following fixes:

[PHP] Upload with a defferience

2002-05-14 Thread r
Hi Guys, Yes, I know, everyday somebody asks about the upload thingy...the same old dumb questions over and over and over and but I promise you, my problem is differient. Heres the deal, I am running 2 sites, one with PHP and a MySql database (site 1) the other with just PERL support. (site

[PHP] PHP and mySQL

2002-05-14 Thread City Colleges of Chicago - Mannheim
I am getting a parse error on line 75. I am trying to say: if there is a booktitle and a quantity chosen, then go to that booktitle and adjust the quantity in the database. Thanks! Renee ?php $user = adminer; $pass = hoosiers; $db = Book Store1; $local = jolinux; $link = mysql_connect(

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

2002-05-14 Thread David J Jackson
Is my hosting company trying to pull the wool over my eyes? There response to upgrading to 4.2.1, was that it isn't compatible with Zind optomizer 1.20? The only *issue* I seen with 4.2.x is of course register_globals! (which of course be changed in php.ini) I don't have a problem with them

Re: [PHP] PHP and mySQL

2002-05-14 Thread Jason Wong
On Tuesday 14 May 2002 18:38, City Colleges of Chicago - Mannheim wrote: I am getting a parse error on line 75. I am trying to say: if there is a booktitle and a quantity chosen, then go to that booktitle and adjust the quantity in the database. if ($booktitle AND $quantity) { ... ?php

[PHP] Re: PHP and mySQL

2002-05-14 Thread David Robley
In article [EMAIL PROTECTED], [EMAIL PROTECTED] says... I am getting a parse error on line 75. I am trying to say: if there is a booktitle and a quantity chosen, then go to that booktitle and adjust the quantity in the database. Thanks! Renee ?php $user = adminer; $pass =

Re: [PHP] PHP and mySQL

2002-05-14 Thread webmaster
You are missing a before $booktitle. old:booktitle=$booktitle AND quantity=quantity; new:booktitle=$booktitle AND quantity=quantity; JJ Harrison [EMAIL PROTECTED] www.tececo.com - Original Message - From: Jason Wong [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, May 14, 2002

RE: [PHP] PHP and mySQL

2002-05-14 Thread Craig Vincent
snip }else if(!$submit){ /snip Acthough you didn't show 75 lines of code my guess would be your problem lies here. The else and the if shouldn't have a space between them. } elseif(!$submit){ See how that works for you =) Also your SQL is faulty snip $sql = UPDATE Book2 SET

RE: [PHP] PHP and mySQL

2002-05-14 Thread Craig Vincent
You are missing a before $booktitle. old:booktitle=$booktitle AND quantity=quantity; new:booktitle=$booktitle AND quantity=quantity; So you're saying $sql = UPDATE Book2 SET stock ='$stock-quantity' WHERE booktitle=$booktitle AND quantity=quantity; is the correct SQL statement? Me thinks

[PHP] php with access

2002-05-14 Thread S.Sule
Hello PHP wizards, Need some help on connection with 2 different databases. My project included refering to 2 different databases, one in mysql and other in MS-Access. It was done normally,and thing is working perfectly. The problem arised when a need came to access the same database via

RE: [PHP] css sheets in designs

2002-05-14 Thread Jay Blanchard
[snip] CSS sheets have to be in the document root somewhere, don't they? [/snip] Nope. You just have to be able to refer to them in the LINK REL tag in the sheet(s) to be styled. HTH! Jay -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Newbie challenge to brainiacs

2002-05-14 Thread Jason Wong
On Tuesday 14 May 2002 19:42, Josh Edwards wrote: Here is a sample of my weblog that reads into an array from a file ie $filename = (combined_log); $fcontents = file($filename); 203.29.154.13 - - [08/May/2002:21:21:07 +1000] GET /A1.php HTTP/1.1 200 417 - Mozilla/4.0 (compatible; MSIE

RE: [PHP] Newbie challenge to brainiacs

2002-05-14 Thread David Freeman
Here is a sample of my weblog that reads into an array from a file ie I want to try to find the hour that has the most hits The day of the week that has the most hits and the max and ave no of hits of these. I haven't given it a whole lot of thought but I'd be tempted to dump the

RE: [PHP] Where's the error?

2002-05-14 Thread David Freeman
Thanks heaps for your help I really appreciate it. I have made the changes you suggested but now I only get a blank screen. These are more general hints on ways to solve the problem yourself. function getmydate($hit) { $single = explode ( ,$hit); return $single[3].$single[4];

RE: [PHP] Newbie challenge to brainiacs

2002-05-14 Thread Jay Blanchard
[snip] I want to try to find the hour that has the most hits The day of the week that has the most hits and the max and ave no of hits of these. I haven't given it a whole lot of thought but I'd be tempted to dump the whole thing into an appropriately structured sql database and then use

Re: [PHP] How to stop site flipping?

2002-05-14 Thread Kirk Babb
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 (the query, getting the array for the query,

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

2002-05-14 Thread Collins, Robert
But the point is we aren't talking about a HACKER. we are talking about some cheapskate corporate suit who probably doesn't know how to turn his computer on. Most companies have an IT department; but most network admins aren't programmers (some can) and if they had programmers, they wouldn't need

Re: [PHP] Generating PINs

2002-05-14 Thread Alvin Tan
Hi, Thanks to everyone for help on this matter. Combined with some SQL insert statements and loops, it works great. Now to get the numbers to a printer... As usual, this list ROCKS lvin At 03:23 PM 5/14/02, Miguel Cruz wrote: On Tue, 14 May 2002, Alvin Tan wrote: This is not really a

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

2002-05-14 Thread Michael Kimsal
David J Jackson wrote: Is my hosting company trying to pull the wool over my eyes? There response to upgrading to 4.2.1, was that it isn't compatible with Zind optomizer 1.20? The only *issue* I seen with 4.2.x is of course register_globals! (which of course be changed in php.ini) I don't

[PHP] RE: textarea problem

2002-05-14 Thread Tim Ward
Are you POSTing or GETting the data? Tim Ward www.chessish.com http://www.chessish.com -- From: Enrique Vadillo [SMTP:[EMAIL PROTECTED]] Sent: 14 May 2002 01:33 To: [EMAIL PROTECTED] Subject: textarea problem Hi, I'm not

[PHP] Euro symbol [textarea/e-mail]

2002-05-14 Thread speedfreak
Hi PHP guru's, I've got a working script that picks up a msg from a textarea and (after validation etc.) mails out a plain text confirmation e-mail (using fsockopen). So far, so good. Only problem is when the textarea contains the Euro symbol, it is replaced in the plain mail (replaced by ยค).

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

2002-05-14 Thread Collins, Robert
IMHO The best way as a contractor to protect yourself against dishonest companies or people is a contract. However, there maybe a simple method to programmatically help. Put something like this in the top of each of the pages that have common functions PSUDO CODE

[PHP] Re: PHP and mySQL

2002-05-14 Thread Hugh Bothwell
City Colleges Of Chicago - Mannheim [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... if there is a booktitle and a quantity chosen, then go to that booktitle and adjust the quantity in the database. ?php $link = mysql_pconnect($local, $user, $pass)

[PHP] switch and register_globals.

2002-05-14 Thread Gerard Samuel
Just looking for opinions/comments of how others are working with switch() while register_globals is off With register_globals off, switch() has a little handicap. ie switch($foo) { break; } $foo, is now illegal/not set. So far, I've been using this before switch statements.

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

2002-05-14 Thread Gerard Samuel
I like this idea... Collins, Robert wrote: IMHO The best way as a contractor to protect yourself against dishonest companies or people is a contract. However, there maybe a simple method to programmatically help. Put something like this in the top of each of the pages that have common

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

2002-05-14 Thread Stuart Dallas
Collins, Robert [EMAIL PROTECTED] wrote: Put something like this in the top of each of the pages that have common functions PSUDO CODE if(file_exists(/path/to/file/core_functions.php)){ $core_functions = /path/to/file/core_functions.php; }else{

Re: [PHP] switch and register_globals.

2002-05-14 Thread Stuart Dallas
Gerard Samuel [EMAIL PROTECTED] wrote: With register_globals off, switch() has a little handicap. ie switch($foo) { break; } $foo, is now illegal/not set. Why can't you just use switch($_POST['foo'])? Or did I leave my brain at home today? -- Stuart -- PHP General

Re: [PHP] switch and register_globals.

2002-05-14 Thread 1LT John W. Holmes
You can use $_REQUEST['foo'] which looks at all Cookie, Post, and Get data. switch($_REQUEST['foo']) You may have to still wrap the whole thing around an isset(). if(isset($_REQUEST['foo'])) { switch($_REQUEST['foo']) ... ---John Holmes... - Original Message - From: Gerard Samuel

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

2002-05-14 Thread 1LT John W. Holmes
From: Stuart Dallas [EMAIL PROTECTED] Collins, Robert [EMAIL PROTECTED] wrote: Put something like this in the top of each of the pages that have common functions PSUDO CODE if(file_exists(/path/to/file/core_functions.php)){ $core_functions =

Re: [PHP] switch and register_globals.

2002-05-14 Thread Stuart Dallas
Gerard Samuel [EMAIL PROTECTED] wrote: foo can also be $_GET['foo'] in the same script In that case use $_REQUEST['foo']. -- Stuart -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

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

2002-05-14 Thread andy
Hi there, I did recently compile php4.2.0 and it worked fine. Now I did download 4.2.1 and used the same configure command (still in the cache) to configure the new php code. This are the errors I did get: checking for bison... no checking for byacc... no configure: warning: You will need

Re: [PHP] PHP 4.2.1 release announcement

2002-05-14 Thread Steve Buehler
I know that I just saw something like this last week on the list, but can't find it now. Anyway, I have just installed PHP 4.2.1 on my WinXP laptop running Apache 1.3.23. phpinfo() is still showing 4.1.2. I think I remember something about a dll that needs to be deleted or something like

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

2002-05-14 Thread Rasmus Lerdorf
quick-fix is to just install flex on your box - not sure why this requirement suddenly appeared though. Perhaps a timestamp is wrong on a file. -Rasmus On Tue, 14 May 2002, andy wrote: Hi there, I did recently compile php4.2.0 and it worked fine. Now I did download 4.2.1 and used the same

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

2002-05-14 Thread Collins, Robert
Good point I hadn't thought about that, maybe its time for that second pot of coffee ;) Robert W. Collins II Webmaster New Orleans Regional Transit Authority Phone : (504) 248-3826 Email : [EMAIL PROTECTED] -Original Message- From: 1LT John W. Holmes [mailto:[EMAIL PROTECTED]]

[PHP] [] versus -

2002-05-14 Thread Christoph Starkmann
Hi there. I hope this is not a too stupid question. When -as I used to- using $HTTP_POST_VARS, I can write the following: echo $HTTP_POST_VARS-somevar; which will, of course, echo the value stored in somevar sent via POST, same as if I wrote echo $HTTP_GET_VARS-somevar; So far, so goot. But

RE: [PHP] PHP and mySQL

2002-05-14 Thread J Smith
Actually, elseif and else if are both valid. J Craig Vincent wrote: snip }else if(!$submit){ /snip Acthough you didn't show 75 lines of code my guess would be your problem lies here. The else and the if shouldn't have a space between them. } elseif(!$submit){ See how that works

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

2002-05-14 Thread J Smith
The change to register_globals doesn't affect the Zend Optimizer or any other extension afaik. That's a non-issue. What is of issue are changes to the Zend Engine itself, which underlies PHP. Changes have been made to ZE that affect binary compatibility, so ZO 1.20 doesn't work with PHP

Re: [PHP] PHP 4.2.1 release announcement

2002-05-14 Thread Steve Buehler
Sorry, I forgot to move my php4ts.dll to the windows/system32 directory. Steve ---snip--- I know that I just saw something like this last week on the list, but can't find it now. Anyway, I have just installed PHP 4.2.1 on my WinXP laptop running Apache 1.3.23. phpinfo() is still showing

[PHP] GD library problem

2002-05-14 Thread Liam Gibbs
This is funny: I have getimagesize(), but not createimage() and things like that. Is this because getimagesize() is not part of the GD library...? Or is there a problem with my GD library? Also, is there any resolution to this GIF copyright thing going on with Unisys? I want to be able to resize

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

2002-05-14 Thread andy
does that mean that I can fix it anyhow, or this is a bug on 4.2.1? I don't know what flex is. Andy Rasmus Lerdorf [EMAIL PROTECTED] schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... quick-fix is to just install flex on your box - not sure why this requirement suddenly

Re: [PHP] GD library problem

2002-05-14 Thread Rasmus Lerdorf
This is funny: I have getimagesize(), but not createimage() and things like that. Is this because getimagesize() is not part of the GD library...? Or is there a problem with my GD library? getimagesize() is not part of GD. You likely didn't add the GD extension correctly to PHP. Also, is

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

2002-05-14 Thread Rasmus Lerdorf
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 4.2.1? I don't know what flex is. Andy Rasmus Lerdorf [EMAIL PROTECTED] schrieb im Newsbeitrag [EMAIL

Re: [PHP] GD library problem

2002-05-14 Thread Liam Gibbs
getimagesize() is not part of GD. You likely didn't add the GD extension correctly to PHP. That's what I figured, but I wasn't sure about it. Dagnabbit. I'm gonna have to try harder with GD. :) The copyright issue really has nothing to do with PHP. Talk to the GD folks. It is not our

Re: [PHP] GD library problem

2002-05-14 Thread Rasmus Lerdorf
By the way, there is no createimage() function. It is called imagecreate(). And the only real news is that the Unisys patent expires in 2003, so we might be able to do something then. But GIF needs to die. It's a crappy format. PNG is well supported in all browsers. -Rasmus On Tue, 14 May

[PHP] Cool PHP Tricks/Features ?

2002-05-14 Thread Girish Nath
Hi I've been using PHP for about 2 years now but only just discovered ob_gzhandler and gzip/compressing http output. It's something i wish i'd found out about earlier because even though it's a simple concept the result blew me away :) Anyway, i just wanted to know of any other cool

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

2002-05-14 Thread David Jackson
J -- Thanks your reply, I 'm a little confused as to the relationship between PHP and Zend? I thought all request were processed by Zend? Or is Zend Optimizer something different from Zend that built as part of PHP4.2.x? Who would a duplicate the error below on my Linux box. Thanks for your

[PHP] Getting all files in a directory

2002-05-14 Thread notoriousvic_ca
Is there anyway I can get all the file and directories in a specific directory? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Cool PHP Tricks/Features ?

2002-05-14 Thread Steve Bradwell
HI Girish, I'm pretty new to php, using for about 8 months now, I haven't heard of these, can you go into some detail for me? Thanks, Steve -Original Message- From: Girish Nath [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 14, 2002 9:28 AM To: [EMAIL PROTECTED] Subject: [PHP] Cool PHP

Re: [PHP] Getting all files in a directory

2002-05-14 Thread 1LT John W. Holmes
Yes. ---John Holmes... - Original Message - From: notoriousvic_ca [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, May 14, 2002 12:04 PM Subject: [PHP] Getting all files in a directory Is there anyway I can get all the file and directories in a specific directory? --

Re: [PHP] Getting all files in a directory

2002-05-14 Thread Stuart Dallas
notoriousvic_ca [EMAIL PROTECTED] wrote: Is there anyway I can get all the file and directories in a specific directory? http://www.php.net/readdir -- Stuart -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] RE: MSSQL 2000's 'real' type kills php

2002-05-14 Thread Mullin, Reginald
Jerome, I'd had a similar problem a few weeks ago (see http://marc.theaimsgroup.com/?l=php-generalm=101960285228542w=2). Try modifying your SQL statement like so: mssql_query(SET TEXTSIZE 2048 select inventory from products where code = 'FCA13'); O From Now 'Till Then, \-Reginald

Re: [PHP] Getting all files in a directory

2002-05-14 Thread Stuart Dallas
Stuart Dallas [EMAIL PROTECTED] wrote: notoriousvic_ca [EMAIL PROTECTED] wrote: Is there anyway I can get all the file and directories in a specific directory? http://www.php.net/readdir And I'd suggest that you read this to avoid sarcastic answers:

[PHP] Calculating the bandwith usage

2002-05-14 Thread Etus
Hey, I need to write a script in php that calculate the bandwith usage of selected pages. Anyone knows how I can do this? Thanks, Yuval

Re: [PHP] Calculating the bandwith usage

2002-05-14 Thread Rasmus Lerdorf
Not really a job for PHP. That is best done by analyzing the httpd logs after the fact. On Tue, 14 May 2002, Etus wrote: Hey, I need to write a script in php that calculate the bandwith usage of selected pages. Anyone knows how I can do this? Thanks, Yuval -- PHP General Mailing

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

2002-05-14 Thread Brad Melendy
Thanks Miguel, I'm going to check out preg_match(). What if there are more than one instance of a and /a 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 again! ...Brad Miguel Cruz

[PHP] Changes in 4.2.1

2002-05-14 Thread Steve Buehler
I don't know what I did wrong. I just installed 4.2.1 and can NOT do: ? echo hi; ? But I can do the following: ? phpinfo(); ? I can also do: ? /* index.php version 1.0 */ require(../dbconnect.php); require(../globalvars.inc); echo htmlheadtitle$admin_index_title/title/head; echo frameset

Re: [PHP] Cool PHP Tricks/Features ?

2002-05-14 Thread Girish Nath
Hi Steve http://www.php.net/manual/en/function.ob-gzhandler.php http://www.devshed.com/Server_Side/PHP/OutputBuffering/page8.html Basically it allows output to be compressed with gzip encoding as it's sent to the browser. I had a webpage that was part of an admin section of a website, it was

RE: [PHP] Changes in 4.2.1

2002-05-14 Thread Jon Haworth
Hi Steve, I don't know what I did wrong. I just installed 4.2.1 and can NOT do: ? echo hi; ? What, you mean Bill Gates comes round and beats you up whenever you try it? Can you be more specific about what I cannot do means? (an error message would be particularly handy at this point)

[PHP] Changes in 4.2.1

2002-05-14 Thread Steve Buehler
Ok. Now the first two examples work and the one with the frames does NOT work. I never had these problems in PHP 4.1?? Steve -snip- I don't know what I did wrong. I just installed 4.2.1 and can NOT do: ? echo hi; ? But I can do the following: ? phpinfo(); ? I can also do: ? /*

RE: [PHP] Changes in 4.2.1

2002-05-14 Thread Steve Buehler
At 11:43 AM 5/14/2002, Jon Haworth wrote: Hi Steve, I don't know what I did wrong. I just installed 4.2.1 and can NOT do: ? echo hi; ? What, you mean Bill Gates comes round and beats you up whenever you try it? Can you be more specific about what I cannot do means? (an error message

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

2002-05-14 Thread Brad Melendy
I want to thank everyone for their help. I finally found the right expression. I needed to start at the end of the string and work backwards. STRRCHR did the trick for me. I was able to use: $match = substr(strrchr($string1, ), 1 ); echo $match; I'm actually not sure what role the last 1

Re: [PHP] Getting all files in a directory

2002-05-14 Thread Bogdan Stancescu
Elitist tone aside, that's a very good link. Should be a must read for all forum/mailing list newbies - but how do you get them to read it if most of them can't even be convinced to RTFM? :-( Maybe as a link at the bottom of every e-mail? Bogdan Stuart Dallas wrote: Stuart Dallas [EMAIL

[PHP] RE: MSSQL 2000's 'real' type kills php

2002-05-14 Thread Jerome Houston
Thank you for your reply. i can't tell if your solution works yet because PHP can't seem to handle multiple SQL statments in one call to mssql_query(). when i do what you said: mssql_query(SET TEXTSIZE 2048 select inventory from products where code = 'FCA13'); I get: Warning: Supplied

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

2002-05-14 Thread Jason Wong
On Tuesday 14 May 2002 23:00, 1LT John W. Holmes wrote: From: Stuart Dallas [EMAIL PROTECTED] Collins, Robert [EMAIL PROTECTED] wrote: Put something like this in the top of each of the pages that have common functions PSUDO CODE

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 try

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.

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

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

[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

[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

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

Re: [PHP] changing language on fly

2002-05-14 Thread Yura
Here are two possible solutions: 1. ?php if(!$QUERY_STRING): $url = indexr.php; else: $url = indexr.php?$QUERY_STRING; endif; ? 2. Make link to indexr.php??php print $QUERY_STRING? THank you for help =)) I just was too lazy=( Youri You might want to use the format:

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:

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

[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

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

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 your

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

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

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

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 variable

[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();

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?

  1   2   >