Re: [PHP] Re: Variables via url

2012-05-12 Thread Ashley M. Kirchner

On 5/12/2012 7:21 AM, Jim Giner wrote:
Of course, someone here with much more knowledge than I could very 
soon make me look stupid :) 


Meh, I don't call that looking stupid.  I call it a different way 
of skinning the cat. :)  We're all here to learn from one another, right?


Thanks for the suggestion.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Variables via url

2012-05-11 Thread Ashley M. Kirchner


Can someone point me at examples or directions on how I can pass a 
variable via a URL in the following way:


http://server.domain.com//script///variable/

I will only be passing one single /variable/.  And I want the 
/script/ to use that.


I don't want to see what the script is, for example I don't want it 
to say 'script.php' or 'script.html' ...


Is this possible through PHP only, or do I have to write a rewrite 
directive in Apache to accomplish this?


[PHP] Extracting data from exec() call

2011-06-14 Thread Ashley M. Kirchner


I'm trying to extract data coming from an exec() call.  The exec() 
call is performing an ncdump on a netCDF file:


?php
  $filename = mlab.20110101.cdf;
  exec(/usr/bin/ncdump -l 2048 -v wmax .$filename, $output);
  echo ---\n;
  print_r($output);
  echo ---\n;
?

This is all fine, however the data comes in with extra information 
I don't need, and the data I do need is in a long string format:


Array
(
[0] = netcdf mlab.20110101 {
[1] = dimensions:
[2] =  time = UNLIMITED ; // (288 currently)
[3] = variables:
[4] =  int base_time ;
[5] =  int samp_secs ;
[6] =  float lat ;
[7] =  float lon ;
[8] =  float alt ;
[9] =  int station ;
[10] = float time_offset(time) ;
[11] = float tdry(time) ;
[12] = float rh(time) ;
[13] = float pres(time) ;
[14] = float cpres0(time) ;
[15] = float dp(time) ;
[16] = float wdir(time) ;
[17] = float wspd(time) ;
[18] = float wmax(time) ;
[19] = float wsdev(time) ;
[20] = float wchill(time) ;
[21] = float raina(time) ;
[22] = float raina24(time) ;
[23] = float bat(time) ;
[24] = data:
[25] =
[26] =  wmax = 5, 5, 5, 5.4, 5.7, 5.1, 7.1, 6.1, 4.4, 9.5, 
13.5, 14.4, 11.1, 9.6, 10.5, 10.6, 11.1, 10, 15.3, 17.2, 16.9, 16, 13.9, 
16.7, 15.3, 18.3, 17.2, 16.3, 15.9, 18.9, 17.7, 19.7, 19.7, 16.6, 16.4, 
16, 14.6, 14.9, 14, 16.7, 18.3, 16.2, 18.4, 15.4, 15.3, 13.3, 14.8, 
15.6, 15.1, 14.7, 13.8, 14.2, 18, 16.7, 16.6, 15.6, 15.8, 17.6, 17.4, 
20.3, 17.4, 21.3, 18.7, 16.7, 15.4, 17.5, 17.3, 17.7, 20.4, 17.5, 16.8, 
18.1, 15.9, 17.8, 17.3, 13.9, 16.2, 17.4, 19.8, 17.5, 19, 20, 20.3, 
20.4, 20.8, 21.6, 26.4, 23.1, 21.3, 19.9, 20.1, 21.1, 22.1, 22.5, 21.2, 
20.2, 22.2, 21.6, 19.6, 21.1, 21.7, 21, 20.8, 23.7, 26.6, 21.2, 23.8, 
23.3, 23.5, 23.9, 21.4, 22.1, 23.5, 22.8, 23, 21.8, 22.2, 25.6, 21.9, 
22.8, 26.2, 24.2, 23.6, 25.5, 26.8, 25.6, 27.4, 24.5, 23.5, 22.1, 23.1, 
25.5, 22.5, 22.5, 23.8, 21.8, 22.6, 23.5, 24, 23, 22.3, 21.6, 23.6, 
20.5, 21, 19.4, 23.6, 19.2, 18, 19.2, 20.5, 19.3, 19.1, 20.4, 18, 17.8, 
18.4, 19.4, 21, 18.3, 20.4, 21.2, 22.1, 20.1, 17.3, 17.2, 17.6, 17.2, 
19.9, 21, 20.6, 21.5, 23.8, 25, 24, 23.9, 23.5, 27.7, 21.1, 20.8, 20.1, 
18.6, 21, 18.7, 19.9, 16.4, 16.3, 17.3, 11.8, 11.4, 15.2, 12.4, 14.2, 
16.3, 21.6, 25, 19, 7.7, 9.7, 15.7, 7, 11.1, 10.3, 11.2, 14.8, 11.7, 
5.5, 5.5, 5.5, 6.9, 7.6, 6.5, 6.4, 6.7, 6.7, 4.9, 5.1, 4.7, 5.7, 5.5, 
9.2, 6.2, 7.1, 7.7, 6.5, 5.5, 6, 6.4, 7, 6.2, 6.7, 4.7, 3.8, 9.2, 8.1, 
7.6, 6.8, 6.3, 7.1, 10.5, 8, 9.9, 10.2, 12, 9.4, 14, 18, 11.9, 17.7, 
20.9, 18.8, 17.4, 13.5, 13.8, 12.6, 5.5, 6.1, 6.6, 6.3, 6.3, 5.1, 7.7, 
5.8, 5.4, 4.9, 4.5, 4.9, 4.7, 5, 4.8, 4.5, 5.6, 5.9, 4.6, 5.7, 7.2, 6.1, 
6.4, 5.4, 6.1, 5.6, 5.9, 6.4, 9.5, 11.2, 15.8, 15, 13.6 ;

[27] = }
)

ncdump doesn't provide an option to suppress the header 
information, and as you can hopefully tell, the data I'm looking for is 
in one long string at key position 26.


How can I extract what I need from that (wmax) and have it as an 
array: wmax = array(5, 5, ...)


This is only one variable.  I will be pulling more variables out, 
and they all come out the same way as above, as strings.  The headers 
might change, so I can't simply say ignore the first 0-25 keys and 
expect what I need to be at position 26.  I need a reliable way of 
detecting where the data section starts.  And I need to convert the 
strings into arrays for each data set.


Suggestions?

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Extracting data from exec() call

2011-06-14 Thread Ashley M. Kirchner

On 6/14/2011 12:03 PM, Shawn McKenzie wrote:

--or to search for wmax =
if($array = preg_grep('/^ wmax = $/', $output)) {
$wmax = explode(', ', $array[0]);
}
array_shift($wmax);
print_r($wmax);

May need some more error checking.


Yeah, error checking ...

Can't search for '/^ wmax $/' because it just returns nothing.  
Dropping the '$' at the end works.


The array_shift() also drops the first variable because the 
explode() call breaks it up as:

wmax = 5, 5, 5.4 ... etc.  First value = 'wmax = 5'

And the explode also fails because data is not in $array[0], it's 
in $array[30].  Inserting an array_values() to reindex helps.


So as of right now, I'm looking at:

  if ($array = preg_grep('/^ wmax = /', $output)) {
$array = array_values($array);
$wmax = explode(', ', $array[0]);
  }
  array_shift($wmax);
  print_r($wmax);

The array_shift() call needs to shift out the 'wmax = ', but leave 
the first value.


And, I still need to convert the whole thing into '$wmax = {5, 5, 
5.4, ...}'.  Right now it's an array of strings:


Array
(
[0] =  wmax = 5
[1] = 5
[2] = 5
[3] = 5.4
)


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Check for open file

2011-03-03 Thread Ashley M. Kirchner
 

Is there a clean or reliable way of checking to see if a
file is still being written to before doing anything with it?

 

Here's the scenario: we have a Samba share that we can copy
files to (from within Windows or Macs).  The server picks up the file and
does some processing of said file.  At the moment this is all a manual
process: we copy a file into the Samba share, wait for that to finish then
go to a web page (on the server) and tell it to process the file that was
just copied into the Samba share.  I'm trying to see if there is a way to
automate this where a file, or multiple files, get copied into the share and
the server picks them up and process automatically without needing any
interaction.

 

Can PHP detect this, or should I look into some delayed
process of checking the file's modified time stamp versus current time and
not touch the file till a certain threshold has been reached (say 30 seconds
difference?).

 

Ideas, suggestions, comments .



RE: [PHP] Check for open file

2011-03-03 Thread Ashley M. Kirchner

 Write the file with a temporary name and extension. Once the file is
closed,
 change the name to the pattern your server is looking for. Once you finish
 processing it, either change the name again, or move it to a different
 directory. Don't reuse the same file name, but add a numeric value which
 increases every time you create it. Keep a log of which files have been
 processed and any errors each one produced.
 
 Bob McConnell

I can't require nor expect those copying the files into the share folder to
do this.  No, they will simply be grabbing a set of image files from one
network share and drag them into this Samba share, as is.  I'm not worried
with what happens when PHP picks it up (name changes, moving to a diff
folder, etc., etc.)  I'm only concerned with the first step ... picking up
the file only *after* it's done copying.

I can run PHP as a timed crontask, but I need to figure out a safe way for
it to either grab a file or leave it alone because it's not done yet.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Check for open file

2011-03-03 Thread Ashley M. Kirchner
 As far as I was aware, if you're in the middle of writing to a file and 
 another
 script was attempting to write to it, the OS would prevent that as you had an
 open lock on it.
 
 --
 Thanks,
 Ash
 http://www.ashleysheridan.co.uk

I guess I would have to test that.


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Google Visualization Chart API

2011-02-17 Thread Ashley M. Kirchner


I'm currently using Google Visualization API[1] to generate both 
interactive and static charts for a client and they're viewing these 
online[2].  However they now want to be able to download a PDF 
containing the charts (static) in it.  Does anyone know of a way where I 
can take the same API and create a PDF document instead?


I've worked with fpdf[3] in the past to create PDFs on the fly so 
that's no problem.  The problem is figuring out how to get the charts in 
such a way that I can shove them into the PDF.


[1] http://code.google.com/apis/visualization/
[2] Example: http://www.yeehaw.net/chart.html - feel free to view 
source

[3] http://www.fpdf.org/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Google Visualization Chart API

2011-02-17 Thread Ashley M. Kirchner

On 2/17/2011 12:26 PM, Ashley Sheridan wrote:
Googles API creates an image which you can save locally and insert 
into a PDF that you create with something like fpdf. There are plenty 
of functions in PHP which can be used for this, such as fread(), etc.


That's the thing, I know it does, but how do I capture that.  It's 
all done through their javascript code:


new 
google.visualization.ImagePieChart(document.getElementById('visualization')).

draw(data, {is3D: true, height: 250});
}

When that runs, it looks for the element 'visualization' to put the 
graph in:


div id=visualization/div

So how do I go about capturing the image instead of it being 
written to the doc.


PS, if anyone replies can they leave this line in. I've been trying to 
contact Dan Brown because my email server seems to have been blocked 
by php.net, so none of my replies to the list ever get through.


Dan Brown, calling Dan Brown ...


RE: [PHP] Google Visualization Chart API

2011-02-17 Thread Ashley M. Kirchner
 So. Easy peasy.

Not exactly.  Those examples are not from the Visualization API - it's 
two different things.  The API is written so that one does not have to generate 
those parameters individually and then pass them through POST/GET to Google.  
It's cleaner and faster to work with.  The code for the Visualization API is 
very different from the code the regular Chart API uses.


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Printing in columns

2010-08-27 Thread Ashley M. Kirchner
 

I need some guidance here.  I've been fighting with this
problem for a few days now and not having a whole lot of luck.  I have some,
but I run into issues sooner or later.  So I'm hoping that someone here can
give me some ideas of how to better approach this, perhaps help with coding
as well.

 

My data consists of a number of addresses in any number of
US states.  I need to format them as such:

 

- have a title that consists of the state name, spanning the
full width of a

- have all the addresses pertaining to that specific state
split into two columns and displayed below.

- output everything to Letter size PDF.

 

