Re: [PHP] Problems downloading a PDF / Partially solved

2007-04-04 Thread Jochem Maas
Mário Gamito wrote: > Ok, > > I don't get the warnings anymore, but the PDF is still being displayed > with its binary code inside in the PHP page: > > "%PDF-1.4 %âãÏÓ 351 0 obj <> endobj xref 351 434 16 0 n > 010281 0 n 010417 0 n 010574 0 n 010607 > 0

Re: [PHP] Install PECL

2007-04-04 Thread Jochem Maas
Bagus Nugroho wrote: > Hi All, > I'm trying to install PECL package as install PEAR package, but there's error > as : > --- > C:\PHP>pear install http://localhost/pear/APC-3.0.13.tgz > > downloading APC-3.0.13.tgz ... > Starting to download APC-3.0.

Re: [PHP] PDF: error

2007-04-05 Thread Jochem Maas
you code is *still* borked in pretty much the same way it was to begin with ... there was an error: $error"; } echo 'download it!'; exit; } else { echo 'please login'; } Mário Gamito wrote: > Hi, > >> Where did you get the $data variable? >> as filesize($

Re: [PHP] Idea/Suggestion for PHP App

2007-04-05 Thread Jochem Maas
lets see if I can add anything useful (you be the judge)... 1. aim high, you only learn when you push yourself beyond what you can already do. 2. take/make notes as you go, don't try to keep everything in your head :) 3. occasionally cut a few corners when you've bitten off more than you can ch

Re: [PHP] PHP textbook suggestions?

2007-04-05 Thread Jochem Maas
Chris Lott wrote: > Looking for suggestions for a PHP textbook for an "Intro to Web > Programming" class that will be using PHP5 and MySQL. This is a > first-semester course, so no programming experience required. > > It would be nice to have a text that adhered to (what I see as) good every that

Re: [PHP] Using /index.php/this/that/343/3 style links but having a prob!

