Re: [PHP] enabling domdocument

2010-07-19 Thread Michael A. Peters
Ashley Sheridan wrote: OK, I seem to have answered my own question! It seems that even though PHP had the XML module enabled, I still needed to run 'yum update php-xml' in order for it to load in the DOM module. It's now working fine, and for those of you interested, the ./configure line in

[PHP] Stumped - MDB2 pgsql

2010-07-15 Thread Michael A. Peters
I need to switch from MySQL (where everything is peachy) to Postgresql - reason I need to switch is I need to use PostGIS and I don't see a need to run two databases. I got Postgresql installed (stock CentOS / RHEL 5) and installed the postgresql php module and mdb2 driver. Restarted the web

Re: [PHP] Stumped - MDB2 pgsql

2010-07-15 Thread Michael A. Peters
Michael A. Peters wrote: I need to switch from MySQL (where everything is peachy) to Postgresql - reason I need to switch is I need to use PostGIS and I don't see a need to run two databases. I got Postgresql installed (stock CentOS / RHEL 5) and installed the postgresql php module and mdb2

Re: [PHP] Stumped - MDB2 pgsql

2010-07-15 Thread Michael A. Peters
Michael A. Peters wrote: Michael A. Peters wrote: I need to switch from MySQL (where everything is peachy) to Postgresql - reason I need to switch is I need to use PostGIS and I don't see a need to run two databases. I got Postgresql installed (stock CentOS / RHEL 5) and installed

Re: [PHP] Will PHP ever grow up and have threading?

2010-03-24 Thread Michael A. Peters
Tommy Pham wrote: The response time, max 5 seconds, will be tested on local gigabit LAN to ensure the adequate response (optimized DB code proper hardware) without worrying about users' connection limit and site's upload bandwidth limit (which can easily rectify). Then thereafter will be

Re: [PHP] Will PHP ever grow up and have threading?

2010-03-23 Thread Michael A. Peters
Rene Veerman wrote: But i've yet to find a way to keep global objects in memory between http requests, outside $_SESSION, which i believe is just stored to- and loaded from disk between http requests. You can store sessions in a cache and avoid the disk IO. -- PHP General Mailing List

Re: [PHP] Will PHP ever grow up and have threading?

