Re: [PHP] OK SQL experts...

2004-04-23 Thread Brian Dunning
I don't have access to the MySQL command line; it's hosted at my ISP. :( On Apr 23, 2004, at 8:54 AM, Mark wrote: --- Brian Dunning [EMAIL PROTECTED] wrote: Yes, I've checked and rechecked the spelling on everything. I've been testing with a word that I know appears in at least one

Re: [PHP] OK SQL experts...

2004-04-23 Thread Brian Dunning
if that works move up into: SELECT * FROM my_table WHERE (field_1 LIKE '%$keyword%') AND status = 'active'; Yes, I actually did exactly that. Everything works until I have more than one statement inside the (x LIKE x OR x LIKE x) parens. That's why I figured there has to be something wrong with

Re: [PHP] OK SQL experts...

2004-04-23 Thread Brian Dunning
On Apr 23, 2004, at 10:13 AM, John Nichel wrote: Brian Dunning wrote: I STFW and RTFM and I still can't figure out why this returns a 1064 parse error: SELECT * FROM 'my_table' WHERE ('field_1' LIKE '%$keyword%' OR 'field_2' LIKE '%$keyword%' OR 'field_3' LIKE '%$keyword%') AND 'status

Re: [PHP] OK SQL experts...

2004-04-23 Thread Brian Dunning
On Apr 23, 2004, at 10:27 AM, Edward Peloke wrote: doesn't look like your $keyword value contains anything. My error. Here is the actual return: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ''my_table'

Re: [PHP] OK SQL experts...

2004-04-23 Thread Brian Dunning
You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ''my_table' WHERE ('field_1' LIKE '%%' OR 'field2' Because you are using a single quotes around your table/field names. Remove them or use ` (back tick). As

Re: [PHP] OK SQL experts...

2004-04-23 Thread Brian Dunning
You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ''my_table' WHERE ('field_1' LIKE '%%' OR 'field2' Because you are using a single quotes around your table/field names. Remove them or use ` (back tick). As

Re: [PHP] Max file size for uploads?

2004-05-12 Thread Brian Dunning
Is there a true max size or do I just have something messed up somewhere that I need to tweak?? I've got a client who needs their customers to upload large files for printing this way - and it stops at 30MB. There is some setting in Windows XP that we have not been able to change. It's been a

[PHP] How do I grab the contents of a web page?

2004-05-20 Thread Brian Dunning
I'm sure there's a really simple way to do this: how can I grab the source code of a specified web page and store it in a variable? Is there something like this: $siteCode = functionI'mLookingFor('www.123.com/index.htm'); Thanks, - Brian -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] How do I grab the contents of a web page?

2004-05-20 Thread Brian Dunning
On May 20, 2004, at 5:43 PM, raditha dissanayake wrote: I'm sure there's a really simple way to do this: how can I grab the source code of a specified web page and store it in a variable? Never mind, I found it: $string = get_file_contents('www.123.com'); - Brian -- PHP General Mailing List

Re: [PHP] How do I grab the contents of a web page?

2004-05-20 Thread Brian Dunning
You probably mean... $string = file_get_contents(http://www.123.com;); Whoops Well, it worked, so I must have typed it correctly in my code... :) :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Free zip code database

2004-05-24 Thread Brian Dunning
In case anyone cares, here is a site that gives away a free zip code database that's complete and current, and includes latitude and longitude so you can do distance calculations: http://www.zipwise.com/free-zip-database.php Hope it's useful to someone, - Brian -- PHP General Mailing List

[PHP] Quick encoding question:

2004-05-24 Thread Brian Dunning
I have a form and the people who submit are likely to include a bunch of ¶ characters. (That's a paragraph symbol in case it doesn't come through the list correctly.) However when I read it out of MySQL it comes back as ¶. What can I do about this? Thanks! - Brian -- PHP General Mailing List

[PHP] Session variables not recognized?

2004-05-25 Thread Brian Dunning
The first line of my file is session_start(); but whenever I try to set or reference $_SESSION['anything'] I get: Undefined variable: _SESSION What's up with that??? - Brian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Now I can't start the session either...

2004-05-25 Thread Brian Dunning
Here is the top of my file: ?php // Start the session session_start(); Which looks OK to me, but it returns: Parse error: parse error, unexpected T_STRING in c:\inetpub\wwwroot\palms\htdocs\start-selling.php on line 3 What's going on here?? - Brian -- PHP General Mailing List

Re: [PHP] Re: Now I can't start the session either...

2004-05-25 Thread Brian Dunning
On May 25, 2004, at 9:06 AM, Craig wrote: It doesnt necessarily mean the error occured on that line, that may have been the last executed statement post a few more lines or we cant help you. ?php // Start the session if (! session_id()) session_start(); if (not

Re: [PHP] Session variables not recognized?

2004-05-25 Thread Brian Dunning
This is 4.3.2 and sessions are enabled. Session handling was added in PHP 4.0. The first line of my file is session_start(); but whenever I try to set or reference $_SESSION['anything'] I get: Undefined variable: _SESSION - Brian -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

Re: [PHP] Re: Session variables not recognized?

2004-05-25 Thread Brian Dunning
The first line of my file is session_start(); but whenever I try to set or reference $_SESSION['anything'] I get: Undefined variable: _SESSION What's up with that??? what php-version do you use? It is 4.3.2 on XP. I only recently installed it and this is the first time I've tried using

Re: [PHP] Re: test

2004-05-25 Thread Brian Dunning
to the list. They're certainly not sent by anyone at PHP or who runs this list. :) The same thing can happen with every mailing list in the world. This excellent resource should not be blamed. Brian Dunning http://www.briandunning.com/ -- PHP General Mailing List (http://www.php.net

[PHP] How to check for a $_GET without throwing a Notice?

2004-05-26 Thread Brian Dunning
How do I check for the presence of an optional $_GET param without throwing a Notice: Undefined index when the param is not present? Tried all three of these, they all produce the Notice when the param is not passed: if ($_GET['id']) if ($_GET['id'] != ) if (isset $_GET['id']) -- PHP General

[PHP] Best way to sort?

2004-06-03 Thread Brian Dunning
I'm not sure if this is a complex SQL query or a PHP array sorting thing, but what's the best way to take this data: Tom Greg Brian Tom Brian Tom And return the following results, sorted by number of records: Tom - 3 Brian - 2 Greg - 1 Any thoughts? -- PHP General Mailing List

[PHP] Difficult SQL (for me) - please help!

2004-06-05 Thread Brian Dunning
Thanks to all who helped with my earlier SQL question. It was exactly what I needed. But now I'm making it more involved. Tom and Dick are competing salesmen. The data looks like this: Tom Pitch Dick Pitch Tom Sale Dick Sale Tom Pitch I want to show a list of salesmen, sorted

Re: [PHP] Difficult SQL (for me) - please help!

2004-06-06 Thread Brian Dunning
THANKS!! :) :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] [OFF] - Transparency in DHTML layers?