2007-04-05 Thread Jochem Maas
Mike Shanley wrote: > Hi, > > I'm trying to make friends with search-engines, but I'm having a problem. > > When I use my links (right now, I've only got the forums on my site up), > they take me to the right place, however, the browser only displays part > of the url... like in the addressbar?

Re: [PHP] Using /index.php/this/that/343/3 style links but having a prob!

2007-04-05 Thread Jochem Maas
Mike Shanley wrote: > > >> like in the addressbar? using IE by any chance? .. I don't see this in >> firefox. >> >> > Oddly enough, I'm using firefox and having the problem. Curious. >> dunno, long night? short addressbar? >> if in doubt view the source luke. >> > I keep going over the sour

Re: [PHP] How to disable the "Daylight saving time" in PHP 5?

2007-04-06 Thread Jochem Maas
Tijnema ! wrote: > On 4/6/07, SED <[EMAIL PROTECTED]> wrote: >> I need to disable the "Daylight saving time" in PHP 5. >> >> My servers (Windows, both XP and Vista) have correct local time but PHP 5 these are not servers - they barely run something worthy of calling an OS. >> adds an extra hour w

Re: [PHP] PHP textbook suggestions?

2007-04-06 Thread Jochem Maas
Danial Rahmanzadeh wrote: > I think PHP Architect's Zend PHP5 certification Study guide is good. as > authors indicate in the book: > > "We wrote php|architect's Zend PHP 5 Certification Study Guide with the > specific intent > of making it useful in two situations: > • For candidates who are prep

Re: [PHP] PHP textbook suggestions?

2007-04-06 Thread Jochem Maas
Chris Lott wrote: > I'd still like some actual recommendations for a good book for beginners. > > I think this discussion is getting a little ridiculous... I have my > preferences for a textbook based on 5 years of experience in teaching > this class. Of course I teach my students about superfluou

Re: [PHP] Simple question on simplexml

2007-04-06 Thread Jochem Maas
there is this: http://php.net/manual/en/function.simplexml-element-addChild.php which will allow adding of string data (so you won't be needing to create the new SimpleXMLElement object as per your example below). obviously you will have to first load tghe complete xml document into simplexml us

Re: [PHP] Submitting as POST. Why?

2007-04-06 Thread Jochem Maas
barophobia wrote: > My Peeps, > > I only know of one reason to submit a form as POST and that is because > you can submit more data in one shot. > > > What other reasons are there? upload a file? not have bag of cruft in the url/addressbar? because POST and GET are semantically different ... P

Re: [PHP] Need a working SOAP example using PHP SOAP

2007-04-06 Thread Jochem Maas
not very helpful, but an apt quote from 'the man': http://fplanque.net/Blog/devblog/2005/12/21/rasmus_i_don_t_like_soap Daevid Vincent wrote: > I've been searching all day (read wasting) trying to get a working SOAP > example that uses the new PHP SOAP functions. > > http://us2.php.net/manual/en

Re: [PHP] Need a working SOAP example using PHP SOAP

2007-04-07 Thread Jochem Maas
Daevid Vincent wrote: >> not very helpful, but an apt quote from 'the man': >> http://fplanque.net/Blog/devblog/2005/12/21/rasmus_i_don_t_like_soap > > Yeah, unfortunately, I *must* use SOAP. Not my choice, but politics and > company decree, blah blah... > >> b, you should catch exceptions > > T

Re: [PHP] spl DirectoryIterator

2007-04-08 Thread Jochem Maas
Matthew Dellar wrote: > I have a problem, > > I need to turn an iterator into an array, but when I do, some methods I > need to use stop working. why do you need to turn it into an array? maybe there is an alternative? my first reaction would be that if you really need an array then you'll probab

Re: [PHP] MD5 & bot Question

2007-04-08 Thread Jochem Maas
just a few random thought on how to make it even more painful to crack. random colored borders, random border width, slight changes in width/height, random pixel noise or varying colors, animated gifs (where does the arrow stop), animated gifs (where does the red/pink/blue/green arrow point to),

Re: [PHP] keeping credit card info in session

2007-04-08 Thread Jochem Maas
unless you are a payment gateway or a bank don't touch credit card numbers. there are plenty of threads in the archive of this list that give good reasons not to e.g. being sued out of existence. get a payment provider and let them handle the transaction automatically, the site admin could be give

Re: [PHP] keeping credit card info in session

2007-04-08 Thread Jochem Maas
Davi wrote: > Em Domingo 08 Abril 2007 18:37, Jochem Maas escreveu: >> unless you are a payment gateway or a bank don't touch credit card numbers. >> there are plenty of threads in the archive of this list that give good >> reasons not to e.g. being sued out of exis

Re: [PHP] keeping credit card info in session

2007-04-09 Thread Jochem Maas
e one else will take the blame when things go seriously wrong (assuming she can find anyone to take the job.) and leaves you to doa project that won't make you bankrupt. > > > Thanks again, > Siavash > > > > > Quoting Travis Doherty <[EMAIL PROTECTED]>: >

Re: [PHP] Need a working SOAP example using SOAP -- PHP is blocking the calls

2007-04-09 Thread Jochem Maas
Daevid Vincent wrote: c, could you be having a problem related to the allow_url_fopen ini setting? >>> Now we're talkin! >>> >>> Okay, I made sure that allow_url_fopen and >>> allow_url_include are both "on". >>> Verified via phpinfo(); >>> >>> Still no luck. :-\ >>> >>> However, this s

Re: [PHP] Question about OO design

2007-04-09 Thread Jochem Maas
Chris W. Parker wrote: > Hello, > > I'm working on a project now and I'd like to get some feedback on how to > implement a proper class (or two). > > This is an application that records an employee's used vacation time. > There are two tables: (1) events, (2) users. > > Users: > > id (int) > n

Re: [PHP] MySQL exceptions

2007-04-09 Thread Jochem Maas
Davi wrote: > Hi all! > > I'm developing an OOP app using PHP 5. > I want to use try-catch with mysql functions. > > So, the question is: what are the exceptions classes of MySQL? > Where can I found it? IIRC mysqli (certainly not mysql) extension does not throw exceptions, so write code that ch

Re: [PHP] Question about OO design

2007-04-09 Thread Jochem Maas
Chris W. Parker wrote: > On Monday, April 09, 2007 3:51 PM Jochem Maas > <mailto:[EMAIL PROTECTED]> said: > > Thanks for the response Jochem. > >> Chris W. Parker wrote: > > [snip] > >> you probably only want one DB call to >> populate the User

Re: [PHP] Copying PHP array into a Javascript array

2007-04-10 Thread Jochem Maas
Otto Wyss wrote: > I don't know if I should ask this question here or in the JavaScript > group. I'll try it here since people usually are more helpful. > > I've an array of file names > > $files = getFiles ($d); > > but would like to use this array in a JavaScript array. How can I copy > this

Re: [PHP] PHP editor

2007-04-11 Thread Jochem Maas
Jonathan Kahan wrote: > Hi all, > > I beleive this is in the realm of php (I have learned my lesson from > last time). Does anyone have recomendation for any free (I.E. > permanently free not 30 day trial) of a good php editor. The ones i am > seeing all only allow usage for a limited time. STFA,

Re: [PHP] downloading an image

2007-04-11 Thread Jochem Maas
Ross wrote: > tthe image does not display although it exists in the table 'images' > > > This calls the download script > > > $property_id = $_SESSION['property_id'] ; > $query = "SELECT * FROM images WHERE property_id='$property_id'"; > $result = mysql_query($query); > while($row = mysql_fe

Re: [PHP] PHP editor

2007-04-11 Thread Jochem Maas
Robert Cummings wrote: > On Wed, 2007-04-11 at 10:30 -0500, Philip Thompson wrote: >> Obviously some people think this is NOT "in the realm of php." >> Nonetheless, I think it's a relevant question and others have >> answered it well. > > Relevant sure... but the answers are in the frickin' ar

Re: [PHP] SQL Source Control

2007-04-11 Thread Jochem Maas
Richard Davey wrote: > Hi all, > > I know a lot of you use various means for PHP source control (CVS, SVN, > etc), which is all well and fine, but how do you manage source control > on your databases? > > Say you've got an upgrade to a site, all of the new PHP files are > controlled by SVN, so yo

Re: [PHP] Posting a variable

2007-04-11 Thread Jochem Maas
Robert Cummings wrote: > On Wed, 2007-04-11 at 09:59 -0700, [EMAIL PROTECTED] wrote: >> 1- your mysql query statement is better to have a WHERE part too. >> 2- I would use mysql_fetch_row instead of mysql_fetch_assoc > > Ummm, why would you want to reduce clarity and maintainability by using > mys

Re: [PHP] location of the PHP executable

2007-04-11 Thread Jochem Maas
Mattias Thorslund wrote: > Jim Lucas wrote: ... > $ /my-location-of/php myscript.php > /my-location-of/php > $ > > I was hoping there's a function or $_SERVER property that would contain > this? have you tried looking for this info you want? I can't say for sure if it always exists but on the fe

Re: [PHP] WWE in Stamford, CT needs a kick ass PHP Developer!

2007-04-11 Thread Jochem Maas
Robert Cummings wrote: > On Wed, 2007-04-11 at 18:53 -0400, Robert Cummings wrote: >> On Wed, 2007-04-11 at 17:43 -0400, Arbitrio, Pat wrote: >>> Other skills: >>> >>> * Dreamweaver >> *ROFLMFAO* > > Still *ROFLMFAO* I don't see what's so funny. there is great skill involved with becoming profi

Re: [PHP] WWE in Stamford, CT needs a kick ass PHP Developer!

2007-04-11 Thread Jochem Maas
Jarrel Cobb wrote: > There is a code view in Dreamweaver. The split view is useful for making > handcoded changes to HTML in the top code view and seeing the immediate > result in the bottom design view. You dont have to use the WYSIWYG > features. > ye I'm glad to say my position

Re: [PHP] WWE in Stamford, CT needs a kick ass PHP Developer!

2007-04-11 Thread Jochem Maas
Robert Cummings wrote: > On Wed, 2007-04-11 at 21:14 -0400, Jarrel Cobb wrote: >> You have to save the HTML file to see the changes with a browser refresh. >> You can use the design view to make sure you are atleast in the ballpark >> before saving and using the IE/Firefox preview. I know most peo

Re: [PHP] location of the PHP executable

2007-04-11 Thread Jochem Maas
s the user a prompt to say where it is .. that info can then be stored for use at a later date. Mattias Thorslund wrote: > Jochem Maas wrote: > >>> have you tried looking for this info you want? >>> >> > > Yup, but the manual seems kind of "light"

Re: [PHP] Array remove function?

2007-04-11 Thread Jochem Maas
Paul Novitski wrote: > At 4/10/2007 03:09 PM, M.Sokolewicz wrote: >> Such a function is inherently a Bad Idea (tm). array-values are not >> unique. Array keys are. So unless you want to emulate the way >> array_flip works (bad idea (tm)), I'd say: leave it be. > > > Whoever owns that trademark ha

[PHP] 'lang' file editor ...

2007-04-11 Thread Jochem Maas
oo'] = 'my '.$Lang['bar'].' really hurts'; and I'd prefer it to be able to keep file formatting, item ordering and comments as they were when saving back into the file. I can't find anything really useful - the firefox 'php lang file' editor p

Re: [PHP] 'lang' file editor ...

2007-04-12 Thread Jochem Maas
e: >> Seems to me you'd be better off just running the PHP code and dumping >> the arrays out with var_dump or print_r "like" function to generate >> your new language files... >> >> Otherwise, you're writing a fairly big chunk of the PHP parser, w

Re: [PHP] 'lang' file editor ...

2007-04-12 Thread Jochem Maas
Satyam wrote: >> >> maybe I should consider moving my 'shit' into gettext format. > > That was just what I was going to sugest: using gettext format. yeah, but I curerntly have 30 odd files each with upwards of 2000 strings in them, and it would also require changing the code base to use gettext

Re: [PHP] free allocated memory: HOW ?

2007-04-12 Thread Jochem Maas
Arthur Erdös wrote: > Hello all, > > is there a way to free memory allocated by variables in PHP?? This is a > very important issue concerning long running scripts... this is a recurrent problem - not much can be done about it AFAIK ... I'd be very glad to be proved wrong. > > I have a script t

Re: [PHP] 'lang' file editor ...

2007-04-12 Thread Jochem Maas
ndling the following in a nice way: $Lang['foo'] = 'bar'; $Lang['foo'] = 'my '.$Lang['bar'].' really hurts'; but part of the answer/solution to that problem lies in what I would like to present (and/or require from0 the person who will use the

Re: [PHP] free allocated memory: HOW ?

2007-04-12 Thread Jochem Maas
Arthur Erdös wrote: > I am using PHP version 5.1.2. on my dev machine. The same problem with > PHP 5.2.1 on webserver. > > I am generating mails based on a HTML Template. After reading the > template with fread() memory_get_usage() says ~386 MB in use... WTF - 386 megs for an html file??? someho

Re: [PHP] free allocated memory: HOW ?

2007-04-12 Thread Jochem Maas
Zoltán Németh wrote: > 2007. 04. 12, csütörtök keltezéssel 15.52-kor Jochem Maas ezt írta: >> Arthur Erdös wrote: >>> I am using PHP version 5.1.2. on my dev machine. The same problem with >>> PHP 5.2.1 on webserver. >>> >>> I am generating mail

Re: [PHP] free allocated memory: HOW ?

2007-04-12 Thread Jochem Maas
[EMAIL PROTECTED] wrote: > Couple of questions come to mind... > ... > 4. Please tell us these 'newsletters' don't contain information on "male > enhancement products" or "govt seized puppies"..hah this spring to my mind as well - but given his domainname (brainguide), which points to a seemi

Re: [PHP] links and variables

2007-04-12 Thread Jochem Maas
Dan Shirah wrote: > Greetings! > > I have a page that has several links that point to the same page. I > want to > pass a variable to the linked page depending on which link the user clicks > to only display a result set that is relevant to the link clicked. I know > clicking on a link does not

Re: [PHP] free allocated memory: HOW ?

2007-04-12 Thread Jochem Maas
Arthur Erdös wrote: > answering Jochem: > >> WTF - 386 megs for an html file??? somehow I doubt this is >> the correct number ... are you reading the memory consumption >> correctly? > > when the newsletter generation starts memory_get_usage() says ~96 MB in >

Re: [PHP] 'lang' file editor ...

2007-04-12 Thread Jochem Maas
itn last time round ... when I'm done I post what I have (although It'll be in a form that will require whoever want to do something with it to hack it up a bit so it works within the confines of their CMS [and/or standalone]) > > - Original Message > From: Jochem Maas

Re: [PHP] free allocated memory: HOW ?

2007-04-12 Thread Jochem Maas
Arthur Erdös wrote: >> int memory_get_usage ( [bool $real_usage] ) >> >> Returns the amount of memory, in bytes, that's currently being allocated to >> your PHP script. >> >> it returns the number of *bytes* !!! > > sure, and memory_get_usage()/1048576 returns the number of megs, or am i > wrong?

Re: [PHP] free allocated memory: HOW ?

2007-04-12 Thread Jochem Maas
Arthur Erdös wrote: > ok, its not really fast, but it runs on my development machine (AMD64, 4 > GB of RAM, Ubuntu). mysql on the same machine, database with 175 tables > and 2,3 GB data. that could probably slow down scripts, don't you agree? no. you have 4 F'ing gigs of ram on your desktop and i

Re: [PHP] Download multiple sound files?

2007-04-12 Thread Jochem Maas
Skip Evans wrote: > Hey all, > > I have a need to allow a user to download multiple sound files (mp3s, > typically) from a single link. I've been looking at various solutions > via Google, but have not seen one yet to do this. > > Can anyone point me in the right direction or give me a lead on ho

[PHP] Re: WYSIWYG vs. the 'power-user'

2007-04-12 Thread Jochem Maas
Chetan Graham wrote: ince story. > Also, I do not believe in making fun of people or their views on a subject > even if I feel I know better. Better a friend than an enemy. by definition if you choose 'friend' you are stuck with the concept of 'enemy' - and war will continue doing great busines

Re: [PHP] free allocated memory: HOW ?

2007-04-12 Thread Jochem Maas
Edward Vermillion wrote: > > On Apr 12, 2007, at 11:17 AM, Jochem Maas wrote: > >> Arthur Erdös wrote: >>>> int memory_get_usage ( [bool $real_usage] ) >>>> >>>> Returns the amount of memory, in bytes, that's currently being >>>&

Re: [PHP] free allocated memory: HOW ?

2007-04-12 Thread Jochem Maas
Arthur Erdös wrote: >> don't OMFG me - I can't read your cmdline from here you know, >> and I'm not the one with a completely borked script/system/whatever. >> > > a big sorry again for the missunderstanding!! ;) I did not omfg YOU! I > did omfg ME when I saw that the script eats much more memory

[PHP] token_get_all ...

2007-04-12 Thread Jochem Maas
having decided to attempt to write a visual merge/edit/translate tool for 'old skool' php lang files (see previous thread I started) I have got to a stage where I can reliably extract 'keys' and 'values' from multi-dimensional tokenized arrays regardless of the complexity of the key or value def

Re: [PHP] php5 oop question

2007-04-12 Thread Jochem Maas
nice write up. :-) Tim Stiles wrote: > I suppose I should have summarized what I learned from that experiment, > putting myself more squarely on topic: Simply put, a Fluent interface > let me move from > /snip -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www

Re: [PHP] token_get_all ...

2007-04-12 Thread Jochem Maas
Roman Neuhauser wrote: > # [EMAIL PROTECTED] / 2007-04-12 22:23:23 +0200: >> does anyone know if I can rely on token_get_all() tokenized anything >> and everything that is thrown at it? > > It's an interface to the PHP scanner. IOW, yes. cheers Roman. > -- PHP General Mailing List (http://ww

Re: [PHP] free allocated memory: HOW ?

2007-04-13 Thread Jochem Maas
Roman Neuhauser wrote: > # [EMAIL PROTECTED] / 2007-04-12 18:17:34 +0200: >> 3-4 seconds is dead slow if you ask me - a script like this should be >> capable of >> making the average mailserver go completely apeshit assuming you'd be >> mailing the >> newsletters out directly after creating them

Re: [PHP] Re: free allocated memory: HOW ?

2007-04-13 Thread Jochem Maas
Colin Guthrie wrote: > Jochem Maas wrote: >> yeah or exim, only I can't because it's one of the darn plesk servers - and >> changing >> out the mail server is not something I can do. > > I have recently escaped Pleskhog day. It's s refreshing - s

Re: [PHP] Download multiple sound files?

2007-04-13 Thread Jochem Maas
Richard Lynch wrote: > On Thu, April 12, 2007 11:15 am, Skip Evans wrote: >> I have a need to allow a user to download multiple >> sound files (mp3s, typically) from a single link. >> I've been looking at various solutions via Google, >> but have not seen one yet to do this. >> >> Can anyone point

Re: [PHP] WWE in Stamford, CT needs a kick ass PHP Developer!

2007-04-13 Thread Jochem Maas
Tim wrote: ... > > Oh and guys, since when is their ONE good way of doing things??? The only > thing i regret here is the violence some of these posts take :) Isn't the > world full of it already? Can't we tone it down in here where their is some > resemblance of peace? ;) oh, the world is defi