2010-03-23 Thread Michael A. Peters
Tommy Pham wrote: On Tue, Mar 23, 2010 at 3:33 PM, Per Jessen p...@computer.org wrote: Tommy Pham wrote: On Tue, Mar 23, 2010 at 2:04 AM, Per Jessen p...@computer.org wrote: Use the right tool for the right job - PHP is a scripting/interpreted language, it does not need threading (IMO of

Re: [PHP] PHP SMTP Mailers

2010-03-22 Thread Michael A. Peters
King Coffee wrote: Hi, I'm executing a third-parity standard PHP application on a Windows IIS 7 shared hosting server. I need to convert, or use, a SMTP mailer service. I found two SMTP PHP scripts - I think may work. The sourceforge.net PHPMailer project and the pear.php.net (Mail,

Re: [PHP] Re: PHP in HTML code

2010-03-19 Thread Michael A. Peters
Jan G.B. wrote: 2010/3/18 tedd tedd.sperl...@gmail.com: Calling it ranting or religious unjustly demeans the discussion and is inflammatory. In all of this, I've simply said it's your choice. What I said was: *persons ranting about short open tags* *are just like some religious people * I

Re: [PHP] any reason *not* to use PEAR DB module when accessing mysql?

2010-03-19 Thread Michael A. Peters
Mattias Thorslund wrote: Robert P. J. Day wrote: (just a warning -- as a relative newbie to PHP, i'll probably have the occasional dumb question. just humour me.) i'm looking at some existing PHP code that accesses a mysql 5.0 db, and it's coded using the mysql-specific calls:

Re: Fwd: Re: [PHP] any reason *not* to use PEAR DB module when accessing mysql?

2010-03-19 Thread Michael A. Peters
Nilesh Govindarajan wrote: On 03/20/2010 02:31 AM, Michael A. Peters wrote: Mattias Thorslund wrote: Robert P. J. Day wrote: (just a warning -- as a relative newbie to PHP, i'll probably have the occasional dumb question. just humour me.) i'm looking at some existing PHP code that accesses

Re: [PHP] XML functions

2010-03-06 Thread Michael A. Peters
Ahmad F AlTwaijiry wrote: Dears When i checked the php manual i found many Solutions to read/write xml files and im confused now :) Which function/library is better and is there any new article that compare each function/library? I use DOMDocument. It works best if the input file you are

Re: [PHP] XML functions

2010-03-06 Thread Michael A. Peters
Andre Polykanine wrote: Hello Ahmad and all, I will expand a little bit your question joining to it: what is the better technique to make an RSS feed on the website? The website is manually written, no CMS. I wrote a class to do it -

Re: [PHP] PEAR clases don't work with PHP 5.3

2010-03-05 Thread Michael A. Peters
Martín Marqués wrote: A few days ago I upgraded my development server with PHP 5.3, and found that some pear packages stopped working giving FATAL ERRORs, like this (this one is from package Image_Graph): PHP Fatal error: Call to undefined method

[PHP] svg 2 gif/png

2010-03-03 Thread Michael A. Peters
I'm moving all of my dynamic image generation to svg. Not only does it look better, but it is less resource intensive on my server allowing me to generate the svg on demand instead of pre-generating (via cron) twice a month like I had to do with gd dynamic generation. However, some browsers

Re: [PHP] svg 2 gif/png

2010-03-03 Thread Michael A. Peters
Michael A. Peters wrote: *snip* Is there an easy way around this? IE a php class/function that understands SVG w/ xlink and can replace the use tags with the polygons they refer to? If not, I'll have to try to write one, but I'd rather not ... I just did, haven't tested yet, but this may

Re: [PHP] svg 2 gif/png

2010-03-03 Thread Michael A. Peters
Michael A. Peters wrote: Michael A. Peters wrote: *snip* Is there an easy way around this? IE a php class/function that understands SVG w/ xlink and can replace the use tags with the polygons they refer to? If not, I'll have to try to write one, but I'd rather not ... I just did, haven't

Re: [PHP] svg 2 gif/png

2010-03-03 Thread Michael A. Peters
Michael A. Peters wrote: Michael A. Peters wrote: Michael A. Peters wrote: *snip* Is there an easy way around this? IE a php class/function that understands SVG w/ xlink and can replace the use tags with the polygons they refer to? If not, I'll have to try to write one, but I'd rather

Re: [PHP] loadXML() and namespace

2010-02-17 Thread Michael A. Peters
Michael A. Peters wrote: It seems that if I use loadXML($string) and the $string has a namespace defined in it, domdocument is nuking the namespace and changing the nodenames from whatever to defaultwhatever. Example - math xmlns=http://www.w3.org/1998/Math/MathML; mrow *snip* /mrow

Re: [PHP] Re: UK Project Opportunity

2010-02-17 Thread Michael A. Peters
Daniel Brown wrote: On Wed, Feb 17, 2010 at 16:23, Manuel Lemos mle...@acm.org wrote: What about you? How many times have you shared your Open Source code? HA! That's hilarious that you would say that to *me.* I actually laughed out loud. I'll probably do it a few more times before the

Re: [PHP] importNode issue

2010-02-16 Thread Michael A. Peters
Michael A. Peters wrote: 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'); function syntaxHighlight($dom,$lang,$code) { $hl = Text_Highlighter::factory

Re: [PHP] FTP Site

2010-02-16 Thread Michael A. Peters
Ben Miller wrote: Hi, I'm building a site for a client that has a need to allow their users to upload large files (up to 100mb or more) and store them on the server. I've never had a need to work with PHP's FTP functions until now and, before I go reading the manual to learn how, I wanted

Re: [PHP] Re: UK Project Opportunity

2010-02-16 Thread Michael A. Peters
Nathan Rixham wrote: You make every interaction with your site a horrible, painful interaction that is purely there to get as many adverts as you can in front of people, so that you can bleed every cent possible from the hard work and effort of PHP developers and innocent users. In short, you

[PHP] loadXML() and namespace

2010-02-15 Thread Michael A. Peters
It seems that if I use loadXML($string) and the $string has a namespace defined in it, domdocument is nuking the namespace and changing the nodenames from whatever to defaultwhatever. Example - math xmlns=http://www.w3.org/1998/Math/MathML; mrow mrow msup mix/mi

Re: [PHP] optional object arguments to a function

2010-02-14 Thread Michael A. Peters
Shawn McKenzie wrote: Michael A. Peters wrote: Rene Veerman wrote: On Sat, Feb 13, 2010 at 9:05 AM, Michael A. Peters mpet...@mac.com wrote: How do I specify a default null object, or otherwise make the argument argument optional? To my knowledge: can't be done. But you can check any args

[PHP] optional object arguments to a function

2010-02-13 Thread Michael A. Peters
I've started working on a class using DOMDocument to assemble MathML in php. The class, assuming I actually succeed, will eventually be used for parsing LaTeX math equations to MathML without the need to have TeX installed. I probably won't be able to support all the possibilities for

Re: [PHP] How to secure this

2010-02-13 Thread Michael A. Peters
John Allsopp wrote: Well no they are not logged in, it's just an embedded iframe so that's my main issue with my method, anyone could look at the web page source, pinch the URL of the iframe and they'd have the username and password. I think the only way to do it is to make a key per

Re: [PHP] How to secure this

2010-02-13 Thread Michael A. Peters
Michael A. Peters wrote: John Allsopp wrote: Well no they are not logged in, it's just an embedded iframe so that's my main issue with my method, anyone could look at the web page source, pinch the URL of the iframe and they'd have the username and password. I think the only way to do

Re: [PHP] optional object arguments to a function

2010-02-13 Thread Michael A. Peters
Rene Veerman wrote: On Sat, Feb 13, 2010 at 9:05 AM, Michael A. Peters mpet...@mac.com wrote: How do I specify a default null object, or otherwise make the argument argument optional? To my knowledge: can't be done. But you can check any args through the func_get_arg*() functions, then per

Re: [PHP] HTML plain text in Outlook 2007

2010-02-12 Thread Michael A. Peters
Ashley Sheridan wrote: That last reason could be why your email is failing! HTML email is the one place where it is actually better to code the old way with tables for markup, font tags, and very little (if any) CSS. If you do use any CSS, it's best left inline as well, as some email clients

Re: [PHP] HTML5 aside description

2010-02-11 Thread Michael A. Peters
If aside is not proper to use for this purpose, what would be? sidebar suggests a particular type of layout. section suggests content. nav is appropriate for some items in a side bar, but not all, and is often a child of how aside is being used. div give no semantics. I would like to see a

Re: [PHP] HTML5 aside description

2010-02-11 Thread Michael A. Peters
Michael A. Peters wrote: If aside is not proper to use for this purpose, what would be? How about margin ?? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] HTML5 aside description

2010-02-11 Thread Michael A. Peters
Robert Cummings wrote: Michael A. Peters wrote: If aside is not proper to use for this purpose, what would be? sidebar suggests a particular type of layout. section suggests content. nav is appropriate for some items in a side bar, but not all, and is often a child of how aside is being used

Re: [PHP] PHP Manual problems

2010-02-10 Thread Michael A. Peters
Bob McConnell wrote: Our SOP is to generate standards compliant pages, validate them with Firefox and the HTML Validator add-on, then deal with the deviant browsers. It's a lot less work than trying to do it the other way around. There are a few minor issues, such as W3C still refusing to

Re: [PHP] PHP Manual problems

2010-02-10 Thread Michael A. Peters
Ashley Sheridan wrote: The W3C validator rejects that autocomplete attribute because it still isn't in any valid standard. Some browsers have introduced it, and PCI requires it to be there for browsers that recognise it, but it's not a good security feature, as browsers don't have to honor it

Re: [PHP] PHP Manual problems

2010-02-10 Thread Michael A. Peters
Ashley Sheridan wrote: What about search engines? Will there be any impact on these, particularly with regards to semantic content? I expect semantic markup to (eventually) improve how pages are indexed. Also, are there any browsers that would fall over with unknown tags? I know IE

Re: [PHP] PHP Manual problems

2010-02-10 Thread Michael A. Peters
Robert Cummings wrote: Just a word of thought... if you're doing styling... use classes and not IDs. Use of IDs for styling is very often indicative of inexperience, inability, or lack of understanding with respect to CSS. I use ID when there will only be one element that needs to be

Re: [PHP] PHP Manual problems

2010-02-10 Thread Michael A. Peters
Michael A. Peters wrote: Robert Cummings wrote: Just a word of thought... if you're doing styling... use classes and not IDs. Use of IDs for styling is very often indicative of inexperience, inability, or lack of understanding with respect to CSS. I use ID when there will only be one

Re: [PHP] PHP Manual problems

2010-02-10 Thread Michael A. Peters
Robert Cummings wrote: Many government documents have the concept of aside as appearing through the document and contextually near to the information to which the aside relates. The entire sidebar seems a bit gratuitous as an aside. Sure it's aside, but it's not exactly the semantic meaning

Re: [PHP] PHP Manual problems

2010-02-10 Thread Michael A. Peters
Nathan Rixham wrote: Michael A. Peters wrote: Robert Cummings wrote: Many government documents have the concept of aside as appearing through the document and contextually near to the information to which the aside relates. The entire sidebar seems a bit gratuitous as an aside. Sure it's

Re: [PHP] PHP Manual problems

2010-02-10 Thread Michael A. Peters
Andrew Ballard wrote: On Wed, Feb 10, 2010 at 3:48 PM, Robert Cummings rob...@interjinn.com wrote: Nathan Rixham wrote: The most common misconception of how this element should be used is for the standard sidebar. - see: http://html5doctor.com/understanding-aside/ Unfortunatley I examined

Re: [PHP] php selecting multiple stylesheets

2010-02-08 Thread Michael A. Peters
TG wrote: You could use PHP and cookies (session variables are only useful until the browser is closed, so it's not as persistant as it sounds like you may want). Persistent sessions are possible. The way I'm doing it in the CMS I am working on is via GET which saves selection in session.

Re: [PHP] php selecting multiple stylesheets

2010-02-08 Thread Michael A. Peters
Ashley Sheridan wrote: There is a good reason for having different stylesheets that use differing colour systems. For example, some people with learning difficulties benefit from yellow text on blue backgrounds, as apparently those colours together are better at capturing a users attention

Re: [PHP] PHP generated HTML has submit button which picks up the wrong url.

2010-02-06 Thread Michael A. Peters
Ashley Sheridan wrote: Bit of advice though, don't use Javascript to submit a form. Firstly, Javascript isn't available on all browsers, and on those it is available on, not everyone has it turned on. The W3C has the stats for Javascript being unavailable in a browser at about 5%. Yup. Just

Re: [PHP] DOM TextArea (and dom chart please)

2010-02-03 Thread Michael A. Peters
Michael A. Peters wrote: $website_data = new tidy('dom_test.html',$tidy_config); Doh! Should be $website_data = new tidy('dom_test.html',$tidy_config,'utf8'); Otherwise it has the same problem with multibyte characters that loadHTML() has. But with the 'utf8' specified it works

Re: [PHP] Thinking of moving to .NET because of standalone... any suggestions?

2010-02-03 Thread Michael A. Peters
Ryan S wrote: I need to make a few standalones programs that will run (mostly) on Windows... is there any other way that I have not found that i can use PHP instead of learning something new like .NET? Use the best tool for the job. I suspect that if your primary target is MS you will have

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

2010-02-03 Thread Michael A. Peters
Brian Dunning wrote: Hey all - Glad some of you found that sample data helpful. :-) I use PHP/MySQL to generate RSS feeds of my podcasts. The feed is submitted as *.xml and I use .htaccess to redirect it to my PHP document. The start of the document sets the right header and outputs the ? ?

Re: [PHP] DOM TextArea (and dom chart please)

2010-02-02 Thread Michael A. Peters
Ryan S wrote: $website_data = file_get_contents('dom_test.html');//load the website data, $dom = new DomDocument; //make a new DOM container in PHP $dom-loadHTML($website_data); //load all the fetched data into the DOM container I'm not sure what the answer to your issue is, but mind if I

Re: [PHP] database abstraction layer

2010-02-02 Thread Michael A. Peters
Lars Nielsen wrote: Hi List I am trying to make a Database Abstraction Layer so I can which the DB of my application between MySQL and Postgresql. I have been looking at the way phpBB does it, and it seems that it is only then php-functions which are different. The SQL seems to be the same. Is

Re: [PHP] database abstraction layer

2010-02-02 Thread Michael A. Peters
Robert Cummings wrote: *snip* Einstein I believe said something along the lines of A smart person solves a problem. A wise person avoids it in the first place Might not have been Einstein, but anyway ... Do you mean the following quote? The difference between a smart person and a wise

Re: [PHP] OpenID

2010-02-01 Thread Michael A. Peters
Daevid Vincent wrote: -Original Message- From: Al [mailto:n...@ridersite.org] Sent: Monday, February 01, 2010 12:09 PM To: php-general@lists.php.net Subject: [PHP] OpenID This is a bit off subject, but What is your opinion on OpenID? Failed gimick. Tried to resurface again

Re: [PHP] Do you use a public framework or roll your own?

2010-01-29 Thread Michael A. Peters
Michael A. Peters wrote: Daevid Vincent wrote: I'm not looking to start a holy war here or re-hash the tired debate. I just want some hard cold numbers to look at. Do you use a public framework or roll your own? http://www.rapidpoll.net/8opnt1e And for those interested, here

Re: [PHP] Creating an Entire .html page with PHP

2010-01-28 Thread Michael A. Peters
clanc...@cybec.com.au wrote: On Thu, 28 Jan 2010 21:10:42 +0100, rene7...@gmail.com (Rene Veerman) wrote: On Thu, Jan 28, 2010 at 12:31 AM, clanc...@cybec.com.au wrote: On Wed, 27 Jan 2010 10:21:00 -0800, deal...@gmail.com (dealtek) wrote: Opening tables, etc, wrongly generally messes the

Re: [PHP] Pointers For Newbies, Reminders For Oldies

2010-01-27 Thread Michael A. Peters
Paul M Foster wrote: ... should be obvious - but are often overlooked - points within coding practice that can cause the programmer to develop bad habits and bad code. - Dan Brown Tip #1: Don't use count() in loops unless there are very few items to count and performance doesn't matter, or the

Re: [PHP] Pointers For Newbies, Reminders For Oldies

2010-01-27 Thread Michael A. Peters
Richard Quadling wrote: for ($i = 0, $j = count($a) ; $i $j ; ++$i) { } is a very common way to handle that. Thanks! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] preg_replace help

