Re: [PHP] Class Auto-Assigning to Variable

2013-08-07 Thread Brian Smither
>Your example does _not_ show this, it works >as expected and throws a notice, from which can be inferred there is other >code doing this Or relevant code having a side-effect not currently realized. >Is your class maybe inheriting from another one and that contains the code >causing this issue?

Re: [PHP] Class Auto-Assigning to Variable

2013-08-07 Thread Brian Smither
> $hello = $clsHello; If that conceptual statement (or any occurance of the conceptual $hello) were in the code, then my (really good) Find feature of my code editor would have found it. > There are only a few variables that get assigned as side effects of > functions, but they have very spe

Re: [PHP] Class Auto-Assigning to Variable

2013-08-07 Thread Brian Smither
>I cannot replicate this. I don't expect anyone to be able to replicate this behavior. The example shows an extraordinarily stripped-down sequence of statements that informs what should work, but do to some unknown agent, which, therefore, cannot be included in the example, produces unexpected

Re: [PHP] Class Auto-Assigning to Variable

2013-08-07 Thread Brian Smither
Second go around: I have a situation where, for some unknown reason, where each class that finishes its __contruct{} function, that class gets automatically assigned to a variable - other than the variable I specify. Conceptually (a little bit better on the conceptualizing): class Hello { priv

[PHP] Class Auto-Assigning to Variable

2013-08-07 Thread Brian Smither
I have a situation where, for some unknown reason, where each class that finishes its __contruct{} function, that class gets automatically assigned to a variable - other than the variable I specify. Conceptually: class Hello { private $_world = 'World'; __construct(){} } $clsHello = new Hello(

[PHP] Guaranteed Way to Get Error Message Wanted

2013-07-06 Thread Brian Smither
>Have you got all your extensions updated? I would think so. Just to state the required disclaimers: phpinfo.php with works. Liberally peppering a tracer routine throughout the application shows it is getting executed up until one spot. But there is nothing obviously wrong with the code. Nothin

[PHP] Guaranteed Way to Get Error Message Wanted

2013-07-06 Thread Brian Smither
>It looks like you are running the thread-safe version with >FastCGI, which I understand to be counter to the recommendations. Thank you for the comment. I switched to PHP5.4.17-NTS-VC9, but the application still crashes. And still no clue as to why. So, still looking for that magic method to g

[PHP] Guaranteed Way to Get Error Message Wanted

2013-07-05 Thread Brian Smither
I have an application running under PHP-5.4.17-TS-VC9 (and .14 as of yesterday) with Aprelium's Abyss X1 v2.8 web server in FastCGI mode on WinXPSP3. An earlier version of this application works. The current version causes a 500 Internal Server Error. There is no entry in PHP's (fully active) er

[PHP] Lifetime

2013-02-26 Thread Brian Smither
I'm curious to know what the lifetime of a constant is. I know that sounds like a stupid question, but the context is this: I have a file I am writing to up to the very last possible micro-second. As such, I know that as PHP is destroying itself after having executed the last statement in the p

Re: [PHP] Very Large File Splatter

2013-02-22 Thread Brian Smither
"If you can show the write portion of the code in your iteration, as well as a sample of the naming convention, it may offer more clues." $dbgMsg = "a diagnostic string maybe 5K in length"; $dbg_fp = fopen(ROOT_DIR.DS."dbg_log.txt", "a"); // Derives a full path fwrite($dbg_fp, $dbgMsg); fclose($db

[PHP] Very Large File Splatter

2013-02-22 Thread Brian Smither
PHP 5.4.4-TS-VC9 on Windows XP SP3 NTFS non-system drive with 18GB free. I dare not try to replicate this. As such, I cannot firmly place the blame on PHP. I have peppered a PHP application with a call to a function which appends-only to a logfile the parameters passed to it. Each pass of the a

[PHP] Is PHP unsuitable for HTML5 WebSockets?

2012-08-12 Thread BRIAN M. FITZPATRICK
I've looked all over the net and I have been unable to find a concrete answer to this question. I am about to start development on a web application that will need to provide real-time updates of data to user's browsers. WebSockets are ideal for this task. I have read in some places on the net

Re: [PHP] File moving hell on Windows

2012-07-31 Thread Brian Dunning
Regular Windows networking. On Jul 30, 2012, at 2:29 PM, Mike Mackintosh wrote: >> > What protocol are you targeting? FTP, SFTP, SSH, SMB, etc? > > -- > Mike Mackintosh > PHP 5.3 ZCE > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] File moving hell on Windows

2012-07-30 Thread Brian Dunning
I'm dealing with a Windows NT network that includes some digital printing presses that also run Windows. PHP 5.3.8 is running on one NT machine. Its job is to take CSV files that exist in a directory on one machine, and move them to a directory on the digital presses. All the source and destinat

Re: [PHP] FPDF ?

2012-05-18 Thread Brian Dunning
I never found a solution to this myself. On Apr 26, 2012, at 2:13 PM, Jim Giner wrote: > For those of you with FPDF experience. > > I've just begun using it and have figured out how it works I think. I am > still having trouble with the bottom of the page tho. Seems that if I get > too close

[PHP] Bust out a PDF via the print stylesheet?

2012-05-18 Thread Brian Dunning
heet? I've used various PHP PDF classes before, but I'd rather see if I can shortcut this rather than assembling the doc from scratch. - Brian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Running through an enormous SQL file

2012-05-04 Thread Brian Dunning
How would you launch that from PHP? On May 4, 2012, at 6:11 PM, tamouse mailing lists wrote: > Is there any need to use PHP with this at all? If it's already in SQL, > can't you just feed it to mysql? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/u

[PHP] Running through an enormous SQL file

2012-05-04 Thread Brian Dunning
I have a script that downloads a 267MB SQL file (it creates and loads a MySQL database). Any idea how to do this? Obviously I'm not going to get a file that size into memory to loop through. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Serving a .dmg via readfile?

2012-04-26 Thread Brian Dunning
Thanks, this suggestion from Dante completely solved the problem. Replaced: readfile('/var/www/mypath/My Cool Image.dmg'); With: $fd = fopen ('/var/www/mypath/My Cool Image.dmg', "r"); while(!feof($fd)) { set_time_limit(30); echo fread($fd, 4096); flush(); } fclose ($fd); It's now

[PHP] Serving a .dmg via readfile?

2012-04-25 Thread Brian Dunning
Hey all - I'm having no luck serving a .dmg from my online store. I stripped down the code to just the following to debug, but no matter what I get a zero-byte file served: header('Content-Type: application/x-apple-diskimage'); // also tried octet-stream header('Content-Disposition: attac

Re: [PHP] Updating Google Plus

2012-03-29 Thread Brian Dunning
That's EXACTLY what I was looking for. Thanks! Don't know why my Google-Fu failed me... :-) On Mar 29, 2012, at 5:26 PM, Don Wieland wrote: > First Google+ (Google Plus) status update bot in PHP > http://360percents.com/posts/first-google-google-plus-status-update-bot-in-php/ > Is that what you

