Re: [PHP] Randomly missing a function

2008-07-17 Thread Micah Gersten
Try returning a value from CreateUser and checking it before sending the E-Mail. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Miles Thompson wrote: An online signup script is randomly missing part of the task. These scripts are involved: sub_signup.php

Re: [PHP] is there a problem with php script pulling HTML out of database as it writes the page??

2008-07-17 Thread Micah Gersten
What can help is if one app only has access to it's own DB. Also, for mysql, there is the mysql_real_escape_string function for a reason. Also, for the web app, you can usually disable Administrative functions and grant a minimal set of permissions. Thank you, Micah Gersten onShore Networks

Re: [PHP] is there a problem with php script pulling HTML out of database as it writes the page??

2008-07-17 Thread Micah Gersten
For anyone interested, here's a nice book to get anyone started on PHP Security: http://oreilly.com/catalog/9780596006563/index.html Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Stut wrote: On 17 Jul 2008, at 21:56, Robert Cummings wrote: On Thu, 2008

[PHP] Anyone use Zend framework

2008-07-18 Thread Micah Gersten
Does anyone use the Zend Framework? Is it fast? -- Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Counting Occurrences within an If statement

2008-07-20 Thread Micah Gersten
If it's a simple x y, you might want to consider putting your if statement in the SQL query so you don't return so many rows. To make a counter, just set a variable like: $counter = 0; if ($x $y) { print $row; $counter++ } Thank you, Micah Gersten onShore Networks Internal Developer

Re: [PHP] Pasword Protecting several pages

2008-07-20 Thread Micah Gersten
Set a session variable after the login has been confirmed and check for it at the beginning of every page. If it's not set, then redirect to login. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com R.C. wrote: I'm still trying to get this scenario worked out

Re: [PHP] Pasword Protecting several pages

2008-07-20 Thread Micah Gersten
*) { $_SESSION['login'] = true; header(Location: info.php); exit(); } //Output Form Here ? Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com R.C. wrote: Thank you Micah, Could you give me some code on that? Ref Micah Gersten [EMAIL PROTECTED] wrote

Re: [PHP] session ok? [SOLVED]

2008-07-21 Thread Micah Gersten
When you use a header redirect, you start with a new page. Everything you did until then is gone. When you call session_start on the new page, it resumes the same session, not creates a new one. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com tedd wrote

Re: [PHP] Re: a question...

2008-07-23 Thread Micah Gersten
I just want to point out that public IPs are no longer given out as Class A, B, and C networks, but based on CIDR. You can use rwhois to figure out who has use of a certain subnet and what the range of it is. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com

Re: [PHP] Multi-array - What am I missing?