2010-01-26 Thread Michael A. Peters
$fixSrch[] = '/\n/'; $fixRplc[] = '[br]'; is what I need except I want it to leave anything between [code] and [/code] alone. I figured it out before but with element /element but I don't even remember what I was working on when I did that and I can't for the life of me find it now. --

Re: [PHP] preg_replace help

2010-01-26 Thread Michael A. Peters
Kim Madsen wrote: Michael A. Peters wrote on 26/01/2010 14:18: $fixSrch[] = '/\n/'; $fixRplc[] = '[br]'; is what I need except I want it to leave anything between [code] and [/code] alone. I figured it out before but with element /element but I don't even remember what I was working

Re: [PHP] preg_replace help

2010-01-26 Thread Michael A. Peters
Michael A. Peters wrote: Kim Madsen wrote: Michael A. Peters wrote on 26/01/2010 14:18: $fixSrch[] = '/\n/'; $fixRplc[] = '[br]'; is what I need except I want it to leave anything between [code] and [/code] alone. I figured it out before but with element /element but I don't even remember

Re: [PHP] Creating an Entire .html page with PHP

2010-01-26 Thread Michael A. Peters
Ashley Sheridan wrote: I think generally though, it's usual to have the pages created and output on the fly, rather than output the .html page. Yes, though often using a cache if it is dynamic content that doesn't change often. No reason to hit the db continuously if the content is the