In very simple form, it looks something like this (hoping
this doesn't get mangled in formatting):

 

+---+

|   STATE NAME  |

+---+

|  Address 1  |   Address 5 |

|  Address 2  |   Address 6 |

|  Address 3  |   Address 7 |

|  Address 4  | |

+---+

 

So far what I've been able to get done is so the data
sorting and matching up the addresses with their states.  I can format the
address the way I want them displayed and all.  All the way to where I start
outputting the data.  However .

 

I have to account for page length so that my data doesn't
run past the page.  I have to account for the possibility that the current
state being processed will have some lines on one page and some more on the
next page . which is fine, but when that happens, I want the title repeated
on the next page like so: STATE NAME (Cont.)

 

So here's how far I got:

- grab data from CSV file

- process/sort data

- loop through data, line by line, inserting same state
addresses into an array()

- when I encounter a new state, I move to output the current
contents of the array()

- when it's time to output the array, I do:

- array_chunk($array, ceil(count($array)/2))

- output chunks into respective column

 

The problem I have is when I reach the bottom of the page
while printing the first chunk.  Let's say I have 120 records to print, and
I only have room for 23 lines.  So initially the array gets split into two
chunks of 60 records each.  I start outputting data.  I reach the end of the
document and still have 37 lines left, so now what?

 

Right now I'm thinking I need to take that remaining data,
merge it with the second chunk and start outputting that into the second
column till I reach the bottom of the page again (which would be 23 lines
later.)  At that point I will still have 74 record left (14 PLUS the initial
60 lines that was the original 2nd chunk.)  I start a new page, add the same
state name title, and go through the motions again of rechunking the
remaining data and outputting again.

 

Does any of that even make sense?  Am I going on about it
the right way?  Is there a better way to do this to begin with?

 



[PHP] MySQL select matching

2010-07-19 Thread Ashley M. Kirchner


I may be going at this completely wrong but at the moment I'm 
stuck.  I have a DB from a client and need to do several searches on 
it.  This one sentence is important because it's their DB, not mine.  So 
I can't modify the way the DB was created in the first place, I can only 
work with what I have.  And, whatever the solution to this might be, it 
does NOT have to be strictly MySQL, it can also be a PHP solution (which 
is why I'm sending it there as well.)  So, having said that, consider 
the following table:


+---+-+-+---+
| 1 | 123 | 0.0 | C |
| 1 | 234 | 0.1 | D |
| 1 | 345 | 0.0 | D |
| 1 | 456 | 0.1 | C |
| 1 | 567 | 0.1 | G |
| 2 | 123 | 0.0 | C |
| 2 | 234 | 0.1 | D |
| 2 | 345 | 0.0 | D |
| 3 | 234 | 0.1 | D |
| 3 | 345 | 0.0 | D |
| 3 | 123 | 0.0 | C |
| 3 | 456 | 0.1 | C |
| 3 | 567 | 0.1 | G |
| 4 | 123 | 0.0 | C |
| 4 | 234 | 0.1 | D |
| 4 | 345 | 0.0 | D |
+---+-+-+---+

mysql select * from table where id='1';
+---+-+-+---+
| 1 | 123 | 0.0 | C |
| 1 | 234 | 0.1 | D |
| 1 | 345 | 0.0 | D |
| 1 | 456 | 0.1 | C |
| 1 | 567 | 0.1 | G |
+---+-+-+---+

Now, I have to find other IDs that match the above result.  In the 
table, that would be ID '3' (and in the entire DB, there may be 
others as well - I need to find all those IDs.)  But, notice how ID 0003 
isn't in the same order as ID 1, but the data is still the same.


So how do I efficiently search through the DB to find other IDs 
that matches the one I need?  I can't imagine doing a for loop selecting 
each ID and comparing their result to the one I'm starting with.  If the 
DB contains thousands upon thousands of rows, that might take a very 
long time.


Open to suggestions.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: [MySQL] Re: MySQL select matching

2010-07-19 Thread Ashley M. Kirchner

On 7/19/2010 10:48 AM, Michael Dykman wrote:

Not quite sure what the question is.

from:
   

mysql  select * from table where id='1';
+---+-+-+---+
| 1 | 123 | 0.0 | C |
| 1 | 234 | 0.1 | D |
| 1 | 345 | 0.0 | D |
| 1 | 456 | 0.1 | C |
| 1 | 567 | 0.1 | G |
+---+-+-+---+
 

How do we deduce that you would want ID '3' ?

This conversation would be easier if we gave names to those columns..
   


I didn't think it mattered, but the ID that I'm starting with (in 
this case '1') is the user id currently searching the DB.  Basically 
I take the user id and collect the initial data set I need to compare 
against.


As for names on the columns, ok:

+---+-+-+---+
|   uid | set | dec | l |
+---+-+-+---+
| 1 | 123 | 0.0 | C |
| 1 | 234 | 0.1 | D |
| 1 | 345 | 0.0 | D |
| 1 | 456 | 0.1 | C |
| 1 | 567 | 0.1 | G |
+---+-+-+---+




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] is ?= good?

2010-06-11 Thread Ashley M. Kirchner

On 6/11/2010 11:40 AM, Daevid Vincent wrote:


I use short tags and I output XML all the time.
   


I think there's a difference to note here.  You're outputting XML 
from PHP, versus files having XML tags in the files ... I ran into a 
problem with short tags not too long ago when a client transferred their 
website to us.  They had every single file starting with:


?xml version=1.0 encoding=UTF-8?

When you have short_tags enabled, this causes problems.  And 
because we have other clients who have applications written using 
short_tags, I had to redo all of those XML tags and make them:


???xml version=1.0 encoding=UTF-8?

This is why personally I refuse to use short tags - I'd rather type 
the whole thing out  and not run into trouble later if for some reason I 
have to move hosts.  None of my new servers have short_tags turned on.  
And anyone who asks is being told the same thing: type it out.


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] is ?= good?

2010-06-11 Thread Ashley M. Kirchner

On 6/11/2010 4:07 PM, David Harkness wrote:
*PHP* files? I would have flagged that as the problem rather than 
disabling

short tags.
   


Yeah, whoever created their site originally mixed XML/HTML/PHP all 
in the same file (all the files were .html but contained xml and php 
snippets) so I had to change their specific virtual host and then each 
individual file ...



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Need login suggestions

2010-05-03 Thread Ashley M. Kirchner
 -Original Message-
 From: Karl DeSaulniers [mailto:k...@designdrumm.com]
 Sent: Monday, May 03, 2010 12:03 AM
 To: PHP
 Subject: Re: [PHP] Need login suggestions
 
 I see, well I have a login that has multiple levels and here is how I
 have it.
 Obvious pertinent info has been changed, but you can adopt and add
 your own.

That part I already have and isn't the problem.  We're at the 'who is this
person registering' stage before I can even determine what level they belong
in.  :)


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Need login suggestions

2010-05-02 Thread Ashley M. Kirchner
Slightly OT, but I can't think of a better forum to ask this in.  I'm sure a
lot of us here have at some point or another built a system that requires
registration to gain access.  What I'm trying to figure is how to set
different levels of access.

 

We're building a large site for a school district, to be used by both
students and parents.  When a student logs in, they gain some access to the
site, and when a parent logs in, they gain access to other sections on the
site.  That's all fine and dandy, it's the actual registration process that
I'm having a hard time with.

 

How to determine if a registration is a student or a parent.  Do I simply
give them a check box (or other method) to pick from (student or parent) and
hope they're being honest?  Has anyone here have to deal with that in the
past, and would you be willing to give me some ideas of what you did?
Thanks!



RE: [PHP] Need login suggestions

2010-05-02 Thread Ashley M. Kirchner
 -Original Message-
 From: Nilesh Govindarajan [mailto:li...@itech7.com]
 Sent: Sunday, May 02, 2010 8:20 PM
 To: php-general@lists.php.net
 Subject: Re: [PHP] Need login suggestions
 
 Its a very bad idea to allow public registration for parents, instead
 the school IT department should give accounts to students and parents.

Now, how does that answer the question?  What does it matter to you how or 
where this is being done?  That's not what I was asking.  The simple fact that 
I mentioned a school district in my e-mail, you took that approach.  I could've 
just as well mentioned a completely different scenario.  The point is, the 
question is about different levels of access based on a registration process.


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Need login suggestions

2010-05-02 Thread Ashley M. Kirchner
 -Original Message-
 From: Nathan Rixham [mailto:nrix...@gmail.com]
 Sent: Sunday, May 02, 2010 8:39 PM
 To: Ashley M. Kirchner
 Cc: php-general@lists.php.net; Nilesh Govindarajan
 Subject: Re: [PHP] Need login suggestions
 
 Ashley,
 
 I think Nilesh, (and later both Bobby  I), were just looking out for
 our fellow developer, with good, if not the best intentions.
 
 Consider the scenario where you are making a school district site for
 students and parents, and you slipped up and gave access to kids
 details
 to anybody who claimed to be a parent - I think in that scenario you'd
 really appreciate the gentle nudge - and we, many of us parents,
 wouldn't want the possibility of a hurt (or worse) child due to not
 speaking up ;)

While I can appreciate that, this isn't the case here.  This isn't sensitive 
information being broadcasted here.  It's simply a matter of figuring out who's 
registering for what.  Kids would be registering for a photo contest, parents 
will be registering for something completely different.  So what if a student 
registers on the wrong side of the wall?  Nothing happens there other than not 
having the ability to participate in the photo contest because it won't be 
available to them.  And they can't *see* anything that the parents have done 
either, those are all contained within each specific account.

I did take offense in Nilesh response because to me all he did was jump right 
down my throat and tell me not to do something (or that it's a very bad idea) 
without even knowing WHAT it is that's being done.  Whether this was a school 
district, or a gaming website between friends, it makes absolutely no 
difference.  I'm asking about the specifics for a registration mechanism, NOT 
whether I should share information, nor what kind of information is being 
shared.

This is a public school district, and we DO allow public registrations on our 
campus, because not all schools fall under our central system, and because 
parents want information.

I'm simply inquiring from others if anyone has thought this through and come up 
with some way of determining who's who when they register, and I hate to say 
it, but so far the only person that actually answered my question with ideas 
was you, Nathan.  So far everyone else has done nothing but say 'don't do it'.  
That's not helping any.


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] RE: Need login suggestions

2010-05-02 Thread Ashley M. Kirchner

 -Original Message-
 From: Nathan Rixham [mailto:nrix...@gmail.com]
 Sent: Sunday, May 02, 2010 8:21 PM
 To: Ashley M. Kirchner
 Cc: php-general@lists.php.net
 Subject: Re: Need login suggestions
 
 Ideally you need to be able to unambiguously identify either a student
 or a parent, you're best bet is to go for student - thus try and find a
 single bit of information that both a student and you know about that
 student, possibilities are:

Yep, easier said than done.  It would be rather easy to determine a
student, they're all common login formats.  Staff e-mails are different yet,
as are others.  However, for the charter schools, they don't fall in the
same common pool, and thus have totally different e-mails, public e-mails
at that.  So I can't simply rely on their e-mail.

I can certainly ask for a student ID (and verify that on the
backend), but again, parents also know their student's IDs.  They also know
what year.  Teacher won't have any bearing here because there is no such
thing as a 'home room' at the level we're working at.  I'm not so much
worried about a parent registering on the wrong side of the wall ... the
access would be even less anyway.  And while a student registering on the
wrong side simply won't give them access to the contest, there is also no
reason for them to be there.  And rather than me getting an e-mail to change
their registration, I'd rather it happen automatically.  There is nothing on
the parent side that is a secret or that the student can't know.  This isn't
any kind of secure or secret site we're working with here.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Re: Need login suggestions

2010-05-02 Thread Ashley M. Kirchner
 -Original Message-
 From: Bobby Pejman [mailto:bpej...@gmail.com]
 Sent: Sunday, May 02, 2010 8:30 PM
 To: Nathan Rixham; Ashley M. Kirchner
 Cc: php-general@lists.php.net
 Subject: Re: [PHP] Re: Need login suggestions
 
 I would also agree that allowing parent registration could be risky.
 What you may be able to do just off the top is create a UserLevel field
 in your users table and assign value 1 for all those who say they're
 students.  That is, if you have no student ids at your disposal.
 
 Then, when parents register, you can ask who their kid is, and assign a
 user level 2, for example.  When a parent finishes their registration,
 don't allow them access.  Display a message saying you'll have to call
 in to get your password or something similar.
 
 What you're essentially doing is identifying parents by their user
 level yet making sure parents are parents.
 
 Just an idea I thought I share.

What you're suggesting, multi level access, is already in place.  It's
determined by whatever group a login falls in, student, staff,
administrator, contractor, volunteer, parent, etc., etc.  However, for what
I'm doing, working with one of the departments, we don't have full access to
the LDAP server to verify a login, nor can we expect someone registering for
*transportation* is also registered in the main LDAP server.  So things work
separately.

What we're doing has nothing at all to do with what's on the main server.
No personal information is being shared or broadcasted.  No student
information, absolutely nothing.  This is strictly a case of 'user A' versus
'user B' and figuring out a way to determine, through registration, what
level of access they get.  Is it based solely on the honor system, hoping
that each user does the right thing when they register, or have people come
up with some other kind of mechanism ...


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Need login suggestions

2010-05-02 Thread Ashley M. Kirchner
 -Original Message-
 From: Angus Mann [mailto:angusm...@pobox.com]
 Sent: Sunday, May 02, 2010 10:43 PM
 To: Ashley M. Kirchner; php-general@lists.php.net
 Subject: Re: [PHP] Need login suggestions
 
 It sounds like it really doesn't matter how you do it. Nothing bad
 happens
 if a student registers as a parent or vice-versa and the only person
 inconvenienced is the end-user. I would just take some simple steps to
 ask
 the person if they want to view as a student or as a parent. Have you
 considered the option of just letting people register, and then
 allowing
 them to select a radio-button labelled Show me information important
 to
 parents or Show me information relevant to students or Show me
 information relevant to both.
 
 Some users might quite legitimately want to see both sets of content.

Hmm, didn't think of that.  I suppose it's possible a parent might want to
see both sides, though a student ... can't think of a reason why but in the
end, I don't know if it really matters.  Thanks for the suggestion!


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Need login suggestions

2010-05-02 Thread Ashley M. Kirchner
 -Original Message-
 From: Paul M Foster [mailto:pa...@quillandmouse.com]
 Sent: Sunday, May 02, 2010 10:53 PM
 To: php-general@lists.php.net
 Subject: Re: [PHP] Need login suggestions
 
 The only reliable way to resolve this is to let the school
 administration to handle it. Each registration would *attempt* to
 register as a student, parent or whatever. Those attempted
 registrations
 would go into a wait queue. Meantime, emails would be sent to an
 administrator whose job is would be to bless those registrations.
 They
 would check to see if a potential registrant was what they claimed to
 be. You'd give them a page where the queued registration attempts would
 show up. And they would check the proper box for each potential
 registrant. Once done, the registration would be completed, and in the
 proper category.

Yeah, that would fall on our shoulders.  School administration won't do
this.  It comes back to the IT Department and we have to figure it out.
The problem is, while we can bless student registrations, we can't always
tell if the next one is a parent or not, or if it's a parent in our
district.

We do have another system in place, one in which we hand out 2 unique keys
for each student at each school and parents pick those up.  Internally those
keys are matched to that student so we know who it is that's registering.
However, that requires a lot of front work to get those keys out.

For this particular project, we want to make it as painless as possible, but
the more I think about it, the more I'm accepting the impossible nature of
it.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Need login suggestions