2008-07-23 Thread Micah Gersten
){ $calArray[] = array($calArrayTime['day'] = array('NULL','linked-day '.strtolower($calArrayTime['reason']),$calArrayTime['day'])); Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Chris Ditty wrote: Can anyone point me in the right direction? I know I am

Re: [PHP] Multi-array - What am I missing?

2008-07-23 Thread Micah Gersten
I'm still confused. What do you mean by same line? Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Chris Ditty wrote: The array($calArrayTime. is actually another string. I am mainly trying to get the values for ['day']['0'], ['reason']['0'] etc all

Re: [PHP] Multi-array - What am I missing?

2008-07-23 Thread Micah Gersten
Nice catch, I missed that. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Jason Norwood-Young wrote: On Wed, 2008-07-23 at 13:52 -0500, Chris Ditty wrote: Can anyone point me in the right direction? I know I am missing something simple, but I can't

Re: [PHP] Questions about finding ranges

2008-07-23 Thread Micah Gersten
Here's the info on the weirdness of between: http://dev.mysql.com/doc/refman/5.0/en/comparison-operators.html#operator_between Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com VamVan wrote: Hey, For ranges you can also use Between in the mysql queries

Re: [PHP] Help with an error...

2008-07-24 Thread Micah Gersten
You cannot have commands in the middle of a string. Try building a string first, or use output buffering and then capture the buffer and use that as the string for the mail function. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com [EMAIL PROTECTED] wrote

Re: [PHP] Help with an error...

2008-07-24 Thread Micah Gersten
He had code blocks in the middle of a string. That's what I was referring to. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Ted Wood wrote: Micah, Please provide an example of what your response was referring to in the original message

Re: [PHP] Help with an error...

2008-07-24 Thread Micah Gersten
It seems like you're still calling functions inside the string. Instead of concatenating, try the output buffering like was mentioned before. Also, if you want HTML tags in your PHP code, you need to end and start the PHP tags again, or print them as output in quotes. Thank you, Micah Gersten

Re: [PHP] Regular Expression help need

2008-07-25 Thread Micah Gersten
Are you trying to make it xml compatible or XHTML compatible? '' is not valid HTML or XHTML as it has special meaning. If you want it to adhere to the standard and display correctly, you must use 'amp;' Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com

Re: [PHP] Help with an error...

2008-07-25 Thread Micah Gersten
Philip Thompson wrote: On Jul 24, 2008, at 12:40 PM, Micah Gersten wrote: You cannot have commands in the middle of a string. Technically you can. ?php $str = Hi, my name is . $this-getName(); This is correct, but is not in the middle of the string. // or $str = Hi, my name

Re: [PHP] Regular Expression help need

2008-07-26 Thread Micah Gersten
Are you talking about looking at blogs in a mobile phone browser or actually downloading the blog into another format? Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Shelley wrote: Ok, let me tell you what i want to achieve. I want to transfer users

Re: [PHP] It may be OT. phpmyadmin not opening.

2008-07-26 Thread Micah Gersten
I thought wampp was deprecated. Try xampp: http://www.apachefriends.org/en/index.html Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com mukesh yadav wrote: hi , sorry for posting here.I really dont know where to post I asked in the mysql IRC they said

Re: [PHP] Start/Stop Service from program php

2008-07-26 Thread Micah Gersten
Generally, apache runs as www-data. What was the output of the command? Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com I need write a script execute some command, but try start or stop service like named, network this don't work I edit visudo and add

Re: [PHP] foreach question

2008-07-29 Thread Micah Gersten
You cannot do this: $row[] = $result; You need to loop around this: $row = mysql_fetch_assoc($result); Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Jason Pruim wrote: Hey Everyone... So I am attempting to pull 2 random records from a MySQL database

Re: [PHP] limiting the amount of emails sent at a time in a batch send

2008-07-29 Thread Micah Gersten
Here's a PEAR package that handles this: http://pear.php.net/package/Mail_Queue/ Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Richard Kurth wrote: I want to limit these script two send 100 email and then pause for a few seconds and then send another 100

Re: [PHP] Why PHP4?

2008-07-30 Thread Micah Gersten
and a smaller footprint. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Hélio Rocha wrote: Sorry to disagree, But I think that with PHP4 a lot of people start thinking that they could be programmers (maybe they can, developers it's another story). When php5

Re: [PHP] Why PHP4?

2008-07-30 Thread Micah Gersten
Sometimes speed improvements require removing things. If you end up backwards supporting everything you end up with a big monster engine that is incredibly slow. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Hélio Rocha wrote: Brainfuck rox! LOL

Re: [PHP] Creating new site

2008-07-30 Thread Micah Gersten
of functionality make available. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Raido wrote: Hi, There are many sites explaining how to build new site etc but I'd like to hear what You suggest. (about how to plan whole thing and how to write separate parts which

Re: [PHP] accessing variables within objects

2008-07-30 Thread Micah Gersten
You might want to check the scope of the properties. If you want to access them outside of the class, make sure they are declared public. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Marten Lehmann wrote: Hello, I'm using some php-classes which worked

Re: [PHP] Using $_GET for POST

2008-07-30 Thread Micah Gersten
This page can help you understand them better: http://us2.php.net/manual/en/language.variables.superglobals.php Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Edward Diener wrote: In handling an HTTP POST request I came across some PHP code, which I need

Re: [PHP] upload file problem

2008-07-31 Thread Micah Gersten
Maybe check the return value of the function: http://us3.php.net/manual/en/function.move-uploaded-file.php Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Jignesh Thummar wrote: I'm trying to upload the file. It's showing me successfully uploaded. But it's

Re: [PHP] accessing variables within objects

2008-07-31 Thread Micah Gersten
Here's the PHP doc page. Let us know if you have more questions: http://us3.php.net/manual/en/language.oop5.overloading.php Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Philip Thompson wrote: On Jul 30, 2008, at 1:29 PM, Jim Lucas wrote: Marten Lehmann

Re: [PHP] accessing variables within objects

2008-07-31 Thread Micah Gersten
Sorry about that, I forgot you got that link already. Here's an answer for you: I use overloading to dynamically call a function in another object if the current object does not have it. It helps because PHP does not support multiple inheritance. Thank you, Micah Gersten onShore Networks

Re: [PHP] Dynamic Select Lists - 1st Selection Effects 2nd!

2008-07-31 Thread Micah Gersten
Maybe you should try this library. It comes with examples and is fairly easy to implement. http://xajaxproject.org/ Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Rahul S. Johari wrote: In theory your solution sounds extremely feasible perhaps

Re: [PHP] Dynamic Select Lists - 1st Selection Effects 2nd!

2008-07-31 Thread Micah Gersten
What I usually do is default to the most common country and show the associated states. You can change the states if they change the country. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Andrew Ballard wrote: On Thu, Jul 31, 2008 at 12:40 PM, Rahul S

Re: [PHP] Dynamic Select Lists - 1st Selection Effects 2nd!

2008-07-31 Thread Micah Gersten
You're right. Same principles apply though. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Boyd, Todd M. wrote: *cough* ...pretty sure he wrote county, guys. ;) Todd Boyd Web Programmer -- PHP General Mailing List (http://www.php.net

Re: [PHP] HTTP PUT for file uploads

2008-08-01 Thread Micah Gersten
Is this a repetitive thing your clients will do many times? I recently created a backup solution using ssh keys and the pecl ssh extension to automate backups. Then a cronjob sorts the files on the server. It's a lot more secure than allowing PUTs. Thank you, Micah Gersten onShore Networks

Re: [PHP] E-Shop system

2008-08-04 Thread Micah Gersten
true...user paid the good and i can send him the product ? thanks a lot for all your feedback. Paypal can handle itself, Bank Transfers and Credit Cards for you. They have nice APIs. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com -- PHP General

Re: [PHP] PHP querying mysql db for data limited to the last month

2008-08-04 Thread Micah Gersten
1. To get last months date, you can use strtotime(1 month ago) instead of mktime. 2. I don't see anywhere in the code where you are limiting by date. Try using and . Between is tricky on dates. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Vinny

Re: [PHP] Regular Expression by Exception

2008-08-04 Thread Micah Gersten
I don't know how to use the POSIX classes, but if you use preg_replace: preg_replace(/[^$params]/, '', $string); I think this will work. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Alberto García Gómez wrote: Fellows: If I use ereg_replace($params

Re: [PHP] An appeal to your better nature

2008-08-05 Thread Micah Gersten
Seems like 1and1 screwed up their Apache installs. My site shows a blank page when I go to the domain, but when I go to index.php, it works. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Richard Heyes wrote: Hi, Seems my 1and1 server has finally gone

Re: [PHP] An appeal to your better nature

2008-08-05 Thread Micah Gersten
I'm on a shared host, I should have mentioned that. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Richard Heyes wrote: Seems like 1and1 screwed up their Apache installs. My site shows a blank page when I go to the domain, but when I go to index.php

Re: [PHP] Echo in __GET()

2008-08-05 Thread Micah Gersten
You can write 2 functions to handle this. Value and OutputValue Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Tyler C. wrote: Is the a way to have an array, or use __get() to provide different data if you are echoing a variable, rather than if you

Re: [PHP] Fatal error: Cannot redeclare

2008-08-05 Thread Micah Gersten
What is around this line? /global/WEB_DAT/documents/fme/institute/get/lehre/course/lib.php:25 Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Kai Kauer wrote: Am Dienstag, 5. August 2008 15:46:42 schrieb Daniel Brown: On Tue, Aug 5, 2008 at 9:37 AM

[PHP] Anyone use FileMaker

2008-08-07 Thread Micah Gersten
I'm wondering if anyone here has experience integrating FileMaker with PHP using either ODBC or JDBC. -- Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] JDBC Wrapper for PHP

2008-08-07 Thread Micah Gersten
Does anyone know of a JDBC API Wrapper that can be called from PHP? I'm already using this to connect to Java: http://php-java-bridge.sourceforge.net/doc/ -- Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com -- PHP General Mailing List (http://www.php.net

Re: [PHP] Why PHP4?

2008-08-07 Thread Micah Gersten
You can't steal it, but you can't do anything with it either, so what's the point of having it? Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com V S Rawat wrote: I was surprised to see some very busy and well to do Chartered Accountants, Company

Re: [PHP] read a bunch of files that are in many directors into one string

2008-08-07 Thread Micah Gersten
First, which version of PHP? PHP 5 added a lot of features for reading files. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Richard Kurth wrote: I am trying to read a bunch of files that are in many directors into one string But it will only read one

Re: [PHP] read a bunch of files that are in many directors into one string

2008-08-07 Thread Micah Gersten
Try this: $rootPath = '/remote'; $string = ''; foreach (0..22 as $dirNum) { $dir = $rootPath/$dirNum; chdir($dir); $files = glob(13*); foreach ($files as $file) { $string .= file_get_contents($file); } } echo $string; Thank you, Micah Gersten onShore Networks

Re: [PHP] read a bunch of files that are in many directors into one string

2008-08-07 Thread Micah Gersten
oops. foreach (range(0..22) as $dirNum) :) Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Richard Kurth wrote: *I get this when I run it Parse error*: syntax error, unexpected T_DNUMBER in *remove.php* on line *4 it does not like the *foreach (0..22

Re: [PHP] read a bunch of files that are in many directors into one string -- oops again

2008-08-07 Thread Micah Gersten
foreach (range(0,22) as $dirNum) Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Richard Kurth wrote: *I get this when I run it Parse error*: syntax error, unexpected T_DNUMBER in *remove.php* on line *4 it does not like the *foreach (0..22 as $dirNum

Re: [PHP] read a bunch of files that are in many directors into one string -- oops again

2008-08-07 Thread Micah Gersten
Well, make sure $rootPath is correct for your environment. Also, add a slash after the directory name. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Richard Kurth wrote: *Now I get this error Warning*: chdir() [function.chdir]: No error (errno 0

Re: [PHP] Re: PUT vs. POST

2008-08-11 Thread Micah Gersten
No, if you said: .. there is NO way for PHP to access anything *directly* on the client. That's more true. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net

Re: [PHP] Re: Incrementing variables based on database data

2008-08-12 Thread Micah Gersten
Why not let the DB do this for you? You can group by whatever column that is and select count(*), column_your_looking_for. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Vinny Gullotta wrote: Nevermind, I figured it out. I needed to make the if statements

Re: [PHP] Re: Incrementing variables based on database data

2008-08-12 Thread Micah Gersten
Well, MySQL can aggregate the data for you so you don't have to pass it to PHP. It can just give you the results. I suggest reading up on the SELECT COUNT syntax and the GROUP BY syntax in MySQL. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Vinny

Re: [PHP] More math fun

2008-08-12 Thread Micah Gersten
Robert, when you do yours, it's performing the same function on two different variable types and has to do a conversion before the function works. He was doing a numeric function on a string which might be giving the funky results. Thank you, Micah Gersten onShore Networks Internal Developer

Re: [PHP] Re: regex

2008-08-13 Thread Micah Gersten
Take a look at this function, it'll make things a little easier: http://us3.php.net/manual/en/function.parse-str.php Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Philip Thompson wrote: Figured it out. Just needed to stretch my brain a lil. On Aug 13

Re: [PHP] Tool Tip in pdf

2008-08-14 Thread Micah Gersten
Why not wrap the text? Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Subhranil wrote: Hi all, I am creating a pdf where text size of cell is not fixed. My problem is if one text is too long than that cell then it overlap the next cell. I wish

Re: [PHP] php-gd problems on Ubuntu 8.04

2008-08-14 Thread Micah Gersten
Make sure that your php.ini file for the cli is loading gd. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Chantal Rosmuller wrote: Hi list, I have a PHP problem on Ubuntu 8.04, the php-gd package for ubuntu doesn't use the gd bundles library

Re: [PHP] PHP editor for linux

2008-08-14 Thread Micah Gersten
I use Eclipse with PHPEclipse. I think you have to install from source to get PHPEclipse to work right. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com It flance wrote: Hi, What do you think is the best php editor for linux. I'm using the Debian

Re: [PHP] preg_replace strange behaviour, duplicates

2008-08-15 Thread Micah Gersten
Take a look at the negative assertions on this page: http://us2.php.net/manual/en/regexp.reference.php Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Adz07 wrote: I am trying to nail down a bit of code for changing processor names depending on matches

Re: [PHP] Tool Tip in pdf

2008-08-19 Thread Micah Gersten
Which PDF generator are you using? Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Subhranil wrote: Hi Micah, Sorry for late reply. Actually 15th August is our INDEPENDENCE DAY and I was out of work. I am a newbie. I have very little knowledge about pdf

Re: [PHP] Tool Tip in pdf

2008-08-20 Thread Micah Gersten
); } $this-Ln(); } Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Subhranil wrote: I am using fpdf. Micah Gersten wrote: Which PDF generator are you using? Thank you, Micah Gersten onShore Networks Internal Developer http

Re: [PHP] preg_replace strange behaviour, duplicates

2008-08-20 Thread Micah Gersten
You know what's not supposed to be next in the second string, and that's the word Duo. Thank you Micah Gersten onShore Networks Internal Developer http://www.onshore.com Adz07 wrote: Problem is that a negative assertion assumes i know what is going to come after the match, but i don't. I

Re: [PHP] Re: Breaking a line in two

2008-08-20 Thread Micah Gersten
If you use wordwrap, you don't need nl2br. See Example 1 for wordwrap. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Lupus Michaelis wrote: Ron Piggott a écrit : This is 23 characters long. I want br added after the 12th character, following

Re: [PHP] Re: Conditional compilation

2008-08-20 Thread Micah Gersten
You can always call a function with a DEBUG flag and execute certain parts if it's set or not. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Robert Cummings wrote: On Fri, 2008-08-15 at 18:34 -0500, Shawn McKenzie wrote: Herman Gomez wrote: Hi

Re: [PHP] Re: Breaking a line in two

2008-08-20 Thread Micah Gersten
Actually, in HTML the space is irrelevant if you are breaking the line. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Ashley Sheridan wrote: Unfortunately, the wordwrap function won't do what he needs. He needed to add a br/ *after* the space

Re: [PHP] Re: Breaking a line in two

2008-08-20 Thread Micah Gersten
Wordwrap can still keep the space and add the br /. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Ashley Sheridan wrote: In HTML it is, I agree, irrelevant with regards to display, but the string could be going into an XML file, where the space has some

Re: [PHP] Re: Breaking a line in two

2008-08-20 Thread Micah Gersten
I tested it, and that's a valid break character. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Ashley Sheridan wrote: I really don't think it does, and there's no mention of it on the man page for it, unless your break character is br/ rather than just

Re: Fwd: [PHP] php not reading file properly

2008-08-20 Thread Micah Gersten
If the directory above it doesn't have execute privileges, it won't be able to read it either. Also, why not use the PHP5 function file_get_contents()? Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com sean greenslade wrote: Thanks for the advice. I changed

Re: [PHP] testing my being subscribed

2008-08-20 Thread Micah Gersten
You are indeed. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Govinda wrote: am I subscribed? I had to check. The other (php-install) list just sent me emails (when I tried to post) saying I was abusing the system (even though I am sure I subscribed

Re: [PHP] Quick question regarding getcwd() and directory location.

2008-08-21 Thread Micah Gersten
Once you tell apache to load /example/index.php, that's where you are. You might try looking at the $_SERVER['HTTP_REFERER']. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Ólafur Waage wrote: I'll throw out an example here. I have a directory structure

Re: [PHP] Restore Leading Zeros in Zip Codes

2008-08-21 Thread Micah Gersten
if (strlen($zip) == 4 || strlen($zip) == 9) $zip = 0$zip; Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Keith Spiller wrote: Hi, RE: Restore Leading Zeros in Zip Codes Does anyone happen to have a script that will restore the leading zeros

Re: [PHP] Restore Leading Zeros in Zip Codes

2008-08-21 Thread Micah Gersten
]; } Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Micah Gersten wrote: if (strlen($zip) == 4 || strlen($zip) == 9) $zip = 0$zip; Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Keith Spiller wrote: Hi

