[PHP] Need to check whether a param exists!

2003-02-03 Thread Brian Dunning
Hi, All I'm trying to do is check for the presence of a query string, but everything I try gives me an Undefined Index error. I want to set a variable $pagename to whatever was passed as the ?page= value, and if it wasn't passed, set it to some default value. http://www.mysite.com/index.php?pa

Re: [PHP] Need to check whether a param exists!

2003-02-03 Thread Brian Dunning
Wow, an embarrassment of riches. Thanks to all of you who replied so quickly. - Brian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Is my syntax wrong?

2003-02-04 Thread Brian Dunning
Hi, The following code is giving me a "parse error, unexpected T_STRING." $inc_current_ad = WrapMySQLDatabaseResults("macasap", "update ads where ad_id = '.$current_ad->Value("ad_id").' set rotate='.$current_ad->Value("rotate")+1.'", "block=0","inc_current_ad"); It's supposed to increment th

Re: [PHP] Is my syntax wrong?

2003-02-04 Thread Brian Dunning
I think we are almost there. This code is not producing an error, but it is also not incrementing the database. The value stays at zero. Any idea what could be wrong? $inc_current_ad = WrapMySQLDatabaseResults("macasap", "update ads where ad_id = ".$current_ad->Value("ad_id")." set rotate=".($

Re: [PHP] Is my syntax wrong?

2003-02-05 Thread Brian Dunning
On Tuesday, February 4, 2003, at 05:03 PM, John W. Holmes wrote: I think we are almost there. This code is not producing an error, but it is also not incrementing the database. The value stays at zero. Any idea what could be wrong? $inc_current_ad = WrapMySQLDatabaseResults("macasap", "update a

[PHP] Include today's date in a SQL statement?

2003-02-05 Thread Brian Dunning
What would the SQL be to find a record where: start_date < today <= end_date Thanks, - Brian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] GoLive dynamic actions anyone?

2003-02-10 Thread Brian Dunning
I have a GoLive dynamic content site, and its pages require than you include at the top a file called mysql.runtime6.php. All is well, except when I try to type in my own SQL actions that are intended to be totally separate from anything the GoLive stuff is doing, I get an error in mysql.runtim

[PHP] Installation help

2003-05-27 Thread Brian Dunning
Hi, I am a lamer & a newbie, and ran the PHP and MySQL installers on my XP box, but can't connect to any database and don't see any new processes running. Is there someplace I can find documentation for this that is optimized for the newbie lamer? Thanks, - Brian -- PHP General Mailing List (

[PHP] Can't change a cookie

2003-05-30 Thread Brian Dunning
Help, I'm trying to change a cookie to whatever is submitted as a URL parameter called 'aid.' But once it's set the first time, I can't get it to overwrite it next time the 'aid' parameter is received. How do I make this work? Here is my code: -- PHP General Mailing List (http://www.php.net/) To

[PHP] CR in MySQL?

2003-05-31 Thread Brian Dunning
How do you put a carriage return in a MySQL database and have it display as a line break on the web page? - Brian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Is this a new PHP technology??????

2003-06-27 Thread Brian Dunning
Check it out: http://www.americansubstandard.com/index.php?sub=v&word=vmail -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Need PHP consulting - $!

2003-12-08 Thread Brian Dunning
I need some consulting assistance with a project. Complete information about what I need is on this page - http://www.briandunning.com/php-help.shtml THANK YOU!!! - Brian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

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 serv

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: http://www.php.ne

Re: [PHP] Conversion of Field Value to Hyperlink

2004-07-29 Thread Brian Dunning
noise is not helpful. Go find a list where everyone already 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 valu

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 i

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 dynamic

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 th

[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 n

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 (http:/

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 addre

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 o

[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 f

[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 prod

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 list

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 D

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. Th

[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 'onetwothreefourfive' at the nth occurrence of needle ''. 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 of one of t

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

2004-09-22 Thread Brian Dunning
twothreefourfive'; $nthPos = 4; $tmpArr = explode( '', $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 ''. So I'm looking for a function that will re

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] 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 = $_COOKIE['bookmarks'

[PHP] Can GD make a JPG thumbnail of a PDF?

2008-11-20 Thread Brian Dunning
Well can it? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Anyway to simulate pcntl_fork() on Windows?

2008-11-21 Thread Brian Dunning
It's the function I need most and it's not available on Windows, and unfortunately that's what the client uses. Any suggestions for a workaround? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Slow file download

2008-12-02 Thread Brian Dunning
I'm using a PHP cron job to constantly download files from a remote server. Client and server both have abundant unused bandwidth, and the sysads have already eliminated switches, interface cards, etc. as the source of the slowdown. I'm looking at the script to see why file downloads are ta

Re: [PHP] Slow file download

2008-12-02 Thread Brian Dunning
I'm open to something like that - we're in the middle of the holiday crunch and can't afford any downtime, so a significant change is out of the question. This is part of much larger and more involved scripting, so it would need to be a plug-n-play replacement and also be able to return inf

Re: [PHP] Re: Slow file download

2008-12-02 Thread Brian Dunning
IIS, Windows PHP 5.2.6, and unfortunately the downloads are https. On Dec 2, 2008, at 12:32 PM, Nathan Rixham wrote: what's the server running? iis/apache, win/linux version of php (as accurate as you can) oh and via http or https/ssl? -- PHP General Mailing List (http://www.php.net/) To uns

Re: [PHP] Can GD make a JPG thumbnail of a PDF?

2008-12-10 Thread Brian Dunning
I've spent most of the last week trying to get ImageMagick working on my Windows PHP installation. I gather that since I'm going to be converting PDFs to JPEGs, I need Ghostscript. Well, I've got ImageMagick installed: http://printhq2.com/info.php I ran a Ghostscript installer, but it didn't

[PHP] Help debugging a file upload on IIS

2008-12-29 Thread Brian Dunning
Hi - I have a file upload that returns no error, but the file does not appear on the server. Here is the result of $_FILES: Array ( [f] => Array ( [name] => Elephants.pdf [type] => application/pdf [tmp_name] => C:\WINDOWS\Temp\php3133.tmp

Re: [PHP] Help debugging a file upload on IIS

2008-12-29 Thread Brian Dunning
The one thing I was doing was: move_uploaded_file($_FILES['upload_file']['tmp_name'], $new_path); but nothing was happening, no new file appearing where it was supposed to, and no error returned, left me scratching my head. (Later the same script logs the upload to MySQL using data from $_FIL

[PHP] IM Convert PDF->JPG works in command line, not in PHP

2008-12-31 Thread Brian Dunning
Here's a weird thing. I have a new Redhat machine, with PHP 5.2.6 and IM 6.4.8. The following works beautifully on the command line: convert original.pdf new.jpg But from PHP, it only works beautifully if I specify complete pathnames for convert, the original file, and the new file (that's O

Re: [PHP] IM Convert PDF->JPG works in command line, not in PHP

2008-12-31 Thread Brian Dunning
My typo skipping the '/html/' in the pathname, the paths are correct in my actual code. On Dec 31, 2008, at 3:24 PM, Brian Dunning wrote: /var/www/html/original.pdf /var/www/html/new.jpg -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] IM Convert PDF->JPG works in command line, not in PHP

2008-12-31 Thread Brian Dunning
Interesting. When I try this, $return_output gives an empty array, and $return_code gives 1. On Dec 31, 2008, at 3:38 PM, chris smith wrote: Try using exec() so you get the whole return message, might be something useful in there. exec($command_line, $return_output, $return_code); -- PH

Re: [PHP] IM Convert PDF->JPG works in command line, not in PHP

2008-12-31 Thread Brian Dunning
OMG. I had not set the permissions properly on the destination directory. It works now. Sorry for wasting the list's time, and thanks to Chris for your help. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Anyone else have trouble with Apple Mail threading this list?

2008-12-31 Thread Brian Dunning
I use Apple Mail, and subscribe to many lists but PHP-General is the only one I have this problem with. People tell me that my replies are not properly threaded to the original post. When I hit Reply or Reply All in Mail, it wants to reply directly to the poster, and only CC's the list. So

[PHP] How can a script tell if there's a MySQL problem?

2009-01-09 Thread Brian Dunning
I have one server that's pretty busy and runs into "Too many connections" from MySQL from time to time, and needs to have MySQL restarted to clear it up. I've tried everything I can think of to have PHP take note of this error but continue executing with other stuff, but no matter what I

[PHP] imagejpeg, imagecreatefromjpeg both choke

2009-01-09 Thread Brian Dunning
I'm trying a stripped down test just to try to get this work. I have a valid jpeg on disk: 3.jpg<- 3316x2220, 3.6 MB And am trying either of the following: // This does nothing at all imagejpeg('3.jpg'); // This displays "failed" $im = imagecreatefromjpeg('3.jpg'); if(!$im) echo 'failed'

Re: [PHP] imagejpeg, imagecreatefromjpeg both choke

2009-01-09 Thread Brian Dunning
Same thing, no output at all. I can access the image directly in my browser and it's fine. On Jan 9, 2009, at 7:52 AM, Zechim wrote: try, header('Content-type: image/jpeg'); $image = imagecreatefromjpeg($your_file); imagejpeg($image,"", 100); imagedestroy($image); zechim -- PHP

[PHP] Convert CMYK values to RGB values?

2009-01-09 Thread Brian Dunning
Anyone know how to convert CMYK values to RGB values? I'm just trying to translate the numbers from one to the other, not actually do any graphic stuff. Thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Convert CMYK values to RGB values?

2009-01-09 Thread Brian Dunning
I think your short answer is the right one. This explains why I didn't find that cmyk_to_rgb() function on php.net. Thanks... :-( On Jan 9, 2009, at 3:14 PM, c...@l-i-e.com wrote: Short Answer: You can't. :-) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: ht

[PHP] Best way to post XML via curl?

2009-02-11 Thread Brian Dunning
I'm going crazy, can't quite get this encoding to work. I've tried all the various combinations, trying to send this block $xml (which is a simple string variable) via post along with 3 other params: $postArgs = http_build_query(array('method'=>'newPrintRequest', 'login'=>$login, 'password'

Re: [PHP] Best way to post XML via curl?

2009-02-11 Thread Brian Dunning
Just realized I didn't happen to mention the problem. :-) The server is not seeing any of my posted fields. It's returning a properly-formatted XML response that says I did not submit the required fields. Unfortunately the server is a black box, but lots of other partners use it every day

Re: [PHP] Best way to post XML via curl?

2009-02-11 Thread Brian Dunning
This line is the key. WITH the line, I get a properly formatted XML response from the server, telling me that I did not send any valid post fields. WITHOUT the line, all I get back from the server is a '1' and their tech reports that no valid call was received from me. On Feb 11, 2009, at

Re: [PHP] Best way to post XML via curl?

2009-02-11 Thread Brian Dunning
look at my code, it clearly is. On Feb 11, 2009, at 5:08 PM, Stuart wrote: 2009/2/12 Brian Dunning : This line is the key. WITH the line, I get a properly formatted XML response from the server, telling me that I did not send any valid post fields. WITHOUT the line, all I get back from the

[PHP] Need to hire some PHP help...

2009-02-12 Thread Brian Dunning
I need probably no more than an hour of two of help from someone better than me at PHP, but have money sitting here ready to pay you. My project is way behind schedule and I'm burning too much time and making no progress trying to solve two problems. (1) Submitting some XML to a web service

[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 alternati

Re: [PHP] Zend Guard/Optimizer alternatives?

2009-02-16 Thread Brian Dunning
my users 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,

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 unsub

[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
the directory. Thanks. On Jun 15, 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; filename

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 unsubscr

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 uns

[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: a

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; f

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

2009-08-07 Thread Brian Dunning
Correct, the files on the server have not changed either, and have been working fine for a long time. No funny characters. On Aug 7, 2009, at 4:59 PM, Adam Randall wrote: Sorry for replying to myself, but the files themselves only contain US-ASCII characters, and no quotes, correct? Having ex

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

2009-08-08 Thread Brian Dunning
A Rackspace guy determined that php.ini was set to use 16MB of memory, and he upped it to 32MB, and now everything works. Some of my downloads are as large as 41MB so I asked him to up it to 48MB. Maybe they upgraded the PHP version or something and wiped this setting. The 41MB files had al

[PHP] Really quick try/catch question

2009-08-18 Thread Brian Dunning
I have a "new SimpleXMLElement()" that is occasionally throwing: 'Exception: String could not be parsed as XML' Will this catch it when it happens, or am I missing something? function domyfunction() { // This does some stuff to exit the script gracefully } try { $xmlobject = new

[PHP] Simple PDF manipulation

2006-12-27 Thread Brian Dunning
Let's say I have a complicated PDF document, like a Christmas card, that was made in Illustrator -- too complicated to easily create from scratch using PDFlib. Is there a way to use PHP make simple text changes - like changing "Dear XXX" to "Dear John"? I've opened the files with a text edi

Re: [PHP] Simple PDF manipulation

2006-12-27 Thread Brian Dunning
Interesting, that's a good idea. I was not aware that it was possible to load an existing PDF into memory and then add stuff to it. On Dec 27, 2006, at 7:28 AM, tedd wrote: At 6:32 AM -0800 12/27/06, Brian Dunning wrote: Let's say I have a complicated PDF document, like a Christ

[PHP] Hash/checksum for an image?

2007-01-15 Thread Brian Dunning
I want to make sure that a jpg uploaded by the user is unique. I was thinking about storing a hash code for each image in its MySQL record (got a db record for each uploaded image already). Is there an easy way to generate such a string? -- PHP General Mailing List (http://www.php.net/) To

[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 t

[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
ly 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

[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 big

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] Cookie Quandary

2009-10-27 Thread Brian Dunning
I wrote some cookies for a whole bunch of site admins, but failed to set the path, so all the cookies are set to '/admin', which is not going to work for everything they need to do. They are also too long, set for 6 months. I need to correct both issues, so I changed it to write cookies to

Re: [PHP] Cookie Quandary

2009-10-27 Thread Brian Dunning
No, I'm talking about cookies, thus the references to pathnames and expirations. On Oct 27, 2009, at 10:56 AM, Ashley Sheridan wrote: Cookies are client-side. Do you mean session files? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Emergency! Performance downloading big files

2009-12-01 Thread Brian Dunning
This is a holiday-crunch emergency. I'm dealing with a client from whom we need to download many large PDF docs 24x7, several thousand per hour, all between a few hundred K and about 50 MB. Their security process requires the files to be downloaded via https using a big long URL with lots of cr

Re: [PHP] Emergency! Performance downloading big files

2009-12-01 Thread Brian Dunning
Oops, it's several hundred per hour, several thousand per day. Sorry for the accidental superlative. > I'm dealing with a client from whom we need to download many large PDF docs > 24x7, several thousand per hour, all between a few hundred K and about 50 MB. -- PHP General Mailing List (http

Re: [PHP] Emergency! Performance downloading big files

2009-12-01 Thread Brian Dunning
Can someone explain how this would work? It's a Windows web server running IIS and the files are saved to a drive that is outside the web root. PHP is grabbing each filename from a MySQL database, along with the URL and credentials for it, and ends up with a url something like this: https://serv

[PHP] Good source for sample data?

2010-01-28 Thread Brian Dunning
Hey all - I need a few million sample contact records - name, company, address, email, web, phone, fax. ZIP codes and area codes and street addresses should be correct and properly formatted, but preferably not real people or companies or email addresses. But they'd work if you did address vali

  1   2   3   4   >