Re: [PHP] Do you use a public framework or roll your own?

2010-01-26 Thread Michael A. Peters
Daevid Vincent wrote: I'm not looking to start a holy war here or re-hash the tired debate. I just want some hard cold numbers to look at. Do you use a public framework or roll your own? http://www.rapidpoll.net/8opnt1e And for those interested, here are the results of the last poll: To

[PHP] Reliable way to identify Ogg types?

2010-01-26 Thread Michael A. Peters
When I use fileinfo on an uploaded Ogg file, the mime it returns is Application/Ogg which is almost useless. Is there a reliable php way, preferably without needing to execute shell commands, to positively identify a file as Ogg Theora or Ogg Vorbis? Thanks for suggestions. -- PHP General

Re: [PHP] Reliable way to identify Ogg types?

2010-01-26 Thread Michael A. Peters
Eric Lee wrote: Hi Micheal, One of way for this should be by checking the header of the file with its OggS magic number. You may take a look at this page to see if it could help ! http://en.wikipedia.org/wiki/Ogg But I'am confused that the mime type should be enough what type of data its

[PHP] importNode issue

2010-01-25 Thread Michael A. Peters
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'); function syntaxHighlight($dom,$lang,$code) { $hl = Text_Highlighter::factory($lang); $out =

Re: [PHP] importNode issue