Re: Fwd: [PHP] php not reading file properly

2008-08-22 Thread Micah Gersten
What are the permssions of /var/log and /var/log/httpd? Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com sean greenslade wrote: Yeah, but it wouldn't read access_log.tmp, which wasn't being written to at the time of loading. I think the whole logs folder

Re: [PHP] Quick question regarding getcwd() and directory location.

2008-08-22 Thread Micah Gersten
You might want to try a Redirect Rule or rewrite which would tell you the HTTP PATH. AFAIK, there is no way to know which directory they tried to access unless you write your own index.php and store it in a session variable. Thank you, Micah Gersten onShore Networks Internal Developer http

Re: [PHP] Sorting Arrays

2008-08-22 Thread Micah Gersten
I believe you'll need a custom sorting function for this. http://us.php.net/usort Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Tom Shaw wrote: I'm having a problem sorting my array and wondered if anybody had experience sorting arrays by their values

Re: [PHP] Sorting Arrays

2008-08-22 Thread Micah Gersten
. Exactly. That's one reason why I love PHP. They have functions that do things you have to write subroutines for in other languages. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit

Re: [PHP] Quick question regarding getcwd() and directory location.

2008-08-23 Thread Micah Gersten
What is the point of figuring that out? If we knew that, we might be able to help you with a solution. As it stands what you want is not possible AFAIK. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Ólafur Waage wrote: I am within a certain directory

