Re: [PHP] Best practices for using MySQL index

2008-05-01 Thread Chris
>> Point above about spread still applies, but if you >> can join index to index, the join goes a lot faster. (A primary key in >> MySQL >> is always indexed.) >> > How much is the *a lot*? Thanks. :) If it's a unique (including primary) key then orders of magnitude for millions of rows. If it'

Re: [PHP] equivalent to perl shift function

2008-05-01 Thread Chris
Richard Luckhurst wrote: > Hi All > > I am in the process of porting a perl script and I am trying to fin out if > there > is a php equivalent to the perl shift function? I have been looking at the php > manual and google searching so far with no luck. http://www.php.net/manual/en/function.array

Re: [PHP] Categories like wordpress

2008-05-01 Thread Chris
Ryan S wrote: > Hey, > Am not really used to using the JOIN in SQL so am a bit confused as to what > kind of data I need to enter into this table: > > image_category_mapping table: > - image_id > - category_id It comes down to database normalization (http://en.wikipedia.org/wiki/Database_normali

Re: [PHP] mysql query and maximum characters in sql statement

2008-05-01 Thread Chris
Jim Lucas wrote: > Waynn Lue wrote: >> Wouldn't using LOAD DATA INFILE be better than writing your own script? >> > > depends, does the data file match the table column for column? Doesn't have to. http://dev.mysql.com/doc/refman/5.0/en/load-data.html By default, when no column list is provided

Re: [PHP] PHP Web Apps & OpenID

2008-05-06 Thread Chris
Joe Harman wrote: > Hey Ya'll! > > I am curious here if any of you are considering or already using > OpenID or Windows CardSpace? Does anyone see this being a big deal??? > from a users stand point it seems like a big hassle to get started > with it and I'm not sure if it would scare people away

Re: [PHP] mysql query and maximum characters in sql statement

2008-05-08 Thread Chris
Sanjeev N wrote: > Hi Jim Lucas, > > You are correct... i want to run in the same way. > > but as my 2 tables, column name are different i cant run the LOAD DATA > infile. If you're inserting the same data, then use LOAD DATA INFILE to load it into a temporary table, then use INSERT SELECT's to

Re: [PHP] mysql_pconnect issue

2008-05-11 Thread Chris
bruce wrote: > hi... > > running into a problem that i can't seem to solve... > > using mysql_pconnect() and i'm trying to figure out what parameters have to > be used in order to connect to a local mysql session, where mysql is > accessed using the defaults (ie, no user/passwd/hostIP) Use 'loca

Re: [PHP] creating an xls file from mysql data

2008-05-12 Thread Chris
Richard Kurth wrote: > > This script will create an xls file from the data that is sent to it > When I run this it only gets one recored and it is supposet to get all > the records that are past by the $_POST[selectedcontactlist] > I think I have a } in the wrong place but I can not figure it out

Re: [PHP] creating an xls file from mysql data

2008-05-12 Thread Chris
> Or you can do it straight from MySQL, which is a lot faster: With the caveat that you need extra mysql permissions to be able to do that. -- Postgresql & php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/un

Re: [PHP] creating an xls file from mysql data

2008-05-13 Thread Chris
> This is what the $_POST['selectedcontactlist'] looks like > > 121,17,97,123,243,52,138,114,172,170,64,49,60,256,176,244,201,42,95,4, First question is why do you need to pass it through like that? > it is not coming across as an array so the foreach is throwing an error I assume it always ha

Re: [PHP] tracking Mials Which were bounced.

2008-05-13 Thread Chris
mike wrote: > Seems like the general way is to create a mailbox (POP3 or IMAP) to > accept the bounces, then check it periodically and mark the emails as > invalid in your local database. > > I would set threshholds so you don't mark something failed that only > bounced once - it could have been a

Re: [PHP] Can Safari 3 be forced to cache a large jpeg with PHP headers?

2008-05-13 Thread Chris
Rob Gould wrote: > I am creating a touch-screen kiosk application, using a full-screen version > of Safari 3.1, and was wondering if there's a way I can force Safari to cache > a large background image JPEG. > > What I'm finding is that Safari 3 will sometimes cache my large 1.1 MB > backgrou

Re: [PHP] question about validation and sql injection

