Re: [PHP] syntax woes

2009-04-03 Thread Shawn McKenzie
Chris wrote: > Shawn McKenzie wrote: >> Chris wrote: >>>> Wow, it does chown and chmod as well, thats friggen cool. >>> chown will only work if the script is running as root which I doubt your >>> drupal site will be. >>> >> >> Or if the

[PHP] Re: Best Practices for Hiding Errors

2009-04-06 Thread Shawn McKenzie
r, what they mean by the "never be used on production systems" is that display errors should not be "On" on a production system. You should change it to "Off" in your php.ini, or if you can't use the ini_set() in your script. -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: problems with loaded extensions

2009-04-08 Thread Shawn McKenzie
> > -Andres Does the extension rely on any external libraries? It may be that apache/the extension can't find it/them or apache doesn't have permission to it/them. Execute a shell as the apache user and try it from cli. -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: PHP and Send Mail

2009-04-08 Thread Shawn McKenzie
-- > Red Telematica de Salud - Cuba > CNICM - Infomed > > Hi! I'm Shawn. Bye -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] opening utf-8 files - chinese mb characters

2009-04-09 Thread Shawn McKenzie
On FF 2.0.0.6 Ctrl-I brings up the info page - perhaps 3.0 changed that? > > > /Per > Same on 3.0 Linux. Brings up the info page. -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: unknown number of inputs

2009-04-09 Thread Shawn McKenzie
quot;add more authors" and when clicked the javascript adds an additional input to the form. -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Escape Data In/Out of db [solved]

2009-04-11 Thread Shawn McKenzie
f > magic_quotes_sybaseOffOff > > I'm assuming that means OFF, right? > > Cheers, > > tedd I think you want to look for magic_quotes_gpc -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Escape Data In/Out of db [solved]

2009-04-11 Thread Shawn McKenzie
tedd wrote: >> I think you want to look for magic_quotes_gpc >> >> >> -- >> Thanks! >> -Shawn > > > -Shawn: > > You were right. > > I'll fix it. > > Thanks, > > tedd I normally have a prep4display() and prep4store()

Re: [PHP] Escape Data In/Out of db [solved]

2009-04-11 Thread Shawn McKenzie
Shawn McKenzie wrote: > tedd wrote: >>> I think you want to look for magic_quotes_gpc >>> >>> >>> -- >>> Thanks! >>> -Shawn >> >> -Shawn: >> >> You were right. >> >> I'll fix it. >> >>

Re: [PHP] multi-dimensional arrays

2009-04-13 Thread Shawn McKenzie
; } print_r($result); //another way $text = 'xxx xx x xx xxx xx x x xxx xx xx xx xxx xx xx xx'; $lines = explode(PHP_EOL, $text); foreach($lines as $line) { preg_match_all('|([^\s]+)+|', $line, $matches); $result[] = $matches[1]; } print_r($result); -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] multi-dimensional arrays

2009-04-13 Thread Shawn McKenzie
Shawn McKenzie wrote: > Well in your approach you get a bunch of empty elements where the spaces > are. Here are two ways but I'm sure one preg_match_all() without the > explodes and loop could do it (some guru will show us): > > //one way > $text = 'xxx xx

[PHP] Re: What was the unix timestamp of last week, Monday 12:00 am?

2009-04-14 Thread Shawn McKenzie
ny ways to skin > this cat, with date() arithmetic, etc., but the exceptions (Jan 1, first > day of the month, etc.) are driving me crazy. > > ...Rene 1239598800 -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: header() and passing sessions

2009-04-15 Thread Shawn McKenzie
t; >} > ?> > > so you click on View Pending Requests, and the URL in your browser is: > > http://intra.mdah.state.ms.us/helpdesk/viewpending.php?PHPSESSID=du75p41hel9k1vpuah799l2ce7 > > > but viewpending.php says "You have not logged in". Why is that? > > What does this display: echo session_name(); -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] redirect to a page the fist time a site is accessed