Re: [PHP] Adding a single php file to .htaccess.

2008-08-24 Thread Micah Gersten
You can replace the Python files with .html files that just have a redirect header in them. Then you can just have the php files as .php. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Dotan Cohen wrote: On one particular server, all *.html files

Re: [PHP] Quick question regarding getcwd() and directory location.

2008-08-26 Thread Micah Gersten
I said AFAIK. I was under the impression the DirectoryIndex did a redirect. I just tested it and it does not, so you are correct Jochem. He has everything he needs. He'll need the document root and $_SERVER['REQUEST_URI'] to do this. Thank you, Micah Gersten onShore Networks Internal

Re: [PHP] PHP IDE needed

2008-08-26 Thread Micah Gersten
How much RAM do you have? Eclipse is a great IDE. Have you upgraded to 3.4? Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Sascha Braun wrote: Hi people, I have a webproject which is round about 3 GB in size. I was usually using eclipse to work

Re: [PHP] Regex for email validation

2008-08-27 Thread Micah Gersten
That's a very handy extension. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com mike wrote: php should have a good check built-in. see http://www.php.net/manual/en/function.filter-var.php if(!filter_var($var, FILTER_VALIDATE_EMAIL)) { echo invalid

Re: [PHP] Re: Variable name as a string

2008-08-27 Thread Micah Gersten
First, the type is checkbox, not check. Second, you cannot put a value in the brackets for a checkbox group. A checkbox group is passed to PHP automatically as an array. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Maciek Sokolewicz wrote: Well

