[PHP] Command Line Script

2004-10-30 Thread Steve Douville
I'm trying to write something to run as a cron job that will perform an sftp command and then run a batch file. I was trying to use: system(sftp [EMAIL PROTECTED]) But that stalls and waits for a password before continuing with the script. Any ideas on how to pass the password when it's

Re: [PHP] Command Line Script

2004-10-30 Thread Chris Shiflett
--- Steve Douville [EMAIL PROTECTED] wrote: I'm trying to write something to run as a cron job that will perform an sftp command and then run a batch file. I was trying to use: system(sftp [EMAIL PROTECTED]) But that stalls and waits for a password before continuing with the script. Any

Re: [PHP] PHP in CGI ....php.in

2004-10-30 Thread Christian Ista
#!/usr/bin/php -c /path/to/php.ini I tried this #!/usr/local/lib/php -c php.ini In the php.ini : register_globals = on but that's not work Any idea ? Christian, -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Session and validation

2004-10-30 Thread Jason Barnett
Maybe that is my problem , that session variables will get blown away when the validations are run in the same page. Shouldn't be right ? A session variable will last the lifetime of the session... it's a php.ini setting. Session variables should remain in the session store until it is

Re: [PHP] Session and validation

2004-10-30 Thread Chris Shiflett
--- Stuart Felenstein [EMAIL PROTECTED] wrote: I had this thread going yesterday. Then basically think it reached a stalemate. I think you need to try to simplify your code to the most basic example that demonstrates the problem. By doing this, you'll achieve one of two things: 1. Figure out

RE: [PHP] Re: Bug-Tracking-System in PHP ?

2004-10-30 Thread Reinhart Viane
Hmmm No email support?? When a bug is posted, updated, a bug note is added, etc everyone who subscribed to this 'topic' will receive a email on it We use it in our firm and it works like a charm :) -Original Message- From: Michelle Konzack [mailto:[EMAIL PROTECTED] Sent: vrijdag 29

[PHP] standard ini settings

2004-10-30 Thread Reinhart Viane
Can someone point me out the best ini settings? Which are nowadays used as standards when scripts are writte? I wanna make sure the codes i (try to) write meet this standards Thx _ Reinhart Viane mailto:[EMAIL PROTECTED] [EMAIL PROTECTED] Domos || D-Studio Graaf Van Egmontstraat

[PHP] image files - upload and managment

2004-10-30 Thread Jaskirat Singh
Hi People, I am writing a web app on LAMP. The app is sort of yellow pages where people can login and post advertisments with pictures. App needs to allow users to upload pictures. (jpg and gif), needs to create thumbnails of those pictures and to store thumbnails and full pictures. App needs

Re: [PHP] Session and validation

2004-10-30 Thread Stuart Felenstein
--- Chris Shiflett [EMAIL PROTECTED] wrote: --- Stuart Felenstein [EMAIL PROTECTED] wrote: I had this thread going yesterday. Then basically think it reached a stalemate. I think you need to try to simplify your code to the most basic example that demonstrates the problem. By doing

RE: [PHP] Session and validation

2004-10-30 Thread Stuart Felenstein
--- Graham Cossey [EMAIL PROTECTED] wrote: So, if this is the result of a form submission how are you getting the POST variables? How/where is $industry being set? I appears that you are assuming that variables are 'maintained' within a script, they are not. You have to remember that

RE: [PHP] Session and validation

2004-10-30 Thread Graham Cossey
[snip] Here is the example: testarray (page1) //Start the session ?php session_start(); //Check for the array on submit if ( empty( $_SESSION['l_industry'] ) ) { $_SESSION['l_industry']=array(); } $industry = $_POST['industry']; // ?? //Check to make sure user didnt exceed 5

Re: [PHP] Command Line Script

2004-10-30 Thread Steve Douville
If you want to stick with PHP, you're better off using an ssh key, so that you're not prompted for the password. Ahh, okay thanks. If anyone can point me to some useful docs, I'd appreciate it. I've been looking on google but not really sure what's right and what's not. Thanks, Steve --

[PHP] php compiler

2004-10-30 Thread Hodicska Gergely
Hi! $a = 0; $b = 1; if ($a = 1 $b = 0) { echo 'true '; var_dump($a); var_dump($b); } else { echo 'false '; var_dump($a); var_dump($b); } Runing this we get: true bool(false) int(0) After the precedence table the first step could be evaluating the ,

[PHP] localeconv

2004-10-30 Thread Klaus Reimer
Hi, I just noticed an annoying issue with locales in PHP and I'm not sure if this behaviour is intended or it's a bug. I'm doing the following: setlocale(LC_ALL, 'de_DE'); $l = localeconv(); printf(Decimal point: %s\n, $l['decimal_point']); printf(Thousands sep:

RE: [PHP] php compiler

2004-10-30 Thread Mike
You're assigning values in your test. Use == instead of = in the if condition. =M -Original Message- From: Hodicska Gergely [mailto:[EMAIL PROTECTED] Sent: Saturday, October 30, 2004 9:50 AM To: [EMAIL PROTECTED] Subject: [PHP] php compiler Hi! $a = 0; $b = 1; if ($a = 1 $b = 0) {

Re: [PHP] php compiler

2004-10-30 Thread Klaus Reimer
Hodicska Gergely wrote: $a = 0; $b = 1; if ($a = 1 $b = 0) { echo 'true '; var_dump($a); var_dump($b); } else { echo 'false '; var_dump($a); var_dump($b); } Runing this we get: true bool(false) int(0) Are you sure you posted the example correctly? It outputs this: false

Re: [PHP] Command Line Script

2004-10-30 Thread - Edwin -
Hi, On Sat, 30 Oct 2004 09:42:13 -0400 Steve Douville [EMAIL PROTECTED] wrote: If you want to stick with PHP, you're better off using an ssh key, so that you're not prompted for the password. Ahh, okay thanks. If anyone can point me to some useful docs, I'd appreciate it. I've been

Re: [PHP] php compiler

2004-10-30 Thread Marek Kilimajer
Mike wrote: You're assigning values in your test. Use == instead of = in the if condition. hmm, but he should not get what he gets anyways: $a = 1 - evaluates to true, continue $b = 0 - evaluates to false, so the whole if() condition is false, jump to else and print: false 1 0 He gets: true

Re: [PHP] php compiler

2004-10-30 Thread Marek Kilimajer
Marek Kilimajer wrote: Mike wrote: You're assigning values in your test. Use == instead of = in the if condition. hmm, but he should not get what he gets anyways: $a = 1 - evaluates to true, continue $b = 0 - evaluates to false, so the whole if() condition is false, jump to else and print: ok,

Re: [PHP] php compiler

2004-10-30 Thread Hodicska Gergely
Use == instead of = in the if condition. Thx, I know the difference. The exapmle use willfuly =. Felho -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] php compiler

