[PHP] Re: "public static" or "static public"?

2011-01-29 Thread Colin Guthrie
is all ties in with my view, so I'm not really complaining :D Cheers for the insights. Col -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited [http://www.tribalogic.net/] Open Source: Mageia Contributor [http://www.mageia.org/] PulseAudio Hacker

[PHP] Re: Quotes in Heredoc

2011-02-28 Thread Colin Guthrie
mages/spacer.gif"> > Actually, in xhtml the tag would need a corresponding tag, or it can be self closing: e.g. (technically the space before the /> bit above is not needed, but used to be needed to stop older versions of IE from exploding... these probably are not worth worrying

[PHP] Re: $$var

2011-03-07 Thread Colin Guthrie
'Twas brillig, and sexyprout at 06/03/11 15:16 did gyre and gimble: > ∞ And beyond! -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited [http://www.tribalogic.net/] Open Source: Mageia Contributor [http://www.mageia.org/] PulseAudio Hack

[PHP] Opensuse 11.4 - PHP returned as text?

2011-03-28 Thread Colin Beckingham
I'm trying to debug an issue which I think is more to do with Apache than PHP, but perhaps someone else has experience with this. Using opensuse 11.4, custom compile of kernel 2.6.38, custom compile of Apache httpd 2.2.17, and PHP 3.3.6. phpinfo() page works correctly so my httpd.conf is config

RE: [PHP] Opensuse 11.4 - PHP returned as text?

2011-03-28 Thread Colin Beckingham
HallMarc Websites wrote: >> I'm trying to debug an issue which I think is more to do with Apache than >> PHP, but perhaps someone else has experience with this. Using opensuse >> 11.4, custom compile of kernel 2.6.38, custom compile of Apache httpd >> 2.2.17, and PHP 3.3.6. phpinfo() page works

[PHP] seach engines that don't suck

2005-02-26 Thread Colin Olkowski
d on. I guess what I'm looking for is something that I can feed blocks of text and it will strip out all code and build indexes. That way I can still search the fields I choose but have an index and not include code (like img or href tags). Or if there's something totally fly that I d

[PHP] Re: a new it company

2005-03-09 Thread Colin Olkowski
wow. o.k. on this subject i think that : a) the initial email in question was probably stepping over the line (soliciting for business) b) John C. Nichel is correct in that outsourcing me somewhere with a beach where they speak spanish would be good c) Rory is a bit fast on the gun. If you don't

[PHP] Regex

2005-03-20 Thread Colin Ross
d be optional. and any number. I usually tend to understand regexs, not sure why this one isn't working out... Colin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] How can I destroy parameters by page

2005-03-25 Thread Colin Ross
on a side note, for devs, i don't really like how you can override the values of the $_GET (or $_POST) array, seems like it could be a security threat. Also, with that ability, you can never tell (especially if you are making a mod, etc for a larger system) if what your dealling with is the ACTUAL

Re: [PHP] Pagination

2005-03-25 Thread Colin Ross
watch out for SQL injection attacks on that one though: what if the 'user' went to "page.php?start=1;SELECT * from `mysql`; On Thu, 24 Mar 2005 22:55:01 +0100, pavel <[EMAIL PROTECTED]> wrote: > > I am wanting to paginate records from a MySQL Database. > > I want there to be 5 records on a page,

Re: [PHP] How to sort that array?

2005-03-29 Thread Colin Ross
) hundreds of DB queries. If you want I can post an example... let me know. Colin On Tue, 29 Mar 2005 11:59:23 +0200, Merlin <[EMAIL PROTECTED]> wrote: > Hi there, > > I would like to save some db power by putting values into a file which are > often > used. They basicly po

Re: [PHP] Session data disappearing?

2005-03-29 Thread Colin Ross
try: TAKEN'; ?> and btw, the short conditional syntax is: (condition) ? true : false; // ie. (note the empty string... you gotta have SOMETHING there [right?i think so] echo ($taken) ? 'TAKEN' : '' ; Colin On Mon, 28 Mar 2005 20:27:00 -0800 (PST), Richard Lynch <[EMAIL

Re: [PHP] PHP CODE TO DISPLAY ISP

2005-03-29 Thread Colin Ross
and least we forgot about all the users coming from behind a proxy farm with a different ip for each request.. AOL C On Mon, 28 Mar 2005 12:28:32 -0700, Leif Gregory <[EMAIL PROTECTED]> wrote: > Hello jenny, > > Monday, March 28, 2005, 9:36:07 AM, you wrote: > j> i am making a website in php

Re: [PHP] php + mysql: binary arrays

