[PHP] Re: error handling

2002-09-13 Thread Erwin
Mattia wrote: I'm writing a web app with php, and would like to do the following: when an error occures (a php/apache error or an application error) the error is logged to a log file. The user is displayed a page that says 500 internal server error, and nothig more. I have access to .htacces

[PHP] Random numbers in a cronned script?

2002-09-13 Thread Leif K-Brooks
I'm wondering if random numbers in a cronned script would be anywhere near random (I know that rand() isn't true random, but I don't want every number to be the same...)? Since the number is seeded from time... and cron runs by time... -- PHP General Mailing List (http://www.php.net/) To

RE: [PHP] Re: Cry for help

2002-09-13 Thread joakim . andersson
For example: while (!feof ($fp)) What does the ! mean or do? ! means not. What does feof mean? is it one command? or is f e o f all different? feof() is a function that checks if a file has reached the end or not. (eof = end of file) while (!feof ($fp)) in whole means something like

[PHP] Re: Random numbers in a cronned script?

2002-09-13 Thread lallous
Yes, you're right about that point since the seed in most cases is computed from system time = increasing probability of having same number @ the same request time... you can change the seed with the time() too (not all days are the same). hope to hear others' opinions too. Elias Leif K-Brooks

RE: [PHP] Re: Random numbers in a cronned script?

2002-09-13 Thread Martin Towell
if you seed it with unix time then you'll alway be seeding with something different in most cases, the random numbers that are generated will be random enough just my AU2c worth Martin -Original Message- From: lallous [mailto:[EMAIL PROTECTED]] Sent: Friday, September 13, 2002 6:51 PM

RE: [PHP] Need some help with array sorting

2002-09-13 Thread Will Steffen
Thanks Timo I figured if it was do-able it would be something like uasort, or uksort or one of those, but my geek muscles arent quite up to that sort of flex yet - any one mind giving me some clues as to how to get started using these functions - the manual gets pretty vague in this area?

Re: [PHP] numeric to word function

2002-09-13 Thread Tom Rogers
Hi, Friday, September 13, 2002, 12:37:41 AM, you wrote: rhc Hi.. rhc anyone know any function to convert numeric values to word.. rhc something like this: 1252 -- one thousand two hundred and fifty two rhc Thanks... Here is a class that will get you started :) class num_to_text { var

[PHP] Re: Read/Write Pieces of a Binary File

2002-09-13 Thread lallous
what have you already tried? can you show some code? Elias Bob Bowker [EMAIL PROTECTED] wrote in message 5.1.0.14.2.20020912091817.01ef3c50@localhost">news:5.1.0.14.2.20020912091817.01ef3c50@localhost... I have a large binary file (50+ megs) ... I want to read the first 1k bytes, make

Re: [PHP] numeric to word function

2002-09-13 Thread Tom Rogers
Hi, Friday, September 13, 2002, 12:37:41 AM, you wrote: rhc Hi.. rhc anyone know any function to convert numeric values to word.. rhc something like this: 1252 -- one thousand two hundred and fifty two rhc Thanks... Here it is without the typo :) class num_to_text { var $mode;

[PHP] A mailing list

2002-09-13 Thread John Wards
Guys and Gals sorry if this is off topic but I hope someone can answer this question. I need some mailing list software that works like this list i.e. its all done through email and has a web based archive. I know of mailman but I cannot get it to work and my questions go unanswered on the

[PHP] Memory usage - calculating

2002-09-13 Thread Konstantin Tjuterev
Hello! Does anybody know the way to calculate exactly memory usage of PHP script, especially the code part of it and to get any ideas which part of it is taking the memory ? For approximate calculation of data part I'm using the following: function mem_size($var) { $s_var = serialize($var);

[PHP] Question regarding how PHP works internally when running

2002-09-13 Thread Ong Hong Seng
Hi, I'm trying hard to find out how PHP works internally. Such as, when a request comes into the apache/php engine, what happens next. For e.g. for CGI-BIN using perl, a process will be created for each request and thus is not entirely scalable. Basically, I'm curious of how it handles the

RE: [PHP] MS SQL Problem

2002-09-13 Thread M . A . Bond
?PHP $hostname = LocalServer; ^^ This should be LocalHost (unless you are trying to connect to a server with a DNS alias of LocalServer). Mark -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] global variables or not??

2002-09-13 Thread skitum
Hi all, Help me please. I need $vartwo1 have the same value that $varone1. Look: function one(){ ? input type=radio name=checar value=rd1 input type=radio name=checar value=rd2 input type=submit name=button ? } function two(){ $vartwo1=$varone1; $vartwo2=$vartwo2; - HTML code - }

[PHP] SSEditor -- a new IDE for PHP

