Re: [PHP] Re: Avoiding NOTICEs on Array References

2005-01-27 Thread Burhan Khalid
Michael Sims wrote: Jochem Maas wrote: [EMAIL PROTECTED] wrote: If one must check the value and not just the existence of the checkbox entry, or for other uses, e.g. where a flag may or may not be present, one is saddled with clumsy constructs like: if (($isset($array['index'])

[PHP] LDAP paged results?

2005-01-27 Thread Meester Gurth
I'm querying a rather large result set from an LDAP server, and I appear to be bounded by some maximum result set size that is imposed by the server. I've got similar code written in perl that uses the ldap3 paged result sets control, but I see no mention of a similar implementation in the php

Re: [PHP] Re: Avoiding NOTICEs on Array References

2005-01-27 Thread Jochem Maas
Michael Sims wrote: Jochem Maas wrote: [EMAIL PROTECTED] wrote: If one must check the value and not just the existence of the checkbox entry, or for other uses, e.g. where a flag may or may not be present, one is saddled with clumsy constructs like: if (($isset($array['index'])

[PHP] Re: Call-time pass-by-reference ??

2005-01-27 Thread M. Sokolewicz
Michael Gale wrote: Hello, I am trying to start a small php ncurses app but the documenatation is not helping. What does the following mean: PHP Warning: Call-time pass-by-reference has been deprecated - argument passed by value; If you would like to pass it by reference, modify the

Re: [PHP] in need of a directory/listing script/app

2005-01-27 Thread Jochem Maas
Bruce Douglas wrote: hi... i'm looking for a good app/function/code to allow users to select a given item(s) from a list of categories. i'd also like the user to be able to display users who have selected a given category from the list... i can't seem to find an app that has this kind of code

Re: [PHP] Apache: Request exceeded the limit of 10 internal redirects

2005-01-27 Thread Jochem Maas
Richard Lynch wrote: James Guarriman wrote: RewriteEngine on RewriteOptions MaxRedirects=15 RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ /$1.php /Directory /VirtualHost ... I know its due to the way my Apache is setup (not rewrite rules) but the

Re: [PHP] check server status...please help

2005-01-27 Thread Tom
Sarcasm was also my first thought on this one, then I thought I'd tell the world how I handle it ! For one of my sites there are two solutions implemented to two situations (that's two solutions in total, not four :)). 1) User is already in site, and makes another request. Load up a very small

[PHP] help needed on imagettftext()

2005-01-27 Thread Harish Rao K
Hello, While working with some CAPTCHA stuff I get the following error: Fatal error: Call to undefined function imagettftext(). I have compiled with GD support and all the supporting libraries (Freetype, TTF, jpeg, X11R6 etc). What am I missing? Below is the configure command that I have used.

Re: [PHP] Apache: Request exceeded the limit of 10 internal redirects

2005-01-27 Thread Marek Kilimajer
Jochem Maas wrote: Richard Lynch wrote: James Guarriman wrote: RewriteEngine on RewriteOptions MaxRedirects=15 RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ /$1.php /Directory /VirtualHost ... I know its due to the way my Apache is setup (not rewrite

Re: [PHP] Magic quotes question (still driving me mad)

2005-01-27 Thread Ben Edwards
On Wed, 26 Jan 2005 13:07:34 -0800 (PST), Richard Lynch [EMAIL PROTECTED] wrote: Ben Edwards wrote: On Tue, 25 Jan 2005 17:02:21 -0800, Chris [EMAIL PROTECTED] wrote: You should probably use get_magic_quotes_runtime() , as _gpc only applies to GET/POST/COOKIE, htmlspecialchars is

Re: [PHP] Compiling PHP 4.3.3 with large file support

2005-01-27 Thread Marek Kilimajer
Jon wrote: I'm running Fedora Core 1, all packages up to date. I want to add large file support to php. I downloaded the source rpm. Added -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 to CFLAGS in the spec file, rebuilt the rpm and installed it. Apache starts fine but I get [notice] child pid

Re: [PHP] Linux PHP CLI and Environment variables

2005-01-27 Thread Marek Kilimajer
Michael Gale wrote: Hello, I am running php 4.3.7 with ncurses support. I want to create a small app using php and ncurses but I will need to get some information from the shell environment variables. I have searched every where ...is this possible ? Michael.

[PHP] error log

2005-01-27 Thread Benson
could anyone please help me on how to display all the errors to the browser, but not to file? I have tried modifying php.ini and httpd.conf (apache), but I am not sure how to modify... thx -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Apache: Request exceeded the limit of 10 internal redirects

2005-01-27 Thread Jochem Maas
Marek Kilimajer wrote: ... I know its due to the way my Apache is setup (not rewrite rules) but the following always works for me: http://www.somedomain.com/doit runs http://www.somedomain.com/doit.php -- apache just does its magic - I believe its to do with the DocumentIndex apache conf setting

[PHP] escaping quotes

2005-01-27 Thread Giles
Hi Guys Really simple question. How do I change the following: print(value=' . $attributes[messageSubject] . '); to have double quotes around the subject field instead. i.e.: print(value= . $attributes[messageSubject] . ); thanks Giles Roadnight http://giles.roadnight.name -- PHP General

RE: [PHP] Re: Avoiding NOTICEs on Array References

2005-01-27 Thread Michael Sims
Burhan Khalid wrote: Michael Sims wrote: [EMAIL PROTECTED] wrote: If one must check the value and not just the existence of the checkbox entry, or for other uses, e.g. where a flag may or may not be present, one is saddled with clumsy constructs like: if (($isset($array['index'])

RE: [PHP] Re: Avoiding NOTICEs on Array References

2005-01-27 Thread Michael Sims
Jochem Maas wrote: Michael Sims wrote: On a controller page (the C in MVC) that handles form submissions I create an array which defines what form variables are available and their default values if not entered. I then use array_merge() to combine that array with $_POST (or $_GET, as the

[PHP] Re:[PHP] escaping quotes

2005-01-27 Thread Binoy AV
Hi, Try this print(value=\ . $attributes[messageSubject] . \); Binoy __ __ __ __ Sent via the WebMail system at softwareassociates.co.uk --- Scanned by MessageExchange.net (12:54:20 SPITFIRE) -- PHP General

[PHP] SourceForge project adroption

2005-01-27 Thread Devraj Mukherjee
I have run a SourceForge project for the past two years, its a document management product with the unique feature of not using a backend. It uses text files to keep the all its META information. A very well accepted product that has been downloaded over nine thousand times and has a very

RE: [PHP] Re: Avoiding NOTICEs on Array References

2005-01-27 Thread Ford, Mike
To view the terms under which this email is distributed, please go to http://disclaimer.leedsmet.ac.uk/email.htm On 26 January 2005 19:56, [EMAIL PROTECTED] wrote: On 26 Jan 2005 Jason Barnett wrote: if (isset($_POST['checkboxfieldname'])) { /** do stuff */ } Sorry, I should

[PHP] [ParrotHeadPoster] - Re: [PHP] escaping quotes

2005-01-27 Thread Jochem Maas
I had a parrot idea whilst writing this.. (see bottom) Giles wrote: Hi Guys Really simple question. How do I change the following: print(value=' . $attributes[messageSubject] . '); to have double quotes around the subject field instead. i.e.: print(value= . $attributes[messageSubject] . ); you

RE: [PHP] escaping quotes

2005-01-27 Thread Ford, Mike
To view the terms under which this email is distributed, please go to http://disclaimer.leedsmet.ac.uk/email.htm On 27 January 2005 12:14, Giles wrote: Hi Guys Really simple question. How do I change the following: print(value=' . $attributes[messageSubject] . '); to have double

RE: [PHP] escaping quotes

2005-01-27 Thread Mikey
Hi Guys Really simple question. How do I change the following: print(value=' . $attributes[messageSubject] . '); to have double quotes around the subject field instead. i.e.: print(value= . $attributes[messageSubject] . ); Simple: Print (value=\{$attributes['messageSubject']}\);

Re: [PHP] escaping quotes

2005-01-27 Thread John Holmes
Giles wrote: Hi Guys Really simple question. How do I change the following: print(value=' . $attributes[messageSubject] . '); to have double quotes around the subject field instead. i.e.: print(value= . $attributes[messageSubject] . ); print(value=\ . $attributes[messageSubject] . \);

Re: [PHP] Web shopping cart

2005-01-27 Thread Afan Pasalic
I use osCommerce and they are not bad at all. -afan Rick Lim wrote: Can anyone recommend a freeware shopping card app in php? Thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Web shopping cart

2005-01-27 Thread Abdul-Wahid Paterson
I would agree with that. Is relatively easy to install and configure. Although the templating is not perfect...I have seen better ways of doing it. It works well though in doing what it is meant to do. regards, Abdul-Wahid On Thu, 27 Jan 2005 07:32:44 -0600, Afan Pasalic [EMAIL PROTECTED]

[PHP] read file from specific line

2005-01-27 Thread gustav
Hi there! Is there any way reading a file from a specific line? (textfile) /G @varupiraten.se -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] regular expressions ?

2005-01-27 Thread Zouari Fourat
Hello, I need to verify if $x is between 1 and 20 and i need to do that with regular expressions ? anyone can help me outta there ? thanks a lot -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] regular expressions ?

2005-01-27 Thread Marek Kilimajer
Zouari Fourat wrote: Hello, I need to verify if $x is between 1 and 20 and i need to do that with regular expressions ? anyone can help me outta there ? thanks a lot http://www.php.net/operators.comparison -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

RE: [PHP] regular expressions ?

2005-01-27 Thread Jay Blanchard
[snip] I need to verify if $x is between 1 and 20 and i need to do that with regular expressions ? anyone can help me outta there ? [/snip] Why regex? if((1 $x) ($x 20)){ it's true } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP] Re: [ParrotHeadPoster] - Re: [PHP] escaping quotes

2005-01-27 Thread Jason Barnett
Jochem Maas wrote: I had a parrot idea whilst writing this.. (see bottom) ... --- ParrotTalk: I think that this topic of string interpolation/quotes deserves 'parrot' attention which made me think that maybe the parrot could parse for markers (that if added to an email by an autorized poster)

RE: [PHP] read file from specific line

2005-01-27 Thread Jay Blanchard
[snip] Is there any way reading a file from a specific line? (textfile) [/snip] Yes. Loop through a count until you reach the line you want, then read while(!feof($myFile)){ if(lineNumberIWant = $i){ read line $i++; } else {

[PHP] HELLO, some question about php :)

2005-01-27 Thread KevinYu
Dear WM, Sorry to take your time, i wish to build a cluster, but i am not sure the php can support cluster function or not, if so, where can find it? Mysql also hope to run on the cluster, I didn't find any document about this tips! Does PHP and Mysql supports CLUSTER library or function

Re: [PHP] Web shopping cart

2005-01-27 Thread Marek Kilimajer
Abdul-Wahid Paterson wrote: I would agree with that. Is relatively easy to install and configure. Although the templating is not perfect...I have seen better ways of doing it. It works well though in doing what it is meant to do. What templating? There's no templating in osc :) I would also

[PHP] [NEWBIE] Trying to create a function from an existing script

2005-01-27 Thread Dave
PHP List, The Situation: I'm trying to make a page where users can upload an image. I've located on the internet a script that is simple enough for me to use, and I can build upon it to customize for my needs. The script as it is on the web site I got it from is a stand alone .php file

RE: [PHP] [NEWBIE] Trying to create a function from an existing script

2005-01-27 Thread Mike Johnson
From: Dave [mailto:[EMAIL PROTECTED] The Problem: I'm not able to create the right syntax to pass the $HTTP_POST_FILES variable to the function. So the function gets called, but then it stops very early because what I end up giving it is essentially an empty array, so it thinks

[PHP] ftp_put and ftp_fput both failing me

2005-01-27 Thread Wayne Zeller
My first attempt at posting this appears to have failed, so I'll try again. My apologies if this is a duplicate... I can't for the life of me figure out why this won't work. I am downloading a file from a remote host via ftp, processing it and modifying part of it, and then uploading the

Re: [PHP] regular expressions ?

2005-01-27 Thread Leif Gregory
Hello Zouari, Thursday, January 27, 2005, 7:33:04 AM, you wrote: Z I need to verify if $x is between 1 and 20 and i need to do that Z with regular expressions ? If you *need* to do it with regexp, try this: if (preg_match(/[2-19]/,$x)) echo It is!; If 1 and 20 are

Re: [PHP] help needed on imagettftext()

2005-01-27 Thread Marek Kilimajer
Harish Rao K wrote: Hello, While working with some CAPTCHA stuff I get the following error: Fatal error: Call to undefined function imagettftext(). I have compiled with GD support and all the supporting libraries (Freetype, TTF, jpeg, X11R6 etc). What am I missing? Below is the configure command

Re: [PHP] regular expressions ?

2005-01-27 Thread Marek Kilimajer
Zouari Fourat wrote: here's the problem : my user MUST input only digits between 1 and 20 doing a is_numeric and some comparaison can be bypassed by inputing : .5 or 0.5 or 5.1 or 0.3 or .01 ... ... so i thought that the smartest way is to use regex if( $i = 1 $i = 20 $i == (int)$i) ... -- PHP

Re: [PHP] regular expressions ?

2005-01-27 Thread Zouari Fourat
if (preg_match(/[2-19]/,$x)) echo It is!; doesnt work ! this is working fine : if (eregi(^-?([1-3])+$,$x) echo x is 1 or 2 or 3; On Thu, 27 Jan 2005 08:42:19 -0700, Leif Gregory [EMAIL PROTECTED] wrote: Hello Zouari, Thursday, January 27, 2005, 7:33:04 AM, you wrote: Z I need to

[PHP] Cannot connect to Database

2005-01-27 Thread Supersky
Hello, I'm using the following statements to connect to a database. ?php $conn = mysql_connect('localhost', 'root', '') or die (Can't Connect To Database); $db = mysql_select_db(testDB, $conn) or die (Can't Select Database. mysql_error()); ? But I cannot, and I see Fatal error: Call to

Re: [PHP] regular expressions ?

2005-01-27 Thread Zouari Fourat
this is working fine : if (eregi(^-?([1-3])+$,$x) echo x is 1 or 2 or 3; i forgot to say that doesnt work with 1-20 :( how to do it ? On Thu, 27 Jan 2005 16:53:55 +0100, Zouari Fourat [EMAIL PROTECTED] wrote: if (preg_match(/[2-19]/,$x)) echo It is!; doesnt work ! this is working

Re: [PHP] [NEWBIE] Trying to create a function from an existing script

2005-01-27 Thread Marek Kilimajer
Dave wrote: PHP List, The Situation: I'm trying to make a page where users can upload an image. I've located on the internet a script that is simple enough for me to use, and I can build upon it to customize for my needs. The script as it is on the web site I got it from is a stand

Re: [PHP] Cannot connect to Database

2005-01-27 Thread Leif Gregory
Hello Supersky, Thursday, January 27, 2005, 8:55:04 AM, you wrote: S But I cannot, and I see Fatal error: Call to undefined function S mysql_connect() in 1. Make sure you uncomment the extension=php_mysql.dll in your php.ini 2. Copy the php_mysql.dll to your Windows/System folder 3. Restart

Re: [PHP] Cannot connect to Database

2005-01-27 Thread Marek Kilimajer
Supersky wrote: Hello, I'm using the following statements to connect to a database. ?php $conn = mysql_connect('localhost', 'root', '') or die (Can't Connect To Database); $db = mysql_select_db(testDB, $conn) or die (Can't Select Database. mysql_error()); ? But I cannot, and I see Fatal error:

Re: [PHP] ftp_put and ftp_fput both failing me

2005-01-27 Thread Marek Kilimajer
Wayne Zeller wrote: My first attempt at posting this appears to have failed, so I'll try again. My apologies if this is a duplicate... I can't for the life of me figure out why this won't work. I am downloading a file from a remote host via ftp, processing it and modifying part of it, and

Re: [PHP] regular expressions ?

2005-01-27 Thread Zouari Fourat
to Marek Kilimajer : $i='5.'; if (($i=1) ($i=20) ($i==(int)$i)) echo 'yes'; // yes :'( On Thu, 27 Jan 2005 16:52:20 +0100, Marek Kilimajer [EMAIL PROTECTED] wrote: Zouari Fourat wrote: here's the problem : my user MUST input only digits between 1 and 20

Re: [PHP] regular expressions ?

2005-01-27 Thread Marek Kilimajer
Zouari Fourat wrote: to Marek Kilimajer : $i='5.'; if (($i=1) ($i=20) ($i==(int)$i)) echo 'yes'; // yes :'( ok, then use regexp: if (($i=1) ($i=20) regexp('^[0-9]+$', $i)) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] regular expressions ?

2005-01-27 Thread Robin Vickery
On Thu, 27 Jan 2005 16:56:05 +0100, Zouari Fourat [EMAIL PROTECTED] wrote: this is working fine : if (eregi(^-?([1-3])+$,$x) echo x is 1 or 2 or 3; i forgot to say that doesnt work with 1-20 :( how to do it ? You're far better off doing it arithmetically as someone already said,

Re: [PHP] regular expressions ?

2005-01-27 Thread Zouari Fourat
Robin : $i='2'; if (preg_match('/^(20|1[0-9]|1-9])$/', $i)) { echo 'yes'; }else echo 'no'; stdout: no Marek : $i='02'; if (($i=1) ($i=20) (eregi('^[0-9]+$', $i))) echo 'yes'; stdout: yes i hate

Re: [PHP] regular expressions ?

2005-01-27 Thread John Nichel
Zouari Fourat wrote: Robin : $i='2'; if (preg_match('/^(20|1[0-9]|1-9])$/', $i)) { Open the bracket for the last parameter... /^(20|1[0-9]|[1-9])$/ -^ -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] HELLO, some question about php :)

2005-01-27 Thread Richard Lynch
KevinYu wrote: Sorry to take your time, i wish to build a cluster, but i am not sure the php can support cluster function or not, if so, where can find it? Mysql also hope to run on the cluster, I didn't find any document about this tips! Does PHP and Mysql supports CLUSTER library or

Re: [PHP] escaping quotes

2005-01-27 Thread Richard Lynch
John Holmes wrote: print(value=\ . $attributes[messageSubject] . \); Slight typo there: value=\ . ... -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] error log

2005-01-27 Thread Richard Lynch
Benson wrote: could anyone please help me on how to display all the errors to the browser, but not to file? I have tried modifying php.ini and httpd.conf (apache), but I am not sure how to modify... You would be MUCH MUCH MUCH better off to train yourself to use 'tail -f

Re: [PHP] help needed on imagettftext()

2005-01-27 Thread Richard Lynch
Harish Rao K wrote: While working with some CAPTCHA stuff I get the following error: Fatal error: Call to undefined function imagettftext(). I have compiled with GD support and all the supporting libraries (Freetype, TTF, jpeg, X11R6 etc). What am I missing? Check the log files from in the

RE: [PHP] escaping quotes

2005-01-27 Thread Giles
Thanks, that works great. Knew that worked for JavaScript but didn't know it worked for PHP. Giles Roadnight http://giles.roadnight.name -Original Message- From: Richard Lynch [mailto:[EMAIL PROTECTED] Sent: 27 January 2005 17:07 To: John Holmes Cc: Giles; php-general@lists.php.net

Re: [PHP] Web shopping cart

2005-01-27 Thread Richard Lynch
Rick Lim wrote: Can anyone recommend a freeware shopping card app in php? Thanks. Years ago, when this question repeatedly generated flame-wars on this list, I got fed up and built this: http://l-i-e.com/compare/index.htm?date=1970-01-01 Dunno if anybody has voted recently... If anybody

Re: [PHP] regular expressions ?

2005-01-27 Thread Leif Gregory
Hello Zouari, Thursday, January 27, 2005, 8:53:55 AM, you wrote: Z doesnt work ! Z this is working fine : Z if (eregi(^-?([1-3])+$,$x) Z echo x is 1 or 2 or 3; Whoops. Sorry.. That's what I get for throwing out an answer while on the run: Try this: ?php for ($x=0; $x 120; $x++) { if

[PHP] mysql_pconnect / persistent database conections

2005-01-27 Thread Ben Edwards
Been meaning to investigate persistent database connections for a while. Coming from a rdbms background (oracle with a bit of whatcom sqlanywhare) I have always felt that the overhead of opening a connection at the beginning of each page was a little resource intensive. Anyway, I found

Re: [PHP] set-time-limit

2005-01-27 Thread Richard Lynch
Wiberg wrote: why is it so that when I echo something to the screen then I can run the script for a longer time, than if I don't have echo? Don't get the logic... Somewhere, deep in the guts of PHP, there is something not unlike this: if (exceeded_time_limit()){ trigger_error(Time limit

Re: [PHP] regular expressions ?

2005-01-27 Thread Richard Lynch
Zouari Fourat wrote: Robin : $i='2'; if (preg_match('/^(20|1[0-9]|1-9])$/', $i)) { You are missing a [ before the 1-9 in after the last | The regex WILL work if you type it correctly :-) -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List

[PHP] Vars with flash

2005-01-27 Thread Carolina Silva
Hello everybody! This might be a dumb question but i'm having a bit of trouble here: I'm making a contact form in flash MX: the swf sends a string with the variables through a loadVariables function. The string is read by a php file. All the vars get their value through a $HTTP_POST_VARS []

[PHP] Ming - php sync problem?

2005-01-27 Thread John Coppens
Hi all. I have simple page that generates a simple flash with some random images, then publishes it - on the same page. If I do this, i regularly have several kinds of problems, one of them, an error message like: getimagesize(img/topmovie/toplogo.swf): failed to open stream: No such file or

Re: [PHP] ftp_put and ftp_fput both failing me

2005-01-27 Thread Wayne Zeller
Marek Kilimajer wrote: You must use ftp_fput() because you are using open file handle. Check that tmpfile() did not fail. Then make sure you are in the right directory after logging in the ftp server. That's what I get for trying to put together code for my post during attempts to do it several

RE: [PHP] escaping quotes

2005-01-27 Thread Philip Olson
What also works is this: print 'value='. $foo['bar'] . ''; Read the manual section on strings: http://php.net/types.string Regards, Philip On Thu, 27 Jan 2005, Giles wrote: Thanks, that works great. Knew that worked for JavaScript but didn't know it worked for PHP. print(value=\ .

[PHP] Re: read file from specific line

2005-01-27 Thread John Coppens
On Thu, 27 Jan 2005 15:15:48 +0100 (CET) [EMAIL PROTECTED] wrote: Hi there! Is there any way reading a file from a specific line? (textfile) /G @varupiraten.se Not directly - there's no way to know where the line starts, except if they are all of the same length. Read the file, split it

Re: [PHP] mysql_pconnect / persistent database conections

2005-01-27 Thread Richard Lynch
Ben Edwards wrote: Been meaning to investigate persistent database connections for a while. Coming from a rdbms background (oracle with a bit of whatcom sqlanywhare) I have always felt that the overhead of opening a connection at the beginning of each page was a little resource intensive.

Re: [PHP] Re: read file from specific line

2005-01-27 Thread John Nichel
John Coppens wrote: On Thu, 27 Jan 2005 15:15:48 +0100 (CET) [EMAIL PROTECTED] wrote: Hi there! Is there any way reading a file from a specific line? (textfile) /G @varupiraten.se Not directly - there's no way to know where the line starts, except if they are all of the same length. Read the

Re: [PHP] ftp_put and ftp_fput both failing me

2005-01-27 Thread Marek Kilimajer
Wayne Zeller wrote: Marek Kilimajer wrote: You must use ftp_fput() because you are using open file handle. Check that tmpfile() did not fail. Then make sure you are in the right directory after logging in the ftp server. That's what I get for trying to put together code for my post during

Re: [PHP] Ming - php sync problem?

2005-01-27 Thread Richard Lynch
John Coppens wrote: I have simple page that generates a simple flash with some random images, then publishes it - on the same page. If I do this, i regularly have several kinds of problems, one of them, an error message like: getimagesize(img/topmovie/toplogo.swf): failed to open stream: No

Re: [PHP] Ming - php sync problem?

2005-01-27 Thread John Coppens
On Thu, 27 Jan 2005 10:54:18 -0800 (PST) [EMAIL PROTECTED] (Richard Lynch) wrote: Change your php.ini to send error messages somewhere else, and get in the habit of checking that somewhere else when you code. Thanks for the hint It has NOTHING to do with your current problem of having error

[PHP] background process

2005-01-27 Thread mbneto
Hi, I'd like to create a script that will act as a daemon. Now I simply add while() { do stuff } But this forces me to call it script.php . Is there a way to make this work without the -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] regular expressions ?

2005-01-27 Thread Rick Fletcher
Robin Vickery wrote: On Thu, 27 Jan 2005 16:56:05 +0100, Zouari Fourat [EMAIL PROTECTED] wrote: this is working fine : if (eregi(^-?([1-3])+$,$x) echo x is 1 or 2 or 3; i forgot to say that doesnt work with 1-20 :( how to do it ? if (preg_match('/^(20|1[0-9]|1-9])$/', $candidate)) { //

Re: [PHP] regular expressions ?

2005-01-27 Thread Leif Gregory
Hello Rick, Thursday, January 27, 2005, 12:36:39 PM, you wrote: R /^(1?[1-9]|[12]0)$/ works too. The first part covers 1-9, 11-19; R the second part gets you 10 and 20. R Plus, it's ever so slightly shorter! And isnt' that what's most R important? :P Purty :grin: -- Leif (TB lists

Re: [PHP] background process

2005-01-27 Thread Richard Lynch
mbneto wrote: I'd like to create a script that will act as a daemon. Now I simply add while() { do stuff } But this forces me to call it script.php . Is there a way to make this work without the You're probably better off using when calling it, but: http://php.net/pcntl_fork and

Re: [PHP] Cannot connect to Database

2005-01-27 Thread Supersky
Dear Leif, Thank you for your help. I have done what you told me to do. But it doesn't work. Best, Supersky Leif Gregory [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hello Supersky, Thursday, January 27, 2005, 8:55:04 AM, you wrote: S But I cannot, and I see Fatal error: Call

Re: [PHP] ftp_put and ftp_fput both failing me

2005-01-27 Thread Wayne Zeller
Marek Kilimajer wrote: 30 seconds? This must be your firewall blocking connections from outside world. Use ftp_pasv() to turn on passive mode. That did the trick. Thanks s much! Wayne -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Cannot connect to Database

2005-01-27 Thread Leif Gregory
Hello Supersky, Thursday, January 27, 2005, 1:37:12 PM, you wrote: S Thank you for your help. I have done what you told me to do. But it S doesn't work. Does phpinfo(); output anything like below (except it looks prettier! :grin: )? mysql MySQL Support enabled Active Persistent Links

Re: [PHP] Cannot connect to Database

2005-01-27 Thread Richard Lynch
Supersky wrote: Thank you for your help. I have done what you told me to do. But it doesn't work. Are you seeing the same error message, or is it not working in a different way? If it's the same way: 1. Did you restart Apache? 2. What does ?php phpinfo()? say about php.ini? 3. What does ?php

Re: [PHP] Compiling PHP 4.3.3 with large file support

2005-01-27 Thread Jon
Ok, I am using Apache 2.0.51, and PHP 4.3.8. I compiled both srpms with the -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 added to the CFLAGS. Attached is the last few lines of an strace httpd -X. Compiling without these flags works fine. ## strace

Re: [PHP] Ming - php sync problem?

2005-01-27 Thread Marek Kilimajer
John Coppens wrote: Hi all. I have simple page that generates a simple flash with some random images, then publishes it - on the same page. If I do this, i regularly have several kinds of problems, one of them, an error message like: getimagesize(img/topmovie/toplogo.swf): failed to open stream:

Re: [PHP] Cannot connect to Database

2005-01-27 Thread Supersky
Hello Richard, 1. I restarted Apache. 2. ?php phpinfo()? say D:\WINDOWS. 3. ?php phpinfo()? say nothing about MySQL. Thanks, Supersky Richard Lynch [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Supersky wrote: Thank you for your help. I have done what you told me to do. But it

Re: [PHP] Cannot connect to Database

2005-01-27 Thread Supersky
Hello Leif, There is nothing about mysql on the information page. Thanks for your link and I am reading it. Thanks, Supersky Leif Gregory [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hello Supersky, Thursday, January 27, 2005, 1:37:12 PM, you wrote: S Thank you for your help.

Re: [PHP] Cannot connect to Database

2005-01-27 Thread Richard Lynch
Supersky wrote: 2. ?php phpinfo()? say D:\WINDOWS. And is your php.ini file in D:\WINDOWS? Cuz if it ain't, PHP ain't reading it. -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] in need of php code for user management/admin function...

2005-01-27 Thread Bruce Douglas
hi... i'm looking for 'open source' code that can be used in a website for handling user registration, user admin functions... does anybody know of a good set of functions that can provide this kind of feature set. or, can anybody give me opinions regarding apps that you've used that have had

[PHP] in need of php code for user management/admin function...

2005-01-27 Thread The Disguised Jedi
osCommerce handles it pretty well, but a lot of the data doesn't go through much sanitization, so it can fall victim to SQL code injection www.oscommerce.com On Thu, 27 Jan 2005 16:16:51 -0800 (PST), Bruce Douglas [EMAIL PROTECTED] wrote: hi... i'm looking for 'open source' code that can

Re: [PHP] Cannot connect to Database

2005-01-27 Thread Supersky
Hello Richard, I've added my PHP folder to the system path. I think this can do the same as putting in in D:\windows. My problem has been solved. Thank you very much. Gan Richard Lynch [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Supersky wrote: 2. ?php phpinfo()? say

Re: [PHP] Cannot connect to Database

2005-01-27 Thread Supersky
Hello Leif, I've solved my problem. Thanks! Supersky Supersky [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hello Leif, There is nothing about mysql on the information page. Thanks for your link and I am reading it. Thanks, Supersky Leif Gregory [EMAIL PROTECTED] wrote in

[PHP] Re: Cannot connect to Database

2005-01-27 Thread Supersky
Thank all of you who helped me. My problem has been solved. Supersky Supersky [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hello, I'm using the following statements to connect to a database. ?php $conn = mysql_connect('localhost', 'root', '') or die (Can't Connect To

[PHP] mail problem at interland

2005-01-27 Thread David Edwards
Hi, I have a fairly simple script written that uses the mail() function on a client site hosted at Interland. I have used a similar script quite a few times before with no problem. However although the script generates no errors, no emails appear at their intended destination. Interland

[PHP] Developer needed in London

2005-01-27 Thread Underodog H.R.
Sorry for using the list in this way, wont happen again. PLEASE DON¹T REPLY TO THIS MESSAGE THROUGH THE LIST RESPOND DIRECT TO [EMAIL PROTECTED] Job Opportunity: Web Developer/Designer In-house in London (not outsourced). A great opportunity to join a young vibrant company working on exciting

[PHP] getid3

2005-01-27 Thread Daniel Lahey
I found a really great utility for getting info on music files that I thought I'd share. Here's the info: / /// getID3() by James Heinrich [EMAIL PROTECTED] // // available at http://getid3.sourceforge.net

Re: [PHP] [NEWBIE] Trying to create a function from an existing script

2005-01-27 Thread Dave
Marek, Mark, Thanks for the advice. I've added global $HTTP_POST_FILES; into my function, and it is working. I'd also like to follow Marek's advice to modify my script, as it sounds like it helps to make it more secure. However, I don't think I'm using the syntax right. I changed: if(

Re: [PHP] [NEWBIE] Trying to create a function from an existing script

2005-01-27 Thread Josip Dzolonga
On Fri, 2005-01-28 at 14:41 +0900, Dave wrote: if ( move_uploaded_file($HTTP_POST_FILES[$name]['tmp_name'], $store_dir . basename($HTTP_POST_FILES[$name]['name']) ) Try echoing $store_dir . basename($HTTP_POST_FILES[$name]['name'] before uploading the file (before the move_uploaded_file

Re: [PHP] [NEWBIE] Trying to create a function from an existing script

2005-01-27 Thread Jon
basename is looking for a file and $HTTP_POST_FILES[$name]['name'] is not a valid path to a file. Something like this should work if(move_uploaded_file($_HTTP_POST_FILES['upfile']['tmp_name'], rawurlencode($store_dir.$HTTP_POST_FILES['upfile']['name'])) On Fri, 2005-01-28 at 14:41 +0900, Dave

Re: [PHP] mail problem at interland

2005-01-27 Thread Jason Wong
On Friday 28 January 2005 10:09, David Edwards wrote: I have a fairly simple script written that uses the mail() function on a client site hosted at Interland. I have used a similar script quite a few times before with no problem. However although the script generates no errors, no emails

Re: [PHP] mysql_pconnect / persistent database conections

2005-01-27 Thread Steve Slater
At 10:43 AM 1/27/2005, Richard Lynch wrote: Ben Edwards wrote: Been meaning to investigate persistent database connections for a while. Coming from a rdbms background (oracle with a bit of whatcom sqlanywhare) I have always felt that the overhead of opening a connection at the beginning of

Re: [PHP] [NEWBIE] Trying to create a function from an existing script

2005-01-27 Thread Dave
Jon, Thanks for responding. Unfortunately, it still doesn't work. I tried it exactly as you wrote, and it still gives me the message that it failed to upload. Also, I actually want to force a name change to the file, so that regardless of what the name of the file uploaded is, it gets

Re: [PHP] [NEWBIE] Trying to create a function from an existing script

2005-01-27 Thread Jon
Dave, Does $store_dir end with a slash? Is it writable by apache? What do your log files reveal? What is the output of the script? On Fri, 2005-01-28 at 15:18 +0900, Dave wrote: Jon, Thanks for responding. Unfortunately, it still doesn't work. I tried it exactly as you wrote,

  1   2   >