2009-04-16 Thread Shawn McKenzie
and you can still try the cookie method to not show the message, but it's not a big deal if they don't get the cookie/it expires etc., because the worst thing that can happen is that they see the message. > > -Stuart > -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] php isn't displaying mysql query correctly

2009-04-17 Thread Shawn McKenzie
ew User| >> | Server | >> | Telephone | >> +-+ >> 10 rows in set (0.00 sec) >> >> >> >> -- >> PHP General Mailing List (http://www.php.net/) >> To unsubscribe, visit: http://www.php.net/

Re: [PHP] php isn't displaying mysql query correctly

2009-04-17 Thread Shawn McKenzie
Adam Williams wrote: > Shawn McKenzie wrote: >> >> No. How about: >> >> while ($row = mysqli_fetch_array($mysqli_get_support_types_result)) >>{ >>echo "".$row['types']; >>} >> >> > > tha

[PHP] Re: pronlem with yum update and oci8

2009-04-17 Thread Shawn McKenzie
> 3/4 >Cleanup: php-pear-HTML-Common > > 4/4 > > Updated: >php-pear-HTML-Common.noarch 0:1.2.5-1.fc9 > php-pear-HTML-QuickForm-advmultiselect.noarch 0:1.5.1-1.fc9 > > Complete! > > > > > OK, what's the problem? Do you need oci8? If so, yum install it. -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Check whether a page is Google Cached

2009-04-21 Thread Shawn McKenzie
$site = $_GET['site']; $cache = file_get_contents('http://www.google.com/search?q=cache:' . $site); if (strpos($cache, 'This is Google's cache of') !== false) { echo 'Your site is cached by Google'; } else { echo 'Nope'; } -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: error with hosting

2009-04-21 Thread Shawn McKenzie
-za-z0-9\-\.]+$", $email)) > { > echo "Enter a Valid E-Mail > Address."; > } > elseif (strlen($zip)<5) > { > echo "Enter a Valid Zip > Code."; >

[PHP] Re: checkboxes

2009-04-21 Thread Shawn McKenzie
e radio buttons here. Only one in a group can be selected. Use the same name for all in a group but assign a different value. You can use numbers as the values or use the actual value from the DB maybe. So on submit the value of $_POST['choice'] would be 1, 2, 3, or 4. -- Thanks!

Re: [PHP] Unable to send mail from PHP to AT&T e-mail address

2009-04-22 Thread Shawn McKenzie
x27;somefromn...@myserver.com, my bad ). > > Perhaps the AT&T mail server, when it sees the 'nob...@myserver.com' > treats it as spam and does not deliver the mail to even the recipient's > spam mailbox. > > I am not sure if it is normal for outgoing SMTP mail servers to > automatically add the 'nob...@myserver.com' from address first in the > header, or even why it does so ? Does anybody know if this is normal for > mail servers to do this ? Evidently other incoming mail servers do not > react to the 'nob...@myserver.com' in any way, so maybe AT&T is unique > in this. > > Any light anyone can throw on the 'nob...@myserver.com' address would be > most welcome. It is using the apache user @ your host name as the default. Try this: ini_set('sendmail_from', 'whate...@wherever.com'); -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: unzip a file - destination folder wrong

2009-04-23 Thread Shawn McKenzie
to add the directory to fwrite, but without success. > > Does somebody know where to specify the target directory? > > Thank you for any help, > > Merlin Try this: $fp = fopen(dirname($filename) . '/' . zip_entry_name($zip_entry), "w"); -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: unzip a file - destination folder wrong

2009-04-23 Thread Shawn McKenzie
Merlin Morgenstern wrote: > > > Shawn McKenzie wrote: >> Merlin Morgenstern wrote: >>> Hi there, >>> >>> I am trying to unzip a zip file. Therefore I am using this function: >>> >>> # unzip a file >>> function extract_zip

Re: [PHP] I need ideas for things to code -- Roach vs Bugzilla

2009-04-27 Thread Shawn McKenzie
Michael Shadle wrote: > On Mon, Apr 27, 2009 at 5:46 PM, Shawn McKenzie > wrote: > >> #1 Which one are we talking about? > > Tickets/trackers (Bugzilla, Mantis, Roach, you name it) and SCM > integration tools (Redmine, Trac) OK, so geared towards software bugs I as

Re: [PHP] I need ideas for things to code -- Roach vs Bugzilla

2009-04-27 Thread Shawn McKenzie
talking about? #2 Having rarely used either, what are the main (must have) features? #3 What are the needed features that other OSS solutions don't offer? #4 What are the great features missing from free and commercial apps? -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] I need ideas for things to code - webbytedd examples

2009-04-28 Thread Shawn McKenzie
mples? > > I noticed that, too. But I have to say, this is one of the coolest sites > I've ever seen. If you wanted to convince someone (a prospect) you could > do something, this site would do it. Next time I talk to a prospect, I'm > gonna call myself Tedd and

Re: [PHP] $_session/$_cookie trouble

2009-04-28 Thread Shawn McKenzie
also removed all of the if() and still not had success > > None of which are producing results... > > Anyone see where I am going wrong... I have spent all day online, in the > books, in the manual... > > Thanks again > > gary Maybe I'm missing something, b

Re: [PHP] Boolean Parameter to 3 Options?

2009-04-29 Thread Shawn McKenzie
atch the first condition. If you're using true and false now and just want to add a second option then continue using true/false. Don't mix and match. 1 == true and 2 == true. function doFooBar($doFoo = false) { if($doFoo === 2) { //something } elseif($doFoo === true) { //something true } elseif($doFoo === false) { //something false } } -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: file_get_contents doesn't work on one particular server

2009-04-29 Thread Shawn McKenzie
p, compress.zlib, > compress.bzip2, https, ftps, zip > > Test server: PHP 5.2.9-2 > Registered PHP streams: php, file, data, http, ftp, compress.zlib > > Most likely allow_url_fopen = Off in the test server php.ini. If you had error reporting on it would tell you. -- Thanks

[PHP] Re: file_get_contents doesn't work on one particular server

2009-04-29 Thread Shawn McKenzie
Shawn McKenzie wrote: > Brian Dunning wrote: >> Howdy all - We have a production server that runs our script fine. We're >> setting up a test server, and this particular script returns a length of >> zero: >> >> $ctx = stream_context_create(array('ht

[PHP] Re: Static and/or Dynamic site scraping using PHP

2009-04-30 Thread Shawn McKenzie
the body or individual tags, etc... For more control, maybe try this: $doc = new DOMDocument(); $doc->loadHTMLFile('http://example.com/page.html'); Then use: http://php.net/manual/book.dom.php -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: graphical integrated development environment recommendations?

2009-05-01 Thread Shawn McKenzie
d eclispe, but I'm using netbeans now. Runs on win and linux. Just to edit a file here and there I use kate on linux (many text editors have highlighting/folding on linux) and notepad++ when I have to be on windows. -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing Li

[PHP] Re: speaking of control structures...

2009-05-05 Thread Shawn McKenzie
echo "i is not big enough"; break; } $i *= $factor; if ($i < $minimum_limit) { break; } echo "i is ok"; /* process i */ } while (0); -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: SQL Injection - Solution

2009-05-06 Thread Shawn McKenzie
in your code as it is and if you changed the addslashes() to mysql_real_escape_string(). Normally this is good: if(get_magic_quotes_gpc()) { $value = stripslashes($value); } $arraSanitized[$key] = mysql_real_escape_string($value); I also think strip_tags() or htmlentities() belongs more in a dis

Re: [PHP] Re: SQL Injection - Solution

2009-05-06 Thread Shawn McKenzie
Target)) { $Value = array_map('_antiSqlInjection', $Target); } else { if(get_magic_quotes_gpc()) { $Target = stripslashes($Target); } // replace backtick with single quote or whatever $Target = str_replace("`", "'", $Target); $Value = mysql_real_escape_string($Target); } return $Value; } Thanks! -Shawn -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: SQL Injection - Solution

2009-05-06 Thread Shawn McKenzie
ray('x"x','y`y','z')) ); print_r(_antiSqlInjection($_GET)); Array ( [test] => some stuff \"here\" [test_array] => Array ( [0] => a\"a [1] => b\'b [2] => Array (

Re: [PHP] Re: SQL Injection - Solution

2009-05-06 Thread Shawn McKenzie
sql_real_scape_string etc... Then the best you can do is replace mysql_real_scape_string() with addslashes() or possibly addcslashes() and build your own list. -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: SQL Injection - Solution

2009-05-06 Thread Shawn McKenzie
] => x\"x [0] => y\'y [1] => z ) ) ) Thanks! -Shawn -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: SQL Injection - Solution