2004-06-07 Thread Brian Dunning
is still visible in the shaded areas. Or, if anyone knows another technology that might accomplish that, I'd appreciate those suggestions too. :) Thanks, Brian Dunning http://www.briandunning.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net

[PHP] Question about array_search

2004-10-11 Thread Brian Dunning
Say I'm trying to add a value to an array, only if it's not already in there somewhere; so I do an array_search to see. The problem is that if the item is at index 0 in the array, array_search gives the same answer as if it's not in there at all. How does one circumvent this potential pitfall?

[PHP] Grab an array from a cookie without throwing errors?

2004-10-08 Thread Brian Dunning
I've got a cookie that's either non-existent or a serialized array. I'm trying all sorts of different code combinations to retrieve it into an array variable, but everything I try throws up some combination of notices and/or warnings. Here is my latest greatest: $cookie =

Re: [PHP] VOTE TODAY

2004-11-02 Thread Brian Dunning
I'm Canadian, please stop wasting my bandwidth. As a Canadian, you wasted bandwidth by missing your chance to encourage us Gringos to vote Libertarian: http://www.self-gov.org/quiz.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: PHP Supremacy...

2004-11-17 Thread Brian Dunning
what arguments can I show for convince him to try PHP? http://www.php.net/usage.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Can't download to Mac MSIE

2004-11-19 Thread Brian Dunning
Hi, Below is the code I use to provide downloads of purchased software. It has always worked great for all browsers, except MSIE for Mac (OS X and OS 9). They just receive a blank text file called getfile.php (which is the name of this doc). Can anyone suggest a way to improve this to work

[PHP] [Off] - A way for PHP sites to get extreme Google rankings