2010-05-02 Thread Ashley M. Kirchner
 -Original Message-
 From: Adam Richardson [mailto:simples...@gmail.com]
 Sent: Sunday, May 02, 2010 10:59 PM
 To: php-general@lists.php.net
 Subject: Re: [PHP] Need login suggestions
 
 Just be cautious with FERPA guidelines (which can actually get quite
 confusing) if you're doing this in the US.  For instance, normally a
 child's
 name is considered Directory information, or that is, information
 that a
 school can disseminate without consent.  However, this requires that
 the
 school provided the parents an opportunity to opt-out of such
 disclosures.
  As a developer of some educational games AND the husband of an
 elementary
 teacher, I realize FERPA can be quite challenging at times.
 
 I point this out just in case the process you considered included
 presenting
 a drop-down of student names or anything like that in the publicly
 accessible interface.
 
 Here's the links just in case you haven't already read-up (that is, if
 this
 even applies to you):
 http://www2.ed.gov/policy/gen/guid/fpco/ferpa/index.html


Nothing is getting displayed anywhere, especially student information.  In
fact, this particular interface is detached from our main database for that
exact reason.  It's being done on an opt-in system too.  We don't make the
assumption that everyone wants to be included by default.  We let them come
to us.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Need login suggestions

2010-05-02 Thread Ashley M. Kirchner
 -Original Message-
 From: Karl DeSaulniers [mailto:k...@designdrumm.com]
 Sent: Sunday, May 02, 2010 11:44 PM
 To: PHP
 Subject: Re: [PHP] Need login suggestions
 
 Hi Ashley,
 I would have your database that is attached to this part of the
 website,
 verify with another database that stores all your student and parent
 info for your school
 and when they register, you can actually check against a database of
 students that actually
 attend the school and the parents of that student on your server not
 through a login form.
 I believe there is a way to set up a cron or something like that
 where the check is made at
 the server level and no one else can check that way.

That will only work for a rather small subset of students and parents.
Unfortunately not all students in the district are actually in our main
database.  Those attending charter schools are not, so we can't verify them.
And not all parents are actually registered in our main database.  Like I
mentioned, we don't assume everyone wants in on our systems, we let them
come to us.  So if they don't, we don't have them.  (It's amazing how many
don't care how their kids are doing in school.)

For this project we're working on, we have parents and students who are not
in our main DB wanting to be part of it.  Manually, we can check who they
are and do the verification that way.  But, try doing that for several
thousands of registrations and it gets old really fast.  This is why we've
been asked to make it as automated as possible.

Can't say I'm happy to work on this but such is life ...


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Array differences

2010-04-14 Thread Ashley M. Kirchner

On 4/14/2010 2:39 AM, Ashley Sheridan wrote:

On Tue, 2010-04-13 at 23:01 -0600, Ashley M. Kirchner wrote:

  $array1 = array(12, 34, 56, 78, 90);
  $array2 = array(12, 23, 56, 78, 89);

  $diff1 = array_diff($array1, $array2);
  $diff2 = array_diff($array2, $array1);

  $result = array_unique(array_merge($diff1, $diff2));

  print_r($result);
 


I don't see any problems with doing it that way. This will only work 
as you intended if both arrays have the same number of elements I 
believe, otherwise you might end up with a situation where your final 
array has duplicates of the same number:


$array1 = $array(1, 2, 3, 4, 5, 6);
$array2 = $aray(1, 3, 2, 5);


Wouldn't array_unique() take care of that though?  Your example 
above returns 4 and 6, which would be correct.


A

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Array differences

2010-04-14 Thread Ashley M. Kirchner
No because that only does a one-way comparison.  It only tells me what's
missing from $array2.  I need it from both arrays.  That's why I'm comparing
1 versus 2, then 2 versus 1, and then doing a merge/unique on the result.

$array1 = array(1, 2, 3, 4, 5, 6);
$array2 = array(1, 3, 2, 8, 9);
$result = array_diff(array_unique($array1 + $array2),
array_intersect($array1, $array2));

= (4, 5, 6)


Versus:

$array1 = array(1, 2, 3, 4, 5, 6);
$array2 = array(1, 3, 2, 8, 9);
$diff1  = array_diff($array1, $array2);
$diff2  = array_diff($array2, $array1);
$result = array_unique(array_merge($diff1, $diff2));

= (4, 5, 6, 8, 9)

This second $result is what I want.  So far I haven't noticed any problems
doing it this way ... yet.  I'm sure someone will tell me otherwise.

Ash

 -Original Message-
 From: Ryan Sun [mailto:ryansu...@gmail.com]
 Sent: Wednesday, April 14, 2010 8:45 AM
 To: a...@ashleysheridan.co.uk
 Cc: Ashley M. Kirchner; php-general@lists.php.net
 Subject: Re: [PHP] Array differences
 
 Maybe this one works?
 array_diff(array_unique($array1 + $array2), array_intersect($array1,
 $array2))
 
 On Wed, Apr 14, 2010 at 4:39 AM, Ashley Sheridan
 a...@ashleysheridan.co.uk wrote:
  On Tue, 2010-04-13 at 23:01 -0600, Ashley M. Kirchner wrote:
 
  I have the following scenario:
 
 
 
       $array1 = array(12, 34, 56, 78, 90);
 
       $array2 = array(12, 23, 56, 78, 89);
 
 
 
       $result = array_diff($array1, $array2);
 
 
 
       print_r($result);
 
 
 
 
 
  This returns:
 
 
 
       Array
 
       (
 
           [1] = 34
 
           [4] = 90
 
       )
 
 
 
 
 
  However what I really want is a two-way comparison.  I want elements
 that
  don't exist in either to be returned:
 
 
 
  34 and 90 because they don't exist in $array2, AND 23 and 89 because
 they
  don't exist in $array1.  So, is that a two step process of first
 doing an
  array_diff($array1, $array2) then reverse it by doing
 array_diff($array2,
  $array1) and merge/unique the results?  Any caveats with that?
 
 
 
       $array1 = array(12, 34, 56, 78, 90);
 
       $array2 = array(12, 23, 56, 78, 89);
 
 
 
       $diff1 = array_diff($array1, $array2);
 
       $diff2 = array_diff($array2, $array1);
 
 
 
       $result = array_unique(array_merge($diff1, $diff2));
 
 
 
       print_r($result);
 
 
 
 
 
  -- A
 
 
 
  I don't see any problems with doing it that way. This will only work
 as
  you intended if both arrays have the same number of elements I
 believe,
  otherwise you might end up with a situation where your final array
 has
  duplicates of the same number:
 
  $array1 = $array(1, 2, 3, 4, 5, 6);
  $array2 = $aray(1, 3, 2, 5);
 
  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] Array differences

2010-04-14 Thread Ashley M. Kirchner
 -Original Message-
 From: lala [mailto:l...@mail.theorb.net]
 Sent: Wednesday, April 14, 2010 10:15 AM
 To: Ashley M. Kirchner
 Cc: php-general@lists.php.net
 Subject: Re: [PHP] Array differences
 
 Ashley M. Kirchner wrote:
 
  $array1 = array(1, 2, 3, 4, 5, 6);
  $array2 = array(1, 3, 2, 8, 9);
  $diff1  = array_diff($array1, $array2);
  $diff2  = array_diff($array2, $array1);
  $result = array_unique(array_merge($diff1, $diff2));
 
  = (4, 5, 6, 8, 9)
 
 Hi Ash,
 
 Isn't the array_unique() unnecessary?
 
 Mike


Thinking about it, it should be unnecessary, but at the same time I want to 
absolutely sure that I get unique values out of the two diffs.

Ash


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Array differences

2010-04-13 Thread Ashley M. Kirchner
I have the following scenario:

 

 $array1 = array(12, 34, 56, 78, 90);

 $array2 = array(12, 23, 56, 78, 89);

 

 $result = array_diff($array1, $array2);

 

 print_r($result);

 

 

This returns:

 

 Array

 (

 [1] = 34

 [4] = 90

 )

 

 

However what I really want is a two-way comparison.  I want elements that
don't exist in either to be returned:

 

34 and 90 because they don't exist in $array2, AND 23 and 89 because they
don't exist in $array1.  So, is that a two step process of first doing an
array_diff($array1, $array2) then reverse it by doing array_diff($array2,
$array1) and merge/unique the results?  Any caveats with that?

 

 $array1 = array(12, 34, 56, 78, 90);

 $array2 = array(12, 23, 56, 78, 89);

 

 $diff1 = array_diff($array1, $array2);

 $diff2 = array_diff($array2, $array1);

 

 $result = array_unique(array_merge($diff1, $diff2));

 

 print_r($result);

 

 

-- A



[PHP] Updating HTML on page

2010-04-05 Thread Ashley M. Kirchner
I have a PHP script that queries a DB to get a list of image names.  Then it
processes each name and generate thumbnails and what not.  What I want to do
is have a page called (through the browser) which updates as the PHP process
in the background is working.  So when you first pull up the page it will
say 'There are x images to process' and then dynamically update the page
with a progress status.  In its crudest form it should say something like
'Processing 1 of 5 images .'  When that image is done, it should update the
page with 2 of 5 . etc., etc.  Ideally without refreshing the page each
time.

 

Is this where I need to figure out Ajax and incorporate it with PHP?



RE: [PHP] Updating HTML on page

2010-04-05 Thread Ashley M. Kirchner
Hrm, been looking at it for a while now and I can feel a headache coming up.
I think I need to have one PHP script that does the processing, and another
that the user pulls up in their browser.  That one pings the processor
every so often to get updated data.  Yes?

Am I way off here?

 -Original Message-
 From: TG [mailto:tg-...@gryffyndevelopment.com]
 Sent: Monday, April 05, 2010 8:48 PM
 To: Ashley M. Kirchner; php-general@lists.php.net
 Subject: Re: [PHP] Updating HTML on page
 
 The only way to do it with PHP alone would be to control the output
 buffering and I've found that to be inconsistant in quality and
 predictability with different browsers even web servers.  I'm sure
 there's an art to getting that all working well with various
 technologies
 that are involved in the script - client caching and processing, but
 why
 mess with iffy when you can use a proven technology like AJAX.
 
 Get familiar with jQuery (or one of the other big JS libraries, but
 jQuery
 is my choice hands-down) and you'll probably find it's pretty easy.
 
 -TG


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] preg_match? Or something else?

2010-04-02 Thread Ashley M. Kirchner
I have an array that's created as follows:

 

$string = 73G146C   311- 309.1C;

$arr = preg_split(/[\s]+/, $string);

 

Now I need to take each element in that array, and break them up even
further so that I get:

 

73G= 73 and G

146C   = 146 and C

311-   = 311 and -

309.1C = 309, 1, and C  (notice 3 elements here)

 

I'm having a hard time trying to figure out what the proper regex would be
for this, or whether that's the right thing to do.  So far I've gotten this:

 

  preg_match(/^(?Plocation\d+)(?Pletter[A-Z-])/, $item, $matches);

  print_r($matches);

 

Which gives me:

 

Array

(

[0] = 73G

[location] = 73

[1] = 73

[letter] = G

[2] = G

)

Array

(

[0] = 146C

[location] = 146

[1] = 146

[letter] = C

[2] = C

)

Array

(

[0] = 311-

[location] = 311

[1] = 311

[letter] = -

[2] = -

)

Array

(

)

 

 

However that's as far as it goes.  For the other number it returns an empty
array and I know why, the decimal point.   Now I can evaluate each $item
every time, see if they contain a decimal point, and pass it to a different
regex string, but that seems rather inefficient to me.  So how can I do this
all in one fell swoop?

 

Anyone want to take a stab at it?



[PHP] ldap_bind() connectivity

2010-03-15 Thread Ashley M. Kirchner
Thanks to Jochem Mass for helping earlier to the string splitting.  Works
great (so far).  Now on to my next problem, which has to do with
ldap_bind().

 

I have the following code:

 

  $ldapconn = @ldap_connect($adServer);

  $ldapbind = ldap_bind($ldapconn, $ldapuser, $ldappass);

 

  if ($ldapbind) {

/** Successful authentication **/

$_SESSION['username'] = $username;

$_SESSION['password'] = $password;

  } else {

/** Authentication failure **/

$form-setError($field, laquo; Invalid username or password
raquo;);

  }

  ldap_unbind($ldapconn);

 

The problem with this is that if the ldap_bind() fails in the second line,
it instantly spits text out to the browser:

 

Warning: ldap_bind() [function.ldap-bind
http://www.smartroute.org/contest/include/function.ldap-bind ]: Unable to
bind to server: Invalid credentials in /home/contest/include/session.php on
line 351

 

And because it does that, it never reaches the if routine right below it and
everything just bombs.  If I call it with @ldap_bind($ldapconn .) nothing
happens.  The error message gets suppressed but it also doesn't do anything
with the if routine afterwards.  It's almost like $ldapbind isn't getting
set at all.

 

What am I missing here?



[PHP] Splitting a string ...

2010-03-14 Thread Ashley M. Kirchner
I'm not a regexp person (wish I was though), and I'm hoping someone can give
me a hand here.  Consider the following strings:

 

-  domain\usern...@example.org

-  domain\username

-  the same as above but with / instead of \  (hey, it happens)

-  usern...@example.org

-  username

 

Essentially I have a sign-up form where folks will be typing in their
username.  The problem is, in our organization, when you tell someone to
enter their username, it could end up being any of the above examples
because they're used to a domain log in procedure where in some cases they
type the whole thing, in other cases just the e-mail, or sometimes just the
username.

 

So what I'd like is a way to capture just the 'username' part, regardless of
what other pieces they put in.  In the past I would write a rather
inefficient split() routine and eventually get what I need.  With split()
getting deprecated, I figured I may as well start looking into how to do it
properly.  There's preg_split(), str_split(), explode() . possibly others.

 

So, what's the proper way to do this?  How can I capture just the part I
need, regardless of how they typed it in?

 

Thanks!

 

A



[PHP] Connect to LDAP

2009-11-08 Thread Ashley M. Kirchner


   Hi folks,

   I've never done any PHP-LDAP code writing (nor have I ever dealt 
with an LDAP server to begin with.)  However I'm writing an app which 
requires verifying a user's credentials against an LDAP server.  The 
admin of the server sent me the following snippet, however also made it 
clear that he is not 100% whether it's accurate (he's not a PHP coder).  
And I don't have remote access to the server (the app is going to sit on 
the internal network and the LDAP server doesn't accept outside 
connections.)


   So, asking the wise folks on here, does the following piece look 