2010-01-25 Thread Michael A. Peters
Michael A. Peters wrote: The only (untried) solution I can think of is to replace each carriage return with a br / and every space with #160; and then replace the pre with a div class='monospace' or some such hackery before running loadXML() on it. But I would rather not do that. Even

Re: [PHP] importNode issue

2010-01-25 Thread Michael A. Peters
Jochem Maas wrote: highlight_string() function might be an easier route? If I only ever wanted to highlight php it might be. I found a workaround, though I don't like it. add $dom-formatOutput = false; to the function and it displays perfectly, though viewing the generated source isn't as

Re: [PHP] MySQL ID -- what happens when you run out of range?

2010-01-25 Thread Michael A. Peters
Shawn McKenzie wrote: Joseph Thayne wrote: That is incorrect. What will happen is as follows: 1. The value will be incremented by 1 causing the value to be greater than the maximum integer allowed. 2. MySQL will see this as a problem and truncate it to the closest value. 3. MySQL will then

Re: [PHP] SQL question

2010-01-25 Thread Michael A. Peters
Paul M Foster wrote: Typically, coders try to store dates in unix timestamps internally, and then add 86400 seconds for every day to calculate intervals and such. This is often inaccurate. Julian days are far more accurate.) Paul I use seconds from epoch in the database simply because it

