php-general Digest 23 Sep 2005 11:58:02 -0000 Issue 3698

2005-09-23 Thread php-general-digest-help
php-general Digest 23 Sep 2005 11:58:02 - Issue 3698 Topics (messages 223035 through 223064): Re: basic user/input form questions... more validation! 223035 by: Jasper Bryant-Greene 223038 by: bruce 223039 by: Jasper Bryant-Greene 223041 by: Murray .

[PHP] problem with php and mail()

2005-09-23 Thread Marco Strullato
hi all, I have a problem sending mails with mail(): when this code runs: mail([EMAIL PROTECTED],ciao,ciao[EMAIL PROTECTED],%22ciao%22,%22ciao, From: marco marco@ [EMAIL PROTECTED] anotherexample.comhttp://anotherexample.com/ ); any email arrives: qmail tells @40004332b7d900edffbc delivery

RE: [PHP] File complete check (FTP)

2005-09-23 Thread Johannes Tyra
I don't know the local filezize. I have only the remote ftp file, uploaded on the server... PHP runs on the server, so the uploaded file remote ftp file (from the ftp user) is the file to check... -Original Message- From: Jake Gardner [mailto:[EMAIL PROTECTED] Sent: Friday,

Re: [PHP] File complete check (FTP)

2005-09-23 Thread Jasper Bryant-Greene
Johannes Tyra wrote: I don't know the local filezize. I have only the remote ftp file, uploaded on the server... PHP runs on the server, so the uploaded file remote ftp file (from the ftp user) is the file to check... But you can run filesize() on the file before you upload it to the FTP

Re: [PHP] Opensource webshop

2005-09-23 Thread Mark Evans
Are there many in just PHP to? I can name at least 7 or 8 that I know of :-) Most are multi-lingual so can work with any language and come with a full administration tool. Regards Mark -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Opensource webshop

2005-09-23 Thread Gustav Wiberg
- Original Message - From: Vince LaMonica [EMAIL PROTECTED] To: Jasper Bryant-Greene [EMAIL PROTECTED] Cc: php-general@lists.php.net Sent: Friday, September 23, 2005 7:17 AM Subject: Re: [PHP] Opensource webshop On Fri, 23 Sep 2005, Jasper Bryant-Greene wrote: } There are probably

Re: [PHP] ftp_site problem

2005-09-23 Thread Al
[EMAIL PROTECTED] wrote: try: if(ftp_site($conn_id, SITE chmod 0777 /public_html/EditPage/cd_ef_W.txt)) echo 'successful'; else 'failed'; it works for me Crom - Original Message - From: Al [EMAIL PROTECTED] To: php-general@lists.php.net Sent: Thursday, September 22, 2005 9:34 PM

[PHP] Re: Posting variables from one php script to another

2005-09-23 Thread Al
Graham Anderson wrote: I am using GET to send variables from one php script to another php script How would I POST the same variables ? This is the php script I am sending GET variables to... $movieBuilder = ./movieBuilder.php?mask=mask.gifdrag=drag.gifmovie=fonovisa.mov; I am placing

Re: [PHP] Re: Posting variables from one php script to another

2005-09-23 Thread Jasper Bryant-Greene
Al wrote: I'd use this. It's simple and doesn't involve CURL. Here is a brief outline. $file_str= base64encode(serialize($_GET)); //$_GET can be any array Any reason why you base64_encode here? fwrite is binary-safe so base64 encoding your data is slow and a waste of space. Create a

Fwd: [PHP] Re: newbie questionsession and cookie by javascript

2005-09-23 Thread Alex Andrew Mosqueda
Thanks. -- Forwarded message -- From: Ben [EMAIL PROTECTED] Date: Sep 22, 2005 5:29 PM Subject: [PHP] Re: newbie questionsession and cookie by javascript To: php-general@lists.php.net Alex Andrew Mosqueda said the following on 09/22/05 06:28: Hi! I there a way I can get the

[PHP] gettext() troubles

2005-09-23 Thread Denis Gerasimov
Hello List, I am facing some troubles with gettext. phpinfo() says that both of gettext and iconv extensions are installed properly, I can call gettext() function but it never translates my strings returning the original key every time. Here is the code: ?php putenv(LANG=ru_RU);