semantically correct?


/* Check against LDAP server */
$adServer = server.address.hidden;
$ldapconn = ldap_connect($adServer) or die(Connection to the 
AD server failed.);

$ldapuser = $_POST[uname];
$ldappass = $_POST[pword];
$ldapbind = ldap_bind($ldapconn, $ldapuser, $ldappass);

if ($ldapbind) {
  $msg = User Authenticated Successfully!;
  $_SESSION['username'] = $ldapuser;
  $_SESSION['password'] = $ldappass;
  return true;
} else {
  $msg = Invalid username / password;
  return false;
}

   Thanks.

   -- A

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Imagick question

2009-11-05 Thread Ashley M. Kirchner

Brady Mitchell wrote:
I'm sure it can be done, but without seeing your code we can't really 
help.
   Easily solved.  From the PHP manual 
(http://www.php.net/manual/en/function.imagick-roundcorners.php):


 ?php

   $image = new Imagick();
   $image-newPseudoImage(100, 100, magick:rose);
   $image-setImageFormat(png);

   $image-roundCorners(5,3);
   $image-writeImage(rounded.png);
 ?

   That produces a nice transparent cornered image, as it should.  
However, try saving it as a JEPG instead.  Set the image format to 
'jpeg' and write it out as 'rounded.jpg' and you'll notice the corners 
are now black.


   I know JPEG doesn't support transparency, that's fine.  What I want 
is to change the black to white instead.


   -- A

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Imagick question

2009-11-05 Thread Ashley M. Kirchner

Ashley Sheridan wrote:

Fill the background with white before you create the corners.

   Well, I tried that, with no luck.  This is my actual code:

 $width = 150;
 $height = 150;
 $im = new Imagick('original/' . $filename);
 $im-thumbnailImage($width, $height, true);
 $im-sharpenImage(50, 1);
 $im-setImageBackgroundColor('white');
 $im-roundCorners(5, 5, 7);
 $im-setImageFormat('jpeg');
 $im-writeImage('thumbnail/' . $filename);
 $im-clear();
 $im-destroy();

--
H | It's not a bug - it's an undocumented feature.
 +
 Ashley M. Kirchner mailto:ash...@pcraft.com   .   303.442.6410 x130
 IT Director / SysAdmin. 800.441.3873 x130
 Photo Craft Imaging   .  2901 55th Street
 http://www.pcraft.com . .  ..   Boulder, CO 80301, U.S.A. 



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] PEAR segfaulting

2009-10-19 Thread Ashley M. Kirchner


   Typing 'pear segmentation fault' in Google produces tons of 
responses so I know I'm not the only one with this issue, but I'll be 
damned if I can figure out what the problem is and how to fix it.  I 
rolled my own PHP 5.3.0 from source.  Compilation went fine, no errors.  
Installation went without any errors.  I can run 'pecl' and install some 
packages, but when I try to run 'pear', it segfaults after it downloads 
a package:



$ pear install DB
WARNING: pear/DB is deprecated in favor of pear/MDB2
downloading DB-1.7.13.tgz ...
Starting to download DB-1.7.13.tgz (132,246 bytes)
.done: 132,246 bytes
Segmentation fault



   Running it with -vvv gives me:


$ pear -vvv install DB

Warning: file_exists(): Unable to find the wrapper channel - did you 
forget to enable it when you configured PHP? in 
PEAR/Downloader/Package.php on line 1510


Warning: is_file(): Unable to find the wrapper channel - did you 
forget to enable it when you configured PHP? in 
PEAR/Downloader/Package.php on line 1520


Warning: is_file(): Unable to find the wrapper channel - did you 
forget to enable it when you configured PHP? in 
PEAR/Downloader/Package.php on line 1520

WARNING: pear/DB is deprecated in favor of pear/MDB2
pear/DB: Skipping required dependency pear/PEAR version 1.9.0, already 
installed as version 1.8.0

Downloading http://pear.php.net/get/DB-1.7.13.tgz;
downloading DB-1.7.13.tgz ...
Starting to download DB-1.7.13.tgz (132,246 bytes)
.done: 132,246 bytes
Segmentation fault



   So, is this a known issue?

   -- A

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PEAR segfaulting

2009-10-19 Thread Ashley M. Kirchner

Thodoris wrote:
Was, by any chance, PHP installed as binary before you install it from 
source?
If this is the case try uninstalling the binary and then configure and 
compile the source again running 'make clean' before.
   PHP was not installed at all on this machine.  I grabbed the source 
from php.net and installed that.


--
H | It's not a bug - it's an undocumented feature.
 +
 Ashley M. Kirchner mailto:ash...@pcraft.com   .   303.442.6410 x130
 IT Director / SysAdmin. 800.441.3873 x130
 Photo Craft Imaging   .  2901 55th Street
 http://www.pcraft.com . .  ..   Boulder, CO 80301, U.S.A. 



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PEAR segfaulting

2009-10-19 Thread Ashley M. Kirchner

Thodoris wrote:

Is there a good reason for needing this pear package?

http://pear.php.net/package/DB

It is old and it has been replaced with MDB2 some time ago. Why don't 
you use it instead of trying to install DB.
   The issue here isn't what package is being installed.  The issue is 
that PEAR segfaults no matter what I try to install.  PECL works just 
fine (at least I was able to install something with it.)


--
H | It's not a bug - it's an undocumented feature.
 +
 Ashley M. Kirchner mailto:ash...@pcraft.com   .   303.442.6410 x130
 IT Director / SysAdmin. 800.441.3873 x130
 Photo Craft Imaging   .  2901 55th Street
 http://www.pcraft.com . .  ..   Boulder, CO 80301, U.S.A. 



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PEAR segfaulting

2009-10-19 Thread Ashley M. Kirchner

Thodoris wrote:
Obviously something went wrong while installing PHP and you will have 
to find this because this probably the reason pear segfaults.


Did you run make test before installing? (makes sure everything went 
well)


You know you don't need pear binary to use a pear's package right? 
(it's pure PHP after all)
   I know, I've been doing this for years.  This is a new machine, and 
the only one where I have PHP 5.3.0 installed on (all the rest are PHP 
5.2.x and are all working fine.)  So at the moment I'm making the 
assumption it's something with 5.3.0 ...  I'm in the process of 
reinstalling it all from scratch again, see what happens.


   It also doesn't help with you search Google and you find, according 
to them, some 36,000 hits to 'PEAR segmentation fault' ... obviously 
something's up.


   -- A

--
H | It's not a bug - it's an undocumented feature.
 +
 Ashley M. Kirchner mailto:ash...@pcraft.com   .   303.442.6410 x130
 IT Director / SysAdmin. 800.441.3873 x130
 Photo Craft Imaging   .  2901 55th Street
 http://www.pcraft.com . .  ..   Boulder, CO 80301, U.S.A. 



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PEAR segfaulting

2009-10-19 Thread Ashley M. Kirchner
: pear/PEAR requires package pear/Archive_Tar (recommended 
version 1.3.3)
PHP Deprecated:  Function set_magic_quotes_runtime() is deprecated in 
/usr/bin/temp/PEAR/Registry.php on line 1179
PHP Deprecated:  Function set_magic_quotes_runtime() is deprecated in 
/usr/bin/temp/PEAR/Registry.php on line 1183
PHP Deprecated:  Function set_magic_quotes_runtime() is deprecated in 
/usr/bin/temp/PEAR/Registry.php on line 1179
PHP Deprecated:  Function set_magic_quotes_runtime() is deprecated in 
/usr/bin/temp/PEAR/Registry.php on line 1183
warning: pear/PEAR requires package pear/Structures_Graph (recommended 
version 1.0.2)
PHP Deprecated:  Function set_magic_quotes_runtime() is deprecated in 
/usr/bin/temp/PEAR/Registry.php on line 1179
PHP Deprecated:  Function set_magic_quotes_runtime() is deprecated in 
/usr/bin/temp/PEAR/Registry.php on line 1183
PHP Deprecated:  Function set_magic_quotes_runtime() is deprecated in 
/usr/bin/temp/PEAR/Registry.php on line 1179
PHP Deprecated:  Function set_magic_quotes_runtime() is deprecated in 
/usr/bin/temp/PEAR/Registry.php on line 1183
warning: pear/PEAR requires package pear/Console_Getopt (recommended 
version 1.2.3)
PHP Deprecated:  Function set_magic_quotes_runtime() is deprecated in 
/usr/bin/temp/PEAR/Registry.php on line 1179
PHP Deprecated:  Function set_magic_quotes_runtime() is deprecated in 
/usr/bin/temp/PEAR/Registry.php on line 1183
PHP Deprecated:  Function set_magic_quotes_runtime() is deprecated in 
/usr/bin/temp/PEAR/Registry.php on line 1179
PHP Deprecated:  Function set_magic_quotes_runtime() is deprecated in 
/usr/bin/temp/PEAR/Registry.php on line 1183
warning: pear/PEAR requires package pear/XML_Util (recommended version 
1.2.1)
PHP Deprecated:  Function set_magic_quotes_runtime() is deprecated in 
/usr/bin/temp/PEAR/Registry.php on line 1179
PHP Deprecated:  Function set_magic_quotes_runtime() is deprecated in 
/usr/bin/temp/PEAR/Registry.php on line 1183
PHP Deprecated:  Function set_magic_quotes_runtime() is deprecated in 
/usr/bin/temp/PEAR/Registry.php on line 1179
PHP Deprecated:  Function set_magic_quotes_runtime() is deprecated in 
/usr/bin/temp/PEAR/Registry.php on line 1183
PHP Deprecated:  Function set_magic_quotes_runtime() is deprecated in 
/usr/bin/temp/PEAR/Registry.php on line 1179
PHP Deprecated:  Function set_magic_quotes_runtime() is deprecated in 
/usr/bin/temp/PEAR/Registry.php on line 1183

downloading PEAR-1.9.0.tgz ...
Starting to download PEAR-1.9.0.tgz (291,634 bytes)
..done: 291,634 bytes
Segmentation fault

--
H | It's not a bug - it's an undocumented feature.
 +
 Ashley M. Kirchner mailto:ash...@pcraft.com   .   303.442.6410 x130
 IT Director / SysAdmin. 800.441.3873 x130
 Photo Craft Imaging   .  2901 55th Street
 http://www.pcraft.com . .  ..   Boulder, CO 80301, U.S.A. 



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PEAR segfaulting

2009-10-19 Thread Ashley M. Kirchner

Eddie Drapkin wrote:

Have you tried running pear upgrade pear?

   Yep, but I'll do it again for you to see:


pear -vvv upgrade pear

Warning: file_exists(): Unable to find the wrapper channel - did you 
forget to enable it when you configured PHP? in 
PEAR/Downloader/Package.php on line 1510


Warning: is_file(): Unable to find the wrapper channel - did you 
forget to enable it when you configured PHP? in 
PEAR/Downloader/Package.php on line 1520


Warning: is_file(): Unable to find the wrapper channel - did you 
forget to enable it when you configured PHP? in 
PEAR/Downloader/Package.php on line 1520
pear/PEAR: Skipping required dependency pear/Archive_Tar version 
1.3.3, already installed as version 1.3.3
pear/PEAR: Skipping required dependency pear/Console_Getopt version 
1.2.3, already installed as version 1.2.3
pear/PEAR: Skipping required dependency pear/XML_Util version 1.2.1, 
already installed as version 1.2.1
skipping installed package check of pear/pear, version 1.9.0 will be 
downloaded and installed

Downloading http://pear.php.net/get/PEAR-1.9.0.tgz;
downloading PEAR-1.9.0.tgz ...
Starting to download PEAR-1.9.0.tgz (291,634 bytes)
.done: 
291,634 bytes

Segmentation fault



   Like I said, it doesn't matter *WHAT* I try to install/upgrade, pear 
will always segfault.  PECL does not exhibit that behavior.



--
H | It's not a bug - it's an undocumented feature.
 +
 Ashley M. Kirchner mailto:ash...@pcraft.com   .   303.442.6410 x130
 IT Director / SysAdmin. 800.441.3873 x130
 Photo Craft Imaging   .  2901 55th Street
 http://www.pcraft.com . .  ..   Boulder, CO 80301, U.S.A. 



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PEAR segfaulting

2009-10-19 Thread Ashley M. Kirchner


   Ok, we have activity here.  Before deleting everything and 
re-installing, I decided to just rename my php.ini file.  Low and 
behold, pear works now.  So, now the next task is figuring out where and 
why does php.ini cause pear to bomb.


--
H | It's not a bug - it's an undocumented feature.
 +
 Ashley M. Kirchner mailto:ash...@pcraft.com   .   303.442.6410 x130
 IT Director / SysAdmin. 800.441.3873 x130
 Photo Craft Imaging   .  2901 55th Street
 http://www.pcraft.com . .  ..   Boulder, CO 80301, U.S.A. 



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PEAR segfaulting

2009-10-19 Thread Ashley M. Kirchner

Thodoris wrote:

Manually is the best solution as far as I can tell:

http://pear.php.net/manual/en/installation.getting.php
   That's exactly what I did.  I grabbed http://pear.php.net/go-pear 
and saved it, then ran php go-pear.php.  The result is what you saw in 
my previous e-mail.


--
H | It's not a bug - it's an undocumented feature.
 +
 Ashley M. Kirchner mailto:ash...@pcraft.com   .   303.442.6410 x130
 IT Director / SysAdmin. 800.441.3873 x130
 Photo Craft Imaging   .  2901 55th Street
 http://www.pcraft.com . .  ..   Boulder, CO 80301, U.S.A. 



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PEAR segfaulting

2009-10-19 Thread Ashley M. Kirchner


   Well, it boiled down to zlib.so causing the segfault.  As soon as I 
removed that module, everything worked.  Recompiling just the zlib.so 
module yielded the same result: pear segfaults.


   So now the question is: is it zlib's fault, or is it pear?

   At this point I've accomplished what I needed, but it doesn't 
actually fix the problem: enabling zlib will cause pear to segfault.


--
H | It's not a bug - it's an undocumented feature.
 +
 Ashley M. Kirchner mailto:ash...@pcraft.com   .   303.442.6410 x130
 IT Director / SysAdmin. 800.441.3873 x130
 Photo Craft Imaging   .  2901 55th Street
 http://www.pcraft.com . .  ..   Boulder, CO 80301, U.S.A. 



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Email configuration

2009-02-06 Thread Ashley M. Kirchner

Nathan Rixham wrote:

Hmmm...  So Ashley is a him?



yeah quot:
Actually I'm a guy, but we can't all be perfect ;)
http://www.mail-archive.com/php-general@lists.php.net/msg235765.html
   Wouldn't be the first Ashley who's a guy.  I happen to be one of 