2005-03-29 Thread Colin Ross
ys use two parameters for > compatibility with older versions. > > I know implode is binary-safe, not sure about preg_split() > > you COULD also use spliti() instead of preg_split() > http://us4.php.net/manual/en/function.spliti.php > > Colin > > On Tue, 29 Mar 2005

Re: [PHP] NEWBIE: Can't Get My Loop Going. . .

2005-03-29 Thread Colin Ross
i was thinkin in more general term too, what about: $data =& readfile($file); /// etc, etc, etc -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] PHP 5 Status

2005-04-01 Thread Colin Ross
Is PHP 5 ready for production environments? Is it concidered stable, or is it just a matter of going a while with no new bugs discovered to get to stable.. Colin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PHP 5 Status

2005-04-02 Thread Colin Ross
ok, thanks for your input. now to make a roll-out plan for upgrading... Colin On Apr 1, 2005 1:17 PM, Jordi Canals <[EMAIL PROTECTED]> wrote: > > On Apr 1, 2005 8:30 PM, Colin Ross <[EMAIL PROTECTED]> wrote: > > > Is PHP 5 ready for production environments? Is it c

Re: [PHP] PHP 5 Status

2005-04-02 Thread Colin Ross
Now, as far as I know though, there are still issues with Apache 2 and PHP-libraries, correct? On Apr 2, 2005 11:38 PM, Colin Ross <[EMAIL PROTECTED]> wrote: > > ok, thanks for your input. > now to make a roll-out plan for upgrading... > Colin > > > On Apr 1,

Re: [PHP] sessions not being stored