[PHP] PHP in a commandline shell?

2005-09-23 Thread Gustav Wiberg
Hi there! As I understand you MUST? recompile PHP for use with only commandlineshell instead of for example Apache (or any other webserver) Is that true? Or is there any alternative if you only want to use PHP in shell-mode for testing... /G http://www.varupiraten.se/ -- PHP General

Re: [PHP] gettext() troubles

2005-09-23 Thread Aaron Gould
Denis Gerasimov wrote: ?php putenv(LANG=ru_RU); setlocale (LC_ALL,ru); $domain = 'messages'; echo bindtextdomain ($domain, 'D:\intranet\wwwroot\lng'); echo textdomain ($domain); echo bind_textdomain_codeset($domain, 'UTF-8'); echo gettext(string); ? Here's what I use to set my language (to

[PHP] Re: gettext() troubles

2005-09-23 Thread Michael Wallner
Hi Denis Gerasimov, you wrote: I am facing some troubles with gettext. ... putenv(LANG=ru_RU); Speaking from my experience, you need to use only ru there on Windows... setlocale (LC_ALL,ru); ...but you definitly have to use the Windows abbreviation for the corresponding locale in the

Re: [PHP] gettext() troubles

2005-09-23 Thread Jochem Maas
Aaron Gould wrote: Denis Gerasimov wrote: ?php putenv(LANG=ru_RU); setlocale (LC_ALL,ru); $domain = 'messages'; echo bindtextdomain ($domain, 'D:\intranet\wwwroot\lng'); echo textdomain ($domain); echo bind_textdomain_codeset($domain, 'UTF-8'); echo gettext(string); ? anyone who has worked

Re: [PHP] Opensource webshop

2005-09-23 Thread John Nichel
Jasper Bryant-Greene wrote: There are probably dozens of free open source PHP carts already out there. Not to mention the ones written in Perl. Are there many in just PHP to? As he said, there are probably dozens. Four of the PHP-based ones are listed under e-Commerce on this website:

Re: [PHP] PHP in a commandline shell?

2005-09-23 Thread John Nichel
Gustav Wiberg wrote: Hi there! As I understand you MUST? recompile PHP for use with only commandlineshell instead of for example Apache (or any other webserver) Depends on your version of php, and how it was installed. PHP versions 4.2.x you had to turn it _on_ when configuring. 4.3.x,

Re: [PHP] PHP in a commandline shell?

2005-09-23 Thread Jake Gardner
That depends on several things, chief among which are: What version did you install? What options did you supply ./configure? **Did you delete your old install?** The reason for that is because the difference between the CLI and CGI versions of PHP is the binary

Re: [PHP] PHP in a commandline shell?

2005-09-23 Thread Gustav Wiberg
- Original Message - From: Jake Gardner [EMAIL PROTECTED] To: Gustav Wiberg [EMAIL PROTECTED] Cc: PHP General php-general@lists.php.net Sent: Friday, September 23, 2005 4:36 PM Subject: Re: [PHP] PHP in a commandline shell? That depends on several things, chief among which are:

Re: [PHP] PHP in a commandline shell?

2005-09-23 Thread Gustav Wiberg
- Original Message - From: John Nichel [EMAIL PROTECTED] To: PHP General php-general@lists.php.net Sent: Friday, September 23, 2005 4:34 PM Subject: Re: [PHP] PHP in a commandline shell? Gustav Wiberg wrote: Hi there! As I understand you MUST? recompile PHP for use with only

RE: [PHP] basic user/input form questions... more validation!

2005-09-23 Thread bruce
chris... i understood the concept of data being output from an application/function. my question was directed towards trying to understand if you were meaning that an app should escape all output from the mysql db?? or, were you referring to data that would go back to the user via a form? in

Re: [PHP] PHP in a commandline shell?

2005-09-23 Thread John Nichel
Gustav Wiberg wrote: - Original Message - From: John Nichel [EMAIL PROTECTED] To: PHP General php-general@lists.php.net Sent: Friday, September 23, 2005 4:34 PM Subject: Re: [PHP] PHP in a commandline shell? Gustav Wiberg wrote: Hi there! As I understand you MUST? recompile PHP

