Re: [PHP] ldap_add - Server is unwilling to peform

2011-01-26 Thread a...@ashleysheridan.co.uk
You could add a line in to your code: include "ldap-blue-pill"; That should fix any performance issues ;) (note, I did try posting earlier with a much funnier reply, but the email was rejected because of a certain 'v' word!) Thanks, Ash http://www.ashleysheridan.co.uk - Reply message ---

Re: [PHP] Installing PEAR

2011-01-25 Thread a...@ashleysheridan.co.uk
(sorry for top post) As he mentioned using lynx ( and I'm assuming the OS rather than the browser here, as I'm not aware of the browser having those sorts of capabilities) then could it be that all the pear packages don't exist? Mostly, pear packages can just be copied into your app directories

Re: RES: [PHP] email address syntax checker

2011-01-21 Thread a...@ashleysheridan.co.uk
That won't accept dozens of different types of email addresses. It won't even match some value domains. Valid email addresses can contain virtually any character in the local part (although in the main they will require being inside quotation marks), and the @ symbol is included in that! Thank

Re: [PHP] [PHP]: permission problem www-data

2011-01-18 Thread a...@ashleysheridan.co.uk
17 Subject: [PHP] [PHP]: permission problem www-data To: "a...@ashleysheridan.co.uk" Cc:

Re: [PHP] [PHP]: permission problem www-data

2011-01-18 Thread a...@ashleysheridan.co.uk
you could use the chown method in php, which should do what you need. Thanks, Ash http://www.ashleysheridan.co.uk - Reply message - From: "Moses" Date: Tue, Jan 18, 2011 09:44 Subject: [PHP] [PHP]: permission problem www-data To: Hi Everyone, I am creating a file in PHP script which t

Re: [PHP] How to get cpu consumption of a php script

2011-01-17 Thread a...@ashleysheridan.co.uk
I can't think of anything except using top or ps. If you can't guarantee what process runs what individual script, are you able to just track them all globally, and check for differences as you start and stop scripts. Perhaps run certain scripts under different users which should give them their

Re: [PHP] Command line PHP

2011-01-07 Thread a...@ashleysheridan.co.uk
(sorry for top post, still not worked out how not to on phone) Can you not just code it like you normally would any app that doesn't use a framework? I've been writing some cli data importers at work. Basic really, with only classes used that I need, no framework needed (its very simple) and al

Re: [PHP] Re: Regex for telephone numbers

2010-12-31 Thread a...@ashleysheridan.co.uk
Erm, you say regex is overkill, then use one in your example! Thanks, Ash http://www.ashleysheridan.co.uk - Reply message - From: "Al" Date: Fri, Dec 31, 2010 15:53 Subject: [PHP] Re: Regex for telephone numbers To: , On 12/29/2010 7:12 PM, Ethan Rosenberg wrote: > Dear List - > > Th

Re: [PHP] Regex for telephone numbers

2010-12-31 Thread a...@ashleysheridan.co.uk
Sorry for top-post, on phone. What about mobile phone numbers (cell phones you call them in the US) do they conform to the same format? I know there have been times myself when I've been without a landline number leaving me with only my mobile as a means of contact. Thanks, Ash http://www.ashle

Re: [PHP] File-Upload per Drag-N-Drop?

2010-12-29 Thread a...@ashleysheridan.co.uk
On a slight tangent, but is that signature why I'm not able to read any of michelles emails on my phone? For some reason, only her emails get stuck and won't download, so I have to wait til someone else replies. To answer the question on this, I've not yet seen a cross platform answer to this q

Re: [PHP] MP3 Player and PHP