those too ...


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] old HTTP variables

2009-01-18 Thread Ashley M. Kirchner


   Maybe I'm asking for trouble here, but, is there any way to make PHP 
5.2.8 understand the old $HTTP variables?  Like:


$HTTP_SESSION_VARS
$HTTP_GET_VARS
$HTTP_POST_VARS
$HTTP_SESSION_VARS
$HTTP_COOKIE_VARS

   etc., etc.

   I have an old application for which development has stopped back in 
2004 ...  Should I give up now and install an earlier version of PHP 
(and somehow have it behave nice next to PHP5?


   -- A

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] old HTTP variables

2009-01-18 Thread Ashley M. Kirchner

mike wrote:

$HTTP_GET_VARS = $_GET;

etc. :)
   I know what they are.  I'm not about to change a couple of thousand 
lines of someone else's code unless there's no other way.  :)


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] old HTTP variables

2009-01-18 Thread Ashley M. Kirchner

Larry Garfield wrote:

http://us3.php.net/manual/en/ini.core.php#ini.register-long-arrays
  

   Bingo.  That's what I needed.

Although you should probably take the time to upgrade the app anyway, as those 
variables are deprecated and won't be around forever.
   Yeah, that would be nice, except it's not something I wrote, nor am 
I inclined to go rewrite the app at this point in time.  Maybe sometime 
later, but right now I just needed to get the thing up and running.


   Thanks for the pointer!

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] phpguru.org back up

2008-08-13 Thread Ashley M. Kirchner

Richard Heyes wrote:

Lol. Not that sophisticated actually, trusty old tar and gzip, along
with regular downloads to my desktop so that they're in two locations
   If I may suggest ... if you have a second system that doesn't have a 
big load, you can simply rsync the data from one to the other every 24 
hours or however many times you want.  This way, when your primary 
system bites the dust, you can easily switch to the backup one and keep 
running while you work on the primary one.


--
H | It's not a bug - it's an undocumented feature.
 +
 Ashley M. Kirchner mailto:[EMAIL PROTECTED]   .   303.442.6410 x130
 IT Director / SysAdmin / Websmith . 800.441.3873 x130
 Photo Craft Imaging   . 3550 Arapahoe Ave. #6
 http://www.pcraft.com . .  ..   Boulder, CO 80303, U.S.A. 



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] running base64 code from unknown source

2008-07-24 Thread Ashley M. Kirchner

[EMAIL PROTECTED] wrote:

If this is a false code, hope we can do something about it.
  

   Code works as expected and spits out 'Hello World' as it should.

--
H | It's not a bug - it's an undocumented feature.
 +
 Ashley M. Kirchner mailto:[EMAIL PROTECTED]   .   303.442.6410 x130
 IT Director / SysAdmin / Websmith . 800.441.3873 x130
 Photo Craft Imaging   . 3550 Arapahoe Ave. #6
 http://www.pcraft.com . .  ..   Boulder, CO 80303, U.S.A. 



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] WAMP servers

2008-03-27 Thread Ashley M. Kirchner

Rod Clay wrote:
Hello.  Does anyone use a WAMP server?  And, if so, have you found one 
to be better than another?


I am using a WAMP server entitled, aptly enough, WampServer (formerly 
WAMP5).  In the few weeks I have been using it, I frequently get 
messages that a certain library or routine cannot be found.  My 
question therefore is:  do these WAMP servers typically come with all 
of the php libraries and subroutines that are most commonly needed?  I 
have the impression that this WAMP server does not have some of the 
libraries and subroutines I need (or would very much benefit from 
having, anyway).


Thanks for any information you can give me about WAMP servers.

Rod Clay
[EMAIL PROTECTED]


   Don't know anything about WAMP, but I run XAMPP on my laptop.

   http://www.apachefriends.org/en/xampp-windows.html

--
H | It's not a bug - it's an undocumented feature.
 +
 Ashley M. Kirchner mailto:[EMAIL PROTECTED]   .   303.442.6410 x130
 IT Director / SysAdmin / Websmith . 800.441.3873 x130
 Photo Craft Imaging   . 3550 Arapahoe Ave. #6
 http://www.pcraft.com . .  ..   Boulder, CO 80303, U.S.A. 



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: Posting Summary for Week Ending 18 January, 2008: php-general@lists.php.net

2008-01-19 Thread Ashley M. Kirchner


   Well, at least we know which subject will make it to the top next 
week


--
H | It's not a bug - it's an undocumented feature.
 +
 Ashley M. Kirchner mailto:[EMAIL PROTECTED]   .   303.442.6410 x130
 IT Director / SysAdmin / Websmith . 800.441.3873 x130
 Photo Craft Imaging   . 3550 Arapahoe Ave. #6
 http://www.pcraft.com . .  ..   Boulder, CO 80303, U.S.A. 


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] running Batch process using php

2007-10-22 Thread Ashley M. Kirchner

Javed Khan wrote:

Hello Everone,
 
I want to run a script in php which should execute at particular condition and if the condition is true then it will send out emails to the recipients.

Can anyone suggest how can I achieve this.
 
Thanx,
 
Javed
  


   Without spending a whole lot of brain cells at the moment, I'd say 
run it through a cron task (or 'at' task if you're on a Win32 platform).



--
W | It's not a bug - it's an undocumented feature.
 +
 Ashley M. Kirchner mailto:[EMAIL PROTECTED]   .   303.442.6410 x130
 IT Director / SysAdmin / Websmith . 800.441.3873 x130
 Photo Craft Imaging   . 3550 Arapahoe Ave. #6
 http://www.pcraft.com . .  ..   Boulder, CO 80303, U.S.A. 


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] evil script in server logs (Heads Up)

2007-10-05 Thread Ashley M. Kirchner

Paul Scott wrote:

I am taking a quick look through the access logs on our dev box, and
came across this little nasty that was trying to execute itself as a XSS
attack(?)
   Interestingly enough, MimeDefang/ClamAV quarantined your message 
because of that script:


   Quarantine Messages:
   Message quarantined because of virus: PHP.Shell.

   Someone saw it somewhere and reported it...

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] evil script in server logs (Heads Up)

2007-10-05 Thread Ashley M. Kirchner

Daniel Brown wrote:

Yeah, honestly I wasn't sure if it was an injection attack or if
those URLs were referrers in the logs.
  
   If you hit the first URL ( http://www.vesprokat.ru/n ) with, say 
lynx, you get that script coming up.  So it could've been referral 
hits.  Which could mean the remote host is already infected and is now 
looking for more targets.


--
W | It's not a bug - it's an undocumented feature.
 +
 Ashley M. Kirchner mailto:[EMAIL PROTECTED]   .   303.442.6410 x130
 IT Director / SysAdmin / Websmith . 800.441.3873 x130
 Photo Craft Imaging   . 3550 Arapahoe Ave. #6
 http://www.pcraft.com . .  ..   Boulder, CO 80303, U.S.A. 


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] evil script in server logs (Heads Up)

2007-10-05 Thread Ashley M. Kirchner

Daniel Brown wrote:

The biggest issue does still remain: if this is on your local
system, you need to figure out exactly how it got there in the first
place
   I thought the OP said he noticed it in his logs...  I understood 
that as someone cleverly trying to inject it somehow and it ended up in 
the log files.  But, without further information, I'm just as clueless...


--
W | It's not a bug - it's an undocumented feature.
 +
 Ashley M. Kirchner mailto:[EMAIL PROTECTED]   .   303.442.6410 x130
 IT Director / SysAdmin / Websmith . 800.441.3873 x130
 Photo Craft Imaging   . 3550 Arapahoe Ave. #6
 http://www.pcraft.com . .  ..   Boulder, CO 80303, U.S.A. 


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: [Fedora] [PHP] Installation of pear

2007-09-28 Thread Ashley M. Kirchner

[EMAIL PROTECTED] wrote:

Dear All,

Mine is FC6...
Just download the pear from 
http://download.pear.php.net/package/PEAR-1.6.2.tgz

So how to install the pear 1.6.2 with the system ?

   Read the installation documentation that comes with it.

--
W | It's not a bug - it's an undocumented feature.
 +
 Ashley M. Kirchner mailto:[EMAIL PROTECTED]   .   303.442.6410 x130
 IT Director / SysAdmin / Websmith . 800.441.3873 x130
 Photo Craft Imaging   . 3550 Arapahoe Ave. #6
 http://www.pcraft.com . .  ..   Boulder, CO 80303, U.S.A. 


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: [horde] Requirement of IMP / Horde

2007-09-26 Thread Ashley M. Kirchner

[EMAIL PROTECTED] wrote:

post_max_size = 10M
max_execution_time = 3600 ; Maximum execution time of each script, in
seconds
max_input_time = 3600 ; Maximum amount of time each script may spend
parsing request data
memory_limit = 512M ; Maximum amount of memory a script may consume
file_uploads = On
upload_max_filesize = 8M

But For IMP Display result :

1, Maximum Attachment Size: 2,097,152 bytes ( only 2MB ??? )
2, Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to
allocate 1519127 bytes) in
/home/itawm/html/horde/lib/Horde/MIME/Part.php on line 1027 ( limit 8MB
??? )
   You obviously don't ever read any of the numerous replies that 
people have sent you so far, on the Fedora list, on the PHP list, and 
now you want to come here on Horde/IMP and ask the same exact question 
again.  You have had several replies to this problem now, all of them 
pointing you directly to where you need to go inside of your Horde/IMP 
configuration to fix this problem.


   READ YOUR E-MAIL RESPONSES AND STOP BOTHERING PEOPLE ON MULTIPLE 
LISTS WITH THE SAME PROBLEM OVER AND OVER AGAIN.




--
H | It's not a bug - it's an undocumented feature.
 +
 Ashley M. Kirchner mailto:[EMAIL PROTECTED]   .   303.442.6410 x130
 IT Director / SysAdmin / Websmith . 800.441.3873 x130
 Photo Craft Imaging   . 3550 Arapahoe Ave. #6
 http://www.pcraft.com . .  ..   Boulder, CO 80303, U.S.A. 


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Updating dropdown list

2007-06-11 Thread Ashley M. Kirchner


   I have a page containing two drop down lists.  I need to figure out 
a way to populate/update the second drop down list based on a selection 
of the first one (the data for both drop down lists is in a MySQL 
database).  Is this something I need to do in JavaScript?  Or can I 
somehow trick PHP to do this?


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Updating dropdown list

2007-06-11 Thread Ashley M. Kirchner

Tijnema wrote:
But Javascript != PHP, so if this is what you want, you're on the 
wrong list...
   Ik weet dat meneer.  But I also hate JavaScript.  So if I can avoid 
it and use PHP, then I will.  Hence me asking here first to see if I can 
get it accomplished with PHP.  :)


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Updating dropdown list

2007-06-11 Thread Ashley M. Kirchner

Tijnema wrote:

I think he means something like on the nvidia driver download page [1]
This is only possible with javascript, you could take a look at the
page I gave to see how they did it ;)
But Javascript != PHP, so if this is what you want, you're on the 
wrong list...


Tijnema

[1] http://www.nvidia.com/content/drivers/drivers.asp

   Honestly, that's overkill.  Though elegant, I don't need something 
like that.  Just a drop down that allows one to pick names, and when 
picked it would update a second drop down (on the same page) with events 
related to that name.  Then one can pick one of those events and hit a 
submit button to trigger an external script.


--
W | It's not a bug - it's an undocumented feature.
 +
 Ashley M. Kirchner mailto:[EMAIL PROTECTED]   .   303.442.6410 x130
 IT Director / SysAdmin / Websmith . 800.441.3873 x130
 Photo Craft Imaging   . 3550 Arapahoe Ave. #6
 http://www.pcraft.com . .  ..   Boulder, CO 80303, U.S.A. 


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] People's misbehavior on the list

2007-05-18 Thread Ashley M. Kirchner

Tijnema ! wrote:

2853.822438 now, to be exact :)

O wait, since I copied the amount of MB, it has changed already, it is
 2853.822762 now :)

Tijnema
   Do you suppose they have little people running around the data 
center every day, shutting down machines, adding a hard drive or two, 
and put it back online?  Go home, come back tomorrow and do it again?  
:)  And let's not forget the night crew that installs new machines, but 
with only 1 drive in them, just so the day crew has something to do when 
they come in...   *smirk*