Re: [PHP] Updating Google Plus

2012-03-29 Thread Brian Dunning
Sorry, I did not mention the implied "using PHP". Since everything I do & eat & breathe is PHP, it didn't even occur to me to state the obvious. :-) :-) On Mar 29, 2012, at 2:46 PM, Stuart Dallas wrote: > Err, what has this got to do with PHP?!? -- PHP General Mailing List (http://www.php.ne

[PHP] Updating Google Plus

2012-03-29 Thread Brian Dunning
Anyone know a way to update Google Plus via the 33669 SMS number? Yes, I have seen the popular how-to instructions to get the secret email address by using Google Voice and forcing the error message, but I'd prefer a legit non-hack way to do it. I'd even be happy to pay for an SMS gateway rather

[PHP] Re: ASP to PHP

2012-02-17 Thread Brian Smither
I've done a site from Classic ASP (no .net) to non-oop PHP. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Wrong POSTFIELDS Posted

2012-02-17 Thread Brian Smither
I have a script that accepts four POST variables. Three are used and five more are added for a total of eight keys and their urlencode() values all strung together in the proper format. Then cURL is initialized with the field string given to: curl_setopt($ch, CURLOPT_POST,8); curl_setopt($ch, CU

[PHP] Re: PEAR Mail $obj->send()

2011-07-08 Thread Brian Smither
>>Instead of 'auth'=> true, I used 'auth' => "PLAIN" as >> suggested by a user comment on the Mail documentation page.) $obj = Mail::factory('smtp', array ('host' => $host, 'port' => $port, 'auth' => true, 'username' => $username, 'password' => $password)); (Variables are set.

[PHP] PEAR Mail $obj->send()

2011-07-08 Thread Brian Smither
A client has: PHP 5.3 on Win7x64 running a local web app that needs to send mail. (This app was once hosted on a linux-based hosted space.) Apache 2.2 is installed but apparently not being used. I think the IIS service is actually the web server that is engaged. During troubleshooting a wide ra

[PHP] Would like to subscribe to this mailing list

2011-07-03 Thread Brian Dworkin
I would like to subscribe to this mailing list please. Thanks. Sincerely, Brian Dworkin Managing Partner Bright Telecom 201-892-9553 (mobile #) br...@brighttelecom.net http://www.brighttelecom.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net

[PHP] Re: Parent Limits?

2011-06-30 Thread Brian Smither
With all kind respect to Richard Buskirk and Daniel Brown (thank you for responding), their replies did not actually answer my question. My question is: What module or php.ini setting would render inoperative a directory traversal of X parents? My original post follows. The following works (th

Re: [PHP] Time zones are spinning my brain

2011-06-29 Thread Brian Dunning
Thanks everyone. It seems to be working correctly. You gave me some extra peace of mind. I did set the date_default_timezone_set('America/Los_Angeles') but it looks like that was in the defaults anyway. :-) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.n

[PHP] Time zones are spinning my brain

2011-06-29 Thread Brian Dunning
Help. I'm using PayPal's API to get a report of all the yesterday's transactions. I'm in California, and I define "yesterday" as California's yesterday, midnight to midnight. PayPal wants the STARTDATE and ENDDATE provided in UTC/GMT. I'm building and testing my report using this: $start = gmd

[PHP] Parent Limits?

2011-06-20 Thread Brian Smither
The following works (three parents): include("../../../includes/ini.inc.php"); require_once("../../../includes/ini.inc.php"); The following works (four parents): include("../../../../includes/ini.inc.php"); The following does not work (four parents): require_once("../../../../includes/ini.inc.ph

[PHP] Best way to create an image with flowing text?

2011-06-16 Thread Brian Dunning
Hat 4.x with PHP 5.2 and installing new software is unlikely. Can anyone suggest a tool to make this easiest? :-( - Brian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Convert a PDF to a PNG?

2011-06-16 Thread Brian Dunning
I have heard back from Rackspace and ImageMagick is not going to happen for the time being, but they say Ghostscript is installed. Is it possible to do this completely with GS without ImageMagick? The PDFs are text only. On Jun 15, 2011, at 2:28 AM, Richard Quadling wrote: > I use PDF2PNG as t

Re: [PHP] Convert a PDF to a PNG?

2011-06-14 Thread Brian Dunning
The PDFs are text only (white text on transparent background). I made them using the FPDF, which was tedious to set up but works great. I've since learned that I need PNG images, not PDFs. I know that I could rebuild them using GD, but it's a lot of strings of text wrapping and formatting and th

Re: [PHP] Convert a PDF to a PNG?

2011-06-14 Thread Brian Dunning
The server does not have that software installed either. :-( On Jun 14, 2011, at 1:53 PM, Richard Quadling wrote: > I do that using an external tool pdf2png. For me, I use Cygwin. > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Convert a PDF to a PNG?

2011-06-14 Thread Brian Dunning
My server has GD but NOT ImageMagick. Can I convert a PDF doc to a PNG? I have the PDFs stored as a files and I need to save an identical PNG alongside each. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Going crazy with include & require not working

2011-06-07 Thread Brian Dunning
Thanks, this helped me solve it. FPDI extends a class in FPDF, so I simply had to reverse the order in which I call them and all is hunky dory. On Jun 6, 2011, at 5:54 PM, Michael Shadle wrote: > > ini_set('display_errors', 1); > -- PHP General Mailing List (http://www.php.net/) To unsubscri

[PHP] Going crazy with include & require not working

2011-06-06 Thread Brian Dunning
Here's my code: error_reporting(E_ALL); require_once('/var/www/mysite/includes/fpdi.php'); require_once('/var/www/mysite/includes/fpdf.php'); I have used fpdf many times and never had a problem with it. I've double checked my pathnames until I'm blue in the face. But for some reason, the script

[PHP] webserviceX.net?

2011-04-23 Thread Brian Dunning
I'm looking for some geographic data, like ZIP codes, area codes, but it has to be current and correct. Has anyone ever used the free web services at webserviceX.net? Do you know anything about the data? How current/correct is it? Seems to be an awful lot they're giving away for free. -- PHP Gen

Re: [PHP] Can I modify a MySQL object?

2011-03-23 Thread Brian Dunning
I should have said "modify the contents of a MySQL resource". On Mar 23, 2011, at 5:06 PM, Brian Dunning wrote: > Let's say I do a query: > > $result = mysql_query("select * from tablename"); > > Is there some way I can manually update the contents of

[PHP] Can I modify a MySQL object?

2011-03-23 Thread Brian Dunning
Let's say I do a query: $result = mysql_query("select * from tablename"); Is there some way I can manually update the contents of certain columns/records in $result? I don't want to actually update MySQL, just the results that I'm holding in memory for this script. Can I do it without convertin

Re: [PHP] Help! Made a boo-boo encrypting credit cards

2011-03-03 Thread Brian Dunning
That's a great suggestion. I will try this and report back. It's also been suggested to me that I should have base64_encoded the encryptions before storing them in MySQL, so I'll try this option at the same time. On Mar 1, 2011, at 2:04 PM, Ashley Sheridan wrote: > Onto the problem of the data

Re: [PHP] Help! Made a boo-boo encrypting credit cards

2011-03-03 Thread Brian Dunning
My merchant provider levies monthly fines based on how many of their security restrictions you fail to follow. I follow as many as are reasonably practical, but I think it's virtually impossible to follow them all, such as absurdly expensive (and probably unnecessary) hardware. IMHO, some of the

Re: [PHP] Help! Made a boo-boo encrypting credit cards

2011-03-01 Thread Brian Dunning
I just wanted to ping this, as it's becoming a serious problem. I hope someone can help. On Feb 11, 2011, at 2:42 PM, Brian Dunning wrote: > Hey all - > > I'm using mcrypt to store credit cards into MySQL. About 90% of them decrypt > fine, but about 10% decrypt as

Re: [PHP] chat facebook

2011-02-19 Thread Brian Waters
2011/2/19 fakessh @ : > anyone have a recipe for it on facebook chat a recipe for what? > and I request a second thing > how to install PHP API you're going to have to be more specific than that. - BW -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/

Re: [PHP] Finding split points in an article for inserting ads

2011-02-15 Thread Brian Dunning
Yes, thanks, what I'm looking for is how to do that. On Feb 15, 2011, at 1:38 PM, Simon J Welsh wrote: > Assuming you're only using tags, count the number of opening tags, > divide by three. First ad block goes after the round($amount/3)-th , > second ad block goes after the round($amount/3*2

Re: [PHP] Rate my (really) simple template class

2011-02-15 Thread Brian Waters
On Mon, Feb 14, 2011 at 11:49 PM, Paul M Foster wrote: > Advice: don't use eval() this way. It's slow and dangerous. Could you elaborate, or provide a link? > ...read in the file and pass it to you on the stack, which is > really an abuse of the stack if you can avoid it. Interesting. I'm used

[PHP] Finding split points in an article for inserting ads

2011-02-15 Thread Brian Dunning
Hey all - I've got long articles, the HTML for which comes out of MySQL. Works great. I want to split it up so that I can insert ad blocks at various points within it. The articles are all pretty long but they're of variable length. I want to chop them up into three close-to-equal (doesn't have

Re: [PHP] Howdy (new in here)

2011-02-15 Thread Brian Waters
On Tue, Feb 15, 2011 at 3:37 PM, tedd wrote: > So, I took a *weekend* and programmed about 90 percent of application in > FutureBasic. I then created a shell application and forwarded it to the > client. > > After receiving the application, the client said "Yes, this is exactly what > I want -- ex

Re: [PHP] Howdy (new in here)

2011-02-15 Thread Brian Waters
On Tue, Feb 15, 2011 at 12:52 PM, tedd wrote: > At 11:37 AM -0600 2/15/11, Nicholas Kell wrote: >> >> On Feb 15, 2011, at 10:51 AM, tedd wrote: >> > At 8:26 PM -0500 2/14/11, Brian Waters wrote: >> >> (if that's OK). I know that PHP sometimes has a

[PHP] Rate my (really) simple template class

2011-02-14 Thread Brian Waters
So I decided to write a template class in order to get myself going on learning PHP. Of course I wrote the simplest thing possible: class Template { protected $template; protected $vars; public function __construct($template) { $this->template = $te

[PHP] Howdy (new in here)

2011-02-14 Thread Brian Waters
Hi everyone! I'm just starting out with PHP so I'm looking for a good place to ask some questions, have my code critiqued (read: visciously ripped apart), and generally BS about PHP and programming in general (if that's OK). I know that PHP sometimes has a reputation for having (some) lousy develop

Re: [PHP] Help! Made a boo-boo encrypting credit cards

2011-02-14 Thread Brian Dunning
On Feb 13, 2011, at 12:44 AM, Richard Quadling wrote: > You are > using addslashes($_POST['cc_number']). Considering a credit card > number is purely numeric, the addslashes would seem to be redundant as > you don't need to escape numbers. I do that routinely to all input fields as one additional

[PHP] Help! Made a boo-boo encrypting credit cards

2011-02-11 Thread Brian Dunning
Hey all - I'm using mcrypt to store credit cards into MySQL. About 90% of them decrypt fine, but about 10% decrypt as nonsense ("b1�\�JEÚU�A���" is a good example). Maybe there is a character that appears in about 10% of my encryptions that's not being encoded properly??? // Encryption is set

[PHP] How to define a data range for graphing?

2010-12-17 Thread Brian Dunning
ay is 5678, I'd probably like it to go from 0 to 6000. I'm guessing the way to do this is with a ceiling function? - Brian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Help with sending credentials?

2010-10-14 Thread Brian Dunning
Gents - I'm trying to work with a major vendor's web service, but all my efforts are met with a 401 authentication error response. I can log in manually to this URL using these credentials through a browser, so I know the credentials are good. Unfortunately the support guys at the vendor don't

Re: [PHP] Variable (Class instantiation) collision

2010-10-06 Thread Brian Smither
Gentlemen, Thank you. The "Thing1 Thing2" approach worked. >If you have total control over application A which contains the bridge >code, the easiest is to change it to use a different global variable. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.n

Re: [PHP] Variable (Class instantiation) collision

2010-10-05 Thread Brian Smither
>Just to clarify, both packages are instantiating and calling their >respective classes from the $db var, which is in the global scope. >Is this correct? I would say yes to the way you are asking. Take the following two applications. The four respective statements are in each their respective sc

[PHP] Variable (Class instantiation) collision

2010-10-05 Thread Brian Smither
I am running into a variable collision. The project I'm developing is NOT guaranteed to be operating on PHP5. Any solution I find should (hopefully) be able to run on PHP4 (yes, I know PHP4 is deprecated). I am building a bridge between two third-party applications. Both instantiate their respe

[PHP] filter_var (was: Re: [PHP] version_compare)

2010-09-30 Thread Brian Smither
>As Paul pointed out, maybe your version of PHP was built without the >filter_var function compiled in. This is what I have learned about PHP with filter_var() as an illustrative point: Many people who provide elaborations on PHP make too many assumptions or are blatently and woefully incomple

Re: [PHP] version_compare

2010-09-30 Thread Brian Smither
>Personally, I would change that to be >if ( function_exists('filter_var') ) { So would I: *But it's not my code. *I wish to learn and understand the cause of the problem - not walk around it. >It means condition (PHP_VERSION >= 5.2.0) I understand that. There was a second, more relevant, part

[PHP] version_compare

2010-09-30 Thread Brian Smither
I found this code... if (version_compare(PHP_VERSION, '5.2.0', '>=')) { $text=filter_var($text, FILTER_SANITIZE_URL); } ...to be questionable. Under what conditions would version_compare() return true, yet the filter_var() be undefined? Because that's what is happening. Thank you. -- PHP

Re: [PHP] SimpleXML/array duality (like particles & waves)

2010-09-28 Thread Brian Dunning
If you read down to the bottom of the post, the function I used is given. On Sep 28, 2010, at 3:47 PM, Nathan Nobbe wrote: > On Tue, Sep 28, 2010 at 4:29 PM, Brian Dunning wrote: > I am kind of jacked here. I have a SimpleXML object that's been converted to > an array. &g

[PHP] SimpleXML/array duality (like particles & waves)

2010-09-28 Thread Brian Dunning
I am kind of jacked here. I have a SimpleXML object that's been converted to an array. In one of the nodes, for no reason I can see, the array is populated differently if there is only one than if there are multiple s. If there is just one, my $order_item array looks like this: Array ( [or

Re: [PHP] Can't read $_POST array

2010-08-18 Thread Brian Dunning
This was the complete code of the page (this is the POST version not the REQUEST version): Returns an empty array no matter what POST vars are sent. We fixed it by changing it to this, which I've never even heard of, but so far is working perfectly: I have no idea what the problem was. Tha

Re: [PHP] Can't read $_POST array

2010-08-18 Thread Brian Dunning
Sorry, my typo, $_POST is one of the options we tried, not $POST. It returns an empty array also. On Aug 18, 2010, at 1:50 PM, Joshua Kehn wrote: > On Aug 18, 2010, at 4:45 PM, Brian Dunning wrote: > >> I'm trying to write a VERY simple script that does nothing

[PHP] Can't read $_POST array

2010-08-18 Thread Brian Dunning
I'm trying to write a VERY simple script that does nothing but store all the submitted GET and POST vars in a string and echo it out. $response = print_r($_REQUEST, true); echo $response; The problem is it only shows GET vars. I've tried $POST instead of $_REQUEST and it always gives an empty a

Re: [PHP] Battle of Spam

2010-06-07 Thread Brian Dunning
I'm currently geotargeting all the IPs in the log, and focusing on the hits from Russia (the majority of these apache@ spams seem to be Russian). I've got a much shorter list of scripts to look at now. Hopefully I'll find some that just use mail() with no scrubbing. -- PHP General Mailing List (

Re: [PHP] Battle of Spam

2010-06-07 Thread Brian Dunning
I think I must have misstated the problem. Thanks to everyone for the replies, but the question is not how to fix it, it's how to find the script being attacked. Many different admins manage many different sites on this server, and I can't even begin to guess how many mail forms are on there fro

Re: [PHP] Battle of Spam

2010-06-07 Thread Brian Dunning
Agreed that's a great overall strategy but what I need now is a way to track down the offending script, within the next few days if possible. On Jun 7, 2010, at 1:35 PM, Jim Lucas wrote: > Change all the forms to use a single > processing script and then you won't have such a big problem trackin

[PHP] Battle of Spam

2010-06-07 Thread Brian Dunning
Hey - It looks like a PHP form on my server is insecure and is being used to send spam. This is Rackspace's best guess. The problem is there are SO MANY forms on all the web sites on this server that it would be a nightmare task to try and look at them all to be sure they're properly secured. I

Re: [PHP] Help, FPDI is changing the size of my PDFs

2010-05-21 Thread Brian Dunning
Solved it. Here's the solution: $pdf = new fpdi(); $pdf->setSourceFile('D:\\DocShare\\'.$filename); $tplidx = $pdf->ImportPage(1); $s = $pdf->getTemplatesize($tplidx); $pdf->AddPage($s['h'] > $s['w'] ? 'P' : 'L', array($s['w'], $s['h'])); // This gets it the right dimensions $pdf->useTemplate($tp

[PHP] Help, FPDI is changing the size of my PDFs

2010-05-21 Thread Brian Dunning
I'm using FPDI to add some stuff to some existing PDF documents. Works great, except that it's slightly changing the size of the PDF document (the physical page size, not the file size), which is unacceptable since this is for a high-end print file. I've stripped out all the code to the bare bon

Re: [PHP] PHP Encoder like IonCube

2010-05-11 Thread Brian Dunning
Totally agree. But just in case it wasn't clear, you only need a Windows computer once to run the obfuscator; once done the code runs on any PHP server. On May 11, 2010, at 5:06 PM, Ashley Sheridan wrote: > Does slightly limit you to the Windows platform though, which I always think > is a

Re: [PHP] PHP Encoder like IonCube

2010-05-11 Thread Brian Dunning
recommend it. http://phplockit.com/ - Brian On May 9, 2010, at 1:36 PM, shiplu wrote: > Is there any php encoder like IonCube ? > Looking for an opensource solution. > My main target is to deliver encoded php codes so that it can not be > re-engineered. -- PHP General Mailing Li

[PHP] 2D barcodes

2010-05-11 Thread Brian Dunning
I have a project where I need to add some 2D barcodes onto some PDF files. I plan to use fpdi, since I've used it before and am familiar with it, but I need a source to generate the 2D barcodes, preferably as a png or jpg. Anyone have a suggestion - either a local classfile or a reliable web ser

Re: [PHP] simplexml choking on apparently valid XML - Solved

2010-05-10 Thread Brian Dunning
I was able to resolve this by changing the XML file encoding from UTF-8 to ISO-8859-1. Works like a charm now, with the XML-encoded characters. Thanks to all who offered their help. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] simplexml choking on apparently valid XML

2010-05-07 Thread Brian Dunning
y 6, 2010, at 5:02 PM, Brian Dunning wrote: > Hey all - > > I'm using simplexml-load-string just to validation a string of XML, and > libxml-get-errors to return any errors. It's always worked before, but today > it's choking on this line in the XML: > >

[PHP] simplexml choking on apparently valid XML

2010-05-06 Thread Brian Dunning
Hey all - I'm using simplexml-load-string just to validation a string of XML, and libxml-get-errors to return any errors. It's always worked before, but today it's choking on this line in the XML: Basketball Personalized Notebook - Jeff's It's returning "Premature end of data in tag client_or

[PHP] Simple code obfuscation

2010-02-08 Thread Brian Dunning
nes worth) and using eval(base64_decode($that_content)) to run it. I figure that will scare away most of the customers who might be able to edit my code. Can anyone suggest something that goes one better? - Brian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Can't get my PHP-generated RSS to serve properly

2010-02-03 Thread Brian Dunning
Ugh. Stupid me. Thanks Robert. It was a type elsewhere in my code further down the page. I was so hung up thinking it was an encoding or MIME or delivery problem I didn't think to check my PHP. Someone slap me upside the head please. -- PHP General Mailing List (http://www.php.net/) To unsubsc

[PHP] Can't get my PHP-generated RSS to serve properly

2010-02-03 Thread Brian Dunning
t;text/html" type, even though I'm serving the right header. Other PHP pages on this site work fine, and there are no special Apache directives on my site that works that are missing here. Can anyone suggest what I might be missing? - Brian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Good source for sample data?

2010-01-29 Thread Brian Dunning
zips, exchange, so will work for mapping, phone or address validation, whatever your needs are. Hope someone find it useful. http://www.briandunning.com/sample-data/ On Jan 28, 2010, at 3:52 PM, Brian Dunning wrote: > I need a few million sample contact records - name, company, address, email

[PHP] Good source for sample data?

2010-01-28 Thread Brian Dunning
dress validation or mapping. Anyone have a suggestion? - Brian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

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

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

[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] Re: Checkbox in PHP form

2009-11-08 Thread Brian Hazelton
value="PFDs" name=f_sequipment1>PFDs -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] � Frontier Acela High Performan ce Fume Hoods

2009-11-03 Thread Brian Hazelton
My guess is that it is some sort of spam. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

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] 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] getcsv error

2009-10-25 Thread Brian Hazelton
Brian Hazelton wrote: Brian Hazelton wrote: I have a script which uploads csv data into a database. This works well and has worked in every instance so far. However what I am noticing is that today, even if I escape the data before putting it into mysql it will not enter a line if it has a

Re: [PHP] getcsv error

2009-10-25 Thread Brian Hazelton
Brian Hazelton wrote: I have a script which uploads csv data into a database. This works well and has worked in every instance so far. However what I am noticing is that today, even if I escape the data before putting it into mysql it will not enter a line if it has a single quote, once I

[PHP] getcsv error

2009-10-25 Thread Brian Hazelton
I have a script which uploads csv data into a database. This works well and has worked in every instance so far. However what I am noticing is that today, even if I escape the data before putting it into mysql it will not enter a line if it has a single quote, once I take out the single quote i

[PHP] Ubuntu and Apache

2009-10-24 Thread Brian Hazelton
seems the change is not taking effect. What happens is I use the sudo chown command and it shows that I am the owner. I have a script that creates a file when I go to the page and it creates a file and has www-data as the owner, not me. What am I doing wrong? Thanks, Brian -- PHP General

Re: [PHP] PHP broadcast mailer

2009-10-16 Thread Brian Hazelton
I thought about doing a batch email, is that an accepted practice, also how do I find my smtp server limit? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] PHP broadcast mailer

2009-10-16 Thread Brian Hazelton
I am in charge of an email newsletter list and making sure it gets sent out in time. My problem is I have never done broadcast emailing and right now we have 400 subscribers but want to build a system that can scale well regardless of the number of subscribers. Right now I use mysql to store th

[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

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

  1   2   3   4   5   6   7   8   9   10   >