2010-12-22 Thread a...@ashleysheridan.co.uk
You've missed a crucial part of php; its not a client-side language, its all run on the server. So you can't have a music player built in it running in a web browser. For that you need something like flash or java. There is a way potentially with html5, but not all support the tag (internet ex

Re: [PHP] Problem with Include

2010-12-21 Thread a...@ashleysheridan.co.uk
(Apologies for top posting; on my mobile just now.) Not true. Refactoring code is one of the main tasks of a developer. None of us produce perfect code, and some code is less perfect than other code. It's instinct to want to fix bad code when we're maintaining it or having to add new features t

Re: [PHP] Problem with Include

2010-12-19 Thread a...@ashleysheridan.co.uk
Is your server even set up to recognise .inc files as php? You can't just put any old extension on and expect the server to know what to do with it. Thanks, Ash http://www.ashleysheridan.co.uk - Reply message - From: "Tamara Temple" Date: Sun, Dec 19, 2010 17:07 Subject: [PHP] Problem w

Re: [PHP] All records not displaying...

2010-12-19 Thread a...@ashleysheridan.co.uk
I'm not sure what this line us all about: if (mysql_num_rows($result) == !'0') You're basically saying; if the number of rows is equal to the not of the string 0, what I think you may want in this case is just != 0. The next line is causing your problem though. You're grabbing the first row wi

Re: [PHP] empty() in email message

2010-12-13 Thread a...@ashleysheridan.co.uk
How are these variables being given their values by php? If you're making use of register_globals then you're asking for problems. Perform some sanity checks on your data, like using a regex of /^\d+$/ to check for numerical values, and turn globals off; its a security breach waiting to happen.

Re: [PHP] code quest - ECHO?!?

2010-12-12 Thread a...@ashleysheridan.co.uk
And the obvious difference, print returns true on success. I'm not sure what would cause an echo it print to ever fail, so it really doesn't make a huge difference. Thanks, Ash http://www.ashleysheridan.co.uk - Reply message - From: "Alexandru Patranescu" Date: Sun, Dec 12, 2010 18:56

Re: [PHP] Fw: Spoofing user_agent

2010-11-25 Thread a...@ashleysheridan.co.uk
You need to set it in the header request you make. Putting it in the script you're using as a spider with ini_set won't do anything because the Target site doesn't know anything about it. Thanks, Ash http://www.ashleysheridan.co.uk - Reply message - From: "Ron Piggott" Date: Thu, Nov 2

Re: RES: [PHP] I am a Windows programmer and getting started on PHP

2010-11-19 Thread a...@ashleysheridan.co.uk
The reason you might run it on a vm is because not all operating systems are created equal. Things that work in Linux won't necessarily work on windows, and vice versa. If you're developing on the same type of platform as the live server, there is less chance of a problem rearing its head. For

Re: [PHP] protecting email addresses on a web site

2010-11-16 Thread a...@ashleysheridan.co.uk
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

Re: [PHP] mysql help (sorry, a bit OT)

2010-11-16 Thread a...@ashleysheridan.co.uk
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

Re: [PHP] Re: String manipulation

2010-11-14 Thread a...@ashleysheridan.co.uk
What about something like this: $pos = (strpos(' ', $string, 76))?strpos(' ',$string, 76):strlen($string); Thanks, Ash http://www.ashleysheridan.co.uk - Reply message - From: "Ron Piggott" Date: Sun, Nov 14, 2010 20:48 Subject: [PHP] Re: String manipulation To: How would I write an I

Re: [PHP] question about preventing polling for more than once

2010-11-12 Thread a...@ashleysheridan.co.uk
Have you checked for any cookies left by that website? Thanks, Ash http://www.ashleysheridan.co.uk - Reply message - From: "肖晗" Date: Fri, Nov 12, 2010 15:14 Subject: [PHP] question about preventing polling for more than once To: I noticed that some websites such as polldaddy

Re: [PHP] Updating a GET variable

2010-11-09 Thread a...@ashleysheridan.co.uk
Don't think about it in those terms and you'll see why it wasn't working. Http is stateless, so unless you use sessions, it will 'forget' everything from page to page. What's wrong with just putting the url parameters in the link that you know you need, one by one? If you have many, build a lit

Re: [PHP] Chinese words on a PHP web page

2010-11-04 Thread a...@ashleysheridan.co.uk
You could do it using the &1234; type codes, or copy it directly from another source, like a character map program. Bear in mind that if you do the latter, you'll need to output a utf 8 meta tag with the html output too. Thanks, Ash http://www.ashleysheridan.co.uk - Reply message - Fro

Re: [PHP] Fwd: Mail delivery failed: returning message to sender

2010-11-01 Thread a...@ashleysheridan.co.uk
It's not to do with hosting, its an auto reply when you email sascha.braun which gave the same aware reply to me, and I'm on a Linux box at home! Thanks, Ash http://www.ashleysheridan.co.uk - Reply message - From: "Ben Brentlinger" Date: Mon, Nov 1, 2010 08:29 Subject: [PHP] Fwd: Mail d

Re: [PHP] a question about user and permission on linux

2010-10-31 Thread a...@ashleysheridan.co.uk
Reply message - From: "Ryan Sun" Date: Sun, Oct 31, 2010 18:43 Subject: [PHP] a question about user and permission on linux To: "a...@ashleysheridan.co.uk" Then whats the user of php? On 10/31/2010 2:39 PM, a...@ashleysheridan.co.uk wrote: > If its Apache on Linux (as mo

Re: [PHP] a question about user and permission on linux

2010-10-31 Thread a...@ashleysheridan.co.uk
If its Apache on Linux (as most hosting will be) then the user will generally be either apache, www, or http. Thanks, Ash http://www.ashleysheridan.co.uk

Re: [PHP] include html

2010-10-31 Thread a...@ashleysheridan.co.uk
This can only be done with javascript, as the iframe is client-side, which php knows nothing about. Thanks, Ash http://www.ashleysheridan.co.uk - Reply message - From: "Karl DeSaulniers" Date: Sun, Oct 31, 2010 03:32 Subject: [PHP] include html To: "php-general" Hello, I am looking fo

Re: [PHP] search is not case insensitive

2010-10-31 Thread a...@ashleysheridan.co.uk
This isn't a php question but a mysql one. Take out the lower() part of the sql statement, as like is case insensitive by default. Thanks, Ash http://www.ashleysheridan.co.uk - Reply message - From: "Dr Michael Daly" Date: Sun, Oct 31, 2010 04:47 Subject: [PHP] search is not case insens

Re: [PHP] questions about if statements regarding a checkbox

2010-10-31 Thread a...@ashleysheridan.co.uk
What is the code you're using now? You have a syntax error, but without seeing the code, we are all left to guessing what the problem could be. Thanks, Ash http://www.ashleysheridan.co.uk - Reply message - From: "Ben Brentlinger" Date: Sun, Oct 31, 2010 03:56 Subject: [PHP] questions ab

Re: [PHP] Character encoding hell

2010-10-26 Thread a...@ashleysheridan.co.uk
22 Subject: [PHP] Character encoding hell To: "a...@ashleysheridan.co.uk" Cc: "php-general" > Have you tried using the utf8 meta tag rather than using the htmlentities() > function? That should solve the first issue, as I reckon the problem lies > with the way your en

Re: [PHP] Character encoding hell

2010-10-26 Thread a...@ashleysheridan.co.uk
Have you tried using the utf8 meta tag rather than using the htmlentities() function? That should solve the first issue, as I reckon the problem lies with the way your encoding the filename. Linux filesystems have far less limitations on filenames, so it could be that windows is doing something

Re: [PHP] "My truth comes out" [1]

2010-10-21 Thread a...@ashleysheridan.co.uk
truth comes out" [1] To: "a...@ashleysheridan.co.uk" Cc: I'm curious to know why 'thats as bad as an if' ? It's simple, concise, understandble and does the job. So, I'm curious to know why exactly its bad? On Thu, Oct 21, 2010 at 8:01 PM, a...@ashleysh

Re: [PHP] "My truth comes out" [1]

2010-10-21 Thread a...@ashleysheridan.co.uk
That's as bad as an if! What about using settype() on the string? I've not tested it, but it looks like it should do the trick. Thanks, Ash http://www.ashleysheridan.co.uk - Reply message - From: "Russell Dias" Date: Thu, Oct 21, 2010 10:51 Subject: [PHP] "My truth comes out" [1] To:

Re: [PHP] I need some thoughts on code duplication and separation

2010-10-21 Thread a...@ashleysheridan.co.uk
Bit late to this one, but what about an mvc framework like codeigniter? It's perfectly acceptable to use if statements and loops in the view, which would solve your problem. You can set a trigger variable in the controller, and in the header view, check to see if its set and output your javascri

Re: [PHP] Formatting an ECHO statement.

2010-10-18 Thread a...@ashleysheridan.co.uk
Steady on now, this thread started as a php question, and has only deviated a little. Most people on the list don't work purely with php, and I for one dont mind the odd off-topic thread, especially when the majority of the list is made of good php threads. Thanks, Ash http://www.ashleysheridan

Re: [PHP] PDO working via Apache but not at the command line?

2010-10-18 Thread a...@ashleysheridan.co.uk
It's most likely because both cli and web modules are using different php.ini config files. See what the output of a phpinfo() call in both browser and command line. Thanks, Ash http://www.ashleysheridan.co.uk - Reply message - From: "Scott Baker" Date: Mon, Oct 18, 2010 21:20 Subject:

Re: [PHP] Questions from a Newbie

2010-10-17 Thread a...@ashleysheridan.co.uk
Linux can be run as a GUI, using a window manager. Aside from that, have a look at the manual pages on php.net, which give some good examples of how to use the various mysql functions. Also, on your development machine, its a good idea to turn on errors, as it can indicate where these problems

Re: [PHP] odd while behavior...

2010-10-16 Thread a...@ashleysheridan.co.uk
I wouldn't really use a while statement for this, but a for loop instead, as it needs less code: "; for($i =1;$i<=12;$i++) {     $dateformat = date("M", mktime(0,0,0, $i,0,0));     echo <<$dateformat $i HTML; } echo ""; ?> The other code was starting from 0 and going to 12, which is 13 mo

Re: [PHP] Scripts running twice

2010-10-12 Thread a...@ashleysheridan.co.uk
That's probably it then! Some browsers make multiple requests to speed up rendering of a page. Thanks, Ash http://www.ashleysheridan.co.uk - Reply message - From: "Alexis" Date: Tue, Oct 12, 2010 17:16 Subject: [PHP] Scripts running twice To: If you mean how am I triggering the script

Re: [PHP] Unknown Table i field list

2010-10-11 Thread a...@ashleysheridan.co.uk
That's the same query. One thing I did notice (and I wasn't sure if it was a typo as I saw a few in the original post) but you've used a period instead of a comma to separate the values in the query. It shouldn't produce the error you're seeing, but sometimes you never know! Thanks, Ash http:/

Re: [PHP] Re: zip and mac safari

2010-10-10 Thread a...@ashleysheridan.co.uk
Using the gz compression should be fine, as most browsers are able to open pages which use this compression mechanism. The only issue might possibly be windows, but I've had problems before on that where the built in xp zip reader wasn't able to 'see' the entire contents of a zip created in winz

Re: [PHP] PHP and HBCI?

2010-10-08 Thread a...@ashleysheridan.co.uk
How do you mean? Did you want to process payments? Or wad it more of an actual banking thing you needed? I've not heard of hbci before, so can't offer much information back. Thanks, Ash http://www.ashleysheridan.co.uk - Reply message - From: "Stephan Ebelt" Date: Fri, Oct 8, 2010 13:37

Re: [PHP] tedd's Friday Post ($ per line)

2010-10-07 Thread a...@ashleysheridan.co.uk
Surely it would have been a bit more sensible to work out the time the programmer had spent on the project and then calculate it as a percentage of the total time that programmer would spend on it to complete it (which might not be the whole duration of the project) Also, counting code lines se

Re: [PHP] Re: Continuance of the struggle (trying to understand)

2010-10-07 Thread a...@ashleysheridan.co.uk
It will only work if your listing supports php, but you should just be able to put the whole sure up on your hosting, give the upload directory the correct permissions ( its most likely a more secure Linux hosting than insecure windows hosting) Thanks, Ash http://www.ashleysheridan.co.uk

Re: [PHP] Connecting to MySql with PHP

2010-10-04 Thread a...@ashleysheridan.co.uk
Have you installed the php mysql module? Basically, it tells php how to connect to mysql. This question has come up a few times this week, have you tried installing something like xampp or easyphp rather than the individual software components: Apache, php & mysql. Thanks, Ash http://www.ashle

Re: [PHP] Syntax Error

2010-10-04 Thread a...@ashleysheridan.co.uk
Switching to pdo won't necessarily remove sql errors any more than using a php framework will remove php errors. Thanks, Ash http://www.ashleysheridan.co.uk - Reply message - From: "kranthi" Date: Mon, Oct 4, 2010 09:04 Subject: [PHP] Syntax Error To: Cc: "chris h" , "Gary" , As po

Re: [PHP] Which PHP 5.3 documentation generators have you found?

2010-09-29 Thread a...@ashleysheridan.co.uk
Does phpDocumenter not do the trick? I must admit, I've not tried anything specific to 5.3 (i can imagine the namespace thing would be a major part if the documentation) but its served me well with other php5 code. Thanks, Ash http://www.ashleysheridan.co.uk - Reply message - From: "Ada

Re: [PHP] Php Newsletter script

2010-09-28 Thread a...@ashleysheridan.co.uk
Still hit and miss though, outlook is just one if many email clients out there. Thanks, Ash http://www.ashleysheridan.co.uk - Reply message - From: "Richard Quadling" Date: Tue, Sep 28, 2010 10:17 Subject: [PHP] Php Newsletter script To: "a...@ashleysheridan.co.uk"

Re: [PHP] Php Newsletter script

2010-09-27 Thread a...@ashleysheridan.co.uk
It's probably worth noting that very few email clients in use actually observe xhtml. When creating html emails you have to step back a half dozen years for outlook, which is the current dominant client because of offices. Essentially, its back to basics, with tables for layout, font tags, and l

Re: [PHP] Array question

2010-09-26 Thread a...@ashleysheridan.co.uk
I'd also like to add to that: $array = array(); $array[] = 'text'; $array[2] = 123; $array[] = 'hello'; Would output: $array( 0 => 'text', 2 => 123, 3 => 'hello', ); Note the missing index 1, as php makes a numerical index that is one greater than the highest already in use. As the index 2 was

Re: [PHP] module add on Suse 10.3

2010-09-23 Thread a...@ashleysheridan.co.uk
[PHP] module add on Suse 10.3 To: Le jeudi 23 septembre 2010, a...@ashleysheridan.co.uk a écrit : > Suse uses yast2 iirc, which you can use to list and install php modules. > Search for 'php' in yast software manager module. -- Thanks Ash, I id'nt fin

Re: [PHP] module add on Suse 10.3

2010-09-23 Thread a...@ashleysheridan.co.uk
Suse uses yast2 iirc, which you can use to list and install php modules. Search for 'php' in yast software manager module. Thanks, Ash http://www.ashleysheridan.co.uk - Reply message - From: "Patrick Serru" Date: Thu, Sep 23, 2010 14:06 Subject: [PHP] module add on Suse 10.3 To: "PHP Ge

Re: [PHP] Auto-generating HTML

2010-09-20 Thread a...@ashleysheridan.co.uk
He just said that's what he didn't want to do! Thanks, Ash http://www.ashleysheridan.co.uk - Reply message - From: "TR Shaw" Date: Mon, Sep 20, 2010 20:02 Subject: [PHP] Auto-generating HTML To: "Andy McKenzie" Cc: "PHP General list" On Sep 20, 2010, at 2:56 PM, Andy McKenzie wrote:

Re: [PHP] Auto-generating HTML

2010-09-20 Thread a...@ashleysheridan.co.uk
Have you looked at heredoc and nowdoc in the manual? They could be what you're after, as they preserve the output in the way you write it. Thanks, Ash http://www.ashleysheridan.co.uk - Reply message - From: "Andy McKenzie" Date: Mon, Sep 20, 2010 19:56 Subject: [PHP] Auto-generating HTM

Re: [PHP] Elegance is the goal... Sticky form submit help

2010-09-11 Thread a...@ashleysheridan.co.uk
For a month selector, using a loop to output the months is good, as you can then within the loop check for that value sent and set the selected html attribute for that select element. I should warn you that your code will throw a warning when no data has been posted to it. Consider using isset(

Re: [PHP] Disabling an extension on a perdir basis.

2010-09-11 Thread a...@ashleysheridan.co.uk
If you want to prevent certain extensions then just flirt then out from the $_FILES array before you copy them out of the temp directory, as that is where they should be uploaded ready for your script to process. Thanks, Ash http://www.ashleysheridan.co.uk - Reply message - From: "Richa

Re: [PHP] newbie question about code

2010-09-10 Thread a...@ashleysheridan.co.uk
Node.js, wouldn't that be javascript rather than java? :P Thanks, Ash http://www.ashleysheridan.co.uk - Reply message - From: "Joshua Kehn" Date: Fri, Sep 10, 2010 19:32 Subject: [PHP] newbie question about code To: "Bob McConnell" Cc: "Adam Williams" , "PHP General list" Bob- Yes

Re: [PHP] newbie question about code

2010-09-10 Thread a...@ashleysheridan.co.uk
It's object oriented code. $code is an instance of class, and do_command() is a method if that class. I'd advise reading up on oop php. Thanks, Ash http://www.ashleysheridan.co.uk - Reply message - From: "Adam Williams" Date: Fri, Sep 10, 2010 19:27 Subject: [PHP] newbie question about

Re: [PHP] re: logical AND assignments

2010-09-10 Thread a...@ashleysheridan.co.uk
Stay off those red pills David! Thanks, Ash http://www.ashleysheridan.co.uk - Reply message - From: "David Harkness" Date: Fri, Sep 10, 2010 18:54 Subject: [PHP] re: logical AND assignments To: "Robert E. Glaser" Cc: On Fri, Sep 10, 2010 at 8:22 AM, Robert E. Glaser wrote: > It's ha

Re: [PHP] Handling multiple form fields

2010-09-10 Thread a...@ashleysheridan.co.uk
How are you deciding what form fields are being put in the form? There are plenty of scripts out there which can output and validate forms, but you might need to be a bit specific about what you want. Thanks, Ash http://www.ashleysheridan.co.uk - Reply message - From: "Abah Joseph" Da

Re: [PHP] Broken pipes, time outs, PHP, and mail

2010-09-08 Thread a...@ashleysheridan.co.uk
In order to help we really need to have a look at the code in question. You say the code is derived from another class you downloaded. Are you able to post the important bits of it in an email, or put it all on a pastebin? Thanks, Ash http://www.ashleysheridan.co.uk - Reply message - Fr

Re: [PHP] Broken pipes, time outs, PHP, and mail

2010-09-08 Thread a...@ashleysheridan.co.uk
Could it be that there are connection limits on the remote server? Thanks, Ash http://www.ashleysheridan.co.uk - Reply message - From: "Bob McConnell" Date: Wed, Sep 8, 2010 18:24 Subject: [PHP] Broken pipes, time outs, PHP, and mail To: From: Dave M G > I have a set of scripts that s

Re: [PHP] Hi

2010-09-06 Thread a...@ashleysheridan.co.uk
Sep 6, 2010 16:13 Subject: [PHP] Hi To: "a...@ashleysheridan.co.uk" Cc: "Jordan Jovanov" , On 6 September 2010 15:04, a...@ashleysheridan.co.uk wrote: > I think you should not focus so much on the file extension, as that is mostly > meaningless if someone wanted to a

Re: [PHP] Hi

2010-09-06 Thread a...@ashleysheridan.co.uk
I think you should not focus so much on the file extension, as that is mostly meaningless if someone wanted to attack your system. Instead, you could wrap a call to the command line 'file' command, which gives mostly accurate information about a file. Basically it reads the first few bytes to s

Re: [PHP] Error in initialising XML parser

2010-09-06 Thread a...@ashleysheridan.co.uk
PHO won't automatically include a class file by default. You either need to manually include it with a require, include it or require_once line, or use an automagical include script. As it stands, you're getting the error because php doesn't know where your class is. Thanks, Ash http://www.ashl

Re: [PHP] a test (list is too quite)

2010-09-04 Thread a...@ashleysheridan.co.uk
http://www.bash.org/?quote=76416 Meant to post this on Friday, but it works well here too! Thanks, Ash http://www.ashleysheridan.co.uk - Reply message - From: "chris h" Date: Sat, Sep 4, 2010 19:42 Subject: [PHP] a test (list is too quite) To: On Sat, Sep 4, 2010 at 2:24 PM, Marc Guay