[PHP] Mail function

2007-04-04 Thread Zhimmy Kanata
Hi, I am working on a program to create a registration feature through a email notificaiton much like this list. For functional use but also for personal training. However, I can't seem to pass the variable into the mail function() ? If I echo the variable it displays it so it must

RE: [PHP] Audio CAPTCHA review request

2007-04-04 Thread Daevid Vincent
> I often wondered why simple CAPTCHA's like "Type the number seven > four three", or "What is the sum of two plus three?", or "Spell cat", > or "Spell two" wouldn't work? Certainly, one can create a routine > coupled a dB to randomly produce thousands of different combinations > of simple que

Re: [PHP] crontab, PHP and MACOSX

2007-04-04 Thread Yvan Strahm
On 3/28/07, Chris <[EMAIL PROTECTED]> wrote: > There is a lot of require_once(' ') in the script and if i am not in the correct folder the script won't work. That is something php related ;) Change your require to something like this: require(dirname(__FILE__) . '/other_file_name.php'); --

Re: [PHP] finding a particular record within a MySQL result set

2007-04-04 Thread Martin Alterisio
2007/4/4, James Tu <[EMAIL PROTECTED]>: I've cross posted this to the MySQL list... Here's my original post. > Is there some quick way to do the following in MySQL? (I know I > can use PHP to search through the result set, but I wanted to see > if there's a quick way using some sort of query)

Re: [PHP] secure database info in different environments

2007-04-04 Thread Bruce Cowin
Ok, thanks for the feedback. I'll check it out. Regards, Bruce >>> Jochem Maas <[EMAIL PROTECTED]> 3/04/2007 9:12 p.m. >>> Bruce Cowin wrote: > Hi, > > I have a generic database class that I built to connect to our different > databases. From other posts that I've read, I think the safe thi

[PHP] Re: finding a particular record within a MySQL result set

2007-04-04 Thread Steve
Maybe I'm way off here, but when you're looking for his numbered place in the record set, can't you just count the people before him? ID NAME STATE DATE 1 JoeMaine 2006-02-12 2 JimMaine 2006-01-12 3 James Maine 2006-03-12 4 John Maine 2005-05-12 5 Jordan Maine 2006-02-11 Pse

[PHP] Problems when running Java program

2007-04-04 Thread Fernando M M
Hello, I have a Java program that gives me a string. When i run this program on the shell everything works fine but when i try to run using shell_exec i get Error occurred during initialization of VM Could not reserve enough space for code cache This script is currently on a VPS server with php

[PHP] Suggestions for Web based FileServer/Mailaccess

2007-04-04 Thread Michelle Konzack
* * Do not Cc: me, because I am on THIS list, if I write here.* * Keine Cc: an mich, bin auf DIESER Liste wenn ich hier schreibe. * * Ne me mettez pas en Cc:, je suis sur CETTE liste, si j'ecris ici. * ***

RE: [PHP] finding a particular record within a MySQL result set

2007-04-04 Thread Jim Moseby
> > > I've looked at those, but both approaches requires traversing > through > the entire mysql result set to create another array ( could > be memory > intensive if the result set is large...100,000 ? ) > > -James > I agree. That's why I said the mysql group will give you better answe

Re: [PHP] finding a particular record within a MySQL result set

2007-04-04 Thread James Tu
I've looked at those, but both approaches requires traversing through the entire mysql result set to create another array ( could be memory intensive if the result set is large...100,000 ? ) -James On Apr 4, 2007, at 1:39 PM, Jim Moseby wrote: You will probably get a better approach from

[PHP] Re: storing functions

2007-04-04 Thread Steve
The way I organize my stuff is that I have all of my object code, functions, and what not in a specific folder within their own separate files. If there is enough of a certain category of files to flood the directory, I will place those in their own subdirectory. I have separate grouping files t

RE: [PHP] finding a particular record within a MySQL result set

2007-04-04 Thread Jim Moseby
> > You will probably get a better approach from the mysql list, > but from a PHP > solution perspective, I'd load up an array with the result > set and use key() > to get the number. > > The example at http://php.net/key does exactly that. > Or array_search() :) JM -- PHP General Mailing

RE: [PHP] finding a particular record within a MySQL result set

2007-04-04 Thread Jim Moseby
> > I've cross posted this to the MySQL list... > > Here's my original post. > > > Is there some quick way to do the following in MySQL? (I know I > > can use PHP to search through the result set, but I wanted to see > > if there's a quick way using some sort of query) > > > > Let's say I k

RE: [PHP] Install PECL

2007-04-04 Thread Bagus Nugroho
Ok, thanks Best Regards bn From: Jochem Maas [mailto:[EMAIL PROTECTED] Sent: Wed 04-Apr-2007 23:45 To: Bagus Nugroho Cc: php-general@lists.php.net Subject: Re: [PHP] Install PECL Bagus Nugroho wrote: > Hi All, > I'm trying to install PECL package as install P

[PHP] finding a particular record within a MySQL result set

2007-04-04 Thread James Tu
I've cross posted this to the MySQL list... Here's my original post. Is there some quick way to do the following in MySQL? (I know I can use PHP to search through the result set, but I wanted to see if there's a quick way using some sort of query) Let's say I know that Joe is from Maine.

Re: [PHP] Install PECL

2007-04-04 Thread Jochem Maas
Bagus Nugroho wrote: > Hi All, > I'm trying to install PECL package as install PEAR package, but there's error > as : > --- > C:\PHP>pear install http://localhost/pear/APC-3.0.13.tgz > > downloading APC-3.0.13.tgz ... > Starting to download APC-3.0.

[PHP] Install PECL

2007-04-04 Thread Bagus Nugroho
Hi All, I'm trying to install PECL package as install PEAR package, but there's error as : --- C:\PHP>pear install http://localhost/pear/APC-3.0.13.tgz downloading APC-3.0.13.tgz ... Starting to download APC-3.0.13.tgz (105,042 bytes) ..

Re: Fwd: [PHP] PDO mssql + multiple rowsets

2007-04-04 Thread Frank M. Kromann
Support for multiple result sets will be added as soon as I (or someone else) get the time to do so. - Frank > I've seen there's an open bug on the missing feature I pointed out in my > first email, but it's even not assigned and I cannot get an answer from the > developer... so... does anybody k

Re: [PHP] Problems downloading a PDF / Partially solved

2007-04-04 Thread Richard Davey
Mário Gamito wrote: I don't get the warnings anymore, but the PDF is still being displayed with its binary code inside in the PHP page: Are you opening the file as a binary file? Cheers, Rich -- Zend Certified Engineer http://www.corephp.co.uk "Never trust a computer you can't throw out of

Re: [PHP] Problems downloading a PDF

2007-04-04 Thread Richard Davey
Jochem Maas wrote: fine. so exactly what is the 100% bullitproof validation that will catch every attack attempt? other than basename()ing the input and suffixing it to the relevant path and then checking that to see if the file exists?? It depends how you want to handle invalid data. If you'r

[PHP] Re: mixture of GET and POST

2007-04-04 Thread Al
$self= $_SERVER['REQUEST_URI']; ""; The arguments will be included in the URL for GETs Or, simply Put the arguments in hidden inputs; e.g., They will be returned in the POST array Al Ross wrote: I have 3 'action' buttons and I am trying to send the $id from the radio button a

Re: [PHP] help me to solve this math maze

2007-04-04 Thread tedd
At 12:44 PM +0300 4/4/07, Faisal Murad wrote: i am making a program to give money to a group of people lets say that i have to distribute 3000 among 12 people 6 of them are adult and will get 100% 6 them are children those will get 75% from the overall amount. a common solution might appear as

Re: [PHP] dynamic web interface and size

2007-04-04 Thread tedd
At 7:28 AM +0200 4/4/07, Alain Roger wrote: Hi, My question is not so much about PHP language but more about concept and PHP result. Basically i'm currently working on web application to administrate the web content of a website. My customer would like to have a nice web application interface,

Re: [PHP] Problems downloading a PDF / Partially solved

2007-04-04 Thread Jochem Maas
Mário Gamito wrote: > Ok, > > I don't get the warnings anymore, but the PDF is still being displayed > with its binary code inside in the PHP page: > > "%PDF-1.4 %âãÏÓ 351 0 obj <> endobj xref 351 434 16 0 n > 010281 0 n 010417 0 n 010574 0 n 010607 > 0

Re: [PHP] Problems downloading a PDF

2007-04-04 Thread Jochem Maas
Mário Gamito wrote: > Hi, > >> by reading the freaking replies that you get?!? :-), I did give you >> the answer to this in the rewritten code I offered. (granted > You the code you gave me i get I didn't write 120+ liones of code - so what your running is definitely not what I gave you. .. >

Re: [PHP] Audio CAPTCHA review request

2007-04-04 Thread tedd
At 2:30 PM -0700 4/3/07, jochem wrote: Since you are asking for review: this audio captcha is almost certainly easily breakable. Tijnema is right with most of his comments, open source voice recognition software (the code he pointed to like spynx) will break this. I disagree with his point 3) b

Re: [PHP] storing functions

2007-04-04 Thread afan
> I am wondering how you store and recall your functions. > > I have an external file - functions.php, this includes all the functions > for > the site. It is included in the pages head and then I just use the > functions > when I need them. > > Does anyone have a better way to store/recall functio

Re: [PHP] storing functions

2007-04-04 Thread Satyam
- Original Message - From: "Jochem Maas" <[EMAIL PROTECTED]> To: "Ross" <[EMAIL PROTECTED]> Cc: Sent: Wednesday, April 04, 2007 3:29 PM Subject: Re: [PHP] storing functions Ross wrote: I am wondering how you store and recall your functions. I have an external file - functions.php,

Re: [PHP] Problems downloading a PDF / Partially solved

2007-04-04 Thread Mário Gamito
Ok, I don't get the warnings anymore, but the PDF is still being displayed with its binary code inside in the PHP page: "%PDF-1.4 %âãÏÓ 351 0 obj <> endobj xref 351 434 16 0 n 010281 0 n 010417 0 n 010574 0 n 010607 0 n 012850 0 n 01288

Re: [PHP] storing functions

2007-04-04 Thread Davi
Em Quarta 04 Abril 2007 10:19, Ross escreveu: > I am wondering how you store and recall your functions. > > I have an external file - functions.php, this includes all the functions > for the site. It is included in the pages head and then I just use the > functions when I need them. > > Does anyone

RE: [PHP] Audio CAPTCHA review request

2007-04-04 Thread tedd
At 4:59 PM -0700 4/3/07, Daevid Vincent wrote: > -Original Message- From: Daevid Vincent [mailto:[EMAIL PROTECTED] I will point you at http://www.cepstral.com/ for a possible solution to your .mp3 usage. You could use Cepstral's "swift" tool to say the text dynamically. Actually

Re: [PHP] Problems downloading a PDF

2007-04-04 Thread Mário Gamito
Hi, by reading the freaking replies that you get?!? :-), I did give you the answer to this in the rewritten code I offered. (granted You the code you gave me i get "Warning: Cannot modify header information - headers already sent by (output started at /var/www/telbit_website/2/products-testud

Re: [PHP] Problems downloading a PDF

2007-04-04 Thread Zoltán Németh
2007. 04. 4, szerda keltezéssel 14.23-kor Mário Gamito ezt írta: > Hi, > > > that's what I said before. you echo out some html before the file > > headers. that will never work. > > remove the echo statement on line 14 and you should be okay > But i need the line > > echo " " rel=\"ex

Re: [PHP] Problems downloading a PDF

2007-04-04 Thread Jochem Maas
Mário Gamito wrote: > Hi, > >> that's what I said before. you echo out some html before the file >> headers. that will never work. >> remove the echo statement on line 14 and you should be okay > But i need the line > > echo "" rel=\"external\">Download TESTUDIO flyer"; > > to displa

Re: [PHP] storing functions

2007-04-04 Thread Jochem Maas
Ross wrote: > I am wondering how you store and recall your functions. > > I have an external file - functions.php, this includes all the functions for > the site. It is included in the pages head and then I just use the functions > when I need them. > > Does anyone have a better way to store/re

Re: [PHP] Problems downloading a PDF

2007-04-04 Thread Jochem Maas
Richard Davey wrote: > Jochem Maas wrote: > >>> You don't need to basename() it, you already know what the filename is, >>> because it was requested via $_GET['file']. >> >> I would say almost the opposite: > > Let me rephrase: if you are properly validating the $_GET['file'] input > anyway, base

Re: [PHP] Problems downloading a PDF

2007-04-04 Thread Mário Gamito
Hi, that's what I said before. you echo out some html before the file headers. that will never work. remove the echo statement on line 14 and you should be okay But i need the line echo " " rel=\"external\">Download TESTUDIO flyer"; to display the link for download!!! How can i so

[PHP] storing functions

2007-04-04 Thread Ross
I am wondering how you store and recall your functions. I have an external file - functions.php, this includes all the functions for the site. It is included in the pages head and then I just use the functions when I need them. Does anyone have a better way to store/recall functions? R. -

Re: [PHP] Problems downloading a PDF

2007-04-04 Thread Zoltán Németh
2007. 04. 4, szerda keltezéssel 14.04-kor Mário Gamito ezt írta: > Hi, > > Ok, i've hardcoded the filename and i no longer get a 404 error. > But the "PDF" file i get is this: > > "Warning: Cannot modify header information - headers already sent by > (output started at /var/www/telbit_website/2/

Re: [PHP] Problems downloading a PDF

2007-04-04 Thread Mário Gamito
Hi, Ok, i've hardcoded the filename and i no longer get a 404 error. But the "PDF" file i get is this: "Warning: Cannot modify header information - headers already sent by (output started at /var/www/telbit_website/2/products-testudio.php:14) in /var/www/telbit_website/2/products-testudio.php

Re: [PHP] Problems downloading a PDF

2007-04-04 Thread Mário Gamito
Hi, Thank you all for your answers. I would say almost the opposite: I get a Page Not found. The problem is that $file variable is empty (tested with a print). Any ideas ? Warm Regards -- :wq! Mário Gamito -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.p

Re: [PHP] Problems downloading a PDF

2007-04-04 Thread Richard Davey
Jochem Maas wrote: You don't need to basename() it, you already know what the filename is, because it was requested via $_GET['file']. I would say almost the opposite: Let me rephrase: if you are properly validating the $_GET['file'] input anyway, basenaming it is a superfluous step that ma

Re: [PHP] Problems downloading a PDF

2007-04-04 Thread Jochem Maas
Richard Davey wrote: > Mário Gamito wrote: > >> To prevent people to insert the full URL to the documents, i moved >> them outside Apache's DocumentRooot, which is /var/www. >> >> My site is in /var/www/telbit and i put the PDFs in /var/www >> >> I've coded in order to do the trick, but it's faili

Re: [PHP] Cannot remove PHP Version 5.2.1-0.dotdeb.1

2007-04-04 Thread Miles Thompson
On 4/4/07, Mario Guenterberg <[EMAIL PROTECTED]> wrote: On Tue, Apr 03, 2007 at 08:56:12PM -0300, Miles Thompson wrote: > Mario, > > Boy it's been a long day - it seems that every item I had in by configure > batch had to be installed; then at the very end of the day it finally got to > the --wi

Re: [PHP] Problems downloading a PDF

2007-04-04 Thread Richard Davey
Mário Gamito wrote: To prevent people to insert the full URL to the documents, i moved them outside Apache's DocumentRooot, which is /var/www. My site is in /var/www/telbit and i put the PDFs in /var/www I've coded in order to do the trick, but it's failing. I can't get the name of the file.

Re: [PHP] Problems downloading a PDF

2007-04-04 Thread Zoltán Németh
2007. 04. 4, szerda keltezéssel 12.46-kor Mário Gamito ezt írta: > Hi, > > I'm building this site that has several PDFs to download, but only to > registered users. > > To prevent people to insert the full URL to the documents, i moved them > outside Apache's DocumentRooot, which is /var/www. >

RE: [PHP] Problems downloading a PDF

2007-04-04 Thread Peter Lauri
> -Original Message- > From: Mário Gamito [mailto:[EMAIL PROTECTED] > Sent: Wednesday, April 04, 2007 1:46 PM > To: php-general@lists.php.net > Subject: [PHP] Problems downloading a PDF > > Hi, > > I'm building this site that has several PDFs to download, but only to > registered users.

[PHP] Problems downloading a PDF

2007-04-04 Thread Mário Gamito
Hi, I'm building this site that has several PDFs to download, but only to registered users. To prevent people to insert the full URL to the documents, i moved them outside Apache's DocumentRooot, which is /var/www. My site is in /var/www/telbit and i put the PDFs in /var/www I've coded in

Re: [PHP] help me to solve this math maze

2007-04-04 Thread Jochem Maas
Satyam wrote: > You'll give 100 'units' to 6 of them, and 75 to 6, thus: > > 6 * 100 + 6 * 75 ==> 1050 units > > Each 'unit' is valued at: > > 3000 / 1050 ==> 2.8571 > > Thus, you give: > > 6 * 285.71 + 6 * 214.28 ==> 2999.94, and you may keep the change ;-) pity you don't work as bank dire

Re: [PHP] help me to solve this math maze

2007-04-04 Thread Satyam
You'll give 100 'units' to 6 of them, and 75 to 6, thus: 6 * 100 + 6 * 75 ==> 1050 units Each 'unit' is valued at: 3000 / 1050 ==> 2.8571 Thus, you give: 6 * 285.71 + 6 * 214.28 ==> 2999.94, and you may keep the change ;-) Satyam - Original Message - From: "Faisal Murad" <[EMAI

Re: [PHP] help me to solve this math maze

2007-04-04 Thread Zoltán Németh
2007. 04. 4, szerda keltezéssel 12.44-kor Faisal Murad ezt írta: > i am making a program to give money to a group of people > lets say that i have to distribute 3000 among 12 > people 6 of them are adult and will get 100% > 6 them are children those will get 75% from the overall amount. > > a

Fwd: [PHP] PDO mssql + multiple rowsets

2007-04-04 Thread Javier Ruiz
btw... the bug: http://pecl.php.net/bugs/bug.php?id=10530 -- Forwarded message -- From: Javier Ruiz <[EMAIL PROTECTED]> Date: Apr 4, 2007 9:10 AM Subject: Fwd: [PHP] PDO mssql + multiple rowsets To: php-general@lists.php.net I've seen there's an open bug on the missing feature I

Fwd: [PHP] PDO mssql + multiple rowsets

2007-04-04 Thread Javier Ruiz
I've seen there's an open bug on the missing feature I pointed out in my first email, but it's even not assigned and I cannot get an answer from the developer... so... does anybody know if there is any plan to finish the PDO-dblib driver? TIA -- Forwarded message -- From: Javier