2009-05-06 Thread Shawn McKenzie
Andrew Ballard wrote: > On Wed, May 6, 2009 at 2:25 PM, Shawn McKenzie wrote: >> Igor Escobar wrote: >>> Yeah yeah, i understood that, but, the point is... i sad previously, my >>> function is not tied to any database. >>> >>> Is a generic function,

Re: [PHP] speaking of control structures...

2009-05-06 Thread Shawn McKenzie
what I would call an exception. Exception don't have to be errors or > such. It's just a special situation ... > > Marcus In the corner to my right, wearing black trunks, with orange and yellow trim, Marcus Gnaß... In the corner to my left, wearing pink trunks, trimmed in

Re: [PHP] Re: SQL Injection - Solution

2009-05-07 Thread Shawn McKenzie
;>> these words are not common ... >>>>> Igor, >>>>> >>>>> I'm brazilian too, but that is not the point. Deny the use of *any* >>>>> word as input in your app is unnecessary. The problem that you're >>>>> trying to solve, has been s

Re: RES: [PHP] CURL error help

2009-05-08 Thread Shawn McKenzie
turn $dom; > } > > I think somehow the array is not being read or it's trying to pass the full > array of url's as one url? Therefore saying it does not exist? My best guess, > am I making the array wrong? > > Look at your function call in your original post:

Re: RES: RES: RES: [PHP] CURL error help

2009-05-08 Thread Shawn McKenzie
k]=>\"".$node->$k.'", '; >echo ')'; >} >echo "\n"; > >foreach($node->nodes as $c) >dump_html_tree($c, $show_attr, $deep+1); > } > > // get dom form file (deprecated) > function file_get

[PHP] Re: irrational behavior

2009-05-12 Thread Shawn McKenzie
> $ii++; > } > echo "" ; > } > ?> > > The same phenomenon happens in another application using the identical code. > I don't want to sort the category; that has been taken care of in the query. > It just doesn't make sense that sorting would affect the count. :-( > The sorting actually re-indexes your associative array into a numerical one that makes the code that follows work more correctly. -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] handling chunked input from php://stdin

2009-05-12 Thread Shawn McKenzie
e result, has anyone else come across this and > how did they solve it? > > Thanks in advance > There aren't really many examples around, but check http_chunked_decode() from PECL. -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: include file syntax

2009-05-14 Thread Shawn McKenzie
nyone have a clarification, please? > Validation is done on the resultant html output so it's not affected. Every file include takes time to execute the include, however it's probably negligible unless you have a very high number of includes. -- Thanks! -Shawn http://www.spidean.com -

[PHP] Re: php & html integration

2009-05-14 Thread Shawn McKenzie
before the image, then you must place it before the image and vice versa. -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: php ssl connection timeout issue

2009-05-14 Thread Shawn McKenzie
PHP Streams and Registered Stream Socket Transports. Also, is openssl listed under extensions? -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PHP Email Setup problem

2009-05-14 Thread Shawn McKenzie
That has nothing to do with PHP or sendmail, it's in the Apache conf. You would see this whether you configured sendmail or not. AFAIK it's not a problem, especially on a dev box. -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Shopping Cart

2009-05-16 Thread Shawn McKenzie
6* > That's because $result is not valid because the query failed. You'd see this if you turned on error reporting. BY is not valid in your query, maybe ORDER BY? -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] CSS & tables