Re: [PHP] SQL question

2010-01-25 Thread Michael A. Peters
Michael A. Peters wrote: If you need something where Julian day really is better, I assume it isn't that hard to convert between posix and julian day, though it seems odd to me that it isn't part of the date() function. It probably should be. Looks like unixtojd() and jdtounix() do

Re: [PHP] Cookies sessions

2010-01-24 Thread Michael A. Peters
clanc...@cybec.com.au wrote: On Sat, 23 Jan 2010 09:32:37 -0500, tedd.sperl...@gmail.com (tedd) wrote: At 1:13 PM +1100 1/23/10, clanc...@cybec.com.au wrote: but I would be grateful for any suggestions how I could make this procedure more secure. We have given you advice that you should NOT

Re: [PHP] Cookies sessions

2010-01-23 Thread Michael A. Peters
tedd wrote: At 1:13 PM +1100 1/23/10, clanc...@cybec.com.au wrote: but I would be grateful for any suggestions how I could make this procedure more secure. We have given you advice that you should NOT use Cookies in any fashion to secure your site, but you remain steadfast that you know

Re: [PHP] Foreign Characters Break in MySQL

2010-01-22 Thread Michael A. Peters
Ashley Sheridan wrote: You're also forgetting one of the most important elements of this. If you're displaying the characters on a web page, chances are that you need to add a corresponding meta tag to inform the browser that the content is utf-8 meta http-equiv=content-type

Re: [PHP] Cookies sessions

2010-01-22 Thread Michael A. Peters
clanc...@cybec.com.au wrote: My reasoning in using a cookie for user recognition, rather than relying on the session ID, was that with a cookie I could ensure that the connection effectively lasted for some specified period, whereas the session ID lifetime seems to be somewhat short and

Re: [PHP] Cookies sessions

2010-01-21 Thread Michael A. Peters
clanc...@cybec.com.au wrote: Yes; I'm doing that too. I am setting up a private website, and using cookies to control access to it. Clancy The only variable I store in a cookie is the session id. Everything else is stored in the session database. -- PHP General Mailing List

Re: [PHP] How do I remove unused GET parameters from the URL?

2010-01-20 Thread Michael A. Peters
Rene Veerman wrote: Michael, while i respect your choices, i think you should know that jquery.com is pretty good at minimizing browser-incompatibility headaches (and keeping js apps small), and the quircks that are left are easy enough to learn about. for things whereby - the server needs to