--
H | It's not a bug - it's an undocumented feature.
 +
 Ashley M. Kirchner mailto:[EMAIL PROTECTED]   .   303.442.6410 x130
 IT Director / SysAdmin / Websmith . 800.441.3873 x130
 Photo Craft Imaging   . 3550 Arapahoe Ave. #6
 http://www.pcraft.com . .  ..   Boulder, CO 80303, U.S.A. 


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Just to prove my point (used to be - Re: [PHP] People's misbehavior on the list)

2007-05-18 Thread Ashley M. Kirchner

Jim Lucas wrote:
Mostly what happens to my GMail account, is that it groups messages 
together, that truly have nothing to do with each other.
   Now THIS is what I would consider fantastic, loads of fun...  Have 
they trademarked it yet?


--
H | It's not a bug - it's an undocumented feature.
 +
 Ashley M. Kirchner mailto:[EMAIL PROTECTED]   .   303.442.6410 x130
 IT Director / SysAdmin / Websmith . 800.441.3873 x130
 Photo Craft Imaging   . 3550 Arapahoe Ave. #6
 http://www.pcraft.com . .  ..   Boulder, CO 80303, U.S.A. 


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] set_time_limit failing...

2007-04-30 Thread Ashley M. Kirchner


   The manual says that set_time_limit has no effect when PHP is 
running in safe_mode.  Then I have a problem.  I have  the global 
safe_mode turned ON, however I have  'php_admin_value safe_mode 0' set 
in a vhost's config.  When I load up phpinfo(), it correctly tells me 
that the Master Value safe_mode is on, but the Local Value is off.  So 
then why is set_time_limit still complaining that it can't be set when 
running in safe mode, when in theory, safe_mode should not be on for 
that vhosts?



--
H | It's not a bug - it's an undocumented feature.
 +
 Ashley M. Kirchner mailto:[EMAIL PROTECTED]   .   303.442.6410 x130
 IT Director / SysAdmin / Websmith . 800.441.3873 x130
 Photo Craft Imaging   . 3550 Arapahoe Ave. #6
 http://www.pcraft.com . .  ..   Boulder, CO 80303, U.S.A. 


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Intro to PHP question

2007-03-08 Thread Ashley M. Kirchner

Tijnema ! wrote:

I can offer a few MBs for everyone that wants to get learning PHP.
   Mariachi Bands!  Yes, of course they can teach you how to PHP to the 
music and Tequila!. :)


--
W | It's not a bug - it's an undocumented feature.
 +
 Ashley M. Kirchner mailto:[EMAIL PROTECTED]   .   303.442.6410 x130
 IT Director / SysAdmin / Websmith . 800.441.3873 x130
 Photo Craft Imaging   . 3550 Arapahoe Ave. #6
 http://www.pcraft.com . .  ..   Boulder, CO 80303, U.S.A.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] whois Domain??

2007-01-09 Thread Ashley M. Kirchner

Curt Zirzow wrote:

Assuming paths is evil :)
   To add to what Curt says here, so is assuming the command actually 
exists.  :)


--
H | It's not a bug - it's an undocumented feature.
 +
 Ashley M. Kirchner mailto:[EMAIL PROTECTED]   .   303.442.6410 x130
 IT Director / SysAdmin / Websmith . 800.441.3873 x130
 Photo Craft Imaging   . 3550 Arapahoe Ave. #6
 http://www.pcraft.com . .  ..   Boulder, CO 80303, U.S.A. 


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Database Question

2006-12-19 Thread Ashley M. Kirchner


   Someone's going to tell me to go buy a book, I just know it.  I'll 
ask anyway:


   I'm starting to log weather data to a database and I'm trying to 
figure out what's the best way to create the tables.  The reports are 
coming in every minute, of every hour, 24 hours a day.  Eventually, I'd 
like to do some calculations on the statistics, displaying daily values 
(which can be broken down to hourly), but then also daily and monthly 
averages.


   To me, it doesn't make sense to dump everything into one big table, 
but I can't figure out what's the best way to break it down either.  
Keep in mind that the only data I have, is what comes in for that 
minute.  The daily averages I have to calculate myself (later.)  But I 
can't see one large table being very effective when it comes to 
calculating that stuff.


   So, how should I break the tables down?  Create a new table every 
day (20061219_data, 20061220_data, etc.) and insert all the values in 
it?  Or, break it down per values (temp_table, humidity_table, etc.) and 
insert daily data in them?


   -- A

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Converting array keys to variables?

2006-11-17 Thread Ashley M. Kirchner


   I have an array that looks like this:

   [hours] = Array
   (
   [0] = Array
   (
   [file] = capture.0400.jpg
   [path] = spool/.2006/11/17/04
   [year] = 2006
   [month] = 11
   [day] = 17
   [hhmm] = 0400
   )

   [1] = Array
   (
   [file] = capture.0500.jpg
   [path] = spool/.2006/11/17/05
   [year] = 2006
   [month] = 11
   [day] = 17
   [hhmm] = 0500
   )
   )

   Is there a way that I can simply loop through each array and convert 
the keys into variables?  I want to avoid having to write lines of:


   $file = $array[0][file];
   $path = $array[0][path];
   $year = $array[0][year];
   $month = $array[0][month];
   $day = $array[0][day];
   $hhmm = $array[0][hhmm];

   -- A

--
W | It's not a bug - it's an undocumented feature.
 +
 Ashley M. Kirchner mailto:[EMAIL PROTECTED]   .   303.442.6410 x130
 IT Director / SysAdmin / Websmith . 800.441.3873 x130
 Photo Craft Imaging   . 3550 Arapahoe Ave. #6
 http://www.pcraft.com . .  ..   Boulder, CO 80303, U.S.A.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Converting array keys to variables?

2006-11-17 Thread Ashley M. Kirchner

Jochem Maas wrote:

   $file = $array[0][file];
   $path = $array[0][path];
   $year = $array[0][year];
   $month = $array[0][month];
   $day = $array[0][day];
   $hhmm = $array[0][hhmm];



where the  are your quotes for the array keys? have an E_NOTICE or six.
  
   I was typing fast and didn't bother to put them in when I was 
composing my e-mail.  They did exist in the actual code, though it's now 
a moot point as I'm not doing it that way anymore. :)


   Thanks for bringing it up though.

--
W | It's not a bug - it's an undocumented feature.
 +
 Ashley M. Kirchner mailto:[EMAIL PROTECTED]   .   303.442.6410 x130
 IT Director / SysAdmin / Websmith . 800.441.3873 x130
 Photo Craft Imaging   . 3550 Arapahoe Ave. #6
 http://www.pcraft.com . .  ..   Boulder, CO 80303, U.S.A.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Looping through array

2006-11-16 Thread Ashley M. Kirchner


   Say I have an array containing ten items, and I want to display them 
in a table as follows:


5 4 3 2 1
   10 9 8 7 6

   What's the best way to loop through that array to do that?  My 
thinking gets me to create a loop for 5 through 1, repeated twice, and 
the second time I add '5' to the index value.  There's got to be a saner 
way...


--
W | It's not a bug - it's an undocumented feature.
 +
 Ashley M. Kirchner mailto:[EMAIL PROTECTED]   .   303.442.6410 x130
 IT Director / SysAdmin / Websmith . 800.441.3873 x130
 Photo Craft Imaging   . 3550 Arapahoe Ave. #6
 http://www.pcraft.com . .  ..   Boulder, CO 80303, U.S.A.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Looping through array

2006-11-16 Thread Ashley M. Kirchner

Brad Bonkoski wrote:

Something like this perhaps...

$arr = array(...);
$per_row = 5;
$elem = count($arr);
for($i=0; $i$elem; $i++) {
   if( $i == 0 )
  echo tr;
   else if( $i % $per_row == 0 )
  echo /trtr;
   echo td$arr[$i]/td;
}

   That simply displays things in order, 1 through 5, then 6 through 10.

--
W | It's not a bug - it's an undocumented feature.
 +
 Ashley M. Kirchner mailto:[EMAIL PROTECTED]   .   303.442.6410 x130
 IT Director / SysAdmin / Websmith . 800.441.3873 x130
 Photo Craft Imaging   . 3550 Arapahoe Ave. #6
 http://www.pcraft.com . .  ..   Boulder, CO 80303, U.S.A.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Looping through array

2006-11-16 Thread Ashley M. Kirchner

Darrell Brogdon wrote:
So in other words, you have an array like $arr = 
array(1,2,3,4,5,6,7,8,9,10) but you want it to render on the page as:


  5 4 3 2 1
10 9 8 7 6

right?
   That would be correct.  James Tu provided a solution that I think 
will work.  I'm always open to other suggestions of course.


--
W | It's not a bug - it's an undocumented feature.
 +
 Ashley M. Kirchner mailto:[EMAIL PROTECTED]   .   303.442.6410 x130
 IT Director / SysAdmin / Websmith . 800.441.3873 x130
 Photo Craft Imaging   . 3550 Arapahoe Ave. #6
 http://www.pcraft.com . .  ..   Boulder, CO 80303, U.S.A.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Checking file existence

2006-11-15 Thread Ashley M. Kirchner


   I have files that are named in the following manner:

   file..jpg (where  is an hhmm timestamp [hour and minutes])

   What's the best way to take the current hhmm timestamp and run 
backwards finding the previous 5 files, and checking whether they 
actually exist?  There's a possibility one or more might not exist and 
rather than returning a blank value, I want to continue further back 
till I find the next.


   So for example, say I have:

   file 1122.jpg
   file 1121.jpg
   file 1119.jpg
   file 1117.jpg
   file 1116.jpg
   file 1114.jpg

   Notice the gaps, 1120, 1118, and 1115 are missing.  But I still want 
to return five, thus 1122, 1121, 1119, 1117, and 1116.


   I thought of taking the current timestamp and loop five times, 
subtracting from it every time, but that's assuming all five are there.  
If one's missing then I only have four images.



--
W | It's not a bug - it's an undocumented feature.
 +
 Ashley M. Kirchner mailto:[EMAIL PROTECTED]   .   303.442.6410 x130
 IT Director / SysAdmin / Websmith . 800.441.3873 x130
 Photo Craft Imaging   . 3550 Arapahoe Ave. #6
 http://www.pcraft.com . .  ..   Boulder, CO 80303, U.S.A.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Checking file existence

2006-11-15 Thread Ashley M. Kirchner

Edward Kay wrote:

Are all the files called file..jpg or could they have other names such
as clouds.1123.jpg, field.2034.jpg etc?
   They are all the same exact file name with the only difference being 
the timestamp.



Alternatively, you could get the OS to do the work through an exec call to
something like 'ls *..jpg' or similar. The downside of this however is
that it is then OS dependent.
   I thought of that too, but only because of the way the files are 
stored.  I completely forgot about one other catch...  I thought about 
it but my hands were too quick and I didn't type that paragraph in.


   The files are stored as follows on the file system:

   /.year/month/day/hour/file.hhmm.jpg   (yes that dot preceding year 
is correct)


   So I can look right now and find /.2006/11/15/08/file.0846.jpg

   Each /hour/ folder contains at most 60 files so in essence doing 
either a scandir() or an exec call to ls wouldn't take that long.  
However, I run into problems when I need to traverse to the previous 
hour to find images.


   Say I load up a file with timestamp 0802.  I now need to find 0801, 
0800, 0759, 0758, and 0757.  The last three being in the previous 
folder.  Unless I run scandir() again the entire /day/ folder and sort, 
I'd have to figure out how to go on about that.


   Like I said, I completely forgot to write this piece of the puzzle 
in my previous e-mail.  I blame it on the lack of caffeine.


   -- A

--
W | It's not a bug - it's an undocumented feature.
 +
 Ashley M. Kirchner mailto:[EMAIL PROTECTED]   .   303.442.6410 x130
 IT Director / SysAdmin / Websmith . 800.441.3873 x130
 Photo Craft Imaging   . 3550 Arapahoe Ave. #6
 http://www.pcraft.com . .  ..   Boulder, CO 80303, U.S.A.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Checking file existence

2006-11-15 Thread Ashley M. Kirchner

Stut wrote:
mall, minor, insignificant point If I have less than 5 files this 
loop will never end. But you all knew that right?

   Yup.  I break out of the loop if $i reaches 10 for some weird reason.

Also, depending on the frequency of files (i.e. are there months-worth 
of gaps or minutes at most), the following might be faster...
   Theoretically, minutes.  I mean, the thing has been down in the 
past, for months at a time, but it's been running fine for the past 
month (and I plan on keeping it that way.)  So, unless I get hit by a 
bus, and unless the file system gets full, and unless somehow the camera 
quits, it'll be fine.  I know, way too many 'unless's...  It's a way of 
life. :)


   -- A

--
W | It's not a bug - it's an undocumented feature.
 +
 Ashley M. Kirchner mailto:[EMAIL PROTECTED]   .   303.442.6410 x130
 IT Director / SysAdmin / Websmith . 800.441.3873 x130
 Photo Craft Imaging   . 3550 Arapahoe Ave. #6
 http://www.pcraft.com . .  ..   Boulder, CO 80303, U.S.A.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] date() function

2006-11-14 Thread Ashley M. Kirchner


   I noticed that if I do something like this:

   $prevminute = date(i)-1;

   ..and the current minute happens to be '05', $prevminute becomes '4' 
- I lose the padding.  How can I ensure that I retain that padding?  I 
suppose a crud solution is to run $prevminute through an if loop to see 
if it's  10.  But I'm wondering if there's a better way.


--
W | It's not a bug - it's an undocumented feature.
 +
 Ashley M. Kirchner mailto:[EMAIL PROTECTED]   .   303.442.6410 x130
 IT Director / SysAdmin / Websmith . 800.441.3873 x130
 Photo Craft Imaging   . 3550 Arapahoe Ave. #6
 http://www.pcraft.com . .  ..   Boulder, CO 80303, U.S.A.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] [funny] The state of Java Development

2006-10-27 Thread Ashley M. Kirchner

Daevid Vincent wrote:


The state of Java Development

A friend snapped this picture at the Barnes  Noble in Woodinville, WA...



   Nice and ... blank.

