Re: [PHP] For Loop

2006-06-20 Thread Jeffrey Sambells
for($i=1; $i<100; $i++) { ${'p'.$i.'name'} = 'whatever'; } - jeff On 20-Jun-06, at 6:14 PM, Albert Padley wrote: I have a regular for loop - for($i=1; $i<100; $i++) Within the loop I need to create variables named: $p1name; $p2name; $p3name; etc. The integer portion of each variable

[PHP] Bug in == comparison?

2006-07-21 Thread Jeffrey Sambells
ideas why this is suddenly happening? I'm using PHP 5.1, and I realize I could use other functions such as strval() in the comparison however I've used similar logic in the past without problems. Any help would be great. Thanks Jeff ~~ Jeffrey Sambells

[PHP] Re: Bug in == comparison?

2006-07-21 Thread Jeffrey Sambells
hrm.. It just seemed strange as the script I was working on is 3 years old and had worked flawlessly until today. Thanks. - Jeff ~~ Jeffrey Sambells Director of Research and Development Zend Certified Engineer (ZCE) We-Create Inc. [EMAIL PROTECTED] email

Re: [PHP] client<->server upload communication?

2006-08-06 Thread Jeffrey Sambells
Your page currently has a JS error but... The short answer is not in PHP. The PHP script doesn't 'process' the upload of the file. When the file is received by the server, the script (line 1) starts executing AFTER the file is already fully uploaded, and the files temporary location is refe

[PHP] Retrieving variable name?

2005-09-21 Thread Jeffrey Sambells
is it possible to retrieve the name of a variable passed into a function from within the function? //for example here can I determine that $input came from $a in the previous scope? } example($a); ?> Jeffrey Sambells Director of Research and Development We-Create Inc. 519.897.2552 c

Re: [PHP] why memory limit is still being complained about?

2005-09-21 Thread Jeffrey Sambells
Not sure about Gallery or Apache 2 but Apache 1 uses different php.ini files for cli, cgi and mod_php. It could be that gallery checks using the command line version of php which has a different setting for memory limit? Seems silly but it's a thought. Jeff Jeffrey Sambells Direct

Re: [PHP] Re: Retrieving variable name?

2005-09-21 Thread Jeffrey Sambells
oh well, thanks for the help. Jeffrey Sambells Director of Research and Development We-Create Inc. 519.897.2552 cell 519.745.7374 office 888.615.7374 toll free http://www.wecreate.com On 21-Sep-05, at 6:02 PM, Jake Gardner wrote: Maybe something fancy with references? http://us2.php.net

[PHP] Trigger root script?

2005-09-26 Thread Jeffrey Sambells
ot user. I thought of using a cron to watch for some indicator but that would mean there could be a one minute delay. Any thoughts? Running php / linux and I have root access to the machine myself so i can set it up however I need to. Thanks. Jeff -- Jeffrey Sambells Director of Re

Re: [PHP] passing a variable with php_self

2005-10-03 Thread Jeffrey Sambells
t as above however... Don't forget to check for XSS! Using PHP_SELF you could simply change the URL in the browser to: /path/to/script.php">alert('hello'); -Jeff ~~~~~~ Jeffrey Sambells Director of Research and Development Zend Certified Engi

Re: [PHP] passing a variable with php_self

2005-10-03 Thread Jeffrey Sambells
oops, that should be htmlentities, not htmlspecialchars. - Jeff On 3-Oct-05, at 11:51 AM, Jeffrey Sambells wrote: $PHP_SELF should not be used because it will not work without register_globals being enabled. Rather, you should use $_SERVER ['PHP_SELF'] for it as above however.

[PHP] PDO & pgsql?

2005-10-11 Thread Jeffrey Sambells
"" } I am thinking it is something in the PDO_pgsql extension but thought I'd ask if anyone has any ideas why it's not working? Thanks. -Jeff ~~ Jeffrey Sambells Director of Research and Development Zend Certified Engineer (ZCE) We-Crea

Re: [PHP] Using PHP for accsess control, preventing access to staticfiles

2005-10-27 Thread Jeffrey Sambells
sessions and use something like mod_security or a simple cookie/ query_string check to see if the requested file has a valid session. Then apache would handle the download as normal so users could use whatever download mechanism they want. - jeff ~~ Jeffrey

[PHP] Regex for balanced brackets?

2005-11-21 Thread Jeffrey Sambells
subject = << - Jeff ~~~~~~ Jeffrey Sambells Director of Research and Development Zend Certified Engineer (ZCE) We-Create Inc. [EMAIL PROTECTED] email 519.745.7374 office 519.897.2552 mobile ~~ Get Mozilla Firefox at http://spreadfirefox.com -- PHP

[PHP] Class Constant PHP 5

2005-12-07 Thread Jeffrey Sambells
like it to be a constant. Thanks. - Jeff ~~ Jeffrey Sambells Director of Research and Development Zend Certified Engineer (ZCE) We-Create Inc. [EMAIL PROTECTED] email 519.745.7374 office 519.897.2552 mobile ~~ Get Mozilla Firefox

Re: [PHP] Class Constant PHP 5

2005-12-07 Thread Jeffrey Sambells
ould not change the value of the constant. To achieve the result I want I could do: But that just seems pointless and messy. I will assume that the simple answer to my original question was 'No that it is not possible'. Thanks - Jeff Jeffrey Sambells cell 519.897.2552 ph

Re: [PHP] PHP Warning: imagettftext() expects parameter 2 to be double

2005-12-07 Thread Jeffrey Sambells
You've got 83px in you XML file for the fontsize. the 'px' is messing it up change it to just 83 in the XML file or cast the value to (float) which will extract the 83 and remove the px: foreach ($xml->textblock as $text) { $fontsize=(float)$text->fontsize;

Re: [PHP] detecting file size

2005-12-12 Thread Jeffrey Sambells
The php script starts to execute AFTER the file has already been uploaded so the quick answer is no you can't get the file size prior to the upload finishing (in PHP). I fought with a similar problem and ended up implementing the uploading portion of a script using perl which has access to the

Re: [PHP] installing php5 on os x and CLI version

2006-01-09 Thread Jeffrey Sambells
php runs out of /usr/bin/php but entropy.ch installs into /usr/local/ php5 so you want to run /usr/local/php5/bin/php (on my system i symlinked the two so they are the same). -jeff ~~ Jeffrey Sambells Director of Research and Development Zend Certified