2004-11-29 Thread Brian Dunning
/ad-network/?s=174 And now, back to our regularly scheduled programming. Brian Dunning http://www.briandunning.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] [Off] - A way for PHP sites to get extreme Google rankings

2004-11-29 Thread Brian Dunning
I'm guessing s=174 is your referral ID. Yes it is. Try it, you'll find it was well worth it. :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] [SPAM] RE: [PHP] [Off] - A way for PHP sites to get extreme Google rankings

2004-11-29 Thread Brian Dunning
] [Off] - A way for PHP sites to get extreme Google rankings Brian Dunning wrote: Check it out, in 2 weeks I got to #4 on Google for ebay motors - which, as you may know, translates into major affiliate dollars. Completely free and easy to do (as long as your site is in PHP). It's all about backlinks

[PHP] Free for commercial use?

2004-12-02 Thread Brian Dunning
I thought I wouldn't have any trouble finding this. I'm trying to provide documentation that PHP is free for commercial use, and I can't find anything on php.net. Can anyone help me? - Brian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Remember me function

2004-12-03 Thread Brian Dunning
on :) PS - When using a session that lasts a super long time, like 6 months, consider rolling your own session table rather than letting PHP create session text files all over your server. They can accumulate rather quickly. Brian Dunning http://www.briandunning.com/ -- PHP General Mailing List

Re: [PHP] Strange Download-File Problem

2004-12-03 Thread Brian Dunning
Jason - that's cool. :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Parse Error... how to fix?

2004-12-16 Thread Brian Dunning
line 42 is: TITLE $language['program_name'] /TITLE\n . Try: 'TITLE'.$language['program_name'].'/TITLE' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: How to set an absolute include path?

2004-12-27 Thread Brian Dunning
I should add that I'd heard that the following will set the include_path to the server root, no matter where you call includes from: ini_set (include_path, ini_get (include_path) . ':../:../../:../../../:../../../../'); But this doesn't seem to be doing it for me. Also my development server

[PHP] How to set an absolute include path?

2004-12-27 Thread Brian Dunning
Is there a command that will set the include path to the web server root? I'm trying to set up a directory structure where include files will be called from all different folder depths, so I'll need to call them absolutely like: include('/includes/file.php'); where the above will work no

[PHP] PHP based Apache admin tool?

2004-12-27 Thread Brian Dunning
Is there any such thing as a PHP based GUI tool for administering Apache? I've searched high low and found nothing. - Brian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] geographic search engine

2005-01-11 Thread Brian Dunning
On Jan 11, 2005, at 12:39 PM, Greg Donald wrote: This does not take into account the curve of the earth. In addition you'll need a db with the latitude and longitude for each zip code. If I might be so bold as to suggest one without getting flamed: http://www.zipwise.com/ -- PHP General Mailing

Re: [PHP] geographic search engine

2005-01-12 Thread Brian Dunning
What about UK postcodes? I don't have a source for that - looked into it once and it was too expensive. And I thought the USPS charged obscene prices... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] geographic search engine

2005-01-12 Thread Brian Dunning
I realized one day that at a distance of a hundred miles or less, I just didn't *CARE* about curvature of the earth, and replaced that trig with your basic Cartesian distance. True, but be aware that this is only true when all of your coordinates are in the same general latitude. For example,

[PHP] Help with encryption

2005-01-13 Thread Brian Dunning
Howdy all - I have RTFM and STFW and I still can't get encryption to work. What I finally ended up with from the PHP documentation is long, unwieldy, confusing, and doesn't work. I give up. I threw my big mess away and would like to start from scratch. Could anyone point me to a web page or

Re: [PHP] Help with encryption

2005-01-19 Thread Brian Dunning
Here is a class that uses mcrypt that might be helpful: Tom - this class is awesome. Took 5 seconds to add to my site and worked like a charm on the first try. THANKS!! :) - Brian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Best way to encode?

2005-01-19 Thread Brian Dunning
I have a form where people input some text, which is then incorporated into an HTML snippet which appears in a textarea for them to copy paste into a web page. People will be entering foreign language stuff as well as special characters like copyright, so I have to be sure this is handled

Re: [PHP] Malicious SQL

2004-07-07 Thread Brian Dunning
I have a question about this. Here is from the documentation: The PHP directive magic_quotes_gpc is on by default, and it essentially runs addslashes() on all GET, POST, and COOKIE data. Why doesn't this automatically prevent injections, since it escapes out any single quotes they try to