2004-10-30 Thread Hodicska Gergely
It outputs this: false bool(false) int(0) Yes, this the right output. And this output is absolutely correct. Your condition gives new values to $a and $b because you use = and not ==. So you do this: Maybe you never read this:

Re: [PHP] php compiler

2004-10-30 Thread Klaus Reimer
Hodicska Gergely wrote: It outputs this: false bool(false) int(0) Yes, this the right output. And this output is absolutely correct. Your condition gives new values to $a and $b because you use = and not ==. So you do this: Maybe you never read this:

Re: [PHP] php compiler

2004-10-30 Thread Klaus Reimer
Hodicska Gergely wrote: $a = 1 $b = 0 PHP sees two expressions here: After the precedence table the first thing should be evaluating 1 $b, so we get: $a = false = 0 Which is not meaningful thing, and maybe this cause that the evaluating of the statment is not in the right order. = has a right

Re: [PHP] php compiler

2004-10-30 Thread Hodicska Gergely
If you see the output, it seems, that PHP evaluate first $b = 0, and this is the problem. $a = 1 $b = 0 PHP sees two expressions here: After the precedence table the first thing should be evaluating 1 $b, so we get: $a = false = 0 Which is not meaningful thing, and maybe this cause that the

Re: [PHP] php compiler

2004-10-30 Thread Hodicska Gergely
= has a right associativity. This is well explained on the page you Oke, but has a higher precedence. The right associativity has sense when all the operand has the same precedence. Felho -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] php compiler

2004-10-30 Thread Klaus Reimer
Hodicska Gergely wrote: Oke, but has a higher precedence. The right associativity has sense when all the operand has the same precedence. I think the precedence of left and right associative operands can't be compared. The switch between associativities already separates the expression (if it

Re: [PHP] Session and validation