--
W | It's not a bug - it's an undocumented feature.
 +
 Ashley M. Kirchner mailto:[EMAIL PROTECTED]   .   303.442.6410 x130
 IT Director / SysAdmin / Websmith . 800.441.3873 x130
 Photo Craft Laboratories, Inc.. 3550 Arapahoe Ave. #6
 http://www.pcraft.com . .  ..   Boulder, CO 80303, U.S.A.


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Proxy and header redirection

2006-09-08 Thread Ashley M. Kirchner


   In Apache I can configure a proxy redirect from one URL to another, ej:

   htp://www.somesite.com/test - http://www.othersite.com/path/to/display/

   So that when the user loads up http://www.somesite.com/test they 
actually see the content of the redirect instead (without the URL 
getting rewritten.)  However, if that redirected URL happens to be a PHP 
script with a header() statement in it, things go wrong, ej:


   http://www.somesite.com/test - 
http://www.othersite.com/locate.php?page=test


   Assume that locate.php does a header() redirect to 
/path/to/display/, suddenly the proxy redirect doesn't work, instead the 
user will see the URL they typed in changed into:


   http://www.somesite.com/test - 
http://www.somesite.com/path/to/display/ which will cause 404's.


   Does this make any sense, and can someone figure out how to fix this?

--
W | It's not a bug - it's an undocumented feature.
 +
 Ashley M. Kirchner mailto:[EMAIL PROTECTED]   .   303.442.6410 x130
 IT Director / SysAdmin / Websmith . 800.441.3873 x130
 Photo Craft Laboratories, Inc.. 3550 Arapahoe Ave. #6
 http://www.pcraft.com . .  ..   Boulder, CO 80303, U.S.A.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] sort() warning

2006-09-06 Thread Ashley M. Kirchner


   Given this piece of code:

 $i = 0;
 if ($dir = opendir($path)) {
   while ($dh = readdir($dir)) {
 if ($dh != '.'  $dh != '..') {
   $Dirs[$i] = $dh;
   $i++;
 }
   }
 }
 closedir($dir);
 sort($Dirs);

   Why does sort() give me the following warning:

   PHP Warning:  sort() expects parameter 1 to be array, null given in 

   The array contents is as follows ( according to print_r($Dirs) )

   Array
   (
   [0] = 1029
   [1] = 1197
   [2] = 1254
   [3] = 1093
   [4] = 1217
   [5] = 1272
   [6] = 1233
   [7] = 1257
   [8] = 1017
   [9] = 1033
   )


   The end result I want is that it sorts out that array in ascending 
order, thus 1017, 1029, 1033, 1042, etc., etc...


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] sort() warning

2006-09-06 Thread Ashley M. Kirchner

Robert Cummings wrote:

It's because you have written sloppy code and didn't bother to
initialize $Dirs to an array. So it's default value is null. You would
know this if you had notices enabled.
  

   Error fixed.
  

Also, the other problem is that you are either a) opening the wrong
path, b) the path you are opening has no files or directories.
  

   Neither of those assumptions is correct.


Take note also that your variable is called $Dirs, but readdir() returns
all directory contents (including files, links, etc, etc).
  
   I'm aware of what readdir() returns, and also aware that in my 
particular application, it makes no difference what so ever since there 
are only directories in there.  If it also contained individual files, I 
would've named it different.  Variable names are exactly that, variable 
names.  Whether I called it $Dirs or $Robert_Cummings would make no 
difference what so ever [to me].  But thank you for your opinion.


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Problems installing 5.1.4

2006-07-03 Thread Ashley M. Kirchner

Richard Lynch wrote:

Looks to me like PEAR is trying to phone home to download more PEAR
stuff to install PEAR stuff...

Are you connected to the internet?
  

   Yep, 24/7.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Problems installing 5.1.4

2006-07-02 Thread Ashley M. Kirchner


   I'm trying to get v5.1.4 installed on my server and running into 
something of a mystery.  I can configure and run make with no problem.  
When I run 'make install' however, it starts the process, installing the 
dynamic modules, PHP SAPI module, make the necessary changes in 
httpd.conf and moves on to installing the other pieces:



Installing PHP CLI binary:/usr/local/bin/
Installing PHP CLI man page:  /usr/share/man/man1/
Installing shared extensions: 
/usr/local/lib/php/extensions/no-debug-non-zts-20050922/

Installing build environment: /usr/local/lib/php/build/
Installing header files:  /usr/local/include/php/
Installing helper programs:   /usr/local/bin/
 program: phpize
 program: php-config
Installing man pages: /usr/share/man/man1/
 page: phpize.1
 page: php-config.1
Installing PEAR environment:  /usr/local/lib/php/


   That's where it just dies.  Dies in the sense that, it just sits 
there.  Doesn't seem to be doing anything at all.  My only recourse at 
that point is to hit CTRL-C.


   Now, looking in /usr/local/lib/php I see the following:


[200] 19:41:56 [EMAIL PROTECTED]:/usr/local/lib/php ls -al
total 20
drwxr-xr-x  4 root root 4096 Jul  2 18:59 ./
drwxr-xr-x  5 root root 4096 Jul  2 18:59 ../
drwxr-xr-x  2 root root 4096 Jul  2 18:59 build/
drwxr-xr-x  3 root root 4096 Jul  2 18:59 extensions/
[201] 19:41:58 [EMAIL PROTECTED]:/usr/local/lib/php


   Looking at running processes (related to this install) I get this:


17828 pts/2S+ 0:00 make install
25312 pts/2S+ 0:00 /bin/sh -c if test -f 
pear/install-pear-nozlib.phar  
/usr/local/src/apache/php-5.1.4/build/shtool mkdir -p 
/usr/local/lib/php; then  make -s install-pear-installer;  else  cat 
/usr/local/src/apache/php-5.1.4/pear/install-pear.txt;  fi

25329 pts/2S+ 0:00 make -s install-pear-installer
25330 pts/2S+ 0:00 /usr/local/src/apache/php-5.1.4/sapi/cli/php 
-n -dshort_open_tag=0 -dsafe_mode=0 -derror_reporting=E_ALL 
-dmemory_limit=-1 -ddetect_unicode=0 pear/install-pear-nozlib.phar -d 
/usr/local/lib/php -b /usr/local/bin



   It's just sitting there, doing nothing.

   What's going on here?  How do I even start figuring out why it won't 
finish the install?


   -- A

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Checking for empty()

2006-06-14 Thread Ashley M. Kirchner


   I have a form with various fields on it that I want to make sure 
aren't empty or the user didn't just hit the space bar or return (in a 
text field).  What's the best way to do this?  Seems empty() will fail 
on a textarea if the user simply hits a space or return and submits the 
form.


--
W | It's not a bug - it's an undocumented feature.
 +
 Ashley M. Kirchner mailto:[EMAIL PROTECTED]   .   303.442.6410 x130
 IT Director / SysAdmin / Websmith . 800.441.3873 x130
 Photo Craft Laboratories, Inc.. 3550 Arapahoe Ave. #6
 http://www.pcraft.com . .  ..   Boulder, CO 80303, U.S.A.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Checking for empty()

2006-06-14 Thread Ashley M. Kirchner

Brad Bonkoski wrote:
Weel, since this is a PHP list I will assume you are checking once the 
page is posted/submitted...

   That would be correct.  At the moment I'm checking with
  if (empty($_POST['var'])) { throw error flag }

   But as I read up on empty() I realized that if one simply hits a 
space and/or a return, empty() will fail.



off the top of my head, the functions strlen() and isset() come to mind.

   Will look into them.  Danke.

--
W | It's not a bug - it's an undocumented feature.
 +
 Ashley M. Kirchner mailto:[EMAIL PROTECTED]   .   303.442.6410 x130
 IT Director / SysAdmin / Websmith . 800.441.3873 x130
 Photo Craft Laboratories, Inc.. 3550 Arapahoe Ave. #6
 http://www.pcraft.com . .  ..   Boulder, CO 80303, U.S.A.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Color matching magic?

2006-04-06 Thread Ashley M. Kirchner


   I'm trying to figure out if there's a tool that can do this 
(programmatically) or if someone has some script idea/suggestion for 
what I'd like to do.  I have several 130px X 130px images (one per day) 
that I collect.  I'd like to have a script run that will read in the 
folder(d) where these images are stored and with ImageMagick, create a 
montage of them.  I need to be able to set how many images wide by how 
many tall I'd like it to be, and I'd also like the script to organize 
the images in a rainbow pattern based on their color.  Very much like 
what a PhotoMosaic program would do with images, create a color index of 
each one, then build a larger image with these little ones.


   Anyone have a suggestion of how to, or where to start with this?

   Thanks.

--
H | I haven't lost my mind; it's backed up on tape somewhere.
 +
 Ashley M. Kirchner mailto:[EMAIL PROTECTED]   .   303.442.6410 x130
 IT Director / SysAdmin / WebSmith . 800.441.3873 x130
 Photo Craft Imaging   . 3550 Arapahoe Ave. #6
 http://www.pcraft.com . .  ..   Boulder, CO 80303, U.S.A. 


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Different Values for intval(float)

2006-02-18 Thread Ashley M. Kirchner

Bruce wrote:

Consider the following code:

$BB = -2181087916;
$AA = (int)$BB;
$AA = intval($BB);

On some systems, $AA will be int(-2147483648), which is actually
consistent with the documentation.

On most systems, however, $AA will be int(2113879380), which is the
same value truncated at 32 bits.
   Interestingly enough, I tried it on several of my machines, which 
are different platforms and different (sub)versions of PHP and I got 
different results:


   RH7.3 with PHP 4.1.2: 2113879380

   IRIX 6.5.11 with PHP 4.2.3:   2147483647

   FC1 with PHP 4.3.6:   2113879380
   RH7.3 with PHP 4.3.9: 2113879380

   FC3 with PHP 4.3.10: -2147483648
   FC4 with PHP 4.4.0:  -2147483648
   FC4 with PHP 5.0.5:  -2147483648

   So my question now, is it version or platform related?

--
H | I haven't lost my mind; it's backed up on tape somewhere.
 +
 Ashley M. Kirchner mailto:[EMAIL PROTECTED]   .   303.442.6410 x130
 IT Director / SysAdmin / WebSmith . 800.441.3873 x130
 Photo Craft Imaging   . 3550 Arapahoe Ave. #6
 http://www.pcraft.com . .  ..   Boulder, CO 80303, U.S.A. 


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] GD Graph tutorial?

2005-12-05 Thread Ashley M. Kirchner


   Does anyone know of a good GD tutorial for creating graphs?  I'm 
looking to create something like the attached one by feeding it the 
values and have it create the graph.  Possibly with multiple lines, 
different colors, different types of data, etc., etc.


--
W | It's not a bug - it's an undocumented feature.
 +
 Ashley M. Kirchner mailto:[EMAIL PROTECTED]   .   303.442.6410 x130
 IT Director / SysAdmin / Websmith . 800.441.3873 x130
 Photo Craft Laboratories, Inc.. 3550 Arapahoe Ave. #6
 http://www.pcraft.com . .  ..   Boulder, CO 80303, U.S.A.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PHP 5.0.5

2005-11-22 Thread Ashley M. Kirchner

Curt Zirzow wrote:


On Mon, Nov 21, 2005 at 09:41:40PM -0700, Ashley M. Kirchner wrote:
 


ext/ftp/ftp.lo(.text+0x76): In function `data_close':
/usr/local/src/apache/php-5.0.5/ext/ftp/ftp.c:1566: undefined reference 
to `SSL_shutdown'
   



This means basically that the header files (*.h) where found but
none of the libraries were found.

   Yeah, I wondered why.  Found out that -lssl doesn't get passed down 
to EXTRA_LIBS when it get to compiling the CLI.  Once I added it to my 
configure line, everything compiled fine.


   ( EXTRA_LIBS=-lssl ./configure ... )

--
W | It's not a bug - it's an undocumented feature.
 +
 Ashley M. Kirchner mailto:[EMAIL PROTECTED]   .   303.442.6410 x130
 IT Director / SysAdmin / Websmith . 800.441.3873 x130
 Photo Craft Laboratories, Inc.. 3550 Arapahoe Ave. #6
 http://www.pcraft.com . .  ..   Boulder, CO 80303, U.S.A.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] PHP 5.0.5

2005-11-21 Thread Ashley M. Kirchner


   Trying to compile APXS version of PHP5.05 and towards the end, when 
it tries to compile the CLI version, it bombs with the following:


ext/ftp/ftp.lo(.text+0x76): In function `data_close':
/usr/local/src/apache/php-5.0.5/ext/ftp/ftp.c:1566: undefined reference 
to `SSL_shutdown'
ext/ftp/ftp.lo(.text+0x96):/usr/local/src/apache/php-5.0.5/ext/ftp/ftp.c:1557: 
undefined reference to `SSL_shutdown'

ext/ftp/ftp.lo(.text+0x15e): In function `ftp_close':
/usr/local/src/apache/php-5.0.5/ext/ftp/ftp.c:184: undefined reference 
to `SSL_shutdown'

ext/ftp/ftp.lo(.text+0x22b): In function `my_send':
/usr/local/src/apache/php-5.0.5/ext/ftp/ftp.c:1246: undefined reference 
to `SSL_write'
ext/ftp/ftp.lo(.text+0x250):/usr/local/src/apache/php-5.0.5/ext/ftp/ftp.c:1244: 
undefined reference to `SSL_write'