Re: [PHP] isset

2007-04-14 Thread Jochem Maas
Richard Kurth wrote: > What do you do when isset does not work? If I send data in a > $_REQUEST['var'] like > if (isset($_REQUEST['var'])) { > } > Put var has no data it still says it is set. Because $_REQUEST['var'] = "" > and isset thinks "" is set php -r ' $r = array("foo" => ""); var_dump(iss

Re: [PHP] isset

2007-04-15 Thread Jochem Maas
Afan Pasalic wrote: > > Jochem Maas wrote: >> Richard Kurth wrote: >> >>> What do you do when isset does not work? If I send data in a >>> $_REQUEST['var'] like >>> if (isset($_REQUEST['var'])) { >>> } >>>

Re: [PHP] Json.php

2007-04-16 Thread Jochem Maas
Otto Wyss wrote: > Tijnema ! wrote: >> >> *ROFLMFAO*...Did you actually try google for json.php? >> Second result: >> http://mike.teczno.com/JSON/JSON.phps >> > This doesn't have a json_encode but needs a $json object which then > could be used as $json->encode(...). Thanks anyway. that's going to

Re: [PHP] Importing data in to mysql with some control

2007-04-16 Thread Jochem Maas
Richard Kurth wrote: > I am trying to write a import script for loading data into an existing mysql > table. I want to show the import data on the screen and let the user select > the column number to go with which mysql field. Now some of the fields are > mandatory like firstname lastname email ad