2002-09-13 Thread Skyweb
It is the first release yet, but many powerful function will be added. Current features: a.. Multi-file editing. b.. Drag file from explorer to SSEditor. c.. Build-in web browser, View script result in SSEditor window, Don't have to open a web browser out side. of course if you whish, you

Re: [PHP] A mailing list

2002-09-13 Thread Tony Earnshaw
fre, 2002-09-13 kl. 10:31 skrev John Wards: Guys and Gals sorry if this is off topic but I hope someone can answer this question. I need some mailing list software that works like this list i.e. its all done through email and has a web based archive. I know of mailman but I cannot get it to

[PHP] Re: global variables or not??

2002-09-13 Thread nicos
No you shouldn't. Define : $rd1 = $_POST['rd1']; $rd2 = $_POST['rd2']; at the begining of your scripts. http://www.php.net/manual/en/security.registerglobals.php -- Nicos - CHAILLAN Nicolas [EMAIL PROTECTED] www.WorldAKT.com - Hébergement de sites Internet Skitum [EMAIL PROTECTED] a écrit

Re: [PHP] A mailing list

2002-09-13 Thread John Wards
Tony, You are a star! I can't for the life of me get mailman working with qmail and I have read every readme i can get my hands on. I will probably go for one of the others you recomended!! Your a life saver! Cheers John - Original Message - From: Tony Earnshaw [EMAIL PROTECTED] To:

Re: [PHP] Variable Variables

2002-09-13 Thread Marek Kilimajer
Hi, Mike Smith wrote: I am stumped on a project for a receiving system. I'm not sure how to handle receiving more than one line item. I can UPDATE ... WHERE id=$detid when I have 1 item, but how would I get the SQL to fire X times depending on the number of line items I have AND UPDATE the

Re: [PHP] Need 2-way encryption

2002-09-13 Thread Marek Kilimajer
You can use http://www.php.net/manual/en/ref.mcrypt.php Bob Bowker wrote: Maybe reversible hashing of a tar file is a better way to describe what I need ... I want to make a tar file unreadable (at least can't be uncompressed) by anyone who doesn't know the key. Bob. At 10:43 AM

[PHP] Report generator

2002-09-13 Thread José León Serna
Hello: I would like to know what tools do you use to generate reports from your PHP applications. My preferences are: -Object Oriented -PDF/HTML Generation Exists such a tool? -- Best Regards. -- QaDRAM Studio, RAD development for the web

[PHP] BBC article: Intellectual Property

2002-09-13 Thread DL Neil
Open source campaigners and 'evangelists' may be interested in BBC coverage of a report by the Commission on Intellectual Property Rights (CIPR): http://news.bbc.co.uk/1/hi/sci/tech/2253270.stm. It talks of medical, agricultural, industrial, and IT/educational disadvantages placed in front of the

Re: [PHP] PHP mem leaks

2002-09-13 Thread Marek Kilimajer
Is the apache parent process ( the one running under root) getting larger too? John Wards wrote: After being told off on the dev list I have posted this on this list (I thought it was techie enough to go on that list but I was wrong) I am running a large PHP/MySQL/Apache driven website

Re: [PHP] PHP mem leaks

2002-09-13 Thread John Wards
Hmm I am unsure as my server crashed on me this morning and restarted it self so every thing is back to normal (15meg per process) But I can never remeber noticing a much smaller Apache process. So I would gues at yes the parent process gets larger too. I though it was mod_ssl causing the

[PHP] Announcement: FUDforum 2.3.1 Released

2002-09-13 Thread Ilia A.
FUDforum is a web based bulletin board software designed in PHP, utilizing a MySQL or PostgreSQL backend for data storage. The 2.3.1 release is the second stable release in the 2.3 branch, which introduces a number of new features as well as speed improvements. Below are some of the

Re: [PHP] OT - SQL string to get value by latest date only in a join

2002-09-13 Thread Marek Kilimajer
Add ORDER BY date_col DESC LIMIT 1 Merritt, Dave wrote: All, I apologize up front for being off topic, but I don't want to have to subscribe to other lists unless necessary. I know that someone on this list should be able to help me out. I have the SQL string below that I am running. The

RE: [PHP] Inserting Lines in Files WAS [Re: PHP]

2002-09-13 Thread Jay Blanchard
[snip] Also does anyone know how to insert a text on about the 4 or 5 line of a file using php? I can add text to the end of a file and to the beginning, but I'm not sure how to do it for specific lines. [/snip] Ok, I whipped of a quick set of code that I have not tested ?php $lineCounter =

[PHP] a href...

2002-09-13 Thread Meltem Demirkus
Hi, Iwant to send 2 variable by using a href like that: a href=bug_detail_user.php?id=$id?reporter_id=$reporter_id isnt this possible because it is taking the data id as $id?reporter_id=$reporter_id... can anyone tell me how I can manage this.. thanks.. meltem -- PHP General Mailing List