2008-05-15 Thread Chris
Dmitri wrote: > your validation looks good enough to me. If you only allow > alphanumerical chars, then your should not be worried about sql injection > also use addslashes($username) before you insert into database and you > should be fine. > > Usually addslashes is enough to prevent this, but th

Re: [PHP] $_SESSION lost

2008-05-15 Thread Chris
> $ php -v > PHP 5.2.4 (cli) (built: Sep 18 2007 08:50:58) > Copyright (c) 1997-2007 The PHP Group > Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies This shows the php command line version, not the webserver php version. To do that, look at a phpinfo() page. They may indeed be the s

Re: [PHP] problem with htmlspecialchars in version5.2.5

2008-05-18 Thread Chris
It flance wrote: > Hi, > > this statement: > echo nl2br(htmlspecialchars($row['jobdescription'], ENT_QUOTES, 'UTF-8')); > > works for php4.3.10 but not for php5.2.5 What "doesn't work" exactly? What's the output in php4 compared to php5? -- Postgresql & php tutorials http://www.designmagick.co

Re: [PHP] Trying to install imagick PECL module

2008-05-19 Thread Chris
mike wrote: > It doesn't appear to -need- this MagickWand stuff, yet configure keeps > failing on it. I guess it really does need the api stuff then ;) Which parts of imagemagick have you got installed or how did you install imagemagick? for configuring php (and other software) you need the heade

Re: [PHP] reretrieve header from email

2008-05-20 Thread Chris
Richard Heyes wrote: > Yui Hiroaki wrote: >> Does anyone knows how to retrieve Header from email? > > Depends how you have your email. For example you could use > Mail_mimeDecode, optionally in combination with Net_POP3. If it's an > IMAP account you're checking, you could use the IMAP extension i

Re: [PHP] syntax of sprintf

2008-05-20 Thread Chris
> the select query is > > $selectqueryusername = sprintf("Select username from individuals where > username='%s'", mysql_real_escape_string($username)); The syntax is fine. $result = mysql_query($selectqueryusername); if (!$result) { echo "Error! *** " . mysql_error(); } > also for insert q

Re: [PHP] strip_tags and nl2br

2008-05-20 Thread Chris
James Colannino wrote: > Hey everyone, > > I have a little bit of a quandry. I need to strip HTML tags from user > input, but I also need to convert \n's from the textarea elements to > tags so it will display properly in a browser. RTM. Supply the tags you want to keep when you call strip_tag

Re: [PHP] strip_tags and nl2br

2008-05-21 Thread Chris
James Colannino wrote: > Chris wrote: > >> RTM. >> >> Supply the tags you want to keep when you call strip_tags. >> >> $stripped = strip_tags($data, ''); > > I can do that, but my question had to do with strip_tags seeming to get > rid of \

Re: [PHP] PHP + MySQL transactions

2008-05-22 Thread Chris
Philip Thompson wrote: > Hi all. > > I'm currently working on a project that's in its beta stage. Due to time > restraints, we were unable to build in transactions from the beginning. > Well, we're getting to the point where we can now put in transactions. > Basically, I'm curious to find out your

Re: [PHP] PHP + MySQL transactions

2008-05-25 Thread Chris
>> See http://dev.mysql.com/doc/refman/5.0/en/savepoints.html >> >> The situation might not come up but it can't hurt to have it already >> built in "just in case". > > This doesn't appear deal with *nested transactions.* It appears that it > will use a single transaction and you can just save up

Re: [PHP] Still need help with some kind of memory leak in my php database program. General hints for php would help

2008-05-25 Thread Chris
> // IF I RUN THIS THROUGH A LOOP: > // for($j=0;$j<20, $j++){ $many_selected[$jj] = fu_bar($pg, > $BIG_SELECT_cmd)} THE TEST PROGRAM CRASHES so I think I have > more copies of the result of this query than I need. This is just going to create a multi-dimensional array - with each element being

Re: [PHP] Still need help with some kind of memory leak in my php database program. General hints for php would help

2008-05-25 Thread Chris
Mary Anderson wrote: > Thanks for responding. > > I hadn't realized memory_get_usage was available. That will be an > enormous help. > > And I wasn't too clear in my note. Actually, it did not surprise me > that the loop crashed the test code. I expected it to. What does > surprise me is that

Re: [PHP] Weird update problem..