Re: [PHP] Re: Variable name as a string

2008-08-27 Thread Micah Gersten
You cannot have anything in the brackets for the name in a checkbox group. The brackets specify that it is an array. The name of the array is the key in $_POST that contains the values of the checkbox group that were checked. You can have as many groups as you like. Thank you, Micah Gersten

Re: [PHP] PHP IDE needed

2008-08-28 Thread Micah Gersten
That's an opinion that you state as fact. I use an IDE for PHP for function referencing is very PHP. The open declaration feature is very helpful in eclipse. Also, subeclipse is great too. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Dotan Cohen wrote

Re: [PHP] PHP IDE needed

2008-08-28 Thread Micah Gersten
I've been on the list for over a month and I post quite a bit. I do the same thing apparently. See 'Re: [PHP] Re: Variable name as a string' thread. :-) Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Dotan Cohen wrote: 2008/8/28 Micah Gersten [EMAIL

Re: [PHP] grab the complete commandline used ...

2008-08-28 Thread Micah Gersten
Does this work? $command = implode(' ', $argv); http://us2.php.net/manual/en/reserved.variables.argv.php Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Jochem Maas wrote: hiya, anyone know if it's possible to grab the entire commandline that was used

Re: [PHP] grab the complete commandline used ...

2008-08-28 Thread Micah Gersten
I suggest creating a shell wrapper for PHP that will write the command to a file for you and then call PHP with the appropriate arguments. PHP won't even see most of the command that you originally posted. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com