2004-10-30 Thread Jason Wong
On Saturday 30 October 2004 10:27, Stuart Felenstein wrote: --- Chris Shiflett [EMAIL PROTECTED] wrote: --- Stuart Felenstein [EMAIL PROTECTED] wrote: I had this thread going yesterday. Then basically think it reached a stalemate. I think you need to try to simplify your code to the

Re: [PHP] standard ini settings

2004-10-30 Thread Jason Wong
On Saturday 30 October 2004 09:06, Reinhart Viane wrote: Can someone point me out the best ini settings? Which are nowadays used as standards when scripts are writte? I wanna make sure the codes i (try to) write meet this standards The file 'php.ini-recommended' which is included in the

Re: [PHP] image files - upload and managment

2004-10-30 Thread Jason Wong
On Saturday 30 October 2004 09:43, Jaskirat Singh wrote: 1) Storage and retrieval - File system sounds like a better choice over database. We are talking about 20 thousand plus pictures. Using a file system is usually the better choice. With the quantity of files you're handling it might be

Re: [PHP] image files - upload and managment

2004-10-30 Thread Robby Russell
On Sat, 2004-10-30 at 02:43 -0700, Jaskirat Singh wrote: Hi People, I am writing a web app on LAMP. The app is sort of yellow pages where people can login and post advertisments with pictures. App needs to allow users to upload pictures. (jpg and gif), needs to create thumbnails of those

Re: [PHP] (Regex) not working, take a quick look at it plz?

2004-10-30 Thread Jason Wong
On Friday 29 October 2004 23:12, Ryan A wrote: I totally suck at RegEx (but am trying to learn), I got the following from the web, but its not working for me... can anyone spot what I am doing wrong or whats wrong please? And what *exactly* is wrong? What did you expect the code to do? What

Re: [PHP] image files - upload and managment

2004-10-30 Thread raditha dissanayake
Robby Russell wrote: On Sat, 2004-10-30 at 02:43 -0700, Jaskirat Singh wrote: Hi People, I am writing a web app on LAMP. The app is sort of yellow pages where people can login and post advertisments with pictures. App needs to allow users to upload pictures. (jpg and gif), needs to create

[PHP] Trouble with the ISAPI in PHP4

2004-10-30 Thread George Hester
If I am loading extensions in my php.ini file then this is what happens when I try try load the php4isapi.dll. I go ahead and add it as an ISAPI filter the way it supposed to be done in IIS 5. Then I stop the IISAdmin Service and restart it. Then I start the Web Puublishing Service. This is

Re: [PHP] php compiler

2004-10-30 Thread Curt Zirzow
* Thus wrote Hodicska Gergely: If you see the output, it seems, that PHP evaluate first $b = 0, and this is the problem. $a = 1 $b = 0 PHP sees two expressions here: After the precedence table the first thing should be evaluating 1 $b, so we get: $a = false = 0 Which is not

[PHP] php.ini Path at Runtime

