Re: [PHP] Is it possible to install PHP on IIS?
On 16 November 2010 06:46, Himani Aggarwal wrote: > Hi Folks, is it possible to install PHP on IIS? If yes, can someone please > guide me on how to go about doing it? Thanks > PHP on IIS. Certainly. http://docs.php.net/manual/en/install.windows.iis7.php : IIS7 specific instructions. http://docs.php.net/manual/en/install.windows.manual.php : General instructions for installing PHP manually. http://docs.php.net/manual/en/install.windows.commandline.php : Additional instructions for better integration of PHP into the commandline. -- Richard Quadling Twitter : EE : Zend @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] DOMDocument/DOMElement problem
I'm currently trying to parse a document with DOMDocument, and I'm having some serious problems. I created a script that runs fine on php 5.2.9, ripping out content using DOMNode::nodeValue. The same script fails to get any content on php 5.3.3 - even though it correctly navigates to the proper nodes to extract content. Basically, the code used looks like this: $dom = new DOMDocument(); $dom->loadHTML($data); $dom->preserveWhiteSpace = false; $xpath = new DOMXpath($dom); $nodelist = $xpath->query($query); $value = $nodelist->item(0)->nodeValue; I've checked to make sure that item(0) is in fact a node - it's there and even of the right type (a td - table cell), but nodeValue is empty. The script works on some documents but not others (on 5.3.3 - some checking suggests a doctype of xhtml might be involved in the problem but I tried ripping the doctype out and had no difference) - on 5.2.9 it works on all documents, returning the proper nodeValue. Am I missing something basic? TIA Peter -- WWW: plphp.dk / plind.dk LinkedIn: plind BeWelcome/Couchsurfing: Fake51 Twitter: kafe15 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Is it possible to install PHP on IIS?
On 2010-11-16, at 6:55 AM, Richard Quadling wrote: > On 16 November 2010 06:46, Himani Aggarwal wrote: >> Hi Folks, is it possible to install PHP on IIS? If yes, can someone please >> guide me on how to go about doing it? Thanks >> > > PHP on IIS. Certainly. > > http://docs.php.net/manual/en/install.windows.iis7.php : IIS7 specific > instructions. > http://docs.php.net/manual/en/install.windows.manual.php : General > instructions for installing PHP manually. > http://docs.php.net/manual/en/install.windows.commandline.php : > Additional instructions for better integration of PHP into the > commandline. > > > > > -- > Richard Quadling > Twitter : EE : Zend > @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php The windows web platform installer is also an option and will install php/Mysql and other apps like moodle, sugarcrm and others. Bastien > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Is it possible to install PHP on IIS?
[snip] >> Hi Folks, is it possible to install PHP on IIS? If yes, can someone please guide me on how to go about doing it? Thanks [/snip] http://www.wampserver.com/en/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Is it possible to install PHP on IIS?
On 16 November 2010 13:21, Jay Blanchard wrote: > [snip] >>> Hi Folks, is it possible to install PHP on IIS? If yes, can someone > please guide me on how to go about doing it? Thanks > [/snip] > > http://www.wampserver.com/en/ > Jay, if that had been wimpserver ... -- Richard Quadling Twitter : EE : Zend @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Is it possible to install PHP on IIS?
[snip] http://www.wampserver.com/en/ [/snip] And yes, I know that this is Apache - I am just not a fan of IIS. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mysql help (sorry, a bit OT)
It's always best practice to have a staging server for testing these sorts of things. If in doubt, run it in a transaction, but don't commit it, I.e. roll it back. That way you'll see if it would run but nothing actually changes. Thanks, Ash http://www.ashleysheridan.co.uk - Reply message - From: "Gary" Date: Tue, Nov 16, 2010 13:35 Subject: [PHP] mysql help (sorry, a bit OT) To: Is there a way to check the syntax of a query, short of running it? I've got an insert to do (but of course it's a valid question for any query that changes the db contents) and would like to know that the sql I am generating (in php - see! not so off-topic!) is correct. What I don't want to do is run it for testing (live system *sigh*) and find out it is correct (it will change the db), but... I have to test it to check that the syntax (at least) *is* correct. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Is it possible to install PHP on IIS?
On Tue, 16 Nov 2010 12:16:25 +0530 Himani Aggarwal wrote: > Hi Folks, is it possible to install PHP on IIS? If yes, can someone > please guide me on how to go about doing it? Thanks Now, why would you wanna do something crazy like that?! :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Is it possible to install PHP on IIS?
Richard Quadling wrote: On 16 November 2010 13:21, Jay Blanchard wrote: [snip] Hi Folks, is it possible to install PHP on IIS? If yes, can someone please guide me on how to go about doing it? Thanks [/snip] http://www.wampserver.com/en/ Jay, if that had been wimpserver ... I think it's a good point. Windows + IIS + MySQL + PHP == WINP(y) server :-P KDK -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Why the PEAR hate?
http://www.reddit.com/r/PHP/comments/e6zs1/how_many_of_you_use_pear_in_your_projects/ I'm still pretty new to PHP. Why the hate for PEAR? I've used a couple of PEAR modules without any issues. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Why the PEAR hate?
On Tue, Nov 16, 2010 at 11:54, Hansen, Mike wrote: > > http://www.reddit.com/r/PHP/comments/e6zs1/how_many_of_you_use_pear_in_your_projects/ > > I'm still pretty new to PHP. Why the hate for PEAR? I've used a couple of > PEAR modules without any issues. Some of the PEAR stuff is older and unmaintained, which is one possible reason. More likely is that folks often expect PEAR to be the end-all, be-all, and that was never the intent. PEAR is supposed to jump-start a project and extend some built-in functionality, not provide a framework or do all of the work for folks who consider themselves "programmers" because they can iterate an array in just twenty-seven lines of procedural code. As for folks who say that PEAR and PECL don't work --- the most common reason for this is user error or system configuration issues. I've experienced the same issues myself over the years quite frustrating, but sure enough, it was my fault most times. -- Network Infrastructure Manager Documentation, Webmaster Teams http://www.php.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Why the PEAR hate?
On Tue, 16 Nov 2010 09:54:30 -0700 "Hansen, Mike" wrote: > http://www.reddit.com/r/PHP/comments/e6zs1/how_many_of_you_use_pear_in_your_projects/ > > I'm still pretty new to PHP. Why the hate for PEAR? I've used a > couple of PEAR modules without any issues. The few times I have looked at PEAR most of the modules that could possible present a solution to my problem was very poorly documented and in some cases the code quality was bad. I have also noticed bugs that goes unfixed for quite some time. I have always preferred to implement a homemade solution because of the above. --- Mange venlige hilsner/Best regards Kim N. Lesmer Programmer/Unix systemadministrator Web: www.bitflop.com E-mail : k...@bitflop.com > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
FW: [PHP] Why the PEAR hate?
> -Original Message- > From: Hansen, Mike > Sent: Tuesday, November 16, 2010 10:24 AM > To: 'Daniel Brown' > Subject: RE: [PHP] Why the PEAR hate? > > > -Original Message- > > From: paras...@gmail.com [mailto:paras...@gmail.com] On > > Behalf Of Daniel Brown > > > > Some of the PEAR stuff is older and unmaintained, which is one > > possible reason. More likely is that folks often expect PEAR to be > > the end-all, be-all, and that was never the intent. PEAR > is supposed > > to jump-start a project and extend some built-in functionality, not > > provide a framework or do all of the work for folks who consider > > themselves "programmers" because they can iterate an array in just > > twenty-seven lines of procedural code. > > > > As for folks who say that PEAR and PECL don't work --- the most > > common reason for this is user error or system configuration issues. > > I've experienced the same issues myself over the years quite > > frustrating, but sure enough, it was my fault most times. > > > Oops...I just replied to Daniel. Is PEAR supposed to be the CPAN for PHP, or is there another repository of PHP modules that is used by the typical PHP developer? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: FW: [PHP] Why the PEAR hate?
On 16 November 2010 17:25, Hansen, Mike wrote: >> -Original Message- >> From: Hansen, Mike >> Sent: Tuesday, November 16, 2010 10:24 AM >> To: 'Daniel Brown' >> Subject: RE: [PHP] Why the PEAR hate? >> >> > -Original Message- >> > From: paras...@gmail.com [mailto:paras...@gmail.com] On >> > Behalf Of Daniel Brown >> > >> > Some of the PEAR stuff is older and unmaintained, which is one >> > possible reason. More likely is that folks often expect PEAR to be >> > the end-all, be-all, and that was never the intent. PEAR >> is supposed >> > to jump-start a project and extend some built-in functionality, not >> > provide a framework or do all of the work for folks who consider >> > themselves "programmers" because they can iterate an array in just >> > twenty-seven lines of procedural code. >> > >> > As for folks who say that PEAR and PECL don't work --- the most >> > common reason for this is user error or system configuration issues. >> > I've experienced the same issues myself over the years quite >> > frustrating, but sure enough, it was my fault most times. >> > >> > Oops...I just replied to Daniel. > > Is PEAR supposed to be the CPAN for PHP, or is there another repository of > PHP modules that is used by the typical PHP developer? It depends what you want to use. I use PEAR's Console_CommandLine_Parser and Zend Framework's autoloader, config and SOAP/WSDL classes. "Mix'n'match" is the name of the game. -- Richard Quadling Twitter : EE : Zend @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: FW: [PHP] Why the PEAR hate?
On Tue, Nov 16, 2010 at 12:25, Hansen, Mike wrote: > > Is PEAR supposed to be the CPAN for PHP, or is there another repository of > PHP modules that is used by the typical PHP developer? PEAR is to PHP what CPAN is to Perl, yes but there's really no such thing as PHP modules that are "used by the typical PHP developer" --- specifically because there's no typical developer with PHP. There's a huge variety of RADs/IDEs that work great with PHP, as well as frameworks, extensions, libraries, et cetera. For that reason, the PHP developer is a unique entity; there may be similarities, but that's as far as it goes, really. That said, your best bet is to try PEAR for yourself and see what you think, but always keep fresh with changes and such, including reviewing other libraries. As I said, a lot of PEAR code is older and unmaintained. Some isn't even compatible with PHP5. Your best judgment and experience is the true measure of success, not any specific repositories or collections. -- Network Infrastructure Manager Documentation, Webmaster Teams http://www.php.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: FW: [PHP] Why the PEAR hate?
On Tue, 2010-11-16 at 10:25 -0700, Hansen, Mike wrote: > > -Original Message- > > From: Hansen, Mike > > Sent: Tuesday, November 16, 2010 10:24 AM > > To: 'Daniel Brown' > > Subject: RE: [PHP] Why the PEAR hate? > > > > > -Original Message- > > > From: paras...@gmail.com [mailto:paras...@gmail.com] On > > > Behalf Of Daniel Brown > > > > > > Some of the PEAR stuff is older and unmaintained, which is one > > > possible reason. More likely is that folks often expect PEAR to be > > > the end-all, be-all, and that was never the intent. PEAR > > is supposed > > > to jump-start a project and extend some built-in functionality, not > > > provide a framework or do all of the work for folks who consider > > > themselves "programmers" because they can iterate an array in just > > > twenty-seven lines of procedural code. > > > > > > As for folks who say that PEAR and PECL don't work --- the most > > > common reason for this is user error or system configuration issues. > > > I've experienced the same issues myself over the years quite > > > frustrating, but sure enough, it was my fault most times. > > > > > > Oops...I just replied to Daniel. > > Is PEAR supposed to be the CPAN for PHP, or is there another repository of > PHP modules that is used by the typical PHP developer? > > the only pear module i use, is MDB2... and i would actually change from it, if i could find something comparable... i suppose i could write my own, but it works, and have been using it for a few years now. any suggestions to a replacement? Steve -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] APC 3.1.5 never hitting cache - PHP-5.3.3 with APC-3.1.5-beta with Apache under Fedora Core 13
Is this the correct place to ask questions about the APC extension? I'm evaluating APC. After installation, in my test cases it does not seem to be doing anything. The apc.php reports 1 hit, 1 miss regardless of how many times I hit pages on my site. I have also attempting to explicitly call apc_compile_file() which seems to work in that the apc.php reports that those files are in the cache. However, after requesting those pages I see no indication in apc.php that APC even noticed the request was handled. Default Apache 2.2.15 install under Fedora Core 13 using default PHP 5.3.3. I just installed APC 3.1.5 using "pecl install apc-beta" followed by a restart of the apache daemon. php.ini: extension=apc.so apc.enabled=1 apc.max_file_size=10M apc.report_autofilter=1 apc.include_once_override=1 I do have xdebug installed but it is commented out/disabled in php.ini. My simple test case is: include file: apc_test_include.php $msg"); } ?> requested file: apc_test.php This is a test" ); include_once( "./apc_test_include.php" ); included_function( "test123" ); ?> Load apc_test.php a few times. In the Per Directory Entries in apc.php, I see the directory these files are in listed and correctly lists two files but I expect to see the Total Hits column for the directory these files are in to increase when I load the apc_test.php page but it does not. What am I missing? --- Yermo LamersDTLink, LLC Software Developer & Entrepreneur http://www.dtlink.com http://collabinvest.net - Social Networking for Investors http://formvista.com - Entrepreneurs CMS and Business Platform --- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] DOMDocument/DOMElement problem
Hmmm... Nothing really stands out to me, but as my wife would attest, I'm often less than observant. I would probably try sifting through fixes/upgrades in the change logs for possible conflicts and/or changes in behavior. Nothing jumped out at me after a quick glance. Sorry, Adam On Tue, Nov 16, 2010 at 7:01 AM, Peter Lind wrote: > I'm currently trying to parse a document with DOMDocument, and I'm > having some serious problems. I created a script that runs fine on php > 5.2.9, ripping out content using DOMNode::nodeValue. The same script > fails to get any content on php 5.3.3 - even though it correctly > navigates to the proper nodes to extract content. > > Basically, the code used looks like this: > > $dom = new DOMDocument(); > $dom->loadHTML($data); > $dom->preserveWhiteSpace = false; > $xpath = new DOMXpath($dom); > $nodelist = $xpath->query($query); > $value = $nodelist->item(0)->nodeValue; > > I've checked to make sure that item(0) is in fact a node - it's there > and even of the right type (a td - table cell), but nodeValue is > empty. > > The script works on some documents but not others (on 5.3.3 - some > checking suggests a doctype of xhtml might be involved in the problem > but I tried ripping the doctype out and had no difference) - on 5.2.9 > it works on all documents, returning the proper nodeValue. > > Am I missing something basic? > > TIA > Peter > > -- > > WWW: plphp.dk / plind.dk > LinkedIn: plind > BeWelcome/Couchsurfing: Fake51 > Twitter: kafe15 > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Nephtali: PHP web framework that functions beautifully http://nephtaliproject.com
Re: [PHP] protecting email addresses on a web site
I tried this: sss>a/"; ?> and css: .safety { direction:rtl; unicode-bidi: bidi-override; } for the address jocplus@gmail.com but I haven't managed it to display properly Could someone please direct me, I believe if I put the mailto:jocplus@gmail.com";>vicaversa... it does not really protect the email address, because in mailto: it has to be as defined jocplus@gmail.com Thanks, -- When the sun rises I receive and when it sets I forgive -> http://moj.skavt.net/gleskovs/ Always in Heart, Grega Leskovšek 2010/6/15 Ashley Sheridan : > On Tue, 2010-06-15 at 13:02 -0400, HallMarc Websites wrote: > >> >> -Original Message- >> From: Ashley Sheridan [mailto:a...@ashleysheridan.co.uk] >> Sent: Monday, June 14, 2010 10:52 AM >> To: Dotan Cohen >> Cc: HallMarc Websites; David Mehler; php-general >> Subject: Re: [PHP] protecting email addresses on a web site >> >> On Mon, 2010-06-14 at 17:50 +0300, Dotan Cohen wrote: >> >> > On 14 June 2010 15:36, HallMarc Websites >> wrote: >> > > Another is a CSS solution where you type the email address backwards and >> > > then use the CSS style declaration: >> > > style="direction: rtl; unicode-bidi: bidi-override;" >> > > >> > >> > How does that work with screen readers? How about copy-paste? >> > >> >> >> I don't think there's an accessible way of doing this. Anything that >> allows a screen reader to speak the email address would also be >> susceptible to spammers email scrapers. >> >> Thanks, >> Ash >> http://www.ashleysheridan.co.uk >> >> >> >> Copy-n-paste just gives you the email address backwards; screen readers, >> because we are using logical ordering and it is stored in memory the way we >> expect to read it, will read it correctly. >> >> I was not aware that email harvesters used screen readers. Do you have some >> documentation I could read to get up to speed on this? >> >> Marc Hall >> HallMarc Websites >> So many spammers, so few bullets... >> >> >> __ Information from ESET Smart Security, version of virus signature >> database 5199 (20100615) __ >> >> The message was checked by ESET Smart Security. >> >> http://www.eset.com >> >> > > > I didn't say the harvesters used screen readers. I'm saying that if > something is in plain text that a screen reader can understand, what's > to stop an email address harvester? It's not worth their time to analyse > every image (think about where Google is with image searching right now, > and they have a lot more resources at their disposal) but it is easy > enough to read text in a web page. At a push, it's possible to believe > that some might be using rendered CSS to see how an email is rendered. > > Thing is, it's nigh on impossible to hide an email address. Use it once > on a mailing list like this and it's there for the whole world to see on > archive listings. I even though that my email wouldn't be found in > a .pdf CV I'd made, but thanks to Google it is now! > > Basically, it might not be worth the effort to hide email addresses, and > instead see about setting up spam filtering at the server level. You > don't have to download and filter it your end, and it saves on > bandwidth. > > Thanks, > Ash > http://www.ashleysheridan.co.uk > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] protecting email addresses on a web site
On Tue, Nov 16, 2010 at 3:36 PM, Grega Leskovšek wrote: > I tried this: > class=\"safety\">sss>a/ a>"; > ?> > and css: > .safety { direction:rtl; unicode-bidi: bidi-override; } > for the address jocplus@gmail.com > but I haven't managed it to display properly > Could someone please direct me, I believe if I put the > mailto:jocplus@gmail.com";>vicaversa... > it does not really protect the email address, because in mailto: it > has to be as defined jocplus@gmail.com > Thanks, > -- When the sun rises I receive and when it sets I forgive -> > http://moj.skavt.net/gleskovs/ > Always in Heart, Grega Leskovšek > > > > > 2010/6/15 Ashley Sheridan : >> On Tue, 2010-06-15 at 13:02 -0400, HallMarc Websites wrote: >> >>> >>> -Original Message- >>> From: Ashley Sheridan [mailto:a...@ashleysheridan.co.uk] >>> Sent: Monday, June 14, 2010 10:52 AM >>> To: Dotan Cohen >>> Cc: HallMarc Websites; David Mehler; php-general >>> Subject: Re: [PHP] protecting email addresses on a web site >>> >>> On Mon, 2010-06-14 at 17:50 +0300, Dotan Cohen wrote: >>> >>> > On 14 June 2010 15:36, HallMarc Websites >>> wrote: >>> > > Another is a CSS solution where you type the email address backwards and >>> > > then use the CSS style declaration: >>> > > style="direction: rtl; unicode-bidi: bidi-override;" >>> > > >>> > >>> > How does that work with screen readers? How about copy-paste? >>> > >>> >>> >>> I don't think there's an accessible way of doing this. Anything that >>> allows a screen reader to speak the email address would also be >>> susceptible to spammers email scrapers. >>> >>> Thanks, >>> Ash >>> http://www.ashleysheridan.co.uk >>> >>> >>> >>> Copy-n-paste just gives you the email address backwards; screen readers, >>> because we are using logical ordering and it is stored in memory the way we >>> expect to read it, will read it correctly. >>> >>> I was not aware that email harvesters used screen readers. Do you have some >>> documentation I could read to get up to speed on this? >>> >>> Marc Hall >>> HallMarc Websites >>> So many spammers, so few bullets... >>> >>> >>> __ Information from ESET Smart Security, version of virus signature >>> database 5199 (20100615) __ >>> >>> The message was checked by ESET Smart Security. >>> >>> http://www.eset.com >>> >>> >> >> >> I didn't say the harvesters used screen readers. I'm saying that if >> something is in plain text that a screen reader can understand, what's >> to stop an email address harvester? It's not worth their time to analyse >> every image (think about where Google is with image searching right now, >> and they have a lot more resources at their disposal) but it is easy >> enough to read text in a web page. At a push, it's possible to believe >> that some might be using rendered CSS to see how an email is rendered. >> >> Thing is, it's nigh on impossible to hide an email address. Use it once >> on a mailing list like this and it's there for the whole world to see on >> archive listings. I even though that my email wouldn't be found in >> a .pdf CV I'd made, but thanks to Google it is now! >> >> Basically, it might not be worth the effort to hide email addresses, and >> instead see about setting up spam filtering at the server level. You >> don't have to download and filter it your end, and it saves on >> bandwidth. >> >> Thanks, >> Ash >> http://www.ashleysheridan.co.uk >> >> >> > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > Why not just make a simple contact form and never show the address? -- Bastien Cat, the other other white meat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] protecting email addresses on a web site
On Nov 16, 2010, at 4:02 PM, Bastien Koert wrote: > On Tue, Nov 16, 2010 at 3:36 PM, Grega Leskovšek wrote: >> I tried this: >> > class=\"safety\">sss>a/> a>"; >> ?> >> and css: >> .safety { direction:rtl; unicode-bidi: bidi-override; } >> for the address jocplus@gmail.com >> but I haven't managed it to display properly >> Could someone please direct me, I believe if I put the >> mailto:jocplus@gmail.com";>vicaversa... >> it does not really protect the email address, because in mailto: it >> has to be as defined jocplus@gmail.com >> Thanks, >> -- When the sun rises I receive and when it sets I forgive -> >> http://moj.skavt.net/gleskovs/ >> Always in Heart, Grega Leskovšek >> >> >> >> >> 2010/6/15 Ashley Sheridan : >>> On Tue, 2010-06-15 at 13:02 -0400, HallMarc Websites wrote: >>> -Original Message- From: Ashley Sheridan [mailto:a...@ashleysheridan.co.uk] Sent: Monday, June 14, 2010 10:52 AM To: Dotan Cohen Cc: HallMarc Websites; David Mehler; php-general Subject: Re: [PHP] protecting email addresses on a web site On Mon, 2010-06-14 at 17:50 +0300, Dotan Cohen wrote: > On 14 June 2010 15:36, HallMarc Websites wrote: >> Another is a CSS solution where you type the email address backwards and >> then use the CSS style declaration: >> style="direction: rtl; unicode-bidi: bidi-override;" >> > > How does that work with screen readers? How about copy-paste? > I don't think there's an accessible way of doing this. Anything that allows a screen reader to speak the email address would also be susceptible to spammers email scrapers. Thanks, Ash http://www.ashleysheridan.co.uk Copy-n-paste just gives you the email address backwards; screen readers, because we are using logical ordering and it is stored in memory the way we expect to read it, will read it correctly. I was not aware that email harvesters used screen readers. Do you have some documentation I could read to get up to speed on this? Marc Hall HallMarc Websites So many spammers, so few bullets... __ Information from ESET Smart Security, version of virus signature database 5199 (20100615) __ The message was checked by ESET Smart Security. http://www.eset.com >>> >>> >>> I didn't say the harvesters used screen readers. I'm saying that if >>> something is in plain text that a screen reader can understand, what's >>> to stop an email address harvester? It's not worth their time to analyse >>> every image (think about where Google is with image searching right now, >>> and they have a lot more resources at their disposal) but it is easy >>> enough to read text in a web page. At a push, it's possible to believe >>> that some might be using rendered CSS to see how an email is rendered. >>> >>> Thing is, it's nigh on impossible to hide an email address. Use it once >>> on a mailing list like this and it's there for the whole world to see on >>> archive listings. I even though that my email wouldn't be found in >>> a .pdf CV I'd made, but thanks to Google it is now! >>> >>> Basically, it might not be worth the effort to hide email addresses, and >>> instead see about setting up spam filtering at the server level. You >>> don't have to download and filter it your end, and it saves on >>> bandwidth. >>> >>> Thanks, >>> Ash >>> http://www.ashleysheridan.co.uk >>> >>> >>> >> >> -- >> PHP General Mailing List (http://www.php.net/) >> To unsubscribe, visit: http://www.php.net/unsub.php >> >> > > Why not just make a simple contact form and never show the address? > A simple javascript can obfuscate the mailto: url and display text say of the form your.name at yourdomain.com Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] protecting email addresses on a web site
Sorry for top post on phone. Depending on the type of site and location an email address might be legally required. For example, a business website in the UK requires a value email address to be made accessible to all your visitors, which includes blind people, so no image-only addresses. Spam is just a fact of life now, and the only real method of protection is a decent spam filter. Thanks, Ash http://www.ashleysheridan.co.uk - Reply message - From: "Bastien Koert" Date: Tue, Nov 16, 2010 21:02 Subject: [PHP] protecting email addresses on a web site To: "Grega Leskovšek" Cc: , "HallMarc Websites" , "Dotan Cohen" , "David Mehler" , "php-general" On Tue, Nov 16, 2010 at 3:36 PM, Grega Leskovšek wrote: > I tried this: > class=\"safety\">sss>a/ a>"; > ?> > and css: > .safety { direction:rtl; unicode-bidi: bidi-override; } > for the address jocplus@gmail.com > but I haven't managed it to display properly > Could someone please direct me, I believe if I put the > mailto:jocplus@gmail.com";>vicaversa... > it does not really protect the email address, because in mailto: it > has to be as defined jocplus@gmail.com > Thanks, > -- When the sun rises I receive and when it sets I forgive -> > http://moj.skavt.net/gleskovs/ > Always in Heart, Grega Leskovšek > > > > > 2010/6/15 Ashley Sheridan : >> On Tue, 2010-06-15 at 13:02 -0400, HallMarc Websites wrote: >> >>> >>> -Original Message- >>> From: Ashley Sheridan [mailto:a...@ashleysheridan.co.uk] >>> Sent: Monday, June 14, 2010 10:52 AM >>> To: Dotan Cohen >>> Cc: HallMarc Websites; David Mehler; php-general >>> Subject: Re: [PHP] protecting email addresses on a web site >>> >>> On Mon, 2010-06-14 at 17:50 +0300, Dotan Cohen wrote: >>> >>> > On 14 June 2010 15:36, HallMarc Websites >>> wrote: >>> > > Another is a CSS solution where you type the email address backwards and >>> > > then use the CSS style declaration: >>> > > style="direction: rtl; unicode-bidi: bidi-override;" >>> > > >>> > >>> > How does that work with screen readers? How about copy-paste? >>> > >>> >>> >>> I don't think there's an accessible way of doing this. Anything that >>> allows a screen reader to speak the email address would also be >>> susceptible to spammers email scrapers. >>> >>> Thanks, >>> Ash >>> http://www.ashleysheridan.co.uk >>> >>> >>> >>> Copy-n-paste just gives you the email address backwards; screen readers, >>> because we are using logical ordering and it is stored in memory the way we >>> expect to read it, will read it correctly. >>> >>> I was not aware that email harvesters used screen readers. Do you have some >>> documentation I could read to get up to speed on this? >>> >>> Marc Hall >>> HallMarc Websites >>> So many spammers, so few bullets... >>> >>> >>> __ Information from ESET Smart Security, version of virus signature >>> database 5199 (20100615) __ >>> >>> The message was checked by ESET Smart Security. >>> >>> http://www.eset.com >>> >>> >> >> >> I didn't say the harvesters used screen readers. I'm saying that if >> something is in plain text that a screen reader can understand, what's >> to stop an email address harvester? It's not worth their time to analyse >> every image (think about where Google is with image searching right now, >> and they have a lot more resources at their disposal) but it is easy >> enough to read text in a web page. At a push, it's possible to believe >> that some might be using rendered CSS to see how an email is rendered. >> >> Thing is, it's nigh on impossible to hide an email address. Use it once >> on a mailing list like this and it's there for the whole world to see on >> archive listings. I even though that my email wouldn't be found in >> a .pdf CV I'd made, but thanks to Google it is now! >> >> Basically, it might not be worth the effort to hide email addresses, and >> instead see about setting up spam filtering at the server level. You >> don't have to download and filter it your end, and it saves on >> bandwidth. >> >> Thanks, >> Ash >> http://www.ashleysheridan.co.uk >> >> >> > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > Why not just make a simple contact form and never show the address? -- Bastien Cat, the other other white meat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] protecting email addresses on a web site
On Tue, Nov 16, 2010 at 16:29, a...@ashleysheridan.co.uk wrote: > Sorry for top post on phone. > > Depending on the type of site and location an email address might be legally > required. For example, a business website in the UK requires a value email > address to be made accessible to all your visitors, which includes blind > people, so no image-only addresses. > > Spam is just a fact of life now, and the only real method of protection is a > decent spam filter. -- Dedicated Servers, Cloud and Cloud Hybrid Solutions, VPS, Hosting (866-) 725-4321 http://www.parasane.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Updating a GET variable
> -Original Message- > From: Nathan Rixham [mailto:nrix...@gmail.com] > Sent: Thursday, November 11, 2010 8:18 AM > To: Marc Guay > Cc: Tamara Temple; PHP General > Subject: Re: [PHP] Updating a GET variable > > Marc Guay wrote: > >> So all you need to do, is take a look at > >> $_SERVER['HTTP_ACCEPT_LANGUAGE'] to get a users language > preferences. > > > > Hi Nathan, > > > > Yep, I'm using this var to set the default but I think it's nice to > > allow the user to override it. Maybe someone using their computer is > > more comfortable in a different language? > > So then surely that would be their default language? > > However, there is of course the case where somebody wants to see both > english and german variations of the "same" page, so probabyl a good use- > case after all - session to the rescue! > A bit late in the thread. However, IMO, I don't think session is necessary, unless you intend to save it for later use, during that same visit from the user. If it's just a 1 time request, you can just use (example) $_GET['lang']=en,de,fr,... Then just split up individual languages, process the request of each supported language, and place each relevant localization in its own tab panel, div (non js), etc... Regards, Tommy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] php running as module or cgi?
-Original Message- > From: John Hicks [mailto:johnl...@gulfbridge.net] > Sent: Friday, November 12, 2010 12:11 PM > To: php-general@lists.php.net > Subject: Re: [PHP] php running as module or cgi? > > On 11/11/2010 02:14 PM, Didier Gasser-Morlay wrote: > > On 11/11/2010 12:04 PM, Richard Quadling wrote: > >> On 11 November 2010 00:46, Al wrote: > >>> Briefly, what are the trade offs on a typical shared host? > >>> > >>> I've done a little research and can't seem to find anything > >>> outstanding either way. > >>> > >>> Seems like as an Apache module is faster. This argument makes sense. > >>> > >>> CGI is more secure, this argument doesn't seem too persuasive to me. > >>> Maybe > >>> I'm missing something. > >>> > >>> Thanks > >> > >> As a module, any misbehaving script is running within the same space > >> as all the other scripts. If a script is able to knock out PHP (for > >> any reason), all the script go. > >> > >> With CGI, they are run in separate spaces. No direct communication > >> (unless the scripts are sharing memory by some way). If a script > >> knocks out PHP, that script dies. Everything else keeps on going. > >> > >> The main downside to CGI (as I understand things), is that for each > >> invocation of the script, PHP has to do the complete build up and > >> tear down every single time. For every single script. > >> > >> With FastCGI, when the server starts, a pool of ready to go php > >> instances are created. So a script is called, the build up part is > >> already done. > >> > >> In terms of speed, I'd guess you'd have to be working pretty hard to > >> see the difference between module/isapi and fast-cgi. > >> > > > > If I am not mistaken, An apache module can even bring down the whole > > web server if it really misbehaves. > > > > So this leaves the choice between CGI & FatsCGI. > > > > CGI setup/teardown is only an issue for site with a fairly high > > traffic. It really depends on the type of site you intend to build. > > > > To me, the main security issue with mod_php in a virtual domain > configuration is that it runs as the apache user and therefore any php code > can read any files accessible to apache. If you have clients maintaining > their > own php code, they can access the code (and passwords and databases) of > your other clients. > > I've never used cgi but I hope that it allows you to avoid this problem. > Am I correct? > > --John > FastCGI is being developed for Apache httpd, I found this out a few weeks ago while compiling AMP stack for Windows x64. I don't remeber if it's stable yet. Regards, Tommy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] mysql help (sorry, a bit OT)
> -Original Message- > From: Gary [mailto:php-gene...@garydjones.name] > Sent: Tuesday, November 16, 2010 5:35 AM > To: php-general@lists.php.net > Subject: [PHP] mysql help (sorry, a bit OT) > > Is there a way to check the syntax of a query, short of running it? I've got an > insert to do (but of course it's a valid question for any query that changes > the db contents) and would like to know that the sql I am generating (in php > - see! not so off-topic!) is correct. > > What I don't want to do is run it for testing (live system *sigh*) and find out > it is correct (it will change the db), but... I have to test it to check that the > syntax (at least) *is* correct. > Gary, If you use a current version of the MySQL workbench, the tool can send complete SELECT, UPDATE, INSERT, DELETE statement, with all the fields, to the query window for the selected table. That way you'll know that you have the proper field (name and quoted with `). Add that to what Ash suggested of having a local copy of the database, you'll have little or no chance of breakage in the app because of a silly SQL syntax error ;) Regards, Tommy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] mod rewrite - DMXzone's PHP Pagination
Hello Guys, Gals, I've been working on a project of mine creating a custom little cms. I've managed to go by tutorials and reference material from the php site to get as far as I have. I've got search engine friendly links working with mod rewrite using mysql entry of page alias and my code is like /.html Now that was simple to what I have ran into... DMXzone has a dreamweaver extension called PHP Pagination which creates very nice paging links. But it has a huge class and its function to print links is over my head. I'm new to the list and I know how aggravating it can be to volunteer help and I give everyone many thanks that makes the effort to help others. I'm sure you all are blessed in many ways. Can a new guy to the list just jump right in and ask for help? - lol If someone here a guru at mod_rewrite, please help me get through this step because i'm stuck... My url to my integrated blog is /blog.html after click pagination /blog.html?pageNum_rsBlog=1 my htaccess I have added RewriteEngine on RewriteRule blog-(.*).html$ /blog.html?pageNum_rsBlog=$1 my link should end up /blog-1.html I hope its ok to post this long function here is the dmxzone function inside pagination class function addPagination() { $pageNo = 1; $recPerPage = 1; if ($this->recordsetName != "") { $dsName = $this->recordsetName; $offsetName = "pageNum_"; $useOffset = 0; } else { $dsName = $this->feedGenieName; $offsetName = "offset_"; $useOffset = 1; $recPerPage = $this->rowsPerPage; } $this->numPages = ceil($this->rowsTotal / $this->rowsPerPage); if ($this->numPages < 2) { return; } $curPageUrl = substr("/blog.html", strrpos("/blog.html", "/") +1); // $curPageUrl = substr($_SERVER['PHP_SELF'], strrpos($_SERVER['PHP_SELF'], "/") +1); if (isset($_GET[$offsetName.$dsName])) { if ($useOffset == 0) { $pageNo = intval($_GET[$offsetName.$dsName]) + 1; } else { $pageNo = (intval($_GET[$offsetName.$dsName]) / $this->rowsPerPage) + 1; } } $pageNumParam = $offsetName.$dsName."="; $curPageUrl .= "?"; $queryString = ""; if (!empty($_SERVER['QUERY_STRING'])) { $params = explode("&", $_SERVER['QUERY_STRING']); $newParams = array(); foreach ($params as $param) { if (stristr($param, $offsetName.$dsName) == false && stristr($param, "totalRows_".$dsName) == false) { array_push($newParams, $param); } } if (count($newParams) != 0) { $queryString = "&" . htmlentities(implode("&", $newParams)); } } echo ""; if ($this->showFirstLast) { if ($pageNo == 1) { echo "".$this->firstLabel.""; } else { $prev = $pageNo - 1; echo "".$this->firstLabel.""; } } if ($this->showNextPrev) { if ($pageNo == 1) { echo "".$this->prevLabel.""; } else { $prev = $pageNo - 1; echo "".$this->prevLabel.""; } } if($this->numPages < (($this->outerLinks + $this->adjacentLinks)*2 + 1)) { for ($i = 1; $i < $this->numPages + 1; $i++) { if ($pageNo == $i) { echo "".$i.""; } else { echo "".$i.""; } } } else { if($pageNo < $this->outerLinks + $this->adjacentLinks + 2) { for ($i = 1; $i < ($this->outerLinks + $this->adjacentLinks*2 + 2); $i++) { if ($pageNo == $i) { echo "".$i.""; } else { echo "".$i.""; } } if ($this->outerLinks > 0) { echo $this->pageNumSeparator; } for ($i = $this->numPages - $this->outerLinks + 1; $i < $this->numPages + 1; $i++) { echo "".$i.""; } } else { if ($pageNo < $this->numPages - $this->outerLinks - $this->adjacentLinks) { for ($i = 1; $i < $th
[PHP] Stripslashes
I was doing a test of stripslashes on a $_POST, when I recieved the email, all of the slashes were still in the data posted. I used : $fname = stripslashes($_POST['fname']); I input G\\a//r\y\\, and was expecting, according to the manuel G\a//r*y\, but got the original spelling. I added: echo stripslashes($fname); and did get the expected result on the page, but not in the email from the $_POST. I also tried $fname = (stripslashes($_POST['fname'])); But got the same result. Can anyone tell me what I am not understaning? Thank you Gary __ Information from ESET Smart Security, version of virus signature database 5625 (20101116) __ The message was checked by ESET Smart Security. http://www.eset.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Stripslashes
On Tue, Nov 16, 2010 at 10:10 PM, Gary wrote: > I was doing a test of stripslashes on a $_POST, when I recieved the email, > all of the slashes were still in the data posted. > > I used : > > $fname = stripslashes($_POST['fname']); > > I input G\\a//r\y\\, and was expecting, according to the manuel G\a//r*y\, > but got the original spelling. > In this case, you should get the original, if I'm understanding correctly. Think of it like a basic math problem: Step 1: Happens automatically when you submit the form and PHP receives the form variables input + slashes = slashed_input Step 2: This happens when you call stripslashes. slashed_input - slashes = input The goal of stripslashes is that it will undo what happened automatically using magic_quotes_gpc (which essentially calls addslashes on the GPC vars behind the scenes) so you'll end up with the original input. So, working through your example: 1. You inputted into a form G\\a//r\y\\ and submitted the form. 2. PHP received G\\a//r\y\\ and added slashes (Ga//r\\y). 3. You called stripslashes (G\\a//r\y\\). > > I added: > > echo stripslashes($fname); and did get the expected result on the page, but > not in the email from the $_POST. > Here, you called stripslashes on something already stripped once, so you now have a new value (G\a//ry\). > > I also tried > > $fname = (stripslashes($_POST['fname'])); > This would be no different than your attempt without enclosing parentheses. Now, let me just say that I detest magic_quotes, and it's best to run with them disabled so you don't even have to worry about this kind of issue (they've been deprecated.) But, perhaps you were just trying to learn about some piece of legacy code. Hope the explanation helps, Gary. Adam -- Nephtali: PHP web framework that functions beautifully http://nephtaliproject.com