Re: [PHP] Appending into associative arrays

2007-04-16 Thread Jochem Maas
Zoltán Németh wrote: > 2007. 04. 16, hétfő keltezéssel 10.50-kor Zoltán Németh ezt írta: >> 2007. 04. 16, hétfő keltezéssel 10.40-kor Otto Wyss ezt írta: >>> Zoltán Németh wrote: what do you mean by doesn't work? what error is thrown if any? what result do you get instead of the expected?

Re: [PHP] Array remove function?

2007-04-16 Thread Jochem Maas
Richard Lynch wrote: > On Wed, April 11, 2007 9:00 pm, Jochem Maas wrote: >> [PS - I've the pleasure of listening to a colleague do a manual >> install >> of Vista over an existing copy of XP and then get the really tricky >> stuff >> like the soundcard to wor

Re: [PHP] Json.php

2007-04-16 Thread Jochem Maas
Robert Cummings wrote: > On Mon, 2007-04-16 at 10:49 -0400, tedd wrote: >> At 8:41 AM -0500 4/16/07, Philip Thompson wrote: >>> On Apr 16, 2007, at 4:40 AM, Jochem Maas wrote: >>> >>>> Otto Wyss wrote: >>>>> Tijnema ! wrote: >&g

Re: [PHP] I make a patch, how I report?

2007-04-16 Thread Jochem Maas
Fernando chucre wrote: > Hello all, > > I buid a patch for wrapper php fopen. In this patch I create a way for > the script access the filedescriptos opened by process. Ex: > > php file.php 3file_out.txt > > In this case the script can't read the filedescriptor 3 and 7. Not > have way for read o

Re: [PHP] isset

2007-04-16 Thread Jochem Maas
Richard Lynch wrote: > On Mon, April 16, 2007 5:35 pm, Tim Earl wrote: >> What about in the following context? >> >> $arr = array(); >> If (!empty($arr)) { } >> >> This is where i have found it to be the most usefull... > > If I'm already certain that it's an array, I just use 'count' personally.

Re: [PHP] WWE in Stamford, CT needs a kick ass PHP Developer!

2007-04-17 Thread Jochem Maas
Richard Lynch wrote: > On Fri, April 13, 2007 8:14 pm, Robert Cummings wrote: peacepipe in one hand, broadsword in the other - lets hack on :-) >>> ***BIG SMILE*** >> And WHAT are you smiling at??? Staves beat peacepipes and broadswords >> anyday! > > Maybe he's smiling because of what's IN h