2008-05-25 Thread Chris
Ryan S wrote: > This is really weird... i have tried the same exact code in phpmyadmin and it > works like a charm, but when i run the script... no errors then i go to > phpmyadmin and nothing has changed :( > > this is the code: >

Re: [PHP] Image modifications

2008-05-25 Thread Chris
Ronald Wiplinger wrote: > I would like to find some samples to start with. > > We want to upload a picture and the user may apply some "filters" or > "instructions" to create a new picture, based on the uploaded picture and > the available "filters" and "instructions". > > The idea of it is not r

Re: [PHP] PEAR_Exception & PEAR_Error

2008-05-27 Thread Chris
Al wrote: > I'm using the pear class Mail_RFC822::parseAddressList() which > apparently only throws an error_object for PEAR_Error. > > The manual says that PEAR_Error is deprecated, so I'd like to use > PEAR_Exception; but; am having trouble getting it to recognize the error. Probably better to

Re: [PHP] Query refuses to recurse all rows

2008-05-28 Thread Chris
> $numrows1 = pg_numrows($result1); > $row = 0; > do > { > $myrow = pg_fetch_array($result1, $row); > $numrows2 = pg_numrows($result2); >

Re: [PHP] A problem with fgets()

2008-05-29 Thread Chris
Usamah M. Ali wrote: > Hello, > > I have a function that picks up a random entry from a file consisting > of city names, each name on a separate line. The random value is > generated by rand() before fseek()ing to the position determined by > it. The problem is that when using fgets() to get a ran

Re: [PHP] A problem with fgets()

2008-05-29 Thread Chris
> I just need to figure out why when using fgets() with fseek() & > rand(), the script returns partial strings form the city names. Because fseek doesn't necessarily put you at the start of a line. It puts you anywhere (which could be the start, middle, 3 chars from the end) according to the nu

Re: [PHP] PHP Extensions as Shared Objects?

2008-05-29 Thread Chris
Weston C wrote: > This might be a dumb question with an obvious answer somewhere, but > I'm wondering if it's possible to build php extensions as shared > objects that plug into the PHP binary much like an apache shared > module plugs into apache. Yes. See http://www.php.net/dl (though a lot of

Re: [PHP] A bit 0T - WAMPSERVER

2008-05-29 Thread Chris
Ryan S wrote: > Hello all! > Had some big problems with XAMPP crashing my windows (Vista) laptop 8 times > out or 10 (actual figures) as I started XAMPP so have shifted over to > WAMPSERVER2 > So far so good, no crash... but their website seems to be down and need one > small tidbit... if anyone

Re: [PHP] Embed images in emails

2008-05-29 Thread Chris
Iñigo Medina García wrote: > Hi Bastien, > > thanks for the tip. I've already done it and it didn't run. > But I'll check it again. > > iñigo > >> On Thu, May 29, 2008 at 6:11 AM, Iñigo Medina García < >> [EMAIL PROTECTED]> wrote: >> >>> Hi, >>> >>> I'm trying to send emails with embed and dyn

Re: [PHP] Embed images in emails

2008-05-30 Thread Chris
Iñigo Medina García wrote: > Hi Chris, > > yep, phpmailer is a good work too. But it works the same i said about > htmlMimeMail5. So use either package to figure out what it does and how it does it - you can learn a lot from other peoples code. -- Postgresql & ph

Re: [PHP] Imagick installation issue

2008-06-09 Thread Chris
> This is the output for ldd -r for imagick.so. There are a number of > dependencies that I don't recognize > and I think there may be other packages that need to be installed. > > > > undefined symbol: zend_ce_iterator > (/usr/local/lib/php/extensions/no-debug-non-zts-20060613//imagick

Re: [PHP] PHP Runs But Does Not Display on Linux

2008-06-11 Thread Chris
Wei, Alice J. wrote: > Hi, > > I am currently using a Linux box with Fedora to run my PHP scripts, which I > have seen in the download page at http://www.php.net/downloads.php that > >We do not distribute UNIX/Linux binaries. Most Linux distributions come > with PHP these days. > > Wha

Re: [PHP] unlink oddity

2008-06-12 Thread Chris
> > function saveRecord ($db,$POST) { >$bd = "/absolute_path_to_document_root"; >$fp = "/path_to_files_from_document_root/"; >$ud = $bd . $fp; > $path = $ud.$file; // absolute path to newly named file > if ($fail || !$name || !$temp) continue; > // @unlink

Re: [PHP] a questoin about the "#" char

2008-06-12 Thread Chris
Sebastian Camino wrote: > Hello, > > I want to know what the "#" char does. In a url it's an anchor tag (http://www.w3schools.com/HTML/html_links.asp). In php it's used to mark a comment. It means nothing specific in a filename. -- Postgresql & php tutorials http://www.designmagick.com/ --

Re: [PHP] Does PHP support utf16 encode / decode

2008-06-15 Thread Chris
hce wrote: > Hi, > > I know PHP supports utf8 encode/decode, but does it support utf16 > encode/decode? If yes, would you please point me a php manual URL? It's listed as supported under the mbstring functions here: http://www.php.net/manual/en/mbstring.supported-encodings.php -- Postgresql &

[PHP] show file creation date

2007-04-21 Thread chris
Hi sorry not really a php question.. but using it in a php script :) I want to list the date and time a file was created so I want someting like.. Apr 21 18:57 monkey.txt Ive been playing around with the LS options but I dont know what flags I need. Closest I could get was.. ls -g -o -t m

Re: [PHP] move "if" logic from php into query

2007-04-26 Thread Chris
Thufir wrote: I couldn't get the page to load when the logic for line 31, "($id == $_POST[recordID])", was in the query. Can the logic for that be moved to the query? I expect so. $query = "SELECT contacts.id, px_items.id, title, notes FROM contacts, px_items WHERE contacts.id=px_items.id

Re: [PHP] Another SYSTEM Function Question

2007-04-26 Thread Chris
Nathaniel Hall wrote: I have another question regarding running a system command on a web server. Let me explain again, I am creating a login page that is to be used on my local lan only. I am wanting to lock down a maximum number of logins to up to 2 MAC addresses. I finally got the arp com

Re: [PHP] define() an array?

2007-04-27 Thread Chris
Tijnema ! wrote: On 4/20/07, Richard Lynch <[EMAIL PROTECTED]> wrote: On Fri, April 20, 2007 4:46 am, [EMAIL PROTECTED] wrote: > I thought I could define() and array. However, when I do this: Nope. :-( Has to be string or int or boolean or float or other "scalar" type. > define("THECONSTANT",

Re: [PHP] phpbb / sessionid nightmare

2007-04-29 Thread Chris
Brad Sumrall wrote: The cookie it's self says PHPSESSID=26b7974a5d71c7d0bfebbf71750dac7b Path=/ Host=www.domain.com When I go to the jacked up page, I pickup this one PHPSESSID=a787e077dd18ed18cb824f664d38315d Path=/ Host=domain.com That will be your problem. A cookie created on domain.com is

Re: [PHP] Running processes in windows

2007-04-29 Thread Chris
Nathan Wallis wrote: Howdy. I have an application in windows that I am running with a PHP page using exec ("start.. I am wondering as to the efficiency of such a statement and how taxing it is on the server. If multiple people access a page with such a statement, what toll does it

Re: [PHP] phpbb / sessionid nightmare

2007-04-29 Thread Chris
Brad Sumrall wrote: The cookie domain in phpbb is already set at ./domain.com I doubt it's set to ./domain.com What about your session (ie NOT phpbb) ? -- Postgresql & php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://w

Re: [PHP] Delete first line of a csv file if it is the headers

2007-04-29 Thread Chris
Richard Kurth wrote: The below script will parse a csv file to a database I need to remove the first line because it is the header files and I don't need them. How can I test for that and remove them. $file = fopen($_POST['copy'], 'r') or $message .= "Could not open" . $_POST[copy] . "fo

Re: [PHP] sloppy use of constants as strings. WAS: What does "<<<" mean?

2007-04-30 Thread Chris
> Personally, I *hate* that it does this work, and would love to see a little stricter parsing done and throw a fatal error if you try to use an undefined constant. You can do this yourself. See http://php.net/set_error_handler -- Postgresql & php tutorials http://www.designmagick.com/ -- PH

Re: [PHP] MySQL change-tracking

2007-05-03 Thread Chris
Richard Lynch wrote: On Wed, May 2, 2007 4:32 pm, Brad Fuller wrote: Richard Lynch wrote: I have this simple database and I'm going to have a handful of people editing it... I'd like to track each and every edit with username, and, ideally, provide myself an easy "Undo" if I decide [bleep] is

Re: [PHP] [opinions] Ashop Commerce

2007-05-04 Thread Chris
Marco Sottana wrote: if you have nothing to say.. say nothing LOL. You're the one spamming & trolling the list. -- Postgresql & php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] sqlite AND OR query ?

2007-05-08 Thread chris
Hello, I want to select two dates one being todays date and the other being -00-00 which just a date in the database when no proper date has been entered. Ive tried this but it does not work... $today = date('Y-m-d'); $result = sqlite_query($db, "SELECT * FROM domains WHERE date = '-0

[PHP] Killing a process with php

2007-05-08 Thread chris
Hi could someone give me examples on how to detect and kill processes on linux. I have a number of scripts running as socketxxx.php these stop and start every hour. But I also need to at the end of each day make sure their dead before the next days start. These processes are also running as ro

Re: [PHP] sqlite AND OR query ?

2007-05-08 Thread chris
Thanks Richard. - Original Message - From: "Richard Lynch" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Cc: Sent: Wednesday, May 09, 2007 1:49 AM Subject: Re: [PHP] sqlite AND OR query ? On Tue, May 8, 2007 7:09 pm, [EMAIL PROTECTED] wrote: I want to select two dates one being toda

Re: [PHP] Weird results with floor compiling with -march=pentium4 -mcpu=pentium4

2007-05-08 Thread Chris
Rodolfo Gonzalez Gonzalez wrote: Hi, Just for the record. I compiled PHP 5.2.2 with CFLAGS="-O2 -march=pentium4 -mcpu=pentium4", as usual (I've done so with all the 5.x.x series, and the proc is a Pentium 4, of course) and a customer complained about weird results in one of his scripts. I iso

Re: [PHP] DBA flatfile mode

2007-05-08 Thread Chris
Ultraband wrote: Hello, I'm using PHP's dba flatfile mode to maintain a flatfile database with a few records. It works good, but I was wondering about how it works. I notice that after deleting a record, only what I take to be the key part of the record is removed (the dba_* functions now long

Re: [PHP] PhP and Java login trouble

2007-05-08 Thread Chris
Brad Sumrall wrote: I am trying to create a commonlogin.php which would perform a duel login for phpbb and a java based FCKEditor combined I have working code for each as an individual but not a clue how to combine them. Does anyone have any suggestion on where I can go for information abou

Re: [PHP] PhP and Java login trouble

2007-05-08 Thread Chris
Firstly always CC the list - others can provide help and suggestions too. Brad Sumrall wrote: Any chance you can tell me what I am doing wrong? Brad onsubmit="return BBValidateLogin();"> You don't have a javascript function called 'BBValidateLogin'. You have one called validateLogin whic

Re: [PHP] PhP and Java login trouble

2007-05-08 Thread Chris
Brad Sumrall wrote: I have been hunting all around that website you referred me too looking for javascripting information and can find nothing. I know a little bit of php but little to nothing about javascripting. Eh? I never sent you to a website. See this code: function validatelogi

Re: [PHP] Search function

2007-05-09 Thread Chris
Ryan A wrote: Hey! .A little background: We have a site that has already been made.. a couple of hundred pages displayed via SMARTY templates, the site's in Swedish. The navigation and other parts except for the center is taken care of by the templates and other scripts... the center main

Re: [PHP] Scalable Site Architecture

2007-05-09 Thread Chris
bruce wrote: Hi.. In looking for what's required fo a site, I'm trying to find docs/overview/mentors to talk to/etc,... Basically, I'm considering what's required in terms of hardware/apps/functionality for each server to be able to support a site/system of ~100,000/day Depends on your app an

Re: [PHP] Problem with mssql_query()

2007-05-10 Thread Chris
Richard Lynch wrote: PostgreSQL will simply throw an error, because '8' is not no way no how an INT. It's a string. Since when? test=# create table b(b int); CREATE TABLE test=# insert into b(b) values ('1'); INSERT 0 1 test=# SELECT * from b; b --- 1 (1 row) test=# select * from b where b

[PHP] sqlite if query changes to empty on a loop

2007-05-10 Thread chris
its empty and then stop. I have this... which does not work. Thanks Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] finding next and prev record in mysql

2007-05-10 Thread Chris
Richard Kurth wrote: How would I find the next id and the prev id in sql statement like the one below. The id number is not going to be in order so I can't do a < or > limit 1 on the search SELECT id FROM contacts WHERE category = '5' AND subcategory = '1' AND members_id= '8' ORDER BY lastname

[PHP] Function Declared in Included File Not Being Found

2007-05-11 Thread Chris
e then why does the following not work as I expect? I expect the result to be "Function was called!" but it actually is "Function test() does not exist!". File: a.php --- File: b.php ------- File: c.php Chri

Re: [PHP] Function Declared in Included File Not Being Found

2007-05-11 Thread Chris
There was a specific reason that the require to the file defining the function came after the call to the function. But alas, it doesn't matter what the reason is now. Thanks for the explanation. Chris On May 11, 2007, at 7:53 PM, Robert Cummings wrote: Files are included/requir

Re: [PHP] Function Declared in Included File Not Being Found

2007-05-13 Thread Chris
etty sure that it isn't considered a bug. Chris On May 13, 2007, at 1:38 AM, Richard Lynch wrote: On Fri, May 11, 2007 3:43 pm, Chris wrote: Hello, According to the PHP manual on functions (http://www.php.net/manual/ en/language.functions.php): "In PHP 3, functions must be defined

Re: [PHP] RE: Bounty

2007-05-14 Thread Chris
Brad Sumrall wrote: The bounty still applies Need a sharp php programmer on the fly. No joke! I think you've pretty much pissed off the whole list so good luck. -- Postgresql & php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscrib

Re: [PHP] RE: Bounty FYI

2007-05-15 Thread Chris
Brad Sumrall wrote: Food for thought! Respect the freedom. Respect the Internet! We all benefit! Never abuse! Err - can you stop flooding the list with this crap? While you might think it's funny, you're just going to piss everyone off even more. -- Postgresql & php tutorials http://www.

Re: [PHP] RE: Bounty FYI

2007-05-15 Thread Chris
Brad Sumrall wrote: You're an idiot! Yeh - thanks for making my point. Now everyone knows the sort of person they are dealing with. -Original Message- From: Chris [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 15, 2007 3:02 AM To: Brad Sumrall Cc: php-general@lists.php.net Su

Re: [PHP] RE: Bounty FYI

2007-05-15 Thread Chris
Kinda says it all really. Oh - one other point. I don't think a supposed "DoD network security specialist" would ever *really* post server login details to a mailing list - do you? Hmm. Anyway. Brad Sumrall wrote: What ever script kiddy! -Original Message----- From

Re: [PHP] Mysqli insert / OO Design Problem - Call to a member function bind_param() on a non-object in...

2007-05-16 Thread Chris
Lee PHP wrote: Hi there, I'm new to OO-PHP and have encountered a problem that I just can't figure out. I have a class called DBAccess that extends mysqli. In a nutshell, it looks like this: If I execute the following code: $conn = DBAccess::getInstance(); Does that give you an object? C

Re: [PHP] delete_global_variable & session_unset

2007-05-16 Thread Chris
Stanislav Malyshev wrote: I recently noticed that session_unset in 5.2 (and probably in 6) uses delete_global_variable which looks up global scope and then deletes variable from it. Fine so far, but it does it in a loop - meaning it looks for the global scope each time anew for each session varia

Re: [PHP] using preg_match

2007-05-16 Thread Chris
Ed Curtis wrote: I'm trying to use preg_match to find a string in a system path. What I need to do is see if the string '/realtors' exists in a variable named '$path'. I know '/' is used as a container within the command itself. How do I escape it to find the string '/realtors'? http://www

Re: [PHP] WTF is wrong with the PEAR site forcing me to register to submit a bug, yet doesn't provide any way to!?

2007-05-17 Thread Chris
Daevid Vincent wrote: I wanted to submit a bug that the Spreadsheet_Excel_Writer-0.9.1 is still broken. Probably complain to the pear list instead of this one :P http://pear.php.net/support/lists.php -- Postgresql & php tutorials http://www.designmagick.com/ -- PHP General Mailing List (htt

Re: [PHP] Download speed limit

2007-05-17 Thread Chris
Rangel Reale wrote: Yes, I tried, this works, but I would like to control the send speed more, preferably via URL, as this programs will only be accessed by my desktop application, and I have full control of them. But, if there is no other way, this will be the way! Use the url parameter to wo

Re: [PHP] Database error: Invalid SQL:

2007-05-23 Thread Chris
wisuttorn wrote: I have a problem please help me when i loged in to egroup this show " Database error: Invalid SQL: SELECT DISTINCT egw_cal_repeats.*,egw_cal.*,cal_start,cal_end,cal_recur_date FROM egw_cal JOIN egw_cal_dates ON egw_cal.cal_id=egw_cal_dates.cal_id JOIN egw_cal_user ON egw_cal.cal

Re: [PHP] Re: Send HTML from PHP scripts ...

2007-05-24 Thread Chris
If you are intending to send HTML email you must set the appropriate mime-type in the header. And the rest ;) It's pretty hard to get it all working properly. I'd suggest the OP check out http://phpmailer.sourceforge.net/ It does most of the work for you. -- Postgresql & php tutorials http:

Re: [PHP] Client does not support authentication protocol...

2007-05-28 Thread Chris
Tom wrote: Hi, as always, I'm trying to connect to a MySQL database in the following way: mysql_connect('host','user','password'); In my local PC this Works perfectly, but in the server I receipt the following error: mysql_connect(): Client does not support authentication protocol requested

Re: [PHP] Client does not support authentication protocol...

2007-05-28 Thread Chris
Firstly always CC the mailing list - others can learn from the info as well. Ing. Tomás Liendo wrote: Yes, but the solutions that figure in the Web are only applicable if one has access like administrator to the server. I can't make things like upgrade versions or configure MySQL or PHP. What I

Re: [PHP] Re: Too many records to display in one web page

2007-05-29 Thread Chris
Steve wrote: The way I handle it: Step 1- Add SELECT SQL_CALC_FOUND_ROWS to the front of your initial query and add the pagination limit to the end (LIMIT 200, 400 or whatever range you want to display.) Step 2- Do a 2nd query: SELECT FOUND_ROWS() immediately after. With a *HUGE* clause th

Re: [PHP] Client does not support authentication protocol...

2007-05-29 Thread Chris
Zoltán Németh wrote: 2007. 05. 28, hétfő keltezéssel 23.52-kor Tom ezt írta: Hi, as always, I'm trying to connect to a MySQL database in the following way: mysql_connect('host','user','password'); In my local PC this Works perfectly, but in the server I receipt the following error: mysql_c

Re: [PHP] ZIP it :o)

2007-05-31 Thread Chris
Auto-Deppe, C. Haensel wrote: Morning guys, I have been trying to find an easy to use way to zip an archive on a linux box running PHP5. Now I've tried the zip-lib.php and others, but they always throw an error msg But that is not the question. I am looking to use exec("zip archive.zip $d

Re: [PHP] linking to an image with document_root

2007-06-01 Thread Chris
blueboy wrote: May be a stupid question but can I link to images with doscument root $img_url= $_SERVER['DOCUMENT_ROOT'].'/images/holder.gif'; echo ""; An image source is the URL to that image. The server document root is the local location of that file (eg /home/user/file.gif) - which is n

Re: [PHP] Fwd: php5 and sendmail

2007-06-04 Thread Chris
Arvind Autar wrote: Hello all, Firstly, I'm not subcsribed so please CC me. The issue, I'm running FC6 with php5 and sendmail. I can use mail and send mail with client inlc telnet sessions. However, mailing with php is just not working. This is what I'm using. Anyone got a clue? Check y

Re: [PHP] uploading big images.

2007-06-04 Thread Chris
Yamil Ortega wrote: Hi, me again. I need to tell you that im completely new in LAMP, so please don´t get tired with my silly questions :-). I was able to upload and create thumb images with the same size. But now, I am realizing that I can´t upload images bigger than 1 MB, I don´t know wh

Re: [PHP] TableName with space

2007-06-04 Thread Chris
karthi keyan wrote: Hi, How can I create a table with spaces "Order details" in MSSQL using PHP? I am able to create manually the table name with space by providing the name in Double Quotes. Is there a way out to do this using PHP? Put double quotes around it in php - rather simple r

Re: [PHP] explode string at new line

2007-06-05 Thread Chris
Davi wrote: Em Terça 05 Junho 2007 23:52, [EMAIL PROTECTED] escreveu: That's exactly correct. Except I /think/ you should use "\n" instead of '\n'. Thank you for the reply... =) I'll check this... BTW: array explode ( string $delimiter, string $string [, int $limit] ) So, I was wrong... Th

Re: [PHP] explode string at new line

2007-06-05 Thread Chris
Jim Lucas wrote: Chris wrote: Davi wrote: Em Terça 05 Junho 2007 23:52, [EMAIL PROTECTED] escreveu: That's exactly correct. Except I /think/ you should use "\n" instead of '\n'. Thank you for the reply... =) I'll check this... BTW: array explode ( string $de

Re: [PHP] php-cli vs python

2007-06-06 Thread Chris
Abdullah Ramazanoglu wrote: Hello, I'm already (going to) use php for web based development. Shell scripting and compiled languages have their own places, but there's also a place for a high level scripting language. While people usually use python (for higher level and perl for lower level task

Re: [PHP] cannot make directory at remote host

2007-06-06 Thread Chris
blueboy wrote: This work localy but not on my remote host. How can I debug it? if(!(is_dir('images/$customer_id'))) { mkdir("images/$customer_id", 0700); } The file is in the main public_html folder and there is a images folder. First tip - always use full paths instead of local ones so you

Re: [PHP] Re: London PHP salaries

2007-06-14 Thread Chris
n: go for at least twice that. AT LEAST :o) go for 30k, and if they don't wnan give you that, you better stop thinking about that job. Cheerio! Chris "Javier Leyba" <[EMAIL PROTECTED]> schrieb im Newsbeitrag news:[EMAIL PROTECTED] >> For living in London you would need

Re: [PHP] Re: London PHP salaries

2007-06-14 Thread Chris
Daniel My net (after taxes) are about 22k. So you better think twice before moving to germany ;o) Chris ""Daniel Brown"" <[EMAIL PROTECTED]> schrieb im Newsbeitrag news:[EMAIL PROTECTED] On 6/14/07, Colin Guthrie <[EMAIL PROTECTED]> wrote: > Chris wro

Re: [PHP] Re: London PHP salaries

2007-06-14 Thread Chris
x27;s see what my boss has to think about that *gg* Cheerio mate Chris ""Daniel Brown"" <[EMAIL PROTECTED]> schrieb im Newsbeitrag news:[EMAIL PROTECTED] On 6/14/07, Chris <[EMAIL PROTECTED]> wrote: > Daniel > > My net (after taxes) are about 22k. S

[PHP] Re: Form Data Filtering

2007-06-15 Thread Chris
t" || $value == "hell" || $value == "goddamn" || $value == "skank" || > $value == "Tit" || $value == "dick" || $value == "hoe") > { > $profanity[$field] = "bad"; > } > > Any suggestions welcome. Hi Have you tried eregi()? That might work for you. Cheers Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] New htmlentities() '$double_enocde' Param Question

2007-06-17 Thread Chris
pected Output: < // Actual Output: &lt; echo htmlentities(htmlentities('<', ENT_QUOTES, false), ENT_QUOTES, false); Thanks, Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Controlling project version

2007-06-17 Thread Chris
Miguel Vaz wrote: Hi, I recently finished a project for our local city hall and some people asked me to do some version control for future updates. They suggested the use of a linux script called Recursive Version Control, which i never even heard anything about. Sure you don't mea

Re: [PHP] Controlling project version

2007-06-17 Thread Chris
I fail to see the difference between "just a script" and "a proper program", but regardless... I think of a "script" as something like a firewall script - where-as cvs/subversion have a bunch of different commands to do different things. All interpretation I guess :P I use cvs at work (be

Re: [PHP] Controlling project version

2007-06-18 Thread Chris
Stut wrote: Chris wrote: That's odd since this is one of the major advantages that Subversion has over CVS (for me at any rate). When you branch or tag in CVS it will sit there and create a copy of every single file in the repository. Depending on the size of your projects this can take a

RE: [PHP] if test

2007-06-19 Thread Chris
I am not sure what you are trying to accomplish, but maybe require( some file ) will be of more use to you. -Original Message- From: Kostas Papadimitriou [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 19, 2007 9:31 AM To: php-general@lists.php.net Subject: Re: [PHP] if test Jochem Maas wr

Re: [PHP] POST adding extra characters

2007-06-20 Thread chris
le should be.. dry-run: filter: account-id = '10002' select: key but its writting this instead.. dry-run: filter: account-id = \'10002\' select: key How can I stop it addind the backslashes \ Thanks Chris sounds like you have magic quotes enabled. something like this a

<    4   5   6   7   8   9   10   11   12   13   >