[PHP] Google question

2004-07-14 Thread Brian Dunning
Does anyone know a way to programmatically determine if a given URL is already in Google's index? I don't see anything like this in their documentation. Thanks, - Brian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Google question

2004-07-14 Thread Brian Dunning
That's the documentation I was referring to. Are you sure? Like I said, I didn't see anything like that in there. On Jul 14, 2004, at 12:13 PM, Greg Donald wrote: On Wed, 14 Jul 2004 11:27:09 -0700, Brian Dunning [EMAIL PROTECTED] wrote: Does anyone know a way to programmatically determine

Re: [PHP] Is there a brian I can pick?

2004-07-26 Thread Brian Dunning
I'm a Brian, but you can't pick me unless you're a really hot chick. - Brian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Newbie image manipulation question

2004-07-28 Thread Brian Dunning
I'm just about to dive into image uploading resizing for the first time. Do I need Imagemagick for this, or are PHP's Image tags adequate? All I want to do is let the user upload a graphic, and have PHP automatically scale it to a couple of desired sizes, and name them, pretty basic stuff. I

[PHP] Server's clock gone funny, maybe?

2004-07-29 Thread Brian Dunning
I've got a function where I reset an expiration datetime to 3 days in the future, using: update table set expire = NOW()+300 where ... Has always worked great, but today it always sets the field to -00-00 00:00:00. No code was touched. Anyone have a clue? A problem with the ISP's

Re: [PHP] Server's clock gone funny, maybe?

2004-07-29 Thread Brian Dunning
On Jul 29, 2004, at 10:18 AM, Jay Blanchard wrote: Have you asked the ISP? No - that's like asking a black hole, unfortunately - I was hoping someone here might spot a problem on my end. - Brian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Server's clock gone funny, maybe?

2004-07-29 Thread Brian Dunning
On Jul 29, 2004, at 10:45 AM, Jay Blanchard wrote: Please read this now, before you post again... http://catb.org/~esr/faqs/smart-questions.html Thank you for not trying to be a condescending smartass at all. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] Conversion of Field Value to Hyperlink

2004-07-29 Thread Brian Dunning
knows everything so you can masturbate all you want. Please flame me back channel, Brian Dunning http://www.briandunning.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Why do I keep getting a 501 mail error?

2004-08-05 Thread Brian Dunning
Developing on a Windows server to be deployed on Linux. I get SMTP server response: 501 Bad address syntax. Here's my code: $mail_from = 'My Name [EMAIL PROTECTED]'; $mail_server = 'mail.servername.com'; // This is hosted externally ini_set(SMTP, $mail_server); ini_set(sendmail_from,

Re: [PHP] How pass form variable to window.open()

2004-08-05 Thread Brian Dunning
Actually, I just did this last night with great success. Here is my code, I'm sure you can adapt it to your own. PHP was not needed, this was all done as part of the client-side validation JavaScript. Use JavaScript in the submit button's onClick to set the JavaScript variable with the

Re: [PHP] Why do I keep getting a 501 mail error?

2004-08-06 Thread Brian Dunning
Thanks very much to everyone for all the suggestions. I tried them all, and even the most minimal stripped down attempt: mail('[EMAIL PROTECTED]','Test','Test'); fails with a 501 error, Bad address syntax. This is on a Windows box. Anything else I can try? Is it possible that there is some

Re: [PHP] Why do I keep getting a 501 mail error?

2004-08-06 Thread Brian Dunning
On Aug 6, 2004, at 8:35 AM, Nicklas Bondesson wrote: Do you know what SMTP software they are running on the mailserver? Just whatever IIS uses by default on my Windows box... - Brian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Why do I keep getting a 501 mail error? - SOLVED

2004-08-06 Thread Brian Dunning
Turns out I was doing one of these in my config file: ini_set(sendmail_from, 'First Last [EMAIL PROTECTED]'); And there's that Windows-unfriendly format again. Thanks much to all who showed me what to look for! :) :) - Brian -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

[PHP] [OFF] - Fraudulent web orders - any ideas?

2004-08-16 Thread Brian Dunning
Hi all, I have a simple PHP store, and it appears that someone is using it to test credit card numbers. I'm getting a very high number of small orders every day, but a lot more declines. My merchant provider suggests blocking that person's IP address, but that's not practical since it's

