Re: [PHP] having trouble with is_file() and is_dir() on 5.1.2

2007-01-23 Thread clive
try using this, from php manual, clive ?php echo filetype('/etc/passwd'); // file echo filetype('/etc/');// dir ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] having trouble with is_file() and is_dir() on 5.1.2

2007-01-23 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2007-01-22 23:26:06 -0800: On Jan 22, 2007, at 10:20 PM, Chris wrote: $basedir = '/whatever'; for($i = 0; $i count($cont); $i++) { $fullpath = $basedir . '/' . $cont[$i]; if (is_file($fullpath)) { . } Ok, I hope I can get this to work. The code I

Re: [PHP] having trouble with is_file() and is_dir() on 5.1.2

2007-01-23 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2007-01-23 09:14:15 +: readdir() returns only a basename, you need to be in the directory you're traversing (opendir(.) or opendir($dir); chdir($dir)) ... or prefix the basenames with the path you used in the opendir() call. -- How many Vietnam vets does it take to

Re: [PHP] Help With Inventory

2007-01-23 Thread Jim Lucas
Brandon Bearden wrote: What I WANT to see is something like this DVD ID | TITLE | GENRE 1 | GENRE 2 | GENRE 3 | ACT | QTY BCK |HLD | INC | OG USR | OUT DATE | OUT USR | IN DATE | IN USR CY GENRE: ACTION - 1 TITLES 20860023 | Movie name | ACTION | | | 1

Re: [PHP] where match question

2007-01-23 Thread Németh Zoltán
On h, 2007-01-22 at 22:53 -0800, Jim Lucas wrote: Don wrote: I have a db field that contains zip codes separated by comas. I am trying to get php to return all of the rows that contain a particular zip code. $query = SELECT * FROM info WHERE MATCH (partialZIP) AGAINST

Re: [PHP] where match question

2007-01-23 Thread chris smith
On 1/23/07, Németh Zoltán [EMAIL PROTECTED] wrote: On h, 2007-01-22 at 22:53 -0800, Jim Lucas wrote: Don wrote: I have a db field that contains zip codes separated by comas. I am trying to get php to return all of the rows that contain a particular zip code. $query = SELECT *

Re: [PHP] where match question

2007-01-23 Thread Németh Zoltán
On k, 2007-01-23 at 19:46 +1100, chris smith wrote: On 1/23/07, Németh Zoltán [EMAIL PROTECTED] wrote: On h, 2007-01-22 at 22:53 -0800, Jim Lucas wrote: Don wrote: I have a db field that contains zip codes separated by comas. I am trying to get php to return all of the rows that

Re: [PHP] where match question

2007-01-23 Thread Jim Lucas
Németh Zoltán wrote: On k, 2007-01-23 at 19:46 +1100, chris smith wrote: On 1/23/07, Németh Zoltán [EMAIL PROTECTED] wrote: On h, 2007-01-22 at 22:53 -0800, Jim Lucas wrote: Don wrote: I have a db field that contains zip codes separated by comas. I am trying to get php to return all of the

Re: [PHP] where match question

2007-01-23 Thread Németh Zoltán
On k, 2007-01-23 at 00:58 -0800, Jim Lucas wrote: Németh Zoltán wrote: On k, 2007-01-23 at 19:46 +1100, chris smith wrote: On 1/23/07, Németh Zoltán [EMAIL PROTECTED] wrote: On h, 2007-01-22 at 22:53 -0800, Jim Lucas wrote: Don wrote: I have a db field that contains zip codes separated

Re: [PHP] where match question

2007-01-23 Thread chris smith
On 1/23/07, Jim Lucas [EMAIL PROTECTED] wrote: Németh Zoltán wrote: On k, 2007-01-23 at 19:46 +1100, chris smith wrote: On 1/23/07, Németh Zoltán [EMAIL PROTECTED] wrote: On h, 2007-01-22 at 22:53 -0800, Jim Lucas wrote: Don wrote: I have a db field that contains zip codes separated by

Re: [PHP] Function returning but continues execution

2007-01-23 Thread David Mytton
Jochem Maas wrote: rewrite 'section/addfriend/will' - 'index.php?cmd=section/addfriendusername=will' rewrite 'section/addfriend/templates/js/jquery.js' - 'index.php?cmd=section/addfriendusername=templates/js/jquery.js' and what's the bet that this second rewritten url is the bogey man here.

RE: [PHP] using return in include files

2007-01-23 Thread Arno Kuhl
-Original Message- From: Aaron Axelsen [mailto:[EMAIL PROTECTED] Sent: 23 January 2007 06:12 To: php-general@lists.php.net Subject: [PHP] using return in include files I'm trying to figure out what the desired behavior is of using the return function to bail out of an include page. I

Re: [PHP] preg_match problem

2007-01-23 Thread Martin Alterisio
2007/1/22, Beauford [EMAIL PROTECTED]: ... much blah blah blah ... I've probably read 100 pages on this, and no matter what I try it doesn't work. Including all of what you suggested above - is my PHP possessed? if(preg_match(/[EMAIL PROTECTED]()*;:_.'/\\ ]+$/, $string)) { gives me this

Re: [PHP] preg_match problem

2007-01-23 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2007-01-23 09:52:17 -0300: 2007/1/22, Beauford [EMAIL PROTECTED]: PS: Will we be risking going the perl way if we ask that PHP supported regular expressions natively (I mean: without having to provide them as strings)? Yes. I don't know about other people's objections

[PHP] creating an api-which protocol do you use?

2007-01-23 Thread blackwater dev
I need to create some webservices for our web app and am really torn as to which route to go...SOAP, XML_RPC, etc.? I like the looks of REST but many of our partners that will be using our services use cold fusion and I think that has build in SOAP support. Which protocol would you use?

Re: [PHP] preg_match problem

2007-01-23 Thread Paul Novitski
At 1/23/2007 04:52 AM, Martin Alterisio wrote: if (preg_match('/[EMAIL PROTECTED]()*;:_.'\\/ ]+$/', $string)) Close but no cigar. Because you're using apostrophe to quote the expression, PHP interprets the apostrophe inside the character class as ending the quoted expressions and

RE: [PHP] preg_match problem

2007-01-23 Thread Beauford
if (preg_match('/[EMAIL PROTECTED]()*;:_.'\\/ ]+$/', $string)) Use single quotes and double back-slashes. PHP strings also have escape sequences that use the back-slash as escape character, that's why you have to double them. And single quotes to avoid the $ character interpreted

Re: [PHP] exec('make') Q

2007-01-23 Thread james
Roman, On 23/1/2007, Roman Neuhauser [EMAIL PROTECTED] wrote: KEYLIST := keylist.txt DEPS := $(wildcard *.txt) FILES := *.txt $(KEYLIST): $(DEPS) grep ^keywords $(FILES) $@ Why is it so roundabout about $(DEPS)/$(FILES)? The target *actuall* depends on different files than those declared

[PHP] no database selected

2007-01-23 Thread Ross
I am using this to connect remotely but I get a no database selected error. The table is contacts but there is not a parameter for database name according to the documentation. How do I delect my database when conencting this way? $link = mysql_connect('.org:3306', 'my_username',

Re: [PHP] no database selected

2007-01-23 Thread Dave Goodchild
mysql_select_db

RE: [PHP] no database selected

2007-01-23 Thread Jay Blanchard
[snip] I am using this to connect remotely but I get a no database selected error. The table is contacts but there is not a parameter for database name according to the documentation. How do I delect my database when conencting this way? [/snip]

RE: [PHP] preg_match problem

2007-01-23 Thread Beauford
You need to escape that forward slash in the character class: preg_match(/[EMAIL PROTECTED]()*;:_.'\/ Also, you've got only two backslashes in your char class. PHP is reducing this to a single backslash before the space character. I think you intend this to be two

[PHP] Encoding issue with £

2007-01-23 Thread Dave Goodchild
This may be more of a mysql issue, but I am using php for my app so here goes... I have a fee field in the database, and when users post events they can specify entrance fee in £. In some, not all, of the fields I am getting, for example, £7 rather than £. Is this an encoding issue? Many

Re: [PHP] preg_match problem

2007-01-23 Thread Jim Lucas
if (preg_match('/[EMAIL PROTECTED]()*;:_.'\\/ ]+$/', $string)) Here is my rendition of what I think you are looking for. $str = 'tab()/space( )/[EMAIL PROTECTED]*();:...'; if ( preg_match('|[EMAIL PROTECTED]*();:_. /\t-]+$|', $str) ) { echo 'success'; } else {

Re: [PHP] preg_match problem

2007-01-23 Thread Jim Lucas
Beauford wrote: You need to escape that forward slash in the character class: preg_match(/[EMAIL PROTECTED]()*;:_.'\/ Also, you've got only two backslashes in your char class. PHP is reducing this to a single backslash before the space character. I think you intend this to be

RE: [PHP] preg_match problem

2007-01-23 Thread Paul Novitski
At 1/23/2007 09:50 AM, Beauford wrote: preg_match(/[EMAIL PROTECTED]()*;:_.'\/ ]+$/, $string) On top of this, every time a ' is entered it gets preceded by \. If I just check for the characters like below that doesn't happen. Totally confused. if(preg_match(/^[-A-Za-z0-9_.' ]+$/,

[PHP] Re: JPEG info needed

2007-01-23 Thread zerof
Gerry D escreveu: I need PHP to find out if a jpeg file uses progressive encoding. None of the standard exif or image functions seem to be able to tell me that. (please correct me if I'm wrong) Can anybody help me? TIA Gerry http://www.jpeg.org/ -- zerof http://www.educar.pro.br/ Apache -

[PHP] OT - Leaving

2007-01-23 Thread John Nichel
Howdy ladies and gents: For the past 9 or so years, with one email account or another, I have been subscribed to the PHP General Mailing List. Well, life an work have succeeded in taking up all of my time, and the only thing I've been able to do with this list over the past year or so is

Re: [PHP] [HELP] Fatal error when uploading large files!

2007-01-23 Thread Jay Paulson
Hi everyone, Hopefully you all can help! I¹m at a loss as to what to do next. I¹m running PHP 5.1.2 with Apache 2.0.55 on RedHat ES4 and I keep getting the following PHP error when trying to upload a larger file. I have AllowOverride turned on in the httpd.conf file so my .htaccess file

Re: [PHP] [HELP] Fatal error when uploading large files!

2007-01-23 Thread Jay Paulson
Hi everyone, Hopefully you all can help! I¹m at a loss as to what to do next. I¹m running PHP 5.1.2 with Apache 2.0.55 on RedHat ES4 and I keep getting the following PHP error when trying to upload a larger file. I have AllowOverride turned on in the httpd.conf file so my .htaccess file

[PHP] To many connections error message

2007-01-23 Thread Kevin Murphy
I'm working with my host to resolve why I am getting these error messages, but in the meantime, I am getting this message on the website: Warning: mysql_connect(): Too many connections in /path/number/user/ code/connect.php on line 10 Sorry: Could not connect to database. Please contact the

Re: [PHP] To many connections error message

2007-01-23 Thread Pintér Tibor
@, or ask your hoster to disable display_errors t The questions is, since I don't have error reporting turned on, why am I getting an error message that includes the complete path to my connect script something I would like to not be telling the general public? Is there a way to

Re: [PHP] OT - Leaving

2007-01-23 Thread tg-php
Best wishes John! We'll hold the fort and keep fighting the good fight in your absence. :) Good luck to ya! -TG = = = Original message = = = Howdy ladies and gents: For the past 9 or so years, with one email account or another, I have been subscribed to the PHP General Mailing List.

RE: [PHP] OT - Leaving

2007-01-23 Thread Jay Blanchard
[snip] ...damned sappy stuff... [/snip] Later gator, we're going to miss your pseudo-Cajun self! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] OT - Leaving

2007-01-23 Thread Robert Cummings
Who's John Nichel? ;) FYI, for the noobs, the John and Jason referenced in the email are John Holmes and Jason Wong. Cheers, Rob. On Tue, 2007-01-23 at 14:45 -0500, John Nichel wrote: Howdy ladies and gents: For the past 9 or so years, with one email account or another, I have been

Re: [PHP] Encoding issue with £

2007-01-23 Thread tedd
At 5:55 PM + 1/23/07, Dave Goodchild wrote: This may be more of a mysql issue, but I am using php for my app so here goes... I have a fee field in the database, and when users post events they can specify entrance fee in £. In some, not all, of the fields I am getting, for example, £7

Re: [PHP] OT - Leaving

2007-01-23 Thread tedd
At 2:45 PM -0500 1/23/07, John Nichel wrote: Howdy ladies and gents: For the past 9 or so years, with one email account or another, I have been subscribed to the PHP General Mailing List. Well, life an work have succeeded in taking up all of my time, and the only thing I've been able to

[PHP] php installation problem

2007-01-23 Thread Ross
Just installed apache and am looking at an error Warning: session_start() [function.session-start]: open(C:\DOCUME~1\Ross\LOCALS~1\Temp\php\upload\sess_ob822kp9sqlndjvu089r845e50, O_RDWR) failed: No such file or directory (2) in C:\Apache\Apache2\htdocs\ssn\editor.php on line 4 Should I set

Re: [PHP] Encoding issue with £

2007-01-23 Thread Larry Garfield
On Tuesday 23 January 2007 11:55 am, Dave Goodchild wrote: This may be more of a mysql issue, but I am using php for my app so here goes... I have a fee field in the database, and when users post events they can specify entrance fee in £. In some, not all, of the fields I am getting, for

Re: [PHP] To many connections error message

2007-01-23 Thread Chris
Pintér Tibor wrote: @, or ask your hoster to disable display_errors That can be done in the script ;) ini_set('display_errors', false); -- Postgresql php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] php installation problem

2007-01-23 Thread Chris
Ross wrote: Just installed apache and am looking at an error Warning: session_start() [function.session-start]: open(C:\DOCUME~1\Ross\LOCALS~1\Temp\php\upload\sess_ob822kp9sqlndjvu089r845e50, O_RDWR) failed: No such file or directory (2) in C:\Apache\Apache2\htdocs\ssn\editor.php on line 4

Re: [PHP] To many connections error message

2007-01-23 Thread Pintér Tibor
Chris írta: Pintér Tibor wrote: @, or ask your hoster to disable display_errors That can be done in the script ;) ini_set('display_errors', false); Sure it can, but its a lame host that enables displaying of errors by default, thats why I advised to ask them to disable it globally :)

Re: [PHP] having trouble with is_file() and is_dir() on 5.1.2

2007-01-23 Thread jekillen
On Jan 22, 2007, at 11:18 PM, clive wrote: everything without an extension is a directory You will notice that the only directory detected by this code is templates. There are no files detected by this code. Does this have something to do with stat cache? I want to make one array with

RE: [PHP] preg_match problem

2007-01-23 Thread Beauford
You don't need to escape the apostrophe if the pattern isn't quoted with apostrophes in PHP or delimited by apostrophes in the PREG pattern. But generally there's no harm in escaping characters unnecessarily; it just makes for messier code. Here is a simple test of the regexp I

[PHP] Splitting long text

2007-01-23 Thread Skip Evans
Hey all, I have a requirement to take a large amount of text, a story submitted to a competition, and split into displayable chunks of 600 words each. I'd like some feedback on the best way to this. Thanks! Skip -- Skip Evans Big Sky Penguin, LLC 61 W Broadway Butte, Montana 59701

Re: [PHP] OT - Leaving

2007-01-23 Thread Chris Shiflett
John Nichel wrote: I'm just popping in now to let y'all know that I'm off to join people like John and Jason in the world of, what ever happened to him. Thanks for your contributions over the years, John. Chris -- Chris Shiflett http://shiflett.org/ -- PHP General Mailing List

Re: [PHP] Splitting long text

2007-01-23 Thread Paul Novitski
At 1/23/2007 05:52 PM, Skip Evans wrote: I have a requirement to take a large amount of text, a story submitted to a competition, and split into displayable chunks of 600 words each. You can explode a text into an array of words, slice off a 600-element array, and implode the result back

RE: [PHP] Splitting long text

2007-01-23 Thread Jay Blanchard
[snip] I have a requirement to take a large amount of text, a story submitted to a competition, and split into displayable chunks of 600 words each. I'd like some feedback on the best way to this. [/snip] There are many ways to skin this cat Skip but you can start with the basics of using

RE: [PHP] OT - Leaving

2007-01-23 Thread Ligaya A. Turmelle
So many old faces leaving... Feels odd Respectfully, Ligaya Turmelle Systems Analyst Guamcell Communications Phone: (671)689-2377 -Original Message- From: John Nichel [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 24, 2007 5:45 AM To: PHP Mailing Lists Subject: [PHP] OT - Leaving

Re: [PHP] Splitting long text

2007-01-23 Thread Anas Mughal
I have been using the below function successfully. Hope it works for you. -- Anas // textwrap 1.1 Brian Moon [EMAIL PROTECTED] // This code is part of the Phorum project http://phorum.org // $String The string to be wrapped. // $breaksAt How many characters each line should be. //

[PHP] How to make Browse Folder Dialog

2007-01-23 Thread Aslam Bari
Dear All, I m new in this Forum. I m making a project in which i need to show user a Browse Folder Dialog Box, In which he can select a folder and after this i will do some manipulation on that folder's content. So the problem is that i could not found any sample on Web , how to show Folder

Re: [PHP] creating an api-which protocol do you use?

2007-01-23 Thread Richard Lynch
On Tue, January 23, 2007 7:59 am, blackwater dev wrote: I need to create some webservices for our web app and am really torn as to which route to go...SOAP, XML_RPC, etc.? I like the looks of REST but many of our partners that will be using our services use cold fusion and I think that has

Re: [PHP] having trouble with is_file() and is_dir() on 5.1.2

2007-01-23 Thread Richard Lynch
On Tue, January 23, 2007 12:03 am, jekillen wrote: Hello php developers: I am having a problem with the following code: OS: FreeBSD v6.0 Apache 1.3.34 php 5.1.2 - $cont is an array produced from opening and reading a directory: for($i = 0; $i count($cont); $i++) { print

Re: [PHP] using return in include files

2007-01-23 Thread Richard Lynch
On Mon, January 22, 2007 10:11 pm, Aaron Axelsen wrote: I'm trying to figure out what the desired behavior is of using the return function to bail out of an include page. I did some testing, and this is what I concluded. First, I created the following file: ?php if

Re: [PHP] JPEG info needed

2007-01-23 Thread Richard Lynch
On Mon, January 22, 2007 9:46 pm, Gerry D wrote: I need PHP to find out if a jpeg file uses progressive encoding. None of the standard exif or image functions seem to be able to tell me that. (please correct me if I'm wrong) I don't know of any function, and the ever-populare

Re: [PHP] exec('make') Q

2007-01-23 Thread Richard Lynch
On Mon, January 22, 2007 5:45 pm, [EMAIL PROTECTED] wrote: Here's a simple makefile I want PHP's exec to execute make on: KEYLIST := keylist.txt DEPS := $(wildcard *.txt) FILES := *.txt $(KEYLIST): $(DEPS) grep ^keywords $(FILES) $@ now when I use make from command line, it works as

Re: [PHP] [HELP] Fatal error when uploading large files!

2007-01-23 Thread Richard Lynch
On Tue, January 23, 2007 1:48 pm, Jay Paulson wrote: php_value memory_limit 40M php_value post_max_size 30M php_value upload_max_filesize 30M php_value display_errors On php_value max_execution_time 300 php_value max_input_time 300 I *think* PHP (used to?) take the MINIMUM of the php.ini

Re: [PHP] smsSend

2007-01-23 Thread Richard Lynch
On Mon, January 22, 2007 9:17 am, Marcelo Ferrufino Murillo wrote: Hi guys, I´m beginner in php, so I need some help. I have to make a script to send SMS to moviles phones, can you give some ideas how to make it please... Thank you Another option is to partner with a gateway such as mQube to

Re: [PHP] most powerful php editor

2007-01-23 Thread Richard Lynch
On Sat, January 20, 2007 6:54 pm, Vinicius C Silva wrote: hi everyone! i'd like to ask something maybe commonly asked here. what is the most powerful php editor? vi on a Crey. :-) -- Some people have a gift link here. Know what I want? I want you to buy a CD from some starving artist.

[PHP] re: having trouble with is_file() and is_dir() on 5.1.2; solved

2007-01-23 Thread jekillen
Thanks all. ** As far as I know is_dir and is_file require a full path , ... This did the trick. I kind of assumed that the path info would be understood by is_file() and is_dir(). But explicitly adding the path info solved the problem. Now I have a beautiful array with 38 items just as I

RE: [PHP] where match question

2007-01-23 Thread Don
On k, 2007-01-23 at 00:58 -0800, Jim Lucas wrote: Németh Zoltán wrote: On k, 2007-01-23 at 19:46 +1100, chris smith wrote: On 1/23/07, Németh Zoltán [EMAIL PROTECTED] wrote: On h, 2007-01-22 at 22:53 -0800, Jim Lucas wrote: Don wrote: I have a db field that contains zip codes separated

Re: [PHP] where match question

2007-01-23 Thread Chris
I appreciate all the input. I would definitely like to use a separate table for the zips, but I cannot figure out how make the form that stores them user friendly each entry can have any number of zips - from many to just a few. Also, the site is in development, so there is no existing

Re: [PHP] How to make Browse Folder Dialog

2007-01-23 Thread Travis Doherty
Aslam Bari wrote: Dear All, I m new in this Forum. I m making a project in which i need to show user a Browse Folder Dialog Box, In which he can select a folder and after this i will do some manipulation on that folder's content. So the problem is that i could not found any sample on Web , how to

Re: [PHP] How to make Browse Folder Dialog

2007-01-23 Thread Børge Holen
On Wednesday 24 January 2007 07:32, Travis Doherty wrote: Aslam Bari wrote: Dear All, I m new in this Forum. I m making a project in which i need to show user a Browse Folder Dialog Box, In which he can select a folder and after this i will do some manipulation on that folder's content. So

Re: [PHP] Splitting long text

2007-01-23 Thread Travis Doherty
Anas Mughal wrote: I have been using the below function successfully. Hope it works for you. -- Anas // textwrap 1.1 Brian Moon [EMAIL PROTECTED] // This code is part of the Phorum project http://phorum.org // $String The string to be wrapped. // $breaksAt How many characters each

Re: [PHP] How to make Browse Folder Dialog

2007-01-23 Thread Travis Doherty
Børge Holen wrote: On Wednesday 24 January 2007 07:32, Travis Doherty wrote: Aslam Bari wrote: Dear All, I m new in this Forum. I m making a project in which i need to show user a Browse Folder Dialog Box, In which he can select a folder and after this i will do some manipulation on

Re: [PHP] How to make Browse Folder Dialog

2007-01-23 Thread Aslam Bari
Hello, Just a minute. I know the php script will run on server. Suppose i m working on server machine and i need to make a project for myself. The machine is only one and same. Also there are a lot of file and directory methods available in PHP, Whats that? Actually i want to show the files of

RE: [PHP] where match question

2007-01-23 Thread Don
I appreciate all the input. I would definitely like to use a separate table for the zips, but I cannot figure out how make the form that stores them user friendly each entry can have any number of zips - from many to just a few. Also, the site is in development, so there is no

Re: [PHP] How to make Browse Folder Dialog

2007-01-23 Thread Travis Doherty
Aslam Bari wrote: Hello, Just a minute. I know the php script will run on server. Suppose i m working on server machine and i need to make a project for myself. The machine is only one and same. Also there are a lot of file and directory methods available in PHP, Whats that? Actually i want to

Re: [PHP] Splitting long text

2007-01-23 Thread Paul Novitski
At 1/23/2007 05:52 PM, Skip Evans wrote: I have a requirement to take a large amount of text, a story submitted to a competition, and split into displayable chunks of 600 words each. At 1/23/2007 07:20 PM, Anas Mughal wrote: // textwrap 1.1 Brian Moon [EMAIL PROTECTED] // This code is part