2009-05-19 Thread Shawn McKenzie
> clients, could be used on desktops, phones, inside tv hardware etc as > well, then our content could be viewed and applications used virtually > anywhere. > > and yeah, we are already at this point we have the ability for all of > this, flash / air player being the most prominent example. > > so all we need is a few server applications and a decent lightweight > persistent stateful connection for communication, some standard shared > client applications, and of we go! (imho quite sure could extend xmpp a > tiny bit to achieve this). > > lol - i needed to get that out my system Java anyone? -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] CSS & tables

2009-05-19 Thread Shawn McKenzie
Nathan Rixham wrote: > Shawn McKenzie wrote: >> Nathan Rixham wrote: >>> I just wanted to run this past you guys for thoughts and opinions or >>> even just to get brains ticking, it's all web development related and >>> touched on throughout this thre

Re: [PHP] CSS & tables

2009-05-19 Thread Shawn McKenzie
apps. I have only briefly played with Flash or Java and it's been a couple of years. It just sounded like Java to me when you were explaining it. It's hard for me to remember who the Java versus Flash proponents are, so I expected a Java punchline instead of the Flash one :-) -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Posting values to a URL

2009-05-19 Thread Shawn McKenzie
unction not to return response headers? > > > Help needed thanks in advance! > > - > dee $response = http_parse_message(http_post_fields($url, $fields)); $body = $response->body; -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] -less layouts; Ideas welcome

2009-05-21 Thread Shawn McKenzie
ridan.co.uk > I cant get the calendar on your site to do anything. No links and clicks do nothing. FF 3.0.10 / Ubuntu. -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] -less layouts; Ideas welcome

2009-05-21 Thread Shawn McKenzie
Ashley Sheridan wrote: > On Thu, 2009-05-21 at 10:44 -0500, Shawn McKenzie wrote: >> Ashley Sheridan wrote: >> > Tedd, I've got a fairly simple calendar script in PHP here >>> http://www.ashleysheridan.co.uk/coding.php?group=php&article=coding_php_calendar.ph

[PHP] Re: PHP class question

2009-05-21 Thread Shawn McKenzie
I have, is this a good solution, is it the only solution > or are there different ways to tackle this? > As you might see it needs to run in PHP4. > I'm sure there are. This doesn't look right to me, but I'm confused by your examples. -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] SECURITY PRECAUTION BEFORE SUBMITTING DATA IN DATABASE

2009-05-21 Thread Shawn McKenzie
ser input through an existed tested input filter, such > as http://htmlpurifier.org/ rather than trying to re-invent the wheel > and create your own. Script kiddies have scripts that test webapps for > input vulnerabilities (both xss and sql injection), and some of them are >

Re: [PHP] SECURITY PRECAUTION BEFORE SUBMITTING DATA IN DATABASE

2009-05-21 Thread Shawn McKenzie
t;>>> You shouldn't need addslashes with prepared statements. >>>> You should run user input through an existed tested input filter, such >>>> as http://htmlpurifier.org/ rather than trying to re-invent the wheel >>>> and create your own. Script kiddies

Re: [PHP] Re: PHP class question

2009-05-21 Thread Shawn McKenzie
Peter van der Does wrote: > On Thu, 21 May 2009 14:08:11 -0500 > Shawn McKenzie wrote: > > >> This doesn't make sense. You say "class A needs to be extended with >> another class", however what you show below is "class A extending >> framew

Re: [PHP] Re: PHP class question

2009-05-21 Thread Shawn McKenzie
Shawn McKenzie wrote: > Peter van der Does wrote: >> On Thu, 21 May 2009 14:08:11 -0500 >> Shawn McKenzie wrote: >> >> >>> This doesn't make sense. You say "class A needs to be extended with >>> another class", however what you sho

[PHP] Re: reference variables

2009-05-22 Thread Shawn McKenzie
i missing something..? > the same is the case when i replace > $a2[0] = 3; with > $a1[0] = 3; > $x = 3; > > Kranthi. > $a2[0] was assigned the value of $x or 1, so when you change $a2[0], that's all that changes. You have changed the value 1 to 3. $a1[0] is a reference