ext/ftp/ftp.lo(.text+0x415): In function `data_accept':
/usr/local/src/apache/php-5.0.5/ext/ftp/ftp.c:1511: undefined reference 
to `SSLv23_client_method'
ext/ftp/ftp.lo(.text+0x41e):/usr/local/src/apache/php-5.0.5/ext/ftp/ftp.c:1511: 
undefined reference to `SSL_CTX_new'
ext/ftp/ftp.lo(.text+0x434):/usr/local/src/apache/php-5.0.5/ext/ftp/ftp.c:1517: 
undefined reference to `SSL_new'
ext/ftp/ftp.lo(.text+0x451):/usr/local/src/apache/php-5.0.5/ext/ftp/ftp.c:1525: 
undefined reference to `SSL_set_fd'
ext/ftp/ftp.lo(.text+0x470):/usr/local/src/apache/php-5.0.5/ext/ftp/ftp.c:1531: 
undefined reference to `SSL_connect'
ext/ftp/ftp.lo(.text+0x534):/usr/local/src/apache/php-5.0.5/ext/ftp/ftp.c:1528: 
undefined reference to `SSL_copy_session_id'
ext/ftp/ftp.lo(.text+0x589):/usr/local/src/apache/php-5.0.5/ext/ftp/ftp.c:1520: 
undefined reference to `SSL_CTX_free'
ext/ftp/ftp.lo(.text+0x5ae):/usr/local/src/apache/php-5.0.5/ext/ftp/ftp.c:1533: 
undefined reference to `SSL_shutdown'

ext/ftp/ftp.lo(.text+0x652): In function `my_recv':
/usr/local/src/apache/php-5.0.5/ext/ftp/ftp.c:1286: undefined reference 
to `SSL_read'
ext/ftp/ftp.lo(.text+0x686):/usr/local/src/apache/php-5.0.5/ext/ftp/ftp.c:1284: 
undefined reference to `SSL_read'

ext/ftp/ftp.lo(.text+0x1bb1): In function `ftp_login':
/usr/local/src/apache/php-5.0.5/ext/ftp/ftp.c:278: undefined reference 
to `SSLv23_client_method'
ext/ftp/ftp.lo(.text+0x1bba):/usr/local/src/apache/php-5.0.5/ext/ftp/ftp.c:278: 
undefined reference to `SSL_CTX_new'
ext/ftp/ftp.lo(.text+0x1bd0):/usr/local/src/apache/php-5.0.5/ext/ftp/ftp.c:284: 
undefined reference to `SSL_new'
ext/ftp/ftp.lo(.text+0x1bec):/usr/local/src/apache/php-5.0.5/ext/ftp/ftp.c:291: 
undefined reference to `SSL_set_fd'
ext/ftp/ftp.lo(.text+0x1bf8):/usr/local/src/apache/php-5.0.5/ext/ftp/ftp.c:293: 
undefined reference to `SSL_connect'
ext/ftp/ftp.lo(.text+0x1cdc):/usr/local/src/apache/php-5.0.5/ext/ftp/ftp.c:287: 
undefined reference to `SSL_CTX_free'
ext/ftp/ftp.lo(.text+0x1d01):/usr/local/src/apache/php-5.0.5/ext/ftp/ftp.c:295: 
undefined reference to `SSL_shutdown'

collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1


   libphp5.so compiles just fine just before this bomb.  Any sugestions 
anyone?


--
R | I haven't lost my mind; it's backed up on tape somewhere.
 +
 Ashley M. Kirchner mailto:[EMAIL PROTECTED]   .   303.442.6410 x130
 IT Director / SysAdmin / WebSmith . 800.441.3873 x130
 Photo Craft Laboratories, Inc.. 3550 Arapahoe Ave. #6
 http://www.pcraft.com . .  ..   Boulder, CO 80303, U.S.A.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP 5.0.5

2005-11-21 Thread Ashley M. Kirchner

Curt Zirzow wrote:


You're compile path looks awkward to me.

   How so?  /usr/local/src/apache is simply a folder where I have all 
apache related sources dumped and compiled prior to installation.  So 
naturally PHP's source becomes /usr/local/src/apache/php-5.0.5



what does your ./configure line look like?
 


   This same configure line compiles PHP4.4.1 just fine.  It's long:

   ./configure --sysconfdir=/etc/httpd/conf --mandir=/usr/share/man 
--with-apxs --enable-force-cgi-redirect --enable-discard-path 
--enable-fastcgi --with-config-file-path=/etc/httpd/conf/ 
--enable-safe-mode --with-exec-dir=/etc/httpd/php --enable-magic-quotes 
--with-zlib=shared --enable-bcmath --with-bz2=shared --enable-calendar 
--with-bcmath=shared --with-calendar=shared --with-jpeg=shared 
--with-tiff=shared --enable-dba --with-dba=shared --with-gdbm=shared 
--with-db4=shared --with-dom=shared --with-dom-xslt=shared 
--with-dom-exslt=shared --enable-ftp --with-gd=shared --with-png=shared 
--with-freetype-dir --enable-gd-native-ttf --with-gettext=shared 
--with-gmp=shared --with-imap=shared --with-kerberos --with-imap-ssl 
--with-mcrypt=shared --with-mime-magic=/etc/httpd/conf/magic 
--with-mysql=/usr --with-ncurses=shared --with-zlib=shared 
--enable-sockets --with-tsrm-pthreads --with-ldap=shared 
--with-openssl=shared --with-mcal=shared


--
R | I haven't lost my mind; it's backed up on tape somewhere.
 +
 Ashley M. Kirchner mailto:[EMAIL PROTECTED]   .   303.442.6410 x130
 IT Director / SysAdmin / WebSmith . 800.441.3873 x130
 Photo Craft Laboratories, Inc.. 3550 Arapahoe Ave. #6
 http://www.pcraft.com . .  ..   Boulder, CO 80303, U.S.A.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: previous + next buttons, no DB

2005-08-19 Thread Ashley M. Kirchner

Jim Moseby wrote:


If you use a naming convention for the files in /gallery/ that coincides
with the artistic order in which they are to be displayed, then Greg's
simple (yet elegant, and expertly coded) directory listing method would work
like a charm.
 

   Unfortunately, they're not.  This might work for the first 
incarnation of the gallery, but as soon as they start removing and 
adding images, that numbered order goes to hell in a hand basket.  
Imaging if they deleted #5 and in its place they want to add 4 new 
images.  Not going to work.  No, the images are all named by the picture 
name, such_n_such_mountain, this_beach, small_flower, blah, blah, blah.


--
H | I haven't lost my mind; it's backed up on tape somewhere.
 +
 Ashley M. Kirchner mailto:[EMAIL PROTECTED]   .   303.442.6410 x130
 IT Director / SysAdmin / WebSmith . 800.441.3873 x130
 Photo Craft Imaging   . 3550 Arapahoe Ave. #6
 http://www.pcraft.com . .  ..   Boulder, CO 80303, U.S.A. 


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] previous + next buttons, no DB

2005-08-18 Thread Ashley M. Kirchner


   I have a client that maintains picture galleries by simply dropping 
images into a directory.  I have a template created that when loaded, 
with a specific $ID, will load the image that corresponds to that $ID.  
The request now is to have previous and next buttons that web surfers 
can click on to cycle through the rest of the images in the directory 
(instead of having to close that pop-up and click on another image to 
look at.)


   What's the best way to go about this?  Since I don't have a list of 
images in any kind of array (such as a result from  DB query), I'm a bit 
at a loss here.  Obviously if someone clicks on the first image on the 
gallery page, it should only have a 'next' button, and if they click the 
last image, it should only have a 'previous' button, but anything else 
on the page should have a 'previous' and 'next' button.  I just don't 
know how to keep that relationship or how to start coding that.


   Ideas/suggestions/pointers are much appreciated here.

--
R | I haven't lost my mind; it's backed up on tape somewhere.
 +
 Ashley M. Kirchner mailto:[EMAIL PROTECTED]   .   303.442.6410 x130
 IT Director / SysAdmin / WebSmith . 800.441.3873 x130
 Photo Craft Laboratories, Inc.. 3550 Arapahoe Ave. #6
 http://www.pcraft.com . .  ..   Boulder, CO 80303, U.S.A.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: previous + next buttons, no DB

2005-08-18 Thread Ashley M. Kirchner

Jeff Loiselle wrote:


Ashley,

How are you creating the gallery page? You must be reading the 
filenames in the directory and producing an img for each one. Can 
you create an array of those filenames, save it to session (or 
generate it each time),   and iterate through them?



   Say the images are in a folder called /gallery/

   Within that, I have an index.php that is manually coded to have 
thumbnails of the images displayed in a grid.  Important to note: 
they're in a very specific (artistic) order.  Each one of those 
thumbnails is linked to one and the same popup.php file that is simply 
another php file that expects an $ID passed to it.  That $ID, which 
again is hard coded in index.html, tells popup.php which file to 
display.  (that $ID is basically the file name of the image, so I can 
append it to the img / tag as the page loads.


   So you see, I have no array of anything.  The index.html file gets 
manually edited every time something is added or removed.  This is why 
I'd like a programmatic way of a) generating that file, so that the 
client can add/remove images as they see fit, and b) be able to have 
prev/next buttons on the popup window.


   Does that make sense?

--
R | I haven't lost my mind; it's backed up on tape somewhere.
 +
 Ashley M. Kirchner mailto:[EMAIL PROTECTED]   .   303.442.6410 x130
 IT Director / SysAdmin / WebSmith . 800.441.3873 x130
 Photo Craft Laboratories, Inc.. 3550 Arapahoe Ave. #6
 http://www.pcraft.com . .  ..   Boulder, CO 80303, U.S.A.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] SAFEMODE w/ PEAR

2005-06-24 Thread Ashley M. Kirchner


   I'm having a small problem with SAFE MODE and PEAR that I'm unsure 
how to solve:


   [error] PHP Warning:  raiseerror(): SAFE MODE Restriction in 
effect.  The script whose uid is 524 is not allowed to access 
/usr/lib/php/PEAR.php owned by uid 0 in /path/to/script/Lite.php on line 470



   How should that get solved?  Everything in /usr/lib/php is owned by 
root.root and just about everyone wants access to the PEAR library, but 
SAFE MODE won't allow it?


--
H | I haven't lost my mind; it's backed up on tape somewhere.
 +
 Ashley M. Kirchner mailto:[EMAIL PROTECTED]   .   303.442.6410 x130
 IT Director / SysAdmin / WebSmith . 800.441.3873 x130
 Photo Craft Imaging   . 3550 Arapahoe Ave. #6
 http://www.pcraft.com . .  ..   Boulder, CO 80303, U.S.A. 


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] radio buttons in $_POST

2005-04-23 Thread Ashley M. Kirchner
   I have this form.html:
form method=post action=form.php
text input input type=text name=input_testbr /
radio input1 input type=radio name=radio_test  value=test1 /
radio input2 input type=radio name=radio_test  value=test2 /
input type=submit value=Submit
/form
   Then I have this script (form.php):
?php
foreach ($_POST as $key = $val)
echo $key = $val\n;
?
   If I simply submit the form empty, all I get back from the script is 
the text input $key.  The radio button doesn't show up.  Why is that and 
how can I have it show up?  (the radio input does show up once one of 
the radios is checked, but I need it to show up when empty as well.)

--
H | I haven't lost my mind; it's backed up on tape somewhere.
 +
 Ashley M. Kirchner mailto:[EMAIL PROTECTED]   .   303.442.6410 x130
 IT Director / SysAdmin / WebSmith . 800.441.3873 x130
 Photo Craft Imaging   . 3550 Arapahoe Ave. #6
 http://www.pcraft.com . .  ..   Boulder, CO 80303, U.S.A. 


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Converting hexadecimal string

2005-03-27 Thread Ashley M. Kirchner
   Short (possibly simple) question:
   How do I convert a hexadecimal string back into it's ascii 
representation?

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] multidimensional array sort

2005-03-14 Thread Ashley M. Kirchner
   I have a multidimensional array that's built as follows (it's pretty 
much a directory tree):

Array (
 [Dir1] = Array (
 [User1] = Array (
 [0] = File1
 [1] = File2
 )
 [User2] = Array {
 [0] = File1
 [1] = File2
 [2] = File3
 }
 )
 [Dir2] = Array (
 [User1] = Array (
 [0] = File1
 [1] = File2
 [2] = File3
 [3] = File4
 )
 [User2] = Array {
 [0] = File1
 }
 )
)
   I need to do a sort on the whole thing in such a way that:
  a) all the Dir#'s are in ascending order, and
  b) all the User#'s are in ascending order with each Dir#, and
  b) all the File#'s are also in ascending order within each User#
   I don't suppose there's an easy way to do this, other than doing it 
in several steps, is there?  Is there even a way to JUST sort the Dir#'s 
(and the rest gets done at a later stage in the script)?

   -- A
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] multidimensional array sort

2005-03-14 Thread Ashley M. Kirchner
Leif Gregory wrote:
http://us3.php.net/manual/en/function.array-multisort.php
   I did go through that, but I can't get it to work and I'm almost 
willing to bet it's because of the way the array is built.  For example, 
the example on that page says that I should be able to do a sort on 
$ar[0] and $ar[1], however in my array both of those return 0.  In fact, 
when I do this:

 echo items in array:  . count($data) . br /;
 for ($i = 0; $i  count($data); $i++) {
   echo data[$i]:  . count($data[$i]) . br /;
 }

   I get:
 items in array: 2
 data[0]: 0
 data[1]: 0

   When I do a print_r($data), I get:
 Array
   (
  [John] = Array
 (
[KIRASH] = Array
  (
 [0] = 050311_18.00.59__KIRASH.zip
 [1] = 050311_18.10.20__KIRASH.zip
  )
[MCCROY] = Array
  (
 [0] = 050312_20.52.28__MCCROY.zip
  )
 )
  [Ron] = Array
 (
[EMBROR] = Array
  (
 [0] = 050314_15.47.56__EMBROR.zip
  )
 )
   )
   S, I'm at a loss here.  I think I need to create the array 
differently for it to work.

--
H | I haven't lost my mind; it's backed up on tape somewhere.
 +
 Ashley M. Kirchner mailto:[EMAIL PROTECTED]   .   303.442.6410 x130
 IT Director / SysAdmin / WebSmith . 800.441.3873 x130
 Photo Craft Imaging   . 3550 Arapahoe Ave. #6
 http://www.pcraft.com . .  ..   Boulder, CO 80303, U.S.A. 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


  1   2   3   >