Re: [PHP] grab the complete commandline used ...

2008-08-29 Thread Micah Gersten
You can rename the php executable and replace it with a shell script that logs what is run. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Jochem Maas wrote: David Otton schreef: Quote the entire command as a string. Pass it to a shell script that sets

Re: [PHP] casting static property

2008-08-31 Thread Micah Gersten
Old timers like it at the bottom, but I agree with the newcomers. Top posting as long as it's not mixed with bottom posting can be easier for people who follow the threads. (I know I mixed it here) Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Diogo Neves

Re: [PHP] Shared memory, mutex functionality and spawning threads. Is it possible using PHP?

2008-09-01 Thread Micah Gersten
http://us2.php.net/apc Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Kent Larsson wrote: Hi, Is it possible to have shared memory in the form of shared global variables in PHP? Or any other form of shared memory? And if that is the case, is there any

Re: [PHP] Secure way to handle pw on session.

2008-09-02 Thread Micah Gersten
Take a look at this: http://us2.php.net/manual/en/function.session-save-path.php Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com k bah wrote: Hi, I noticed session files are kept on /tmp for a while, and even if they were immediately deleted, well

Re: [PHP] Secure way to handle pw on session.

2008-09-02 Thread Micah Gersten
If one does not know where the session data is, one cannot inject code to expose it. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Robert Cummings wrote: On Tue, 2008-09-02 at 14:45 -0500, Micah Gersten wrote: Take a look at this: http://us2.php.net