[PHP] Subtracting dates w/o database interaction (MySQL)

2005-09-23 Thread Philip Thompson
Hey all. I'm needing to find the number of days between two dates without using an database functions (DATE_SUB, etc)... only PHP. Is there an easy way to accomplish this? I have searched the PHP site, but have not been successful in finding anything that will assist me. Any help would

[PHP] selfreferencing script with output

2005-09-23 Thread Sabine
Hello to all, I have 2 scripts ( preparing about 1000 mails for pear's mail-queue and sending them) which shall be started by the user. There are - limitations of the provider for the duration of the scripts - no cronjobs So I had the idea to write a selfreferencing script like that:

RE: [PHP] Subtracting dates w/o database interaction (MySQL)

2005-09-23 Thread Chris W. Parker
Philip Thompson mailto:[EMAIL PROTECTED] on Friday, September 23, 2005 9:12 AM said: I'm needing to find the number of days between two dates without using an database functions (DATE_SUB, etc)... only PHP. Is there an easy way to accomplish this? I have searched the PHP site, but have

RE: [PHP] basic user/input form questions... more validation!

2005-09-23 Thread Carl Furst
You should be careful about column types in mysql especially if you are doing joins. For example: mysql create temporary table justsomeresearch(foo varchar(10)); Query OK, 0 rows affected (0.00 sec) mysql insert into justsomeresearch values(3); Query OK, 1 row affected (0.00 sec) mysql insert

RE: [PHP] basic user/input form questions... more validation!

2005-09-23 Thread bruce
which is why it's critical/important to really lay out (architect) your app and to think about how the app should be handling various data types. this also goes to thiking about how you name variables in your app. all of this is really software design 101 -bruce -Original Message-

Re: [PHP] selfreferencing script with output

2005-09-23 Thread Rory Browne
On 9/23/05, Sabine [EMAIL PROTECTED] wrote: Hello to all, I have 2 scripts ( preparing about 1000 mails for pear's mail-queue and sending them) which shall be started by the user. There are - limitations of the provider for the duration of the scripts - no cronjobs So I had the idea to

RE: [PHP] basic user/input form questions... more validation!

2005-09-23 Thread Chris W. Parker
bruce mailto:[EMAIL PROTECTED] on Friday, September 23, 2005 10:46 AM said: which is why it's critical/important to really lay out (architect) your app and to think about how the app should be handling various data types. this also goes to thiking about how you name variables in your app.

RE: [PHP] basic user/input form questions... more validation!

2005-09-23 Thread Carl Furst
That may be true, but the point about php being loosely typed is valid.. Although there are cast functions in php, you can store integers in strings and vice versa.. and move them around as much as you want... When you declare a variable it has no type and is not associated with any class per se,

Re: [PHP] Subtracting dates w/o database interaction (MySQL)

2005-09-23 Thread Gustav Wiberg
- Original Message - From: Philip Thompson [EMAIL PROTECTED] To: php-general@lists.php.net Sent: Friday, September 23, 2005 6:11 PM Subject: [PHP] Subtracting dates w/o database interaction (MySQL) Hey all. I'm needing to find the number of days between two dates without using an

Re: [PHP] PHP in a commandline shell?

2005-09-23 Thread Gustav Wiberg
- Original Message - From: John Nichel [EMAIL PROTECTED] To: PHP General php-general@lists.php.net Sent: Friday, September 23, 2005 4:34 PM Subject: Re: [PHP] PHP in a commandline shell? Gustav Wiberg wrote: Hi there! As I understand you MUST? recompile PHP for use with only

Re: [PHP] PHP in a commandline shell?

2005-09-23 Thread John Nichel
Gustav Wiberg wrote: snip With PHPinfo() I get this result on my local testserver which has Windows XP running Apache Can I then use Shell? What command do I use for waiting for user input? Totally novice in this area of PHP... PHP Version 4.3.10 System Windows NT BLACKSHADOW 5.1

Re: [PHP] selfreferencing script with output

2005-09-23 Thread Gustav Wiberg
- Original Message - From: Sabine [EMAIL PROTECTED] To: PHP general php-general@lists.php.net Sent: Friday, September 23, 2005 6:14 PM Subject: [PHP] selfreferencing script with output Hello to all, I have 2 scripts ( preparing about 1000 mails for pear's mail-queue and sending

RE: [PHP] basic user/input form questions... more validation!

2005-09-23 Thread Chris W. Parker
bruce mailto:[EMAIL PROTECTED] on Thursday, September 22, 2005 4:19 PM said: the articles i've seen imply that if you addslashes, you also need to stripslashes on the backend... That's probably because gpc_magic_quotes (I think that's what it's called) is turned on and doing addslashes

Re: [PHP] Re: Posting variables from one php script to another

2005-09-23 Thread Graham Anderson
The below method is the way I send variables to the movieBuilder.php file [located in the 'src' attribute] with GET Variables It does work :) How would I use CURL to POST the same variables to the movieBuilder.php file WITHIN the 'src' attribute ? FYI, I am able to POST to the

[PHP] how to encrypt a readfile($file) on the fly ?

2005-09-23 Thread Graham Anderson
is it possible to encypt a file dynamically as it is being readfile'd ? I want to create a key stored in a db that decrypts the file once it reaches the user's computer. This file is being progressively loaded...loads and plays at the same time something like: header(ETag: .md5(time()));

Re: [PHP] Subtracting dates w/o database interaction (MySQL)

2005-09-23 Thread Philip Thompson
On Sep 23, 2005, at 11:16 AM, Chris W. Parker wrote: Philip Thompson mailto:[EMAIL PROTECTED] on Friday, September 23, 2005 9:12 AM said: I'm needing to find the number of days between two dates without using an database functions (DATE_SUB, etc)... only PHP. Is there an easy way to

Re: [PHP] Re: Posting variables from one php script to another

2005-09-23 Thread Jasper Bryant-Greene
Graham Anderson wrote: The below method is the way I send variables to the movieBuilder.php file [located in the 'src' attribute] with GET Variables It does work :) How would I use CURL to POST the same variables to the movieBuilder.php file WITHIN the 'src' attribute ? You can't.

Re: [PHP] PHP in a commandline shell?

2005-09-23 Thread Gustav Wiberg
- Original Message - From: John Nichel [EMAIL PROTECTED] To: PHP General php-general@lists.php.net Sent: Friday, September 23, 2005 8:35 PM Subject: Re: [PHP] PHP in a commandline shell? Gustav Wiberg wrote: snip With PHPinfo() I get this result on my local testserver which has

[PHP] Is PHP the language for me???

2005-09-23 Thread Emily McCall
I am trying to figure out whether php will help me to set up a website which is essentially just links to donwloadable material. I have directories in place and am using flash to auto fill the directory names on to an index page, however i cant use this to access the files themselves. So I am

Re: [PHP] Is PHP the language for me???

2005-09-23 Thread Kirk . Johnson
Emily McCall [EMAIL PROTECTED] wrote on 09/23/2005 03:07:39 PM: I am trying to figure out whether php will help me to set up a website which is essentially just links to donwloadable material. Emily, you certainly came to the right place to get an endorsement of PHP ;) Yes. PHP will handle