2004-10-30 Thread Chris Shiflett
Does anyone know whether there is a way to specify the path of php.ini within httpd.conf or something similar? There is an environment variabled named PHPRC that is almost useful enough, but it must exist within the environment used to start Apache (e.g., using SetEnv in httpd.conf won't work -

Re: [PHP] php.ini Path at Runtime

2004-10-30 Thread Jonel Rienton
There was a very recent discussion about this, look up the archive from the past week or 2. regards, Jonel Does anyone know whether there is a way to specify the path of php.ini within httpd.conf or something similar? There is an environment variabled named PHPRC that is almost useful enough,

[PHP] Re: Using Google's API with PHP

2004-10-30 Thread Chris Martin
Rahul S. Johari wrote: Ave, Has anyone been able to successfully use the Google API with PHP here? I've been trying different scripts and each one gives me a similar Unexpected T_Function error. The other script from digitalpoint.com does run but it doesn't read my $q, basically it displays all

Re: [PHP] PHP in CGI ....php.in

2004-10-30 Thread Jonel Rienton
Hi, where did you place your php.ini? regards, Jonel -- I not know English well, but I know 7 computer languages. On Oct 30, 2004, at 2:48 AM, Christian Ista wrote: #!/usr/bin/php -c /path/to/php.ini I tried this #!/usr/local/lib/php -c php.ini In the php.ini : register_globals = on but that's

Re: [PHP] php.ini Path at Startup

2004-10-30 Thread Chris Shiflett
--- Jonel Rienton [EMAIL PROTECTED] wrote: There was a very recent discussion about this, look up the archive from the past week or 2. If you're referring to the responses to this question: http://marc.theaimsgroup.com/?l=php-generalm=109907804615206w=2 then it's a different issue. If you're

Re: [PHP] image files - upload and managment

2004-10-30 Thread Matthew Weier O'Phinney
* Robby Russell [EMAIL PROTECTED]: On Sat, 2004-10-30 at 02:43 -0700, Jaskirat Singh wrote: App needs to allow users to upload pictures. (jpg and gif), needs to create thumbnails of those pictures and to store thumbnails and full pictures. App needs to manage all those files - can be

[PHP] Security: Forms and displaying invalid data

2004-10-30 Thread rjc
I have a form, that takes user input, and was wondering what are your thoughts of redisplaying user input back on the page after validation has failed. Eg. they have to enter a date in format: '-mm-dd' and they enter: script./script etc. or anything for that matter. Although that would

Re: [PHP] php.ini Path at Startup

2004-10-30 Thread Marek Kilimajer
Chris Shiflett wrote: --- Jonel Rienton [EMAIL PROTECTED] wrote: There was a very recent discussion about this, look up the archive from the past week or 2. If you're referring to the responses to this question: http://marc.theaimsgroup.com/?l=php-generalm=109907804615206w=2 then it's a different

Re: [PHP] image files - upload and managment

2004-10-30 Thread Robby Russell
On Sat, 2004-10-30 at 22:30 +, Matthew Weier O'Phinney wrote: * Robby Russell [EMAIL PROTECTED]: On Sat, 2004-10-30 at 02:43 -0700, Jaskirat Singh wrote: App needs to allow users to upload pictures. (jpg and gif), needs to create thumbnails of those pictures and to store thumbnails

RE: [PHP] Security: Forms and displaying invalid data

2004-10-30 Thread Graham Cossey
-Original Message- From: rjc [mailto:[EMAIL PROTECTED] Sent: 30 October 2004 23:35 To: [EMAIL PROTECTED] Subject: [PHP] Security: Forms and displaying invalid data I have a form, that takes user input, and was wondering what are your thoughts of redisplaying user input back on the

[PHP] Re: Security: Forms and displaying invalid data

2004-10-30 Thread Manuel Lemos
Hello, On 10/30/2004 07:35 PM, Rjc wrote: I have a form, that takes user input, and was wondering what are your thoughts of redisplaying user input back on the page after validation has failed. Eg. they have to enter a date in format: '-mm-dd' and they enter: script./script etc. or

Re: [PHP] image files - upload and managment

2004-10-30 Thread Jason Wong
On Saturday 30 October 2004 23:06, Robby Russell wrote: I understand the argument regarding a future change in thumbnail sizes. However, generating thumbnails on a filesystem of images is something that is easily scripted and can be performed on an as-needed basis. (ImageMagick is great

Re: [PHP] php.ini Path at Startup

2004-10-30 Thread Jonel Rienton
I misread your question, thought you were referring to the same discussion about the php as cgi :-) regards, Jonel -- I not know English well, but I know 7 computer languages. On Oct 30, 2004, at 4:05 PM, Chris Shiflett wrote: --- Jonel Rienton [EMAIL PROTECTED] wrote: There was a very recent

Re: [PHP] php.ini Path at Runtime

2004-10-30 Thread Chris
Err, I'm not sure how useful this info would be, you may know this already, but that wasn't evident in your post. The Apache 2 php module has a PHPIniDir directive. If you're using 1.3 it may be possible to compile that feature into it with a minimum of fuss, though I wouldn't even have a clue

Re: [PHP] Gawd I hate those useless error messages...

2004-10-30 Thread -{ Rene Brehmer }-
At 15:56 29-10-2004, Richard Davey wrote: Hello -{, Friday, October 29, 2004, 3:28:39 PM, you wrote: RB since this is the test-server, I run with all errors, alerts, and messages RB on, but isn't there someway to make PHP just a little more helpful when RB this happens ??? Use an IDE that

[PHP] mysql_select_db error

2004-10-30 Thread Steven James Samuel Stapleton
Relevant information: Windows XP Pro SP2 PHP 5.0.2 MySQL 4.0.21-nt command line (not server-side) mysql_select_db returns no errors, and does not result in a mysql_error(), however, later queries result in errors suggesting that the switch failed: //I'm having problems with