Re: [PHP] Json.php

2007-04-17 Thread Jochem Maas
Richard Lynch wrote: > On Mon, April 16, 2007 10:20 am, Tijnema ! wrote: >> And btw, I think it's better not to create a new link to the class >> each time the function is called, but just use :: >> if (!function_exists('json_encode')) { >>function json_encode($data) { >>ret

Re: [PHP] Skipping items in a loop

2007-04-18 Thread Jochem Maas
jekillen wrote: > Hello again; > I have a directory that I am opening and reading to produce an > array of contents; files and subdirectories. There are a number > of subdirectories that I do not want to open and read the contents > of, and others that I do want to open and read the contents of. >

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

2007-04-18 Thread Jochem Maas
Chris wrote: > Richard Lynch wrote: >> On Tue, April 17, 2007 4:01 pm, Chris wrote: >>> Tijnema ! wrote: On 4/17/07, Brian Dunning <[EMAIL PROTECTED]> wrote: > Dang. There is no remote access to the server, no way to remotely > edit php.ini - everything is blocked by the firewall. It's

Re: [PHP] Json.php

2007-04-18 Thread Jochem Maas
Richard Lynch wrote: > On Tue, April 17, 2007 4:40 pm, Jochem Maas wrote: >> Richard Lynch wrote: > > So only one of these is "kosher" > static: > return Services_JSON::decode($data); > > class: > $json = new Services_JSON; > return $json->