Re: [PHP] Re: Posting variables from one php script to another

2005-09-23 Thread Graham Anderson
thanks Well, I had to try As an alternative, if I: 1) posted variables to a script with curl $ch = curl_init (path2myScript/movieBuilder.php); curl_setopt ($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_POST,1); curl_setopt ($ch, CURLOPT_POSTFIELDS,

Re: [PHP] Is PHP the language for me???

2005-09-23 Thread Scott Noyes
I have directories in place and am using flash to auto fill the directory names on to an index page, however i cant use this to access the files themselves. So I am after a language i can use to read all the file names in the directory and display them with a bit of 'niceness' onto a

Re: [PHP] Re: Posting variables from one php script to another

2005-09-23 Thread Jasper Bryant-Greene
Graham Anderson wrote: As an alternative, if I: 1) posted variables to a script with curl $ch = curl_init (path2myScript/movieBuilder.php); curl_setopt ($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_POST,1); curl_setopt ($ch, CURLOPT_POSTFIELDS,

Re: [PHP] Is PHP the language for me???

2005-09-23 Thread Greg Donald
On 9/23/05, Emily McCall [EMAIL PROTECTED] wrote: I am trying to figure out whether php will help me to set up a website which is essentially just links to donwloadable material. I have directories in place and am using flash to auto fill the directory names on to an index page, however i

Re: [PHP] Is PHP the language for me???

2005-09-23 Thread Ryan A
On 9/24/2005 12:14:55 AM, Greg Donald ([EMAIL PROTECTED]) wrote: On 9/23/05, Emily McCall [EMAIL PROTECTED] wrote: I am trying to figure out whether php will help me to set up a website which is essentially just links to donwloadable material. I have directories in place and am using

Re: [PHP] Is PHP the language for me???

2005-09-23 Thread Thorsten Suckow-Homberg
Yep, PHP can certainly do that, and once you start you wont find a friendlier place if you need help...without this list I wouldnt be a programming in PHP todayokay, maybe I would but it would be a LOT harder :-) Sooo... how much did they pay you to make you say this? :P -- PHP General