Re: [PHP] How do I remove unused GET parameters from the URL?

2010-01-19 Thread Michael A. Peters
Daevid Vincent wrote: *snip* The problem as I see it, is that this magic happens when the user hits Submit, so not sure PHP has any way to intercept at that point. Javascript might be able to do something on the onClick event or onSubmit I suspect. But this seems like something that someone

Re: [PHP] How do I remove unused GET parameters from the URL?

2010-01-19 Thread Michael A. Peters
Daevid Vincent wrote: I guess I could always redirect to some 'scrubber' page that strips them out and redirects on to the refering page again, but that seems klunky. BTW, I want to use GET so that the page can be bookmarked for future searches of the same data (or modified easily with

[PHP] 64 bit date in 32 bit php ??

2010-01-18 Thread Michael A. Peters
php 5.2.12 running in CentOS 5.x Unfortunately, both my server (xen linode) and my test server (crappy old dell I found in a field) are 32-bit. I need to work with some dates earlier than 1901 and I would really prefer to store them in *nix time in the database and use the date() function to

Re: [PHP] PHP 5.3 shared hosting

2010-01-15 Thread Michael A. Peters
Adam Richardson wrote: Hi, I've developed a framework that requires PHP 5.3 (it takes a more functional approach.) I'm hosting my own apps on a dedicated server running cpanel (thanks to their recent upgrade.) However, for client work I prefer not to personally host the websites. I've been

[PHP] php and XML BibTeX

2010-01-13 Thread Michael A. Peters
Hi - Currently on my web site, book and article references are just stored in the database. While it works, I actually would like to move that out of the database and to an XML file, the reason being is that if/when I need to add fields etc. to the referenced sources, it's a lot easier to

Re: [PHP] corect way to use mail() function

2010-01-12 Thread Michael A. Peters
Angus Mann wrote: There are only 11 types of people in this world. Those that think binary jokes are funny, those that don't, and those that don't know binary. ErUmmm.shouldn't that read ...only 10 types of people... ? 1 - those that think they are funny 10 - those that don't 11 -

Re: [PHP] corect way to use mail() function

2010-01-12 Thread Michael A. Peters
Bob McConnell wrote: I believe the correct way to do this is to use the Sender: header for ord...@computility.com to show where it actually came from. Then it doesn't matter what you put in From. Bob McConnell I believe that is correct. -- PHP General Mailing List (http://www.php.net/) To

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

2010-01-12 Thread Michael A. Peters
LinuxManMikeC wrote: On Fri, Jan 8, 2010 at 1:24 PM, Daevid Vincent dae...@daevid.com wrote: I'm having a debate with a co-worker about adding the final ? on a PHP page... So everybody, when do we get to the real discussion? Which end of an egg do we break? Depends upon how far away the

Re: [PHP] Upgraded PHP now website doesn't work properly?

2010-01-11 Thread Michael A. Peters
Ashley Sheridan wrote: I never bother with X-forwarding for development work, it is too slow I agree. My development box is a Dell Optiplex G50 I found discarded in an illegal trash pile. Hard drive was bad, I had a spare. Heat sink was dislodged, I had thermal paste. CDROM is not

Re: [PHP] Upgraded PHP now website doesn't work properly?

2010-01-11 Thread Michael A. Peters
Kaya Saman wrote: Thanks for that info I do admit that old computers do make the coolest machines especially home servers and when running something like FreeBSD they end up being awsome! However we were talking about SSH over continents not local LAN! With local LAN you get round

Re: [PHP] Clean PHP 5.2.12 Build Core Dumping

2010-01-10 Thread Michael A. Peters
Don O'Neil wrote: Core was generated by `php'. Program terminated with signal 11, Segmentation fault. #0 0x081d50a7 in sqlite3Select (pParse=0xbbc00080, p=0x0, eDest=164102200, iParm=0, pParent=0x24, parentTab=139141440, pParentAgg=0x84c10d8, aff=0x0) at

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

2010-01-10 Thread Michael A. Peters
Daevid Vincent wrote: What do you guys all do? I keep it there, and just make sure not to have white space where it should not be. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

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

2010-01-10 Thread Michael A. Peters
Stuart Dallas wrote: That's a massive assumption. There are a number of editors that automatically add a blank line to the end of source files. I stand by taking the option that requires the least conscious thought from your developers - they have enough important stuff to occupy their brain

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

2010-01-10 Thread Michael A. Peters
Stuart Dallas wrote: On 10 Jan 2010, at 14:44, Michael A. Peters wrote: Stuart Dallas wrote: That's a massive assumption. There are a number of editors that automatically add a blank line to the end of source files. I stand by taking the option that requires the least conscious thought from

Re: [PHP] Re: SimpleXML or DOMDocument help

2009-12-09 Thread Michael A. Peters
Shawn McKenzie wrote: Michael Alaimo wrote: Hello All, I have an XML document that has elements as such: Query:Expression Query:ResourceID Query:EqualTest/Query:Equal /Query:ResourceID /Query:Expression I cannot figure out how to access these

[PHP] How to properly serve a file via a wrapper.

2009-12-08 Thread Michael A. Peters
Please help. I thought I had this squared away, but apparently not. I need to be able to use a php wrapper to serve a file stored outside the web root. Works great for downloads / images - but my wrapper seems broken for media files to be played. My wrapper:

Re: [PHP] cookies and carts

2009-12-08 Thread Michael A. Peters
Allen McCabe wrote: 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 server I am

[PHP] curl spider and being a good citizen

2009-10-24 Thread Michael A. Peters
I'm writing a custom search engine for my site, it seemed easier than modifying sphyder (what I currently use) to do what I want especially since sphyder has a lot of stuff that isn't personally of use to me. One of the things I want to do when I index is list external links and check them.

[PHP] Download Wrapper

2009-10-07 Thread Michael A. Peters
I'm using flowplay (flash) for embedded audio/video. Initially I was using html5 w/ flowplay as fall back, but I stopped because flowplay is better than html5 on browsers that support html5. Anyway - I also am making direct links to the media available as mp4/ogm and mp3/ogg. The problem is

[PHP] Developer Question [DOMDocument]

2009-10-05 Thread Michael A. Peters
. Thanks for any suggestions on where/how to define that tag in the source. Michael A. Peters -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Developer Question [DOMDocument]

2009-10-05 Thread Michael A. Peters
Ashley Sheridan wrote: I've not had a look at DOMDocument myself, having only used DomDocument before (there's a slight difference in the capitalisation of the 2nd and 3rd letters which made it a pain in the proverbial to work with at first!) but I would assume that if it might offer a