Re: [PHP] [OFF] - Fraudulent web orders - any ideas?

2004-08-16 Thread Brian Dunning
Thanks to all of you for your suggestions. Yes I have been logging IP address in my orders database. I think I may have solved it by an even simpler method: I emailed the perpetrator to thank him for all of his orders to see what he'd say. His first few orders came with real email addresses,

Re: [PHP] [OFF] - Fraudulent web orders - any ideas?

2004-08-16 Thread Brian Dunning
On Aug 16, 2004, at 10:07 AM, Ed Lazor wrote: Geesh, this sounds scary. Are you requiring account login before processing payments? Not on this store, it's a really competitive market. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] EPS to PDF?

2004-08-20 Thread Brian Dunning
Does anyone know of a class or technology that can convert an EPS document in memory to an outputtable PDF? GD? ImageMagick? Thanks, - Brian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] [OFF] Double charges to credit cards

2004-08-20 Thread Brian Dunning
This question is not necessarily PHP-specific, though we are running PHP classes. Online store, credit card authorized at time of order, credit card charged at time of shipment (could be anywhere from a few minutes to a couple weeks later). Standard stuff. But customers are complaining that

[PHP] Linkpoint API question

2004-08-20 Thread Brian Dunning
I telephoned *just* as the Linkpoint API support folks left for the weekend Currently we are doing just a SALE transaction. I want instead to first submit an authorization with AVS and CVV2 information, make a decision (2 out of 3) and then process the charge or not. The documentation is

Re: [PHP] Linkpoint API question

2004-08-22 Thread Brian Dunning
Solved. The first transaction should be a PREAUTH, and the second transaction should be a POSTAUTH. Linkpoint's documentation is incorrect where it lists the possible transaction types. POSTAUTH shows up as TICKET in the transaction report, but it doesn't work if you try to send it as TICKET.

[PHP] Re: [OFF] Double charges on credit cards

2004-08-22 Thread Brian Dunning
Solved. As suggested, the tech guy at EFS was on paint. The first transaction should be an AUTH, and the second transaction should be PRIOR_AUTH_CAPTURE, not just CAPTURE. Thanks everyone for confirming there was no way what the guy said could be true... :) -- PHP General Mailing List

Re: [PHP] [OFF] - Fraudulent web orders - any ideas?

2004-08-23 Thread Brian Dunning
The plot thickens. I added AVS *and* CVM to the site - and the Amex orders are still going through. Amex ignores CVM, and the address was correct, so the thieves must have gotten ahold of printed statements that show the billing address. Any idea how to combat THAT? They are using fake IP

Re: [PHP] [OFF] - Fraudulent web orders - any ideas?

2004-08-24 Thread Brian Dunning
On Aug 24, 2004, at 9:05 AM, [EMAIL PROTECTED] wrote: are you passing the cvm on the mc/visa charges? is that stopping them? Yes, I'm doing CVM (or whatever) and AVS on all orders. Where CVM passes, I accept anything but a NN match on AVS. If CVM is blank, I accept only YY on AVS. So far only

[PHP] Cardservice lphp won't create array

2004-09-03 Thread Brian Dunning
You'll need to be generally familiar with Cardservice's lphp class to answer this one: I'm properly setting the $myorder array (as verified by outputting it with a while loop) - but upon executing the next step: $charge_result = $mylphp-curl_process($myorder); I then attempt to display the

[PHP] More on the credit card fraud

2004-09-06 Thread Brian Dunning
The fraudulent orders that I receive on my site come with email addresses of eight random alphanumerics @yahoo.com. Is anyone handy enough with regex or can show me a quick way to test for that, so I can at least refuse all orders with that pattern? (it will work for a little while, until they

[PHP] Re: Cardservice lphp won't create array

2004-09-08 Thread Brian Dunning
But I get: Warning: Variable passed to each() is not an array or object I assume you have instantiated the $mylphp object with new? Yes, in fact I'm using their demo files just to eliminate all the possible variables. It seems to only be a problem on my development server. Works fine in

Re: [PHP] Re: Cardservice lphp won't create array

2004-09-08 Thread Brian Dunning
It seems the problem is that port 1129 is blocked somewhere, which lphp needs to communicate with Cardservice. Sorry for the noise, hope this is helpful to someone else. :) - Brian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Totaling sales by month