Re: [PHP] Secure way to handle pw on session.

2008-09-02 Thread Micah Gersten
I thought he'd be more worried about something like 'cat /tmp/sess_*'. Also, you can enable the save_path in the ini file or htaccess file and then disable the PHP function in the ini file. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Robert Cummings

Re: [PHP] Individual bulk e-mails - performance question (was skinning a cat) :-)

2008-09-02 Thread Micah Gersten
simultaneously, but will not step on each other's toes. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PHP on 64bit Ubuntu

2008-09-03 Thread Micah Gersten
32 bit is 2^32 - 1. 64 bit is 2^64 - 1. 2 * 32 bit = 2 ^ 33 - 2 That's not 64 bit. :) Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Robert Cummings wrote: Please explain how it can take up more than twice. If I have a fence segment with 32 vertical

Re: [PHP] Altering the error_reporting

2008-09-03 Thread Micah Gersten
This seems like a futile activity. It's a waste of time to have to hunt down an error if you can be told where it is. I suggest spending time improving coding standards that error chasing. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com [EMAIL PROTECTED

Re: [PHP] PHP: Mulitiple Arrary Sort

2008-09-03 Thread Micah Gersten
http://us3.php.net/basename Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Vernon wrote: SOLVED! I made the following change as well to fix the file name: BEFORE: echo date(m-d-Y, $entry['filemtime']) . {$file}br /\n; AFTER: echo date(m-d-Y

Re: [PHP] PHP on 64bit Ubuntu

2008-09-03 Thread Micah Gersten
My apologies. I sent this before I had my morning caffeine. You are correct, it's twice the storage space. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Robert Cummings wrote: On Wed, 2008-09-03 at 11:12 -0500, Micah Gersten wrote: 32 bit is 2^32

Re: [PHP] unset($_GET['i'])

2008-09-04 Thread Micah Gersten
The $_GET array comes from the URL which is resent every time someone hits F5. unset works on the server, not on the browser. You could capture it, add it to the session and then redirect without it in the URL. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com

Re: [PHP] Summing array indexes.

2008-09-04 Thread Micah Gersten
This should help: http://us.php.net/array_walk Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Tom Shaw wrote: Is there an easy way to loop thru the array below and add the incremented total price indexes so the order_total_price index contains the correct

  1   2   3   >