Re: [PHP] Reading files in PHP 5.3.0
At 12:32 AM -0400 9/13/09, Paul M Foster wrote: On Sat, Sep 12, 2009 at 10:22:10AM -0400, tedd wrote: At 6:02 PM -0400 9/11/09, Paul M Foster wrote: I typically use us2.php.net, which is hosted by Hurricane Electric. Paul Paul: I wouldn't use Hurricane Electric if their accounts were provided for free! The following is an experience I had with Hurricane Electric and support for my opinion as to their "service". You see, many years ago Hurricane Electric hosted (IMO with complicity) a porn site that sent out over 2000 porn spams to AOL using MY email address as the person to contact. That incident caused me a great deal of trouble. In an attempt to understand and resolve the problem, I sent several emails to Hurricane Electric; I called them numerous times via telephone; and I even sent them letters via the US mail. But unfortunately they refused to answer ANY of my correspondence. Their lack of communication provided support for my opinion of their complicity with what had happened. A few years back they contacted me (again more spam) soliciting my interest in hosting with them. Normally, I would have just reported such spam to spamcop, but because of the incident I replied and told them what had happened. Later I was contacted by one of their technicians who looked thorough their records and confirmed/admitted the incident. However, he told me that they could not be held responsible for they clients they host. Furthermore, they have no intention of screening their clients. He said that they will provide hosting to whomever they want, including porn and spam sites. If their clients do anything wrong per "their standards", then they will deal with it internally. Otherwise they don't care about any harm done to anyone by them hosting such sites. In short, they want the money but not the responsibility. > Now, maybe Hurricane Electric has changed its ways, but they can't change their past. In my opinion, there are more than enough hosting companies who care about the damage they might cause and take steps to reduce the about spam and porn on the net. My advice, seek hosts other than Hurricane Electric. I don't know much about HE, other than the fact that they run ads in Linux Journal. But they're a real hosting company, like Rackspace or 1and1. Yahoo (who hosts www.php.net) isn't a company I think of as a hosting company. And they're an internet behemoth, like Godaddy or Microsoft. So I'd personally steer away from them. Just my bias. It sounds like HE's real problem is their TOS. I've hosted with a lot of companies who will drop accounts where they find porn, spam and warez; it's part of their TOS. The other problem I can see is that they are apparently unwilling to even mediate a problem between two of their accounts. "We just host 'em. Other than that, we don't care." Typical. I expect the porn company paid them a *lot* more money than you did, so they simply looked the other way. A shame. The lesson, I suppose, is to look at the terms of service before you sign up with a hosting company. You may still end up being a victim, but at least you know what you're getting yourself into. If they don't specifically disavow porn, spam and warez, then they allow (and in effect, condone) it. Paul Paul: Good advice, but you assumed that I was one of their clients -- I wasn't. I was just an innocent bystander who found his email address being used as a return address for porn spam. It wasn't until after I started receiving hate email that I discovered who/what Hurricane Electric was. Imagine that suddenly out of the blue you started receiving hate mail from hundreds of AOL users telling you what a low-life you are because you sent porn to their children -- what would you do? I imagine you would: a) find out who was behind it; b) contact them and ask for an explanation; c) and try to restore your good name. One might think that suing them would be a good idea, but the last suit I was in cost me over $20k and I won! I didn't have that spare change laying around at the time to go after a company in another state. I just wanted an explanation, but Hurricane Electric wouldn't do anything. In my opinion, they are an example of what a hosting company should not be. Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Reading files in PHP 5.3.0
On Sat, Sep 12, 2009 at 10:22:10AM -0400, tedd wrote: > At 6:02 PM -0400 9/11/09, Paul M Foster wrote: >> >> I typically use us2.php.net, which is hosted by Hurricane Electric. >> >> Paul > > Paul: > > I wouldn't use Hurricane Electric if their accounts were provided for free! > > The following is an experience I had with Hurricane Electric and > support for my opinion as to their "service". > > You see, many years ago Hurricane Electric hosted (IMO with > complicity) a porn site that sent out over 2000 porn spams to AOL > using MY email address as the person to contact. That incident caused > me a great deal of trouble. > > In an attempt to understand and resolve the problem, I sent several > emails to Hurricane Electric; I called them numerous times via > telephone; and I even sent them letters via the US mail. But > unfortunately they refused to answer ANY of my correspondence. Their > lack of communication provided support for my opinion of their > complicity with what had happened. > > A few years back they contacted me (again more spam) soliciting my > interest in hosting with them. Normally, I would have just reported > such spam to spamcop, but because of the incident I replied and told > them what had happened. > > Later I was contacted by one of their technicians who looked thorough > their records and confirmed/admitted the incident. However, he told > me that they could not be held responsible for they clients they > host. Furthermore, they have no intention of screening their clients. > He said that they will provide hosting to whomever they want, > including porn and spam sites. If their clients do anything wrong per > "their standards", then they will deal with it internally. Otherwise > they don't care about any harm done to anyone by them hosting such > sites. In short, they want the money but not the responsibility. > > Now, maybe Hurricane Electric has changed its ways, but they can't > change their past. > > In my opinion, there are more than enough hosting companies who care > about the damage they might cause and take steps to reduce the about > spam and porn on the net. My advice, seek hosts other than Hurricane > Electric. I don't know much about HE, other than the fact that they run ads in Linux Journal. But they're a real hosting company, like Rackspace or 1and1. Yahoo (who hosts www.php.net) isn't a company I think of as a hosting company. And they're an internet behemoth, like Godaddy or Microsoft. So I'd personally steer away from them. Just my bias. It sounds like HE's real problem is their TOS. I've hosted with a lot of companies who will drop accounts where they find porn, spam and warez; it's part of their TOS. The other problem I can see is that they are apparently unwilling to even mediate a problem between two of their accounts. "We just host 'em. Other than that, we don't care." Typical. I expect the porn company paid them a *lot* more money than you did, so they simply looked the other way. A shame. The lesson, I suppose, is to look at the terms of service before you sign up with a hosting company. You may still end up being a victim, but at least you know what you're getting yourself into. If they don't specifically disavow porn, spam and warez, then they allow (and in effect, condone) it. Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Reading files in PHP 5.3.0
At 6:02 PM -0400 9/11/09, Paul M Foster wrote: I typically use us2.php.net, which is hosted by Hurricane Electric. Paul Paul: I wouldn't use Hurricane Electric if their accounts were provided for free! The following is an experience I had with Hurricane Electric and support for my opinion as to their "service". You see, many years ago Hurricane Electric hosted (IMO with complicity) a porn site that sent out over 2000 porn spams to AOL using MY email address as the person to contact. That incident caused me a great deal of trouble. In an attempt to understand and resolve the problem, I sent several emails to Hurricane Electric; I called them numerous times via telephone; and I even sent them letters via the US mail. But unfortunately they refused to answer ANY of my correspondence. Their lack of communication provided support for my opinion of their complicity with what had happened. A few years back they contacted me (again more spam) soliciting my interest in hosting with them. Normally, I would have just reported such spam to spamcop, but because of the incident I replied and told them what had happened. Later I was contacted by one of their technicians who looked thorough their records and confirmed/admitted the incident. However, he told me that they could not be held responsible for they clients they host. Furthermore, they have no intention of screening their clients. He said that they will provide hosting to whomever they want, including porn and spam sites. If their clients do anything wrong per "their standards", then they will deal with it internally. Otherwise they don't care about any harm done to anyone by them hosting such sites. In short, they want the money but not the responsibility. Now, maybe Hurricane Electric has changed its ways, but they can't change their past. In my opinion, there are more than enough hosting companies who care about the damage they might cause and take steps to reduce the about spam and porn on the net. My advice, seek hosts other than Hurricane Electric. Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Reading files in PHP 5.3.0
On Fri, Sep 11, 2009 at 08:38:13AM -0700, Tommy Pham wrote: > --- On Fri, 9/11/09, Paul M Foster wrote: > > > From: Paul M Foster > > Subject: Re: [PHP] Reading files in PHP 5.3.0 > > To: php-general@lists.php.net > > Date: Friday, September 11, 2009, 8:57 AM > > On Fri, Sep 11, 2009 at 05:48:42AM > > -0700, Tommy Pham wrote: > > > > > > > > I just checked my 'Mail Options' again. It's > > always been 'compose as text'. But I can't guaranteed > > that Yahoo actually does it. Been having problems with > > Yahoo lately (both mail and Yahoo hosting of > > www.php.net). Maybe I should switch to gmail... > > > > I think I'm reading this wrong. Are you saying that php.net > > is hosted > > with *Yahoo*? WTF? > > > > Paul > > go to www.php.net. scroll all way down to the bottom. > > "This mirror generously provided by: Yahoo! Inc. > Last updated: Fri Sep 11 14:51:27 2009 UTC" > I typically use us2.php.net, which is hosted by Hurricane Electric. Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Reading files in PHP 5.3.0
-- On Fri, 9/11/09, Steve Brown wrote: > From: Steve Brown > Subject: Re: [PHP] Reading files in PHP 5.3.0 > To: php-general@lists.php.net > Date: Friday, September 11, 2009, 9:08 AM Perhaps you should add some error checking to see where it breaks > >> function > parseResponseHeaders($header_file) { > >> $http_found = $error_found = false; > >> $http_reponse = $error_message = NULL; > >> > >> $response = array(); > >> $response['ResponseCode'] = NULL; > >> $response['ErrorMessage'] = NULL; > >> > >> if (!is_file($header_file) || > >> !is_readable($header_file)) { > >> return $response; error_log($header_file . " is neither a file nor is it readable. Verify full physical path?? "); > >> } > >> > >> $fin = fopen($header_file, 'r'); if ($fin == false) error_log("Failed to open " . $header_file); > >> while ($line = fgets($fin)) { > >> var_dump($line); > >> > > What does var_dump($line); tell you? > > Nothing, not even an empty variable. Which is why I > think something > is completely screwed up here. > > BTW, squares at the end of lines are your platform not > interpreting > EOL characters correctly from another platform. > Generally, its the > sending client thats not being friendly, not the receiving > client. Those additions will hint you where the problem is. Just check your PHP error log, provided that you have it enabled in the ini. > > -- > 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
Re: [PHP] Reading files in PHP 5.3.0
--- On Fri, 9/11/09, Paul M Foster wrote: > From: Paul M Foster > Subject: Re: [PHP] Reading files in PHP 5.3.0 > To: php-general@lists.php.net > Date: Friday, September 11, 2009, 8:57 AM > On Fri, Sep 11, 2009 at 05:48:42AM > -0700, Tommy Pham wrote: > > > > > I just checked my 'Mail Options' again. It's > always been 'compose as text'. But I can't guaranteed > that Yahoo actually does it. Been having problems with > Yahoo lately (both mail and Yahoo hosting of > www.php.net). Maybe I should switch to gmail... > > I think I'm reading this wrong. Are you saying that php.net > is hosted > with *Yahoo*? WTF? > > Paul go to www.php.net. scroll all way down to the bottom. "This mirror generously provided by: Yahoo! Inc. Last updated: Fri Sep 11 14:51:27 2009 UTC" > -- > Paul M. Foster > > -- > 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
Re: [PHP] Reading files in PHP 5.3.0
>> function parseResponseHeaders($header_file) { >> $http_found = $error_found = false; >> $http_reponse = $error_message = NULL; >> >> $response = array(); >> $response['ResponseCode'] = NULL; >> $response['ErrorMessage'] = NULL; >> >> if (!is_file($header_file) || >> !is_readable($header_file)) { >> return $response; >> } >> >> $fin = fopen($header_file, 'r'); >> while ($line = fgets($fin)) { >> var_dump($line); >> > What does var_dump($line); tell you? Nothing, not even an empty variable. Which is why I think something is completely screwed up here. BTW, squares at the end of lines are your platform not interpreting EOL characters correctly from another platform. Generally, its the sending client thats not being friendly, not the receiving client. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Reading files in PHP 5.3.0
On Fri, Sep 11, 2009 at 8:15 AM, Ashley Sheridan wrote: > On Fri, 2009-09-11 at 08:04 -0400, tedd wrote: >> At 5:06 PM -0700 9/10/09, Tommy Pham wrote: >> > > So did anything change in PHP5.3.0 that would preclude the > code >> >below > from working? Am I going crazy? Or did Apple > f...@# >> >something up in > this release? > > Thanks, > Steve > > BEGIN CODE >> >-snip- >> >> Does anyone else see every line above ending with a square? >> >> If so, what causes that. I only see them from Tommy post. >> >> Cheers, >> >> tedd > > No, but his post inside of yours is looking messed up a bit. Maybe he's > not sending the posts as plain text or maybe it's something peculiar > between Gmail and Yahoo? > > Thanks, > Ash > http://www.ashleysheridan.co.uk It looks fine to me using Gmail. Andrew -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Reading files in PHP 5.3.0
On Fri, Sep 11, 2009 at 05:48:42AM -0700, Tommy Pham wrote: > > I just checked my 'Mail Options' again. It's always been 'compose as text'. > But I can't guaranteed that Yahoo actually does it. Been having problems > with Yahoo lately (both mail and Yahoo hosting of www.php.net). Maybe I > should switch to gmail... I think I'm reading this wrong. Are you saying that php.net is hosted with *Yahoo*? WTF? Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Reading files in PHP 5.3.0
--- On Fri, 9/11/09, Ashley Sheridan wrote: > From: Ashley Sheridan > Subject: Re: [PHP] Reading files in PHP 5.3.0 > To: "tedd" > Cc: "Tommy Pham" , php-general@lists.php.net > Date: Friday, September 11, 2009, 7:15 AM > On Fri, 2009-09-11 at 08:04 -0400, > tedd wrote: > > At 5:06 PM -0700 9/10/09, Tommy Pham wrote: > > > > So did anything change in PHP5.3.0 > that would preclude the > code > > >below > from working? Am I going > crazy? Or did Apple > f...@# > > >something up in > this release? > > > Thanks, > Steve > > BEGIN CODE > > >-snip- > > > > Does anyone else see every line above ending with a > square? > > > > If so, what causes that. I only see them from Tommy > post. > > > > Cheers, > > > > tedd > > > > > > -- > > --- > > http://sperling.com http://ancientstones.com http://earthstones.com > > > > No, but his post inside of yours is looking messed up a > bit. Maybe he's > not sending the posts as plain text or maybe it's something > peculiar > between Gmail and Yahoo? > > Thanks, > Ash > http://www.ashleysheridan.co.uk > I just checked my 'Mail Options' again. It's always been 'compose as text'. But I can't guaranteed that Yahoo actually does it. Been having problems with Yahoo lately (both mail and Yahoo hosting of www.php.net). Maybe I should switch to gmail... Thanks, Tommy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Reading files in PHP 5.3.0
At 1:15 PM +0100 9/11/09, Ashley Sheridan wrote: On Fri, 2009-09-11 at 08:04 -0400, tedd wrote: At 5:06 PM -0700 9/10/09, Tommy Pham wrote: > > So did anything change in PHP5.3.0 that would preclude the > code >below > from working? Am I going crazy? Or did Apple > f...@# >something up in > this release? > > Thanks, > Steve > > BEGIN CODE >-snip- Does anyone else see every line above ending with a square? If so, what causes that. I only see them from Tommy post. Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com No, but his post inside of yours is looking messed up a bit. Maybe he's not sending the posts as plain text or maybe it's something peculiar between Gmail and Yahoo? Thanks, Ash Ash: Yeah, what I sent out wasn't organized the way you reported. I suspect that it's one of those "end of line" problems regarding some combination of LF, CR, and/or NL characters. http://en.wikipedia.org/wiki/Newline Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Reading files in PHP 5.3.0
On Fri, 2009-09-11 at 08:04 -0400, tedd wrote: > At 5:06 PM -0700 9/10/09, Tommy Pham wrote: > > > So did anything change in PHP5.3.0 that would preclude the > code > >below > from working? Am I going crazy? Or did Apple > f...@# > >something up in > this release? > > Thanks, > Steve > > BEGIN CODE > >-snip- > > Does anyone else see every line above ending with a square? > > If so, what causes that. I only see them from Tommy post. > > Cheers, > > tedd > > > -- > --- > http://sperling.com http://ancientstones.com http://earthstones.com > No, but his post inside of yours is looking messed up a bit. Maybe he's not sending the posts as plain text or maybe it's something peculiar between Gmail and Yahoo? 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] Reading files in PHP 5.3.0
At 5:06 PM -0700 9/10/09, Tommy Pham wrote: > So did anything change in PHP5.3.0 that would preclude the > code below > from working? Am I going crazy? Or did Apple > f...@# something up in > this release? > > Thanks, > Steve > > BEGIN CODE -snip- Does anyone else see every line above ending with a square? If so, what causes that. I only see them from Tommy post. Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Reading files in PHP 5.3.0
--- On Thu, 9/10/09, Steve Brown wrote: > From: Steve Brown > Subject: [PHP] Reading files in PHP 5.3.0 > To: php-general@lists.php.net > Date: Thursday, September 10, 2009, 4:13 PM > I've been beating my head against a > wall all day and can't figure this > one out. The code below worked perfectly in > PHP5.2.4. However, I > recently upgraded to PHP5.3.0 and this code no longer > works. > > The function below accepts the path to a text file > containing headers > from a cUrl session (example attached). Basically > this function opens > to log file, looks for certain headers and captures some > information > from that line. When called on the attached file (or > any log file for > that matter), the following is output: > > array(2) { > ["ResponseCode"]=> > NULL > ["ErrorMessage"]=> > NULL > } > > Which means that nothing is getting read from the file. > > Now, I'm going to qualify all of this by saying I'm running > OSX Snow > Leopard, so I'm fully prepared to believe that Apple fucked > something > up in it, as they have done to third party packages on > other occasions > in the past. Well... to be fair, they don't usually > fuck up third > party packages, rather they introduce "enhancements" to the > OS that > prevents certain packages from working correctly and could > care less > that they broke it. > > So did anything change in PHP5.3.0 that would preclude the > code below > from working? Am I going crazy? Or did Apple > f...@# something up in > this release? > > Thanks, > Steve > > BEGIN CODE > == > function parseResponseHeaders($header_file) { > $http_found = $error_found = false; > $http_reponse = $error_message = NULL; > > $response = array(); > $response['ResponseCode'] = NULL; > $response['ErrorMessage'] = NULL; > > if (!is_file($header_file) || > !is_readable($header_file)) { > return $response; > } > > $fin = fopen($header_file, 'r'); > while ($line = fgets($fin)) { > var_dump($line); > What does var_dump($line); tell you? Regards, Tommy > if (substr($line, 0, > 4) == 'HTTP') { > > $line_explode = explode(' ', $line); > > $response['ResponseCode'] = preg_replace('/\D/', '', > $line_explode[1]); > if > ($response['ResponseCode'] != 100) { > > $http_found = true; > } > } > > if (substr($line, 0, > 16) == 'X-Error-Message:') { > > $line_explode = explode(' ', $line); > > array_shift($line_explode); > > $response['ErrorMessage'] = join(' ', $line_explode); > > $error_found = true; > } > } > fclose($fin); > > var_dump($response); > return $response; > } > -- > 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