RE: [PHP] a href...

2002-09-13 Thread Jay Blanchard
[snip] Iwant to send 2 variable by using a href like that: a href=bug_detail_user.php?id=$id?reporter_id=$reporter_id [/snip] a href=bug_detail_user.php?id=$idreporter_id=$reporter_id change the second (and subsequent) question marks to ampersands, which in effect says id = $id AND reporter =

Re: [PHP] a href...

2002-09-13 Thread Aaron Gould
Change the second ? with . The ampersand is used to delimit multiple URI values. Use the ampersand to append any additional name/value pairs as well. a href=bug_detail_user.php?id=$idreporter_id=$reporter_id -- Aaron Gould [EMAIL PROTECTED] Web Developer - Original Message - From:

RE: [PHP] a href...

2002-09-13 Thread Will Steffen
Use a href=bug_detail_user.php?id=$idreporter_id=$reporter_id Some reading around post methods and passing data between scripts might be in order to familarize yourself with all the syntax etc. Hope this helps --Will -Original Message- From: Meltem Demirkus [mailto:[EMAIL

[PHP] PHP User Permissions

2002-09-13 Thread Doug Kozar
Does anyone know how to define a PHP script (within itself) to run as a certain user. Currently my PHP scirpt runs as nobody and I need to change the user it runs as temporarily to get certain permissions to update a file. Thank you. -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] PHP mem leaks

2002-09-13 Thread Marek Kilimajer
Then I would not think it's php issue, as php is called by forked children. There might be also problems in the libraries, so check for updates. Sorry, cannot help you more. John Wards wrote: Hmm I am unsure as my server crashed on me this morning and restarted it self so every thing is back

[PHP] Re: imagecopyresized problems

2002-09-13 Thread Desi Petrovic
Hi, this seems to be a problem with headers. Try this: ?php $max_width = 0; $tmp = imagecreatefromjpeg(img.jpg); if (imagesx ($tmp) $max_width) { imagejpeg($tmp); exit(); } $dst_img = imagecreate(80,60); imagecopyresized($dst_img,$tmp,0,0,80,60,80,60,imagesx($tmp),imagesy ($tmp));

RE: [PHP] PHP User Permissions

2002-09-13 Thread Jay Blanchard
[snip] Does anyone know how to define a PHP script (within itself) to run as a certain user. Currently my PHP scirpt runs as nobody and I need to change the user it runs as temporarily to get certain permissions to update a file. [/snip] A running script cannot change its own permissions, and if

[PHP] xml declaration

2002-09-13 Thread Brian V Bonini
Is this the appropriate way to handle this? ?php echo '?xml version=1.0 encoding=UTF-8?' . \n; ? What's everyone else do? I'm not missing something here am I?? :) -B -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] xml declaration

2002-09-13 Thread Jay Blanchard
[snip] Is this the appropriate way to handle this? ?php echo '?xml version=1.0 encoding=UTF-8?' . \n; ? What's everyone else do? I'm not missing something here am I?? :) [/snip] You can also place the XML declaration outside of the php tags. I have been able to get proper validation both ways.

RE: [PHP] xml declaration

2002-09-13 Thread Brian V Bonini
When I do that PHP complains about the ?xml .. -Original Message- From: Jay Blanchard [mailto:[EMAIL PROTECTED]] Sent: Friday, September 13, 2002 9:28 AM To: 'Brian V Bonini'; 'PHP Lists' Subject: RE: [PHP] xml declaration [snip] Is this the appropriate way to handle this?

RE: [PHP] a href...

2002-09-13 Thread Brian V Bonini
Use $amp; if you need to validate xhtml -Original Message- From: Will Steffen [mailto:[EMAIL PROTECTED]] Sent: Friday, September 13, 2002 9:00 AM To: [EMAIL PROTECTED] Subject: RE: [PHP] a href... Use a href=bug_detail_user.php?id=$idreporter_id=$reporter_id Some

Re: [PHP] A mailing list

2002-09-13 Thread Justin French
ezmlm Justin on 13/09/02 6:31 PM, John Wards ([EMAIL PROTECTED]) wrote: Guys and Gals sorry if this is off topic but I hope someone can answer this question. I need some mailing list software that works like this list i.e. its all done through email and has a web based archive. I know

RE: [PHP] xml declaration

2002-09-13 Thread Jay Blanchard
[snip] When I do that PHP complains about the ?xml .. ?php echo '?xml version=1.0 encoding=UTF-8?' . \n; ? What's everyone else do? I'm not missing something here am I?? :) [/snip] Try ?php print(?xml version=\1.0\ encoding=\UTF-8\?\n); ? I just copied this from a page that I have that