[PHP] how to stream a movie file with fread

2005-09-23 Thread Graham Anderson
I am trying to stream a movie file with 'fread' this my first step in trying to dynamically encrypt the file as it is being streamed from the server do I need to fread the data in chunks? If so, how? $filename =$path2file; $file = fopen($filename,'r'); $fileSize = filesize($filename);

Re: [PHP] Is PHP the language for me???

2005-09-23 Thread Ryan A
On 9/24/2005 12:46:39 AM, Thorsten Suckow-Homberg ([EMAIL PROTECTED]) wrote: Yep, PHP can certainly do that, and once you start you wont find a friendlier place if you need help...without this list I wouldnt be a programming in PHP todayokay, maybe I would but it would be a LOT

RE: [PHP] how to stream a movie file with fread

2005-09-23 Thread bruce
if i may... what exactly are you trying to do. are you simply trying to get a single movie to stream... are you trying to get a better feel for how/what streaming is? -bruce -Original Message- From: Graham Anderson [mailto:[EMAIL PROTECTED] Sent: Friday, September 23, 2005 4:07 PM To:

Re: [PHP] how to stream a movie file with fread

2005-09-23 Thread Philip Hallstrom
I am trying to stream a movie file with 'fread' this my first step in trying to dynamically encrypt the file as it is being streamed from the server do I need to fread the data in chunks? If so, how? $filename =$path2file; $file = fopen($filename,'r'); $fileSize = filesize($filename);

Re: [PHP] Re: Posting variables from one php script to another

2005-09-23 Thread Al
Jasper Bryant-Greene wrote: Al wrote: I'd use this. It's simple and doesn't involve CURL. Here is a brief outline. $file_str= base64encode(serialize($_GET)); //$_GET can be any array Any reason why you base64_encode here? fwrite is binary-safe so base64 encoding your data is slow and

Re: [PHP] how to stream a movie file with fread [success] Now, how to do a fast encrypt ?

2005-09-23 Thread Graham Anderson
Ok, I got it :) Is there a better way to do a very fast encryption of a file for a key that changes daily ? The movie is loading and playing at the same time [progressive/rtsp], so the encrypt/decrypt needs to be pretty fast I tried mcrypt but it seemed way to slow Maybe there is a

Re: [PHP] Subtracting dates w/o database interaction (MySQL)

2005-09-23 Thread Stephen Leaf
$date = mysql date field 2005-09-23 for example $difference =ceil((strtotime($date) - time()) / 86400); strtotime is far nicer than mktime when you already have a date field ready. On Friday 23 September 2005 03:10 pm, Philip Thompson wrote: On Sep 23, 2005, at 11:16 AM, Chris W. Parker wrote:

Re: [PHP] Is PHP the language for me???

2005-09-23 Thread Rory Browne
On 9/23/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Emily McCall [EMAIL PROTECTED] wrote on 09/23/2005 03:07:39 PM: I am trying to figure out whether php will help me to set up a website which is essentially just links to donwloadable material. Emily, you certainly came to the right

Re: [PHP] basic user/input form questions... more validation!

2005-09-23 Thread Chris Shiflett
bruce wrote: my question was directed towards trying to understand if you were meaning that an app should escape all output from the mysql db? If you think about that for a moment, I think you'll see that it doesn't make a lot of sense. Data that you get from a remote source is input, not