2004-09-10 Thread Brian Dunning
I have a MySQL db with a datetime field containing the date and time of the sale. I want to query for a simple report that shows total sales by month. I thought this would be quick easy but it's NOT! I can't figure out how to query for it. If this question would be better posed to a SQL

Re: [PHP] Totaling sales by month

2004-09-10 Thread Brian Dunning
Thanks Pablo - but it's more complicated than that. I'm trying to return totals for all calendar months, not all records within the past month. I'll word my question better and post it to one of your suggested lists. :) On Sep 10, 2004, at 4:27 PM, Pablo Gosse wrote: Brian Dunning wrote: I

Re: [PHP] Totaling sales by month

2004-09-10 Thread Brian Dunning
Amazing - that did it, first try! THANKS. I knew it had to be simple. SQL rocks. - Brian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Can't maintain session across domains

2004-09-18 Thread Brian Dunning
I'm hosting on PowWeb where you have a different domain for SSL pages. I'm trying to pass the user from the www.mydomain.com pages to the mydomain.secure.powweb.com pages to complete a credit card transaction, so I pass sid=xx as a GET param on the link that jumps them to the new domain.

[PHP] Split haystack at nth occurrence of needle?

2004-09-22 Thread Brian Dunning
I've been RTFMing for about an hour and I can't find a string function to split haystack 'onebrtwobrthreebrfourbrfive' at the nth occurrence of needle 'br'. strpos gives me the position of the first needle, and strrpos gives me the position of the last needle. But I'm looking for the position

Re: [PHP] Split haystack at nth occurrence of needle?

2004-09-22 Thread Brian Dunning
? $string = 'onebrtwobrthreebrfourbrfive'; $nthPos = 4; $tmpArr = explode( 'br', $string ); $nthString = $tmpArr[($nthPos - 1)]; ? Thanks Chris, that works great, but it's not doing what I want. I'm just trying to get the position of the 3rd occurrence (for example) of 'br'. So I'm

Re: [PHP] Split haystack at nth occurrence of needle?

2004-09-22 Thread Brian Dunning
I don't understand why explode won't work for you. The explode solution is working. Thanks very much to everyone who replied with so much great information! - Brian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Storing compiled code on the server

2007-02-21 Thread Brian Dunning
I have a few scripts that I want to protect from the prying eyes of even people with root access to my server. The best suggestion I've heard is to store only the compiled version on the server itself. I have no idea how to do this or how those scripts would be called. Can anyone point me

[PHP] Zend question

2007-02-21 Thread Brian Dunning
I have eAccelerator on my server. I want to use Zend Guard. Anyone know if I'll need to lose eAccelerator and switch to Zend Optimizer? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] [X-POST] PHP script to make sure MySQL is up?

2007-03-01 Thread Brian Dunning
I host at Rackspace, and one thing that their monitoring service does NOT catch is a problem when too many connections hit MySQL, and for some reason it remains hung up until the service is manually restarted. In the meantime, this is happening to us once or twice a month. It gets hammered

[PHP] Payflow Pro

2007-03-16 Thread Brian Dunning
Hey is anyone using the pfpro extension, or is their XMLPay the newer and groovier option? Any opinions appreciated. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Why can't I ini_set('upload_max_filesize')?

2007-04-17 Thread Brian Dunning
If I do this: ini_set('upload_max_filesize', 30720); echo ini_get('upload_max_filesize'); it returns 2M. Why is it not accepting the ini_set? The server is Windows, PHP 5.2. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Why can't I ini_set('upload_max_filesize')?

2007-04-17 Thread Brian Dunning
be set in php.ini or httpd.conf. This means that, unfortunately, even if your system uses Apache on Windows and the host allows .htaccess overrides, you still can't set it using php_flags. On 4/17/07, Brian Dunning [EMAIL PROTECTED] wrote: If I do this: ini_set('upload_max_filesize', 30720

[PHP] Uploading: Safari=happy, IE7/Firefox=unhappy

2007-04-17 Thread Brian Dunning
I got everything configured on my server and uploads working great, max_input_time=3600, upload_max_filesize=30M, post_max_size=30M, and anything I upload up to 30M works great on Safari. IE7 and Firefox choke, returning broser-generated page not found, connection reset if the file is

Re: [PHP] Why can't I ini_set('upload_max_filesize')?

2007-04-18 Thread Brian Dunning
We finally got it resolved by editing php.ini. This was classic: A clueless office assistant did it, talked through step-by-step over a cell phone, while an armed security guard accompanied her into their server room. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP] [X-POST] Fastest way to dump this huge table

