Re: [PHP] SMTP Local development to Send email in PHP; Windows Platform/ XP with no IIS

2010-01-15 Thread Andy Shellam
Hi, Also http://www.softstack.com/freesmtp.html which vikash mentioned works through outlook settings. Anyways the below will help- http://php.net/manual/en/ref.mail.php http://glob.com.au/sendmail/ Personally, I always found hMailServer to be perfectly reliable as a relay on

Re: [PHP] Intermittent etwork connection errors with apache. Restarting apache temporarily fixes the problem. PHP or apache problem?

2010-01-04 Thread Andy Shellam
Hi Mark, I don't have any disconnect call in my code. Is this the same for all your connections code, apart from your LDAP? It's good practice to never assume that PHP will disconnect connections for you - explicitly call the disconnect function when your connection is done with. Lately

Re: [PHP] idea? add set_trace_handler() to PHP

2009-12-25 Thread Andy Shellam
Hi, Have you taken a look at Xdebug - http://xdebug.org/ ? From the manual: Xdebug allows you to log all function calls, including parameters and return values to a file in different formats. Would this do what you need - then your second script could process this file? Regards, Andy On 25

[PHP] Re: [PHP-DB] RE: Help for a beginner

2009-12-23 Thread Andy Shellam
Hi Adam, On 23 Dec 2009, at 17:21, Adam Sonzogni wrote: If you read the thread I useda php page totest mysql connectivity after phpmyadmin did not work... At this point I am willing to pay someone to troubleshoot this as I am baffled there is no definitive troubleshooting documentation

Re: [PHP] sending email with php

2009-12-23 Thread Andy Shellam
Hi Suhakar, link rel=stylesheet type=text/css href=style.css / Relative URLs won't work - when it's rendered inside the e-mail client, the relative URL has no meaning (I believe Outlook renders relative URLs relative to the temporary directory the HTML is being rendered in.) Other clients

Re: [PHP] Checking for internet connection.

2009-12-22 Thread Andy Shellam
Both at home and at work there are caching DNS on the LAN. So a DNS request may come back with a valid IP address when the WAN connection is down. I still won't be able to connect to the remote site. Dig an external server - e.g. dig @a.root-servers.net google.co.uk If your net is down the

Re: [PHP] Checking for internet connection.

2009-12-22 Thread Andy Shellam
I'm confused... what's the problem with just trying to hit the update server? If you can then you check for updates, if not then you, erm, don't. Simples, no? True, I think I said this same thing in a previous post - I suggested the DNS option if all the OP wanted to do was check if an

Re: [PHP] Checking for internet connection.

2009-12-22 Thread Andy Shellam
And I was pointing out that this would not be a valid test when there is a caching DNS on the LAN. I also pointed out how to avoid caching issues - the comment was aimed at the author of the message before mine. Too much of the conversation and most of the attribution was stripped too

Re: [PHP] Checking for internet connection.

2009-12-20 Thread Andy Shellam
I think the only way to detect if it can connect to the Internet is to see if you can grab a file from somewhere on the Internet. I'd hazard a guess that when operating systems are able to tell you they can connect to the Internet they are actually saying they can ping a predetermined

Re: [PHP] Checking for internet connection.

2009-12-20 Thread Andy Shellam
By attempting to connect you will implicitly query DNS (which itself is a connection to server). No it's not - it's putting out a packet targeted at an IP address and hoping a server will answer - hence why multi-cast works for DNS because you're not directly connecting to a specified

Re: [PHP] Why does CURLOPT_FOLLOWLOCATION require open_basedir to be turned off?

2009-12-13 Thread Andy Shellam (Mailing Lists)
Hi, I was wondering why CURLOPT_FOLLOWLOCATION requires open_basedir and safe_mode to be turned off. The following was found in the changelog(http://www.php.net/ChangeLog-5.php): Disabled CURLOPT_FOLLOWLOCATION in curl when open_basedir or safe_mode are enabled. (Stefan E., Ilia) I'm

Re: [PHP] php htaccess logins and logouts

2009-11-26 Thread Andy Shellam (Mailing Lists)
Hi, IIRC if you unset $_SERVER['PHP_AUTH_USER'] and $_SERVER['PHP_AUTH_PW'] it will log you out. I've done some research on this in the past - and not all browsers/web servers honour that as it's the browser that keeps the username/password cached and sends it after a 401 response, so the

Re: [PHP] is Aptana taking a crap on the face of PHP?

2009-11-15 Thread Andy Shellam (Mailing Lists)
* It is FREE (unlike Zend's retarded $500 price tag). I bought Zend Studio back in the 5.5 days - a couple of months after that they announced they were dropping support for the standalone IDE and made Studio an Eclipse plugin. It was then they added about $200 to the price. I moved to

Re: [PHP] please help with regular expression in preg_replace

2009-10-29 Thread Andy Shellam (Mailing Lists)
Hi Rene, This looks suspiciously like regex's greedy behaviour - it will gobble up everything that matches until you tell it otherwise. For example, your regex is matching any character that isn't a dot, followed by a dot. In host.domain.com, both host. and domain. match this regex - and

Re: [PHP] Using setters/getters with array of objects

2009-10-18 Thread Andy Shellam (Mailing Lists)
Hi, $u-emails[] = $e; I would hazard a guess because $u-emails isn't a concrete object (whereas $u-_emails is, but is private.) It's sort of a virtual reference - PHP has no way of knowing that $u-emails actually translates into _emails which is an array, if you see what I mean