Re: [PHP] Json.php

2007-04-18 Thread Jochem Maas
Roman Neuhauser wrote: > # [EMAIL PROTECTED] / 2007-04-18 04:59:48 -0400: >>> So only one of these is "kosher" >>> static: >>> return Services_JSON::decode($data); >>> >>> class: >>> $json = new Services_JSON; >>> return $json->decode($data); >>> but not both. >> I'm not trying to start (or further

Re: [PHP] warning message to hide

2007-04-18 Thread Jochem Maas
Tijnema ! wrote: > On 4/18/07, Roman Neuhauser <[EMAIL PROTECTED]> wrote: >> # [EMAIL PROTECTED] / 2007-04-18 07:55:05 +0100: >> > On 4/17/07, Richard Lynch <[EMAIL PROTECTED]> wrote: >> > >On Sat, April 14, 2007 12:12 pm, Tijnema ! wrote: >> > >>> try putting an @ sign before this line. something

Re: [PHP] Json.php

2007-04-18 Thread Jochem Maas
Roman Neuhauser wrote: > # [EMAIL PROTECTED] / 2007-04-18 11:54:59 +0200: >> Roman Neuhauser wrote: >>> That's an incident waiting to happen, and forbidding static calls of >>> instance methods is an (intended) anti-footshooting measure. >> nothing an isset($this) didn't/doesn't solve - they gave m