Re: [PHP] Developer Question [DOMDocument]

2009-10-05 Thread Michael A. Peters
Michael A. Peters wrote: Ashley Sheridan wrote: I've not had a look at DOMDocument myself, having only used DomDocument before (there's a slight difference in the capitalisation of the 2nd and 3rd letters which made it a pain in the proverbial to work with at first!) but I would assume

Re: [PHP] Developer Question [DOMDocument]

2009-10-05 Thread Michael A. Peters
Ashley Sheridan wrote: I never tried to say that classes are case-sensitive, that was actually mentioned by Lupus who misunderstood what I was trying to say. What I was meaning is exactly what you just said here, that the PECL DomDocument is very different from the more typical DOMDocument. I

[PHP] class to generate Javascript Object ??

2009-10-04 Thread Michael A. Peters
I wrote a php class to generate flowplayer/html5 media code for my site: http://www.shastaherps.org/xml_MMmediaClass.phps The buildFlashvars() function in it is really ugly and will be a pain to update as I modify the class in the future. What it does is generate a JavaScript object string,

Re: [PHP] class to generate Javascript Object ??

2009-10-04 Thread Michael A. Peters
Tom Worster wrote: On 10/4/09 9:39 AM, Michael A. Peters mpet...@mac.com wrote: I wrote a php class to generate flowplayer/html5 media code for my site: http://www.shastaherps.org/xml_MMmediaClass.phps The buildFlashvars() function in it is really ugly and will be a pain to update as I

Re: [PHP] [SOLVED] class to generate Javascript Object ??

2009-10-04 Thread Michael A. Peters
Andrea Giammarchi wrote: I'm thinking (hoping) there is already a php class somewhere for generating JavaScript object strings that I can instead of my ugly easily breakable way of doing it. Anyone know of one? json_encode http://uk3.php.net/manual/en/function.json-encode.php

  1   2   3   4   5   >