2007-05-02 Thread Brian Dunning
I have a huge MySQL table, 2.1 million records, 200MB. Once a week I need to dump it in CSV format and zip the file. This is not on my server, and it's in production, so I don't want to risk testing different methods and possibly hanging up their server for a period of time, so I wanted to

Re: [PHP] [X-POST] Fastest way to dump this huge table

2007-05-02 Thread Brian Dunning
Thanks to everyone who answered, think I've got enough info now to handle it. :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Zend Guard/Optimizer alternatives?

2009-02-16 Thread Brian Dunning
Is there a cheaper alternative to Guard/Optimizer? I have a single small PHP file that is part of a larger solution I sell, and I want it to be protected - and it has to be a runtime so it will run on anyone's standard PHP server. Zend's $600 was a little bit of sticker shock. Any

Re: [PHP] Zend Guard/Optimizer alternatives?

2009-02-16 Thread Brian Dunning
to have to know anything or do anything special (they are business people, not developers or server admins). On Feb 16, 2009, at 9:10 AM, Brian Dunning wrote: Is there a cheaper alternative to Guard/Optimizer? I have a single small PHP file that is part of a larger solution I sell, and I want

Re: [PHP] Re: Reverse IP lookup

2009-02-16 Thread Brian Dunning
And an equally important question: How do you prevent your servers from showing up in searches like this? On Feb 16, 2009, at 7:51 AM, Lewis Wright wrote: This may be a little more accurate: http://www.domaintools.com/reverse-ip/ -- PHP General Mailing List (http://www.php.net/) To

[PHP] file_get_contents doesn't work on one particular server

2009-04-29 Thread Brian Dunning
Howdy all - We have a production server that runs our script fine. We're setting up a test server, and this particular script returns a length of zero: $ctx = stream_context_create(array('http' = array('timeout' = 1200))); // 20 minutes per file $contents = file_get_contents($full_url, 0,

[PHP] fopen() on a network share?

2009-06-15 Thread Brian Dunning
Running on Windows... I have a network share, \\sharename\foldername, and I want to write a file. How do I format the pathname with fopen() for this? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] fopen() on a network share?

2009-06-15 Thread Brian Dunning
, 2009, at 1:39 PM, Brian Dunning wrote: Running on Windows... I have a network share, \\sharename \foldername, and I want to write a file. How do I format the pathname with fopen() for this? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Totally weird behavior trying to download a Mac DMG file

2009-06-16 Thread Brian Dunning
So I've added a product to my online store that's in .DMG format. Most of the other files are ZIP or PDF. When someone completes a purchase, it downloads the file to them, and this works great: header('Content-Type: application/octet-stream'); header('Content-Disposition: attachment;

Re: [PHP] Totally weird behavior trying to download a Mac DMG file

2009-06-16 Thread Brian Dunning
Don't think so, only when I download via the PHP code I posted: On Jun 16, 2009, at 10:40 AM, Brian Dunning wrote: If you do a direct download, it mounts on the desktop perfectly, and there's all the stuff inside. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit

Re: [PHP] Totally weird behavior trying to download a Mac DMG file

2009-06-16 Thread Brian Dunning
Good idea, thanks. :-) On Jun 16, 2009, at 12:30 PM, Shawn McKenzie wrote: Use livehttpheaders or some other header capture utility and see what the difference in the headers are between the dl from the PHP page and direct download. -- PHP General Mailing List (http://www.php.net/) To

[PHP] Server change affecting ability to send downloaded files???

2009-08-07 Thread Brian Dunning
Hey all -- A couple of weeks ago my online stores, on a machine I host at Rackspace, stopped delivering files that people purchase. I've used this for years, and it's always worked perfectly with all filetypes: header('Content-Type: application/octet-stream'); header('Content-Disposition:

Re: [PHP] Server change affecting ability to send downloaded files???

2009-08-07 Thread Brian Dunning
Very interesting. Excellent debugging advice. It's giving me a 500 error, probably why the Rackspace techs told me to check my code: HTTP/1.0 500 Internal Server Error Date: Sat, 08 Aug 2009 00:01:10 GMT Server: Apache/2.0.52 (Red Hat) X-Powered-By: PHP/5.2.10 Content-Disposition: attachment;

<    1   2   3   4   >