Re: [PHP] pclzip on PHP 5

2007-04-18 Thread Jochem Maas
Skip Evans wrote: > Hey all, > > I'm developing a site on my local server, which runs PHP4 and BSD. I > also installed pclzip.lib.php to create zip files on the PHP4 machine > and all works well. > > The production server for this site runs PHP5, but I thought it would be > backward compatible, b

Re: [PHP] Json.php

2007-04-19 Thread Jochem Maas
Roman Neuhauser wrote: ... > > You'll have to change the code. I'm suggesting a nice clean way that'll > not only conform to the probable rules of PHP 6 (which are not specific > to PHP, at least static is not), but that'll also conform to the rules > of good design. You're saying the changes

Re: [PHP] Json.php

2007-04-20 Thread Jochem Maas
Richard Lynch wrote: > On Thu, April 19, 2007 2:25 am, Roman Neuhauser wrote: >> I'm at a complete loss then. Richard, what would you advise to someone >> in such a messy situation? > > I don't really see why anybody is getting bent out of shape about > 'almostatic' methods in PHP, but if they're

Re: [PHP] CSS vs. Tables OT

2007-04-20 Thread Jochem Maas
Jay Blanchard wrote: > [snip] > This site (http://www.soyatec.com/main.php) doesn't seem to use > table. At least a simple search of the "table" keyword in several pages > has no result. > [/snip] > > The CSS is pretty compact too. > > BTW, I agree with what others said earlier, this discuss

Re: [PHP] cookies and carts

2009-12-08 Thread Jochem Maas
Allen McCabe schreef: > I have a shopping cart type system set up which keeps track of the cart > contents using a SESSION variable, where $_SESSION['cart'][$item_id'] is > equal to the quantity, so the name/value pair is all the information I need. > > But sessions are unreliable on the free serv

Re: [PHP] mysterious include problem

2009-12-08 Thread Jochem Maas
Hi Allen, gonna be a bit ruthless with you :). 1. your not filtering your input (your open to include being hacked) 2. your not validating or error checking (e.g. does the include file exist??) 3. keeping large numbers of content pages with numerical filenames is a maintenance nightmare and inci

Re: [PHP] mysterious include problem

2009-12-10 Thread Jochem Maas
Ashley Sheridan schreef: > On Tue, 2009-12-08 at 17:32 +0100, Jochem Maas wrote: > >> Hi Allen, >> >> gonna be a bit ruthless with you :). >> >> 1. your not filtering your input (your open to include being hacked) >> 2. your not validating or error

Re: [PHP] I have not seen any messages for a couple of days...

2009-12-10 Thread Jochem Maas
Ashley Sheridan schreef: > On Thu, 2009-12-10 at 11:26 -0500, Robert Cummings wrote: > >> tedd wrote: >>> At 10:29 AM -0500 12/10/09, Robert Cummings wrote: No, it's been broken for days. You won't get any emails for at least another week. >>> What's been broken? >>> >>> I've been recei

Re: [PHP] trying to launch kate from the browser....