Re: [PHP] Re: reference variables

2009-05-22 Thread Shawn McKenzie
ructure/values of the array elements thus showing a reference to a var that is int(1). In the second instance you are var_dumping a specific var so you get the value of the var int(1). I'm not sure if there is a reason that it doesn't show that it is a reference, but the same is tru

Re: [PHP] urgent CSS question

2009-05-22 Thread Shawn McKenzie
r that infraction is what led to the discovery of his multiple rapes and brutal murders. Damn yanks. -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Why does PHP have such a pain in the a$$ configurationfile?

2009-05-26 Thread Shawn McKenzie
hey have changed how > something fairly standard works. Such settings are usually made > available to people who know what they're doing and who need specific > functionality. > > Cheers, > Rob. In addition to what Rob said, the only other option would be implicit_flush, which is ridiculous if it is set to on. Maybe the file that you're evaling has some ob stuff or flush() in it? -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: db messed up

2009-05-26 Thread Shawn McKenzie
rmal shutdown > > This was the time of the problem! > But when I look at /tmp/mysql.sock - it is 0 bytes. > Is this the problem? But I can connect to the other databases... :'( > Been a while for me on BSD, but try: /usr/local/etc/rc.d/mysql-server stop rm /tmp/mysql.sock /

[PHP] Re: Displaying images

2009-05-27 Thread Shawn McKenzie
? Does the image with said filename actually exist in that path? -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: Displaying images

2009-05-27 Thread Shawn McKenzie
Miller, Terion wrote: > > > > Does the filename include the path? Does the image with said filename > actually exist in that path? > > -- > Thanks! > -Shawn > http://www.spidean.com > > -- > PHP General Mailing List (http://www.php.net/) > To unsubs

Re: [PHP] not a shopping cart

2009-05-27 Thread Shawn McKenzie
products, etc. 1. login user/start session 2. query db for categories and list them 3. when user clicks on a category, query db and list all products in that category 4. each product has a text field where the name is the product id and the value is the quantity that is entered by the user 5. when t

Re: [PHP] Re: Displaying images

2009-05-27 Thread Shawn McKenzie
t; $result=mysql_query($sql); > $row = mysql_fetch_assoc ($result); > > > > ?> > > > > This page isn't working and if I try to browse this page it wants to open it > with an editor, it won't view in the browser. > > What am I doing wrong? Is

Re: [PHP] Re: Displaying images

2009-05-27 Thread Shawn McKenzie
Shawn McKenzie wrote: > Miller, Terion wrote: >> Thanks for the suggestions everyone, I have this now, but still no image >> showing up >> >> It is stored as a blob in the database. >> >> on the output page I am calling it like this: >> >>

Re: [PHP] Re: Displaying images

2009-05-28 Thread Shawn McKenzie
t; filename=$name"); > > > echo $data["photoName"]; > echo $data["ePhoto"]; > > exit; It's hard to tell, not knowing what the db fields contain, but the two glaring issues are: 1. unless photoType is image/something then it won't work. It can't just be jpeg or gif. So maybe do header("Content-type: image/$type"); assuming $type is correct. 2. Since $data["photoName"]; is not of type image/whatever, the echo may break the display. -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: class problem :(

2009-05-28 Thread Shawn McKenzie
ate $table; static function getObjectIds ($field, $value, $table) { $query = "SELECT id FROM $table WHERE $field = '$value'"; $object_ids = mysql_fetch_array(); return $object_ids; } } class Category extends ForumObject { static private $table = 'cat

Re: [PHP] recipes anyone?

2009-05-29 Thread Shawn McKenzie
way into a > lot of things you wouldn't think contain corn. > > I think it may be corn syrup itself and not corn that he is allergic to, > I don't remember. Oh God, please don't get PJ started on corn! -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Numerical Recipe - Scheduling Question

2009-05-29 Thread Shawn McKenzie
nterval, something similar to: $interval = "1 week"; $next = $start_time; while ($next <= $end_time) { $next = strtotime("+$interval", $next); echo date(DATE_RFC822, $next) ."\n"; } -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: Numerical Recipe - Scheduling Question

2009-05-29 Thread Shawn McKenzie
bruce wrote: > hey shawn... > > strtotime (or something similar) might just work > > i'll always know the interval... which can be used to compute the nexttime, > which then becomes the next starttime... > > i'm assuming there's an equally simple way to fi

[PHP] Re: Instantiate SOAP Request Objects

2009-06-01 Thread Shawn McKenzie
are mapping SOAP types to PHP classes, so you need to define the PHP class first: class Credentials { public $Password public $Username } $map = array('Credentials' => 'Credentials', 'GetSourceTextRequest' => 'GetSourceTextRequest');

[PHP] Re: Instantiate SOAP Request Objects

2009-06-01 Thread Shawn McKenzie
Shawn McKenzie wrote: > Samuel Vogel wrote: >> Hey, >> >> I would like to know how I can instantiate the types that I get via the >> __getTypes() function or know if this is even possible. >> I am asking because I have a webservice in which all functions expect a

Re: [PHP] Directing form to different handlers?

2009-06-01 Thread Shawn McKenzie
;delete.php"); > break; > > default; > echo "Nothing selected"; > break; > > } Yes, something like this except it would be $_POST. Your form/buttons would be something like: .. And then process.php with a switch or something using the value of $_POST['submit']. -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Directing form to different handlers?

2009-06-01 Thread Shawn McKenzie
ng parameters to a 'delete' action different than passing > 'delete' as a parameter to a general purpose action? > You do have a point with not all clients having Javascript. It would be a > business decision on the part of Shawn if he wants to support the fraction > of

Re: [PHP] Re: Instantiate SOAP Request Objects

2009-06-01 Thread Shawn McKenzie
Samuel Vogel wrote: > Am 01.06.2009 20:05 Uhr, schrieb Shawn McKenzie: >> Shawn McKenzie wrote: >> >>> Samuel Vogel wrote: >>> >>>> Hey, >>>> >>>> I would like to know how I can instantiate the types that I get via the &

Re: [PHP] Redirect not working on server

2009-06-02 Thread Shawn McKenzie
page is blank - except for the echo > test > > Yes, but id display_errors = Off then you need to do: ini_set('display_errors', '1'); -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: MySQL after oracle, still Wise?, was Web application design .......

2009-06-02 Thread Shawn McKenzie
n't see any problems with MySQL. I use it (and will continue) or SQLite for small things. If Oracle lets MySQL continue as it has, then all is well. If not, it is open source now and a group or more than one will fork it and continue on the tradition. -- Thanks! -Shawn http://www.spid

[PHP] Re: PHP Security

2009-06-02 Thread Shawn McKenzie
-Grant Do not under any circumstances put the web server on the Internet. -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: forms problem

2009-06-03 Thread Shawn McKenzie
ve the link to any stylesheets that you're using and see what it looks like. -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Using File_exists? (RESOLVED)

2009-06-03 Thread Shawn McKenzie
a file system or using a wrapper that supports stat(), which HTTP does not. -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] forms problem

2009-06-03 Thread Shawn McKenzie
PJ wrote: > AngeloZanetti wrote: >> Shawn McKenzie wrote: >> >>> PJ wrote: >>> >>>> PROBLEM 1 solved: errant s removed; strange that they were >>>> inhibiting entry of data into form field? >>>> >>>> PROBLEM 2

Re: [PHP] formatting - design question

2009-06-04 Thread Shawn McKenzie
2 */ .someclass { color: blue } someclass will be blue. /* style sheet 1 */ .someclass { color: red; } /* style sheet 2 */ .someclass { color: blue; background-color: yellow; } /* style sheet 1 */ .someclass { color: red; } /* style sheet 3 */ .someclass { color: blue; background-color: white; } -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Automated form generation?