2005-04-07 Thread Colin Ross
ser under which runs Apache > 2.0.48 > > --- On Thu 04/07, Colin Ross < [EMAIL PROTECTED] > wrote: > From: Colin Ross [mailto: [EMAIL PROTECTED] > To: [EMAIL PROTECTED] > Date: Thu, 7 Apr 2005 13:19:49 -0700 > Subject: Re: [PHP] sessions not being stored > > do

Re: [PHP] Error suppression operator (@)

2005-05-04 Thread Colin Ross
the form is blank, otherwise the value is used as its defualt value... pretty neat! Colin On 5/4/05, Jochem Maas <[EMAIL PROTECTED]> wrote: > > Greg Donald wrote: > > On 5/3/05, GamblerZG <[EMAIL PROTECTED]> wrote: > > > >>I would like to know, whether using @

[PHP] Saving of buffers, from a security standpoint

2005-05-11 Thread Colin Ross
y? My concern is that if an error occurs in the processing, i don't want that buffer to remain (with possible valid Credit Card data) on the system... Colin p.s. As with other 'touchy' subjects like credit card processing, all valid input is appriciated.

Re: [PHP] Saving of buffers, from a security standpoint

2005-05-11 Thread Colin Ross
s kinda info in the same style that it saves session data (under /tmp) by default, one of the main reasons why session data should not be concidered all too secure Colin On 5/11/05, Richard Lynch <[EMAIL PROTECTED]> wrote: > > On Wed, May 11, 2005 10:02 am, Colin Ross said: &

Re: [PHP] Saving of buffers, from a security standpoint

2005-05-12 Thread Colin Ross
h, so maybe it's just me... > > PS Got no idea what ob_start() does to buffer your output... Wild Guess is > it just uses RAM, and if your HTML is too big to fit in RAM/swap, you are > screwed. > > On Wed, May 11, 2005 3:14 pm, Colin Ross said: > > at this point,

[PHP] Re: for loop inside a switch

2007-08-16 Thread Colin Guthrie
Stut wrote: > Hulf wrote: >> Hi, >> >> switch ($q) { >> >> for ($i=0; $i <21; $i++) { >> case 'faq$i': >> echo $faq1; >> break; >> } >> } >> >> >> I just want to loop out a big long list of cases. > > That's not a valid construct, but if I understand what you're trying do, > this should w

[PHP] Re: XML editors

2007-08-16 Thread Colin Guthrie
Frank Arensmeier wrote: > Although I am not able to give you any helping advice, I would like to > know if there are any PHP based XML "online" - editors out there (that > would allow me to edit XML files online so to say). One thing that poped > up in my mind was Tiny MCE. Sure, it could be possib

[PHP] Re: a DOM object in $_SESSION ?

2007-08-17 Thread Colin Guthrie
Per Jessen wrote: > Does anyone know if this works? I've been trying out a few things, and > it doesn't seem to work. I.e. the object is there, but the contents > aren't. I think it wont directly but it should be solvable by creating an class which extends DomDocument but also implements __sle

[PHP] Re: isset($a->b) even if $a->b = null

2007-08-17 Thread Colin Guthrie
Olav Mørkrid wrote: > how do i test if a property of a stdclass object is set, even if its > value is null, similar to how array_key_exists() works for arrays. > > the following method fails: > > $a->b = null; > if(isset($a->b)) > echo "yes"; > > and property_exists() seems only to work

[PHP] Re: Declare variables in advance question

2007-08-21 Thread Colin Guthrie
nitrox . wrote: > I want to declare these variables Game_id and Member_id in advance. Following > the suggestionfrom one of my books can I do something like this: > > $expected = array('Game_id', 'Member_id');foreach($expected AS $key) {if > ( !empty($_POST[$key])) { ${$key} = $_POST[$

[PHP] Re: LDAP

2007-08-21 Thread Colin Guthrie
Alain Roger wrote: > Hi, > > I have a stupid issue with ldap_connect. > > i've reinstalled PHP, postgreSQL and restore my data (web files) after > reinstalling my PC. > now, when i try : $ds = ldap_connect($ldaphost, $ldapport) or die("Could not > connect to $ldaphost"); > > nothing works. > i w

[PHP] Re: Announcement: Releasing CORE GRASP for PHP. An open source, dynamic web application protection system.

2007-08-22 Thread Colin Guthrie
Ezequiel Gutesman wrote: > CORE GRASP for PHP is a web-application protection software aimed at > detecting and blocking injection vulnerabilities and privacy violations. > As mentioned during its presentation at Black Hat USA 2007, GRASP is > being released as open source under the Apache 2.0 lice

[PHP] Re: Releasing CORE GRASP for PHP. An open source, dynamic web application protection system.

2007-08-23 Thread Colin Guthrie
Daevid Vincent wrote: > The few extra ms to execute some secure code is well worth it IMHO over > the chance of a XSS or script kiddie causing me hours of grief later. > > So in effect, we're on the same page I think. I think so :) Also it's worth noting that even for expert coders etc., one of

[PHP] Re: Recompiling PHP with mssql

2007-08-23 Thread Colin Guthrie
Dan Shirah wrote: > You shouldn't need to recompile PHP. > > Just go into your PHP.ini file and uncomment the line: > ;extension=php_mssql.dll > > After that you can go to the [MSSQL] section of the .ini file and change the > rest of the settings however you want them. IE. Allow persistent > conn

[PHP] Re: mail() takes too much time

2007-09-02 Thread Colin Guthrie
Stut wrote: > Unless your script is actually hanging for the 4-6 hours this problem > has nothing to do with PHP. > > How mail is delivered depends on the OS you are using, but usually it > will get passed to a local MTA which then handles delivering it, at > which point PHP involvement ends. > >

[PHP] Re: Generating foldout menus in php

2007-09-03 Thread Colin Guthrie
Zoltán Németh wrote: > hmm on Linux/Firefox I can not see any custom menu... there's a box > saying "Right click here to see menu" - I tried right click, left click, > double click there and nothing happens. (on right click the standard > firefox context menu appears) Works for me with FF2 on Linu

[PHP] Re: Generating foldout menus in php

2007-09-03 Thread Colin Guthrie
Richard Heyes wrote: > Colin Guthrie wrote: >> Zoltán Németh wrote: >>> hmm on Linux/Firefox I can not see any custom menu... there's a box >>> saying "Right click here to see menu" - I tried right click, left click, >>> double click ther

[PHP] Re: mail() takes too much time

2007-09-03 Thread Colin Guthrie
Matthew Lasar wrote: > I run pretty simple mail group distribution program that uses php/mysql > and the mail() function. I adapted it from an open source script. Most > of the time it runs well. But it does take a while to run through all > 150 members of the list. So I'm half glad that I don't ha

[PHP] Re: mail() takes too much time

2007-09-03 Thread Colin Guthrie
Stut wrote: > Matthew Lasar wrote: >> I run pretty simple mail group distribution program that uses >> php/mysql and the mail() function. I adapted it from an open source >> script. Most of the time it runs well. But it does take a while to run >> through all 150 members of the list. So I'm half gl

[PHP] Re: mandriva and gd problem

2007-09-11 Thread Colin Guthrie
marc serra wrote: > Hi all, > > I have php 5 and gd install on a mandriva and i'm working with it since > a long time. Now i want to use functions like imagepstext that require > gd with t1lib enable. > > I work with a mandriva server so i use urpmi to install php extensions > and other programs.

[PHP] Working with XML: DomDocument or SimpleXML?

2007-09-20 Thread Colin Guthrie
Hi, Just wondering what people's general opinion is on working with XML in PHP? I like working with SimpleXML but DomDocument seems more useful in some cases (e.g. working with XSLT transforms etc.). So what do you thing? Or do would you simply create a few utility classes to handle conversions?

[PHP] Re: Working with XML: DomDocument or SimpleXML?

2007-09-20 Thread Colin Guthrie
Robert Cummings wrote: > I still use PHP4 so I wrote my own XML handling class that wraps the > xml_xxx() series of functions. Haven't had a problem with it. Makes > working with XML very easy since it uses a path string syntax to > focus/access nodes and attributes: Cheers for that. I know I def

[PHP] Re: Working with XML: DomDocument or SimpleXML?

2007-09-21 Thread Colin Guthrie
Rob wrote: > Fairly unknown tidbit: you can pass SimpleXML objects to the XSL > extension. XSL will use the document from it. Nice to know... /me will have to experiment! >> if ($xml instanceof SimpleXMLElement) >> { >> $rv = new DOMDocument('1.0', 'utf-8'); >> $node = dom_imp

[PHP] Re: Working with XML: DomDocument or SimpleXML?

2007-09-21 Thread Colin Guthrie
Rob wrote: > It had to have been for some other reason as the return type for the > above example is a DOMDocument. A raw DOMNode is *NEVER* returned from > the DOM extension. It is simply a base class for most of the DOM > classes, such as DOMDocument. I think I just didn't do the ->ownerDocument

[PHP] Interesting Rails Vs. PHP article

2007-09-23 Thread Colin Guthrie
Thought ppl here may be interested in this: http://www.oreillynet.com/ruby/blog/2007/09/7_reasons_i_switched_back_to_p_1.html Originally linked from /.: http://developers.slashdot.org/article.pl?sid=07/09/23/1249235 Col -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: ht

[PHP] Re: Merging PDF Documents

2007-09-24 Thread Colin Guthrie
Tom Chubb wrote: > Unfortunately I can't use shell or install anything on my shared box. > Any other suggestions? I can't remember the syntax but I'm sure there is an easy way to get one PDF to reference another and distil it into one... I remember this from way back when (and using Adobe tools wh

[PHP] Re: Data request

2007-09-24 Thread Colin Guthrie
Stut wrote: > Have you tried Google? It knows a lot about most things and a little > about the rest. Failing that you could try asking Henry's cat. You must know Henry's cat? He knows everything about nothing and not to much about that. So if you know someone who know what he knows then you must k

[PHP] Re: Strategy for Secure File Storage

2007-09-24 Thread Colin Guthrie
Kevin Murphy wrote: > 1) Write secure files to MySQL as a blob (only secure files would be > written there) Personally I don't like this strategy but it is always a hot topic on this list. I don't mind storing a few small images in the db but when you start to store >200-300Megs it just complicate

[PHP] Re: article: 7 reasons I switched back to PHP after 2 years on Rails

2007-09-24 Thread Colin Guthrie
Robert Cummings wrote: > On Mon, 2007-09-24 at 12:52 -0500, XIMvad wrote: >> hohoho .. maaanya :D >> http://www.oreillynet.com/ruby/blog/2007/09/7_reasons_i_switched_back_to_p_1.html > > > DUPE!!! > > Posted yesterday! :) This is why everyone accuses us PHPites o

[PHP] Re: Data request

2007-09-25 Thread Colin Guthrie
)quoted originally! Oh to be a child again (and not just settle for having the mental age of one) :p Col > ----- Original Message - From: "Colin Guthrie" <[EMAIL PROTECTED]> > Newsgroups: php.general > To: > Sent: Monday, September 24, 2007 6:12 PM > Subject: Re: Da

[PHP] Re: Strategy for Secure File Storage

2007-09-25 Thread Colin Guthrie
Kevin Murphy wrote: > $ext = explode(".",$file); > > $extension = $mimetypes["$ext[1]"]; Other people have provided answers so I'll just make a quick comment on this bit. It's not ideal but if you only upload a subset of file types then I guess it's OK. Also if the file has more than a single "

[PHP] Re: PDOStatement execute memory issue?

2007-09-27 Thread Colin Guthrie
Carlton Whitehead wrote: > Is something causing the memory allocation > to loop until it reaches this maximum value? I don't think so as the 4GB value is mentioned in the error message. Usually when memory is exhausted in a loop it will say "(tried to allocate 100 bytes)" - e.g. a little amount.

[PHP] Re: languages and PHP

2007-09-27 Thread Colin Guthrie
Per Jessen wrote: > David Christopher Zentgraf wrote: > >> Your biggest problem will be if you accept any kind of user input >> which could be in any kind of language. >> Depending on your server configuration you'll probably have some >> serious cleaning and filtering to do. >> I often have to em

[PHP] Re: languages and PHP

2007-10-02 Thread Colin Guthrie
tedd wrote: > Isn't UTF-8 the big fish here? > > Sure there' UTF-16 and larger, but everything else is a subset of UTF-8, > is it not? > > So, what's the problem if you get a character defined by ISO -- it's > still within the UTF-8 super-group, right? Individual characters are sometimes OK, but

[PHP] Re: the opposite of a join?

2007-10-03 Thread Colin Guthrie
Martin Marques wrote: > SELECT * FROM company WHERE id NOT IN (SELECT companyID FROM contacts); Not ideal as has been mentioned else where in this thread. Col -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Super bizarre changing variable!!

2007-10-04 Thread Colin Guthrie
Brian Dunning wrote: > I'm running the following code: > > $query3 = "DELETE FROM table1 WHERE referer=$referer ORDER BY creation > LIMIT $numtodelete"; > $result3 = mysql_query($query3); > $string = "$total found, $n kept, $numtodelete extras removed ($query3)"; > $x = mysql_query("insert into ta

[PHP] Re: MySQL Identifying worst-performing codes

2007-10-04 Thread Colin Guthrie
Lasitha Alawatta wrote: > There is a tool call “idera” (SQL diagnostic manager). Basically it is > a performance monitoring and diagnostics tool. > > It has a feature; > > > > Identifying of worst-performing codes – > > Identifies performance bottlenecks such as the worst-performing stored

[PHP] Re: Super bizarre changing variable!!

2007-10-04 Thread Colin Guthrie
Brian Dunning wrote: > I'm running the following code: > > $query3 = "DELETE FROM table1 WHERE referer=$referer ORDER BY creation > LIMIT $numtodelete"; > $result3 = mysql_query($query3); > $string = "$total found, $n kept, $numtodelete extras removed ($query3)"; > $x = mysql_query("insert into ta

[PHP] Re: Super bizarre changing variable!!

2007-10-04 Thread Colin Guthrie
Richard Davey wrote: > What data type do the referer / friend_id columns have in MySQL? int? > tinyint? etc Ahh of course. That'll be it. The different tables will have different definitions of the friend_id field and one will be overflowing! Well spotted Richard wood for the trees for me tod

[PHP] Re: Super bizarre changing variable!!

2007-10-05 Thread Colin Guthrie
Brian Dunning wrote: > I definitely misunderstood what you guys are saying about the length. > That's clearly a problem for a lot of my values. > > I can switch them both to bigint. One table has 34,000,000 records and > it's OK if this is hung up for a few minutes but not much longer than > that

[PHP] Re: Generating PDF files (XSLT, ps, XSL-FO, FOP, etc)

2007-10-05 Thread Colin Guthrie
Larry Garfield wrote: > On Friday 05 October 2007, Per Jessen wrote: >> Yannick Warnier wrote: >>> but you can't generate a PDF using XML and XSLT, although XSLT is, to >>> my understanding, made to enable export in various formats from the >>> same XML file. >> XSLT is a style language, and you co

[PHP] Re: Something you can do with AJAX + PHP as well

2007-10-08 Thread Colin Guthrie
Jay Blanchard wrote: > [snip] > I saved it and it played in Winamp, but no audio > [/snip] > > So, is it worth going to all of the trouble to see? > In a word, "no". I watched it fine in Firefox on Linux with mplayer pluing. It just worked(tm) for me! But overall I have to say I was somewhat

[PHP] Re: Something you can do with AJAX + PHP as well

2007-10-09 Thread Colin Guthrie
tedd wrote: > Col: > > What do you think of this? > > http://webbytedd.com/b/timed-php/ > > It's a combination of using both ajax and php together. I'd say overkill for the end result (could be done in plain Javascript without any "Ajax" calls), but then that's not really the point of the page.

[PHP] Re: php gallery for pictures and videos

2007-10-17 Thread Colin Guthrie
zakaria ghandour wrote: > i must create gallery (pictures and videos) in php > The user must login to see only his personal files. > There is any tool doing this. Yes. Google: "php photo gallery" the very first link: http://gallery.menalto.com/ It's very good and has lots of features and as an

[PHP] Re: HELP!! how can arithmetic variables(string) ??

2007-10-18 Thread Colin Guthrie
LKSunny wrote: > $a="1+1"; //variables(string) > > //how can arithmetic variables(string) ?? > //N ROW > > //output > echo $a //i need output "2" not "1+1" > //Please Help, Thank You Very Much !! > ?> > You can do: eval("echo $a;"); But be warned, this has "Injection Attack"

[PHP] Re: Strange behaviour of static declared content.

2007-10-18 Thread Colin Guthrie
Joshua Bacher wrote: >> [EMAIL PROTECTED] ~/working/www/siuConference $ php testScript.php >> FUBeyondAllR >> already defined >> FUBeyondAllR >> >> -nathan > > thats the solution for the wrong problem. it's not up to me to change > the API. the API is designed like i noted and i need a way to get

[PHP] Re: I am looking for a color picker working also in Firefox

2007-10-18 Thread Colin Guthrie
Ronald Wiplinger wrote: > I found many nice color picker (True color), which are working fine in > IE, but I need one, which works also in Firefox. > Can you give me a recommendation, please? http://www.iosart.com/firefox/colorzilla/ I couldn't get it to work on my Linux FF tho', but I'm guessing

[PHP] Re: Strange behaviour of static declared content.

2007-10-18 Thread Colin Guthrie
Stut wrote: > Stut wrote: >> In that case you need a new foo. That's the only way you're going to >> reset the internal static if the API doesn't give you a way to do it. >> >> $f=new foo(); >> $f->bar(); >> $f->bar(); >> $g=new foo(); >> $g->bar(); > > Actually, scratch that, won't work. Not even

[PHP] Re: I am looking for a color picker working also in Firefox

2007-10-18 Thread Colin Guthrie
Daniel Brown wrote: > On 10/18/07, Colin Guthrie <[EMAIL PROTECTED]> wrote: >> Ronald Wiplinger wrote: >>> I found many nice color picker (True color), which are working fine in >>> IE, but I need one, which works also in Firefox. >>> Can you

[PHP] Re: PHP/MySQL CMS for Articles/Studies/Research Papers?

2007-10-19 Thread Colin Guthrie
Jason Paschal wrote: > just wanted to know if any of you have seen anything geared for this sort of > content, something professional-looking that doesn't come with a huge > learning curve. it wouldn't have to be TOO fancy, i could probably make > something, but didn't want to re-invent the round-

[PHP] Re: Strange behaviour of static declared content.

2007-10-19 Thread Colin Guthrie
Stut wrote: > Colin Guthrie wrote: >> Stut wrote: >>> Stut wrote: >>>> In that case you need a new foo. That's the only way you're going to >>>> reset the internal static if the API doesn't give you a way to do it. >>>> >>

[PHP] Re: Strange behaviour of static declared content.

2007-10-19 Thread Colin Guthrie
Stut wrote: > Colin Guthrie wrote: >> Stut wrote: >>> Colin Guthrie wrote: >>>> Stut wrote: >>>>> Stut wrote: >>>>>> In that case you need a new foo. That's the only way you're going to >>>>>> res

[PHP] Re: Different size of file on server and on output

2007-10-22 Thread Colin Guthrie
M. Sokolewicz wrote: > Pavel Janda wrote: >> Hello to everybody, >> >> I have this problem with downloading files via PHP. For illustration - >> I am using this fragment of code: >> >> > >> header("Content-type: $contenttype; name=\"$outputfilename\""); >> header("Content-disposition: form-

[PHP] Re: [PHP-INSTALL] MySQL connector installation/upgrade problems

2007-10-23 Thread Colin Guthrie
David Zentgraf wrote: > Hi, > > I'm trying to upgrade a server running CentOS 3 to an up-to-date MySQL 5 > installation + PHP4. I installed the MySQL 5 package, server and client, > via RPMs and they work fine, the client tells me it's version 5.0.45. I > went on to recompile PHP 4.4.7 --with-mysq

Re: [PHP] Re: [PHP-INSTALL] MySQL connector installation/upgrade problems

2007-10-23 Thread Colin Guthrie
David Christopher Zentgraf wrote: > On 23. Oct 2007, at 17:22, Colin Guthrie wrote: > >> Do rpm -qa --nosignature | grep -i mysql and see what old libraries you >> have lying around. Specifically look for the devel libraries/packages. >> Remove the 3.x versions via

Re: [PHP] Re: [PHP-INSTALL] MySQL connector installation/upgrade problems

2007-10-23 Thread Colin Guthrie
David Christopher Zentgraf wrote: > On 23. Oct 2007, at 20:33, Colin Guthrie wrote: > >> If you compile PHP and it finds v3 of mysql that means that you must >> have the old development libraries for mysql 3 installed in some >> capacity (I believe). >> >&g

Re: [PHP] Re: [PHP-INSTALL] MySQL connector installation/upgrade problems

2007-10-23 Thread Colin Guthrie
David Christopher Zentgraf wrote: > $ rpm -V MySQL-devel-community-5.0.45-0.rhel3 > missing d /usr/share/man/man1/comp_err.1.gz > missing d /usr/share/man/man1/mysql_config.1.gz > > I suppose this is, albeit not ideal, tolerable? Yeah this is fine. Your system is probably not setup to install d

[PHP] Re: MIME email = Content-ID in CSS not supported

2007-10-31 Thread Colin Guthrie
Colin Guthrie wrote: > I found this which is some good, general info for using CSS in mime > emails: > http://www.campaignmonitor.com/blog/archives/2006/03/a_guide_to_css_support_in_emai.html http://www.campaignmonitor.com/blog/archives/2007/04/a_guide_to_css_support_in_emai_2.html

[PHP] Re: MIME email = Content-ID in CSS not supported

2007-10-31 Thread Colin Guthrie
Martin Zvarík wrote: > Hello, > I am trying to send MIME type email with in message image attachments. > It works OK when doing > > > > ...but it does not work in this style="background:url(cid:specialcode)"> > > I am trying to have fading background, is there any way I can achieve > this wi

[PHP] Re: How do I specify a local file for fopen()?

2007-11-05 Thread Colin Guthrie
Jon Westcot wrote: > Hi all: > > I've been beating my head against a brick wall trying to figure this > out and I'm still no closer than I was two weeks ago. > > How do I specify a local file on my computer to use with fopen() on > the server? Keep on beating it until you get the concept of clie

[PHP] Re: How do I specify a local file for fopen()?

2007-11-05 Thread Colin Guthrie
[EMAIL PROTECTED] wrote: > I simply do this > > $file="/home/images/index.html"; > $output = fopen($file, "w"); I'd read the post again! The OP was asking how the *server* could open a file on the *client*. You've just describe how the *server* opens a file on the *server* (e.g. itself). Quite d

[PHP] Re: Performance of PHP

2007-11-06 Thread Colin Guthrie
Merlin wrote: > Hi there, > > I am doing some image cropping of about 40.000 files with php. > To do this I wrote a PHP file that does what I want and I did disable > the timeout so I can call it via webbrowser and fire the script. > > There are two down sides I see: > 1. One image takes about 0.

[PHP] Re: stftime differences on Windows/Linux platforms

2007-11-06 Thread Colin Guthrie
Neil Saunders wrote: > Hi Robin, > > Thanks for your reply. The times are exactly synchronized. I'm looking > at the date section in the output of phpinfo(), and get the following: > > Development: > Default timezone Europe/London > Production: > Default timezone UTC Could this be th

[PHP] Re: MySQL Identifying worst-performing codes

2007-11-08 Thread Colin Guthrie
Lasitha Alawatta wrote: > There is a tool call “idera” (SQL diagnostic manager). Basically it is > a performance monitoring and diagnostics tool. > > It has a feature; > Identifying of worst-performing codes – > > Identifies performance bottlenecks such as the worst-performing stored > procedur

[PHP] Re: PHP ide?

2007-11-09 Thread Colin Guthrie
Lester Caine wrote: > Robert Cummings wrote: >> Ubuntu = Debian + New Life > > Mandriva has Eclipse and PHPEclipse 'out of the box' along with Apache > and PHP > I can build a fully functional development machine from a pile of bits > in under an hour ;) > And currently that includes downloading t

[PHP] Re: Scrape? (Fetch email)

2007-11-12 Thread Colin Guthrie
Jake wrote: > $buffer = ''; > $fp = fopen("php://stdin", "r"); > if ($fp) > { > while(!feof($fp)) > { >$buffer .= fgets($fp, 4096); > } > fclose($fp); > } > That will get you the data (I think file_get_contents('php://stdin') will also work). Interpreting the mail is a little harder bu

[PHP] Re: file_exists

2007-11-15 Thread Colin Guthrie
Instruct ICC wrote: > > >> Date: Thu, 15 Nov 2007 00:20:52 + >> From: [EMAIL PROTECTED] >> To: [EMAIL PROTECTED] >> CC: php-general@lists.php.net >> Subject: Re: [PHP] file_exists >> >> Philip Thompson wrote: >>> I've run into similar problems where I *thought* I was looking in the >>> correc

[PHP] Re: file_exists

2007-11-15 Thread Colin Guthrie
Casey wrote: > I think file_exists returns false for remote files ;) Even if it did (it doesn't: http://uk3.php.net/manual/en/wrappers.ftp.php), I'd still rather not let someone steal my /etc/passwd or /etc/shadow etc. files. As I said before. Some form of regexp or similar restriction is 100

[PHP] Re: Bcompiler errors

2007-11-15 Thread Colin Guthrie
Mike Yrabedra wrote: > Hello, > > > I am getting these errors all the time now, on multiple scripts at random > times. > > Warning: bcompiler: Bad bytecode file format at in Unknown on line > 0 > > This tells me it has to be PHP in some fashion. > > Only thing I have found is this...

[PHP] Re: uploading files... necessary Ajax?

2007-11-21 Thread Colin Guthrie
T.Lensselink wrote: > On Wed, 21 Nov 2007 08:38:18 -0600, "Jay Blanchard" <[EMAIL PROTECTED]> > wrote: >> [snip] >> Seems to me Pere want's to do an upload without reloading the whole >> page. >> [/snip] >> >> The problem is that you cannot upload files using Ajax alone. But you >> can do it withou

[PHP] Re: image galleries

2007-11-22 Thread Colin Guthrie
Lisa A wrote: > Does anyone know of an image gallery I can use on multiple pages of a > website. I'd like to be able to click on the thumbnails and see a larger > image. > Hopefully something simple and easy to install. There is Gallery 2, http://gallery.menalto.com/ but that's a bit heavy weig

[PHP] Question about urlencode....

2007-11-22 Thread Colin Guthrie
Hi, OK this one is a little embarrasing. I've been doing this for years and I just wonder if I'm wrong Say you have an exit link on your site, e.g. /leave.php, which accepts a "url" get arg. You use this page to record stats/whatever and then issue a Location: header to take the user to the c

[PHP] Re: PHP file slow, same file in HTML faster

2007-11-27 Thread Colin Guthrie
Jose Toroscani Hernandez wrote: > All .php files are displayed in 10 seconds (aprox). > Example: test.php > hello world > > But, the same file with extension html (test.html), is displayed in 1 > second. > > > The system is: > - RHEL 5 > - PHP 5.1 > - Apache > > I apreciate your help. The

[PHP] Re: Convertig xml into array

2007-11-27 Thread Colin Guthrie
Edward Kay wrote: >> -Original Message- >> From: Dave Goodchild [mailto:[EMAIL PROTECTED] >> Sent: 27 November 2007 08:36 >> To: PHP General list >> Subject: [PHP] Convertig xml into array >> >> >> Hi guys. I have the following XML file which I want to convert into a >> multidimensional arr

[PHP] Re: Gallery Script

2007-11-27 Thread Colin Guthrie
Tom Chubb wrote: > Hi all, > I have a working gallery script which reads a directory then shows all > thumbnails, each linking to the full size image. > I'm trying to change it so that the page shows an image (fullsize) > then links to the previous/next images in the sequence & then all the > thumb

[PHP] Re: Newbie asks about multi-lingual website strategies

2007-11-27 Thread Colin Guthrie
Jeff Benetti wrote: > I'm a noob so keep the comments to a noob's level please. > > I am doing a website and my client wants the bulk of the text to be > bilingual (French and English). The last site I did used php and mysql so I > am getting comfortable with that technology. Typically I am usin

[PHP] Re: Newbie asks about multi-lingual website strategies

2007-11-27 Thread Colin Guthrie
Jochem Maas wrote: > tedd wrote: >> At 9:37 AM -0400 11/27/07, Jeff Benetti wrote: >>> Any any and all comments are welcome, it will be a learning curve no >>> matter >>> which route I take so a little advice on the best direction pros cons >>> would >>> be great. >>> >>> >>> Thanks, >>> Jeff >> Je

[PHP] Re: Newbie asks about multi-lingual website strategies

2007-11-27 Thread Colin Guthrie
tedd wrote: > At 11:05 PM +0100 11/27/07, Jochem Maas wrote: >> tedd wrote: >> >> > If it were me, I wouldn't use any problematic browser detects schemes >>> (they don't work) or any of that high-thought stuff -- it's beyond me. >> >> whether it's beyond you or not only you can judge, but I disag

[PHP] Re: Newbie asks about multi-lingual website strategies

2007-11-28 Thread Colin Guthrie
tedd wrote: > At 12:56 AM +0100 11/28/07, Jochem Maas wrote: >> Colin Guthrie wrote: >>> tedd wrote: >> >> ... >> >> > >> > Sorry Tedd, but I'm not sure where the browser sniffing stuff came in. >>> IE and FF both offer a U

[PHP] Re: Newbie asks about multi-lingual website strategies

2007-11-28 Thread Colin Guthrie
Jeff Benetti wrote: > Am I correct that if two people are logged on using two different languages > that the session var will keep track of the different users (by IP I assume) > and the server won’t mess up? Sessions are per-user and are not global (you'd need to use something like memcache or si

[PHP] Re: Question about urlencode....

2007-11-30 Thread Colin Guthrie
TG wrote: > Unless your URL is more complicated than your example, you shouldn't need to > use urlencode() at all. You'd need to use it in a case where your string > may contain characters that aren't valid in URLs like spaces and such: > > $baseurl = "http://www.somesearchsite.com/search=";;

[PHP] Re: how to handle inserting special characters into a mysql field

2007-12-14 Thread Colin Guthrie
Jay Blanchard wrote: > [snip] > I'm going to be inserting data from a PHP form into a mysql field. The > data could contain special characters like < > ' " \ /, etc. How do I > handle that? just $data = addslashes(htmlspecialchars($data)); before > the insert query? because later on the data

<    1   2   3   4   5   6   7   >