2010-01-08 Thread Jochem Maas
Op 1/8/10 1:41 PM, Rene Veerman schreef: > I'm working on a better var_dump (http://mediabeez.ws/htmlMicroscope/, > LGPL), and want to launch my kate editor when i click in the browser on a > line in my trace-log. > > I'm trying to exec() this line, but it returns 1 (which is i believe a > general

Re: [PHP] Display just 1 record in a query

2010-01-12 Thread Jochem Maas
Op 1/13/10 12:43 AM, Robert Cummings schreef: > > deal...@gmail.com wrote: >> On Jan 12, 2010, at 1:57 PM, Ashley Sheridan wrote: >> >>> Depends on how you're creating running the query. You could do >>> something like: >>> >>> echo mysql_result($result, 1, 'fieldname'); >>> >>> Where $result is

Re: [PHP] POLL: To add the final ?> or not...

2010-01-14 Thread Jochem Maas
Op 1/14/10 11:37 PM, Kim Madsen schreef: > Ashley Sheridan wrote on 14/01/2010 23:30: > >>> What is the difference between: >>> >>> >> print "hello PHPeople"; >>> ?>WHITESPACE >>> >>> and >>> >>> >> print "hello PHPeople"; >>> WHITESPACE >>> >>> Same shit when I look at it, a sloppy developer is w

Re: [PHP] integrating shipping with shopping cart site - OT

2010-01-18 Thread Jochem Maas
Op 1/18/10 10:47 AM, Angelo Zanetti schreef: > Hi all, > > We are about to start a new project. Custom written shopping cart - quite > simple actually. However we have a concern when it comes to calculating the > shipping cost for an order. > > For each product we can determine the base cost bas

Re: [PHP] Zend debugger doesn't work

2010-01-19 Thread Jochem Maas
Op 1/18/10 10:38 AM, Ali Asghar Toraby Parizy schreef: > Hi > I have installed php 5.3.1 (with thread safety = on) recently And I I would try without thread safety to start with, 'std' setup uses the pre-fork model which doesn't need it and *may* cause probs. [fast]CGI doesn't need thread safety e

Re: [PHP] Foreign Characters Break in MySQL

2010-01-21 Thread Jochem Maas
Op 1/22/10 2:28 AM, Ryan Park schreef: > Forgot to reply all. > > You can see that it's in the middle of the sql statement. > It looks fine here but some how it breaks during the query. > > mysql_connect("localhost", "adminID", "password") or die(mysql_error()); > echo "Connected to MySQL"; > >

Re: [PHP] Enforce a constant in a class.

2010-01-22 Thread Jochem Maas
Op 1/22/10 4:55 PM, Richard Quadling schreef: > 2010/1/22 Ashley Sheridan >> Constants are there for things that should never change. If you ever need to >> change them, then whoever created the base class either didn't think things >> through properly, or you're not. Imagine a class that sets

Re: [PHP] Foreign Characters Break in MySQL

2010-01-22 Thread Jochem Maas
Op 1/22/10 9:41 AM, Ashley Sheridan schreef: > On Fri, 2010-01-22 at 03:47 +0100, Jochem Maas wrote: > >> Op 1/22/10 2:28 AM, Ryan Park schreef: >>> Forgot to reply all. >>> >>> You can see that it's in the middle of the sql statement. >>>

Re: [PHP] Enforce a constant in a class.

2010-01-22 Thread Jochem Maas
Op 1/22/10 5:19 PM, Richard Quadling schreef: > 2010/1/22 Jochem Maas : >> constants in interfaces are not meant for this. a class constant doesn't >> constitute an interface. I believe constants in interfaces are allowed purely >> because it is helpful to have them def

Re: [PHP] Foreign Characters Break in MySQL

2010-01-22 Thread Jochem Maas
Op 1/22/10 5:18 PM, Ashley Sheridan schreef: ... > > You'd be surprised how many people still use a dumb browser! well, no not really - but then we're in the same business :) I wasn't discounting the use of the encoding META tag, just pointing out that it's a hack we have to use (and that we sh

Re: [PHP] Weird Array Issue...

2010-01-23 Thread Jochem Maas
Op 1/23/10 3:28 AM, Don Wieland schreef: > Hi, > > I have defined a stored procedure in my mySQL DB and when I call the > procedure in my mySQL browser it returns the CORRECT results: > > DROP PROCEDURE IF EXISTS `Get_OHC_Years`; > DELIMITER $$ > CREATE definer=`do...@`` PROCEDURE `Get_OHC_Years`

Re: [PHP] importNode issue

2010-01-25 Thread Jochem Maas
highlight_string() function might be an easier route? Op 1/25/10 9:55 AM, Michael A. Peters schreef: > I'm experiencing a slight problem with importNODE putting unwanted > carriage returns in the the output. > > Here's my function: > > // syntax highlighting > include_once('Text/Highlighter.php'

Re: [PHP] Migrating legacy code - changing session name

2010-01-26 Thread Jochem Maas
Op 1/26/10 9:25 AM, Rory McKinley schreef: > Hello List > > A client has asked me to migrate a few scripts that have been running > merrily under PHP4 to PHP5.2. Part of these scripts have integration > with PHPMyAdmin > using the single sign-on and so they make use of the following code : > > se

Re: [PHP] Re: > 120 meg of json analyzed by the browser...

2010-01-28 Thread Jochem Maas
Op 1/28/10 5:03 PM, Rene Veerman schreef: > Oh, i forgot to mention that firefox takes about a gigabyte of memory > after having stalled at "200mb parsed" in a 330mb document.. > > And despite using setTimeout(), firefox frequently freezes (for about > 2 to 10 minutes), before updating the decodin

Re: [PHP] how do I use php://memory?

2010-01-29 Thread Jochem Maas
Op 1/30/10 1:35 AM, Mari Masuda schreef: > Hello, > > I have a function that uses tidy to attempt to clean up a bunch of crappy > HTML that I inherited. In order to use tidy, I write the crappy HTML to a > temporary file on disk, run tidy, and extract and return the clean(er) HTML. > The prog

Re: [PHP] Sessions across subdomains

2010-01-29 Thread Jochem Maas
Op 1/30/10 2:25 AM, Ben Miller schreef: > Hi, I've always thought that session data was subdomain specific and would > not carry over between http://www.mydomain.com and > https://secure.mydomain.com, but it seems to be working for me now. Can I > rely on this and post from http://www.mydomain.com

<    1   2   3   4   5   6   7   8   9   10   >