2009-06-08 Thread Shawn McKenzie
ks, > > Skip My first thought was CakePHP. Setup your database and run the cake bake script and you will get all the forms, create, retrieve, update and delete, as well as the PHP models and controllers to do it. Then you just start customizing. -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Cross site scripting

2009-06-09 Thread Shawn McKenzie
doing some nasty JavaScipt hacking here!"%29%3B%3C%2Fscript%3E in a browser. This means that you're not validating/sanitizing input. You can't just take the contents of a $_GET, $_POST, etc. (any user input) variable and echo it out. -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Preventing XSS Attacks

2009-06-10 Thread Shawn McKenzie
l_escape_string() for sanitising input to use for a search? It > should escape anything out so that the query can't be used in ways that > I don't want no? > > I'd thought about using a whitelist-only regex, but that seems a little > limiting tbh, and as my site contains code, it's not unreasonable to > expect some people might want to search for particular code excerpts. > > > Thanks > Ash > www.ashleysheridan.co.uk > You would use mysql_real_escape_string() before using the string in a db query (searching). You should use htmlentities() and/or strip tags before displaying the string. -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Preventing XSS Attacks

2009-06-10 Thread Shawn McKenzie
Ashley Sheridan wrote: > On Wed, 2009-06-10 at 14:40 -0400, Andrew Ballard wrote: >> On Wed, Jun 10, 2009 at 2:26 PM, Ashley >> Sheridan wrote: >>> On Wed, 2009-06-10 at 14:14 -0400, Eddie Drapkin wrote: On Wed, Jun 10, 2009 at 2:08 PM, Ashley Sheridan wrote: > On Wed, 2009-06-10

[PHP] Re: Field type for american money

2009-06-11 Thread Shawn McKenzie
@ hosting4days . com > [db-lists 09] > > > If you are only interested in round dollar amounts then int should work fine ;-) If you expect any fractions of a dollar (as I suspect you will), such as 19.95 then use decimal. -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing

Re: [PHP] Field type for american money

2009-06-11 Thread Shawn McKenzie
$total = 1995 + 399; //shipping Except with the ints you have to format them for display. -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Field type for american money

2009-06-11 Thread Shawn McKenzie
Robert Cummings wrote: > Shawn McKenzie wrote: >> Waynn Lue wrote: >>> For mysql, it's better to use int and then store it in cents (or >>> micros) so you can use all integer operations instead of float ones. >>> >> >> To each his own.

Re: [PHP] socket communication programming

2009-06-12 Thread Shawn McKenzie
ecting. > > what is the meaning of this string" GET / HTTP/1.0\r\nHost: > www.example.com\r\nAccept <http://www.example.com/r/nAccept>: */*\r\n\r\n" Those are some header from a get request, though looking malformed maybe. > www.bemycandy.com > -- Thanks! -Shawn h

[PHP] Re: preg_replace problem

2009-06-13 Thread Shawn McKenzie
7;t help. > > This seems too obvious to be a bug. Using php5.2.9 > > Al... Your code works for me, unless I'm misunderstanding the problem. With the following: $value = ""e;test"e;"; I get: "e;test"e; &quote;test&quote; -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] fopen() on a network share?

2009-06-15 Thread Shawn McKenzie
en() >> for this? > > > As I remember, you either have to double slash or use the other slash. servername\\sharename\\folder\\file.xml or //servername/sharename/folder/file.xml -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] populate form input option dropdown box from existingdata

2009-06-16 Thread Shawn McKenzie
ng to understand what basic html does, try this: > > http://www.htmlcodetutorial.com/ > > I often use this site to refresh my failing memory about html stuff. > > Cheers, > > tedd > He has a multiple select, so the select has to be an array or you just get one value even if more than one was selected (you just get the last one). -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Form Process Question

2009-06-16 Thread Shawn McKenzie
: 1. Use some javascript that calculates onchange of the form controls. 2. Have a continue/submit button that posts back to the same page that does a calculate on submit and show a confirmation page with the total and then a finish button. -- Thanks! -Shawn http://www.spidean.com -- PHP General

<    1   2   3   4   5   6   7   8   9   10   >