Re: [PHP] How can I secure database passwords used by PHP webpages

2005-03-01 Thread John Holmes
y discussed on here). Your issue is controlling access to the machine and the files, so is an OS/policy/trust issue, imo. -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals – www.phparch.com -- PHP General Mailing List

Re: [PHP] textarea posting duplicate text

2005-03-01 Thread John Holmes
his issue. It was an older version of PHP and/or Apache2 that I thought was fixed, though. Maybe your running into this same issue? Try searching the PHP bug database for "apache2 duplicate" and see if you can find the old bug/issue. -- ---John Holmes... Amazon Wishlist: www.amazon.com

Re: [PHP] Not able to add data to a MySQL database

2005-02-28 Thread John Holmes
Richard Lynch wrote: Vaibhav Sibal wrote: Hi, I am not able to insert data into my mysql database using php even if i use a simple code as follows : ADD SOME ERROR CHECKING!!! http://php.net/die and http://us2.php.net/mysql_error ;) -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry

Re: [PHP] Problem submitting a POST request "by hand"

2005-02-28 Thread John Holmes
or print? -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals – www.phparch.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] php DBMS

2005-02-28 Thread John Holmes
7;re after. It comes with PHP5 and can be built into PHP4, iirc. Of course, I'm assuming what you mean by "fully implemented" is included with PHP, not written with it. A database written in PHP would not be good, imo. -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registr

Re: [PHP] get_defined_vars in all scopes?

2005-02-27 Thread John Holmes
functions that weren't globalized? No, not unless you call this in the functions, also. The variables don't exist after the function is completed. ---John Holmes... UCCASS - PHP Survey System http://www.bigredspark.com/survey.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] http referer

2005-02-26 Thread John Holmes
page before trying to access the file url. some people have said http_referer is not always accurate. I wouldn't rely on http_referer at all. Why not start a session when people enter your site and ensure a valid session is created before your file manager serves the file? -- ---John H

Re: [PHP] HOWTO read PHP source code into a textarea

2005-02-26 Thread John Holmes
st time you try to load a file with the string "" in it, I guess. -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals – www.phparch.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

Re: [PHP] Quoting and $_POST['Name'] problem

2005-02-26 Thread John Holmes
"my value: {$array['key']}"; This also works: echo "my value $array[key]"; but it's better to use the brackets so it's clear exactly what variable you are displaying. -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|ar

Re: [PHP] String validation

2005-02-22 Thread John Holmes
o 'bad'; } Change to {1,6} if you want to ensure the string isn't empty. -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals – www.phparch.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Help with a query please - unable to error check!

2005-02-16 Thread John Holmes
echoing/running the right query? Errors like that are normally caused by a variable being empty. -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals – www.phparch.com -- PHP General Mailing List (http://www.php.net/) To unsu

Re: [PHP] Unable to load dynamic library 'C:\PHP\ext\php_mssql.dll'

2005-02-13 Thread John Holmes
[EMAIL PROTECTED] wrote: I have solved this problem before but cannot remember how. The php.ini is set up any ideas?? Make sure libmysql.dll is in the windows or windows/system32 directory. -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine

Re: [PHP] Creating a varable with a name held in a string

2005-02-10 Thread John Holmes
Randy Johnson wrote: I like to do this: foreach( $row as $key=>$val) { $$key = $row[$key]; } You're just recreating a slower version of extract()... -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Profe

Re: [PHP] Creating a varable with a name held in a string

2005-02-10 Thread John Holmes
have? It's a few more characters to type, but it takes away one level of possible confusion when you come back to this code later. Just my $0.02. -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals – www.phparch.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] mail() function

2005-02-09 Thread John Holmes
them. Also in my php.ini file the parameter sendmail_path is empty. Is this a required parameter for sending mail? I'm using Windows/IIS. No, since you're not using sendmail on Windows. What are your SMTP settings in php.ini? -- ---John Holmes... Amazon Wishlist: www.amazon

Re: [PHP] Control Structures

2005-02-06 Thread John Holmes
it. -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals – www.phparch.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Connecting To Multiple MySQL Databases

2005-02-05 Thread John Holmes
page? Somehow, I doubt it... No. The connection is automatically closed at the end of the script if you don't do it yourself. -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals – www.phparch.com -- PHP General Mailing

Re: [PHP] Connecting To Multiple MySQL Databases

2005-02-03 Thread John Holmes
#x27;s why mysql_connect() returns a connection resource. So assign the result of each mysql_connect() to a different variable so you can keep them apart. It's also why mysql_query() accepts a connection parameter, so you can designate which connection the query is being sent to. --

Re: [PHP] simple question

2005-01-31 Thread John Holmes
print it. The way you have it now, the function must be ran before the original string can be printed. That's why you see the 3 before the 2. function supscript($texto) { return "{$texto}"; } -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|arc

Re: [PHP] escaping quotes

2005-01-27 Thread John Holmes
ect"] . """); print("value="\" . $attributes["messageSubject"] . "\""); print("value=\"{$attributes['messageSubject']}\""); Although, to prevent any vulnerabilities, you probably want: print("value=&quo

Re: [PHP] Id_num = ""

2005-01-24 Thread John Holmes
Steve Marquez wrote: If I do the following, it gives me a blank page. However, instead of using the variable, if I put in $id_num = "191" Then it will display the information. view Use $_GET['id_num'] instead of $id_num and read up on the register_globals setting. -- ---J

Re: [PHP] Get full url

2005-01-24 Thread John Holmes
redheaded twin mistresses... we don't always get what we want, do we? -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals – www.phparch.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Echoing Variables Names

2005-01-17 Thread John Holmes
x27;x'; $b = 'y'; $c = 'z'; $xyz = 'foobar'; //Get name of "variable" $name = $a.$b.$c; // $name = "xyz" //Get value of variable $value = ${$a.$b.$c}; // $value = "foobar" Show some code if that doesn't clue you in. -- ---John H

Re: [PHP] Building key sequences from strings

2005-01-11 Thread John Holmes
Bruce Cooper wrote: I'm trying to set up a custom sort for multi-level [i.e. nested] arrays. The problem is I can't seem to get PHP to recognize syntax such as follows $test=$test_array.'[index][next]'; Maybe $test = ${$test_array.'[index][next]'}; -- ---

Re: [PHP] Re: What program to use to make thumbnail images?

2005-01-10 Thread John Holmes
zerof wrote: John Holmes wrote: What do you guys recommend for making thumbnails from uploaded images? I know of the GD extension, Imagemagik and netpbm. Any other recommendations or opinions on which of the above work best with PHP? Thanks. -- Good choice, http

Re: [PHP] $_REQUEST

2005-01-10 Thread John Holmes
Benjamin Edwards wrote: I am kind of assuming that $_REQUEST is and aggregate of $_POST, $_GET and $_FILES. Is this correct or are there differences. It's a combo of $_GET, $_POST and $_COOKIE. -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect

[PHP] What program to use to make thumbnail images?

2005-01-10 Thread John Holmes
What do you guys recommend for making thumbnails from uploaded images? I know of the GD extension, Imagemagik and netpbm. Any other recommendations or opinions on which of the above work best with PHP? Thanks. -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php

Re: [PHP] Website and Mozilla/Firefox

2005-01-10 Thread John Holmes
g has been changed on the machines. If I switch to my gash client machine that has IE on, things are OK, and changing mirrors gives the same problem. I switched from using the us2.php.net mirror to the us4.php.net mirror and things were fine. -- ---John Holmes... Amazon Wishlist: www.amazon.

Re: [PHP] Php error with MySql

2005-01-06 Thread John Holmes
> with the following bit of code > > $qResult = mysql_query ("SELECT * FROM blog_entries ORDER BY id DESC"); > > $nRows = mysql_num_rows($qResult); > $rString ="&n=".$nRows; Your query has failed for some reason, so $qResult is not a valid result set

Re: [PHP] Re: XML Filters for illegal characters

2005-01-05 Thread John Holmes
to define what's good. You could use get_html_translation_table() to find everything that htmlentities() will convert and then combine those characters, alphanumeric characters and whitespace into a preg_replace to match anything that's *not* one of those characters and erase it. -

Re: [PHP] Re: Regular help

2005-01-05 Thread John Holmes
gt;> >> this is >> some kind >> of a test > preg_match_all('/"(.+)"/U', $string, $result); If the text between quotes can include newlines, you'll want to use preg_match_all('/"(.+)"/Us', $string, $result); or what I repli

Re: [PHP] Regular help

2005-01-05 Thread John Holmes
text,$matches); [^"]* matches anything that is not a double quote -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals – www.phparch.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] XML Filters for illegal characters

2005-01-05 Thread John Holmes
Jones, Douglas 1 wrote: I'm wondering if anyone knows of a filter > that can take data to be wrapped in XML tags > and filter this data encoding any illegal XML characters Have you tried htmlentities()? -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ ph

Re: [PHP] Register Globals=ON

2005-01-03 Thread John Holmes
input from the user 2) Always initialize any variables you use Follow those two rules and you can program secure programs that will not depend upon register globals. -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals – w

Re: [PHP] Total Server Sessions

2005-01-03 Thread John Holmes
n the server $num_sessions = count(glob(session_save_path() . '/sess_*')); echo "There are about {$num_sessions} active sessions."; It will be fairly active so long as your garbage collection is triggered fairly often. -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/re

Re: [PHP] How to argue with ASP people...

2004-12-31 Thread John Holmes
er page, why would you have any output anyhow? Using templates sometimes forces you to do this, as you perform all of your business logic / PHP code before hand and then display the appropriate templates. If you need to send the user to another page, it's easy to do so at any point b

Re: [PHP] Apache 2.0.52 / PHP 4.3.10 Integration Question...

2004-12-31 Thread John Holmes
(setinputfilter/setoutputfilter). Just acknowledging my mistake and passing this along for others, too. :) Happy new year. -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals – www.phparch.com -- PHP General Mailing List (http

Re: [PHP] Apache 2.0.52 / PHP 4.3.10 Integration Question...

2004-12-31 Thread John Holmes
tOutputFilter the Apache2 equivilent of the Forcetype or another way of doing it? Have you tried Forcetype? -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals – www.phparch.com -- PHP General Mailing List (http://www

Re: [PHP] How to argue with ASP people...

2004-12-31 Thread John Holmes
les. If you can have output before Response.Redirect, then ASP is just doing the buffering for you before it sends a Location header. -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals – www.phparch.com -- PHP Gener

Re: [PHP] Why extra slashes???

2004-12-30 Thread John Holmes
Wiberg wrote: Right now I'm creating a form that saves the text from a textarea to an array. That doesn't seem to be any problem. But when I save the contents, I get extra / ? http://us4.php.net/manual/en/ref.info.php#ini.magic-quotes-gpc -- ---John Holmes... Amazon Wishlist: www.am

Re: [PHP] Installing on Windows.... CGI v. ISAPI?

2004-12-29 Thread John Holmes
GH wrote: #2 which method is better to install PHP with IIS? ISAPI or CGI? ISAPI... no idea what it stands for though, but installing PHP that way will make it a module within the server instead of an .exe file that's loaded with each PHP request... -- ---John Holmes... Amazon Wis

[PHP] Re: [PHP-DB] How to process a query form with CHECKBOX Please help

2004-12-27 Thread John Holmes
= "SELECT * FROM table WHERE age_group IN ($in)"; } Next time just post this to php-general or php-db... no need to include both of them. -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals – www.phparch.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Making includes and requires safe.

2004-12-27 Thread John Holmes
bilities" when it's really just poor programming like it's always been? -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals – www.phparch.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] authentication

2004-12-27 Thread John Holmes
Ali wrote: can anyone lead me to a good tutorial on authentication...it wud be good if i can get a one in connection with a database.. $all_good = query("SELECT valid_user FROM table"); or use Google. -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|arch

Re: [PHP] How to set an absolute include path?

2004-12-27 Thread John Holmes
path in php.ini, an .htaccess file or using ini_set(). -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals – www.phparch.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Help with code

2004-12-25 Thread John Holmes
our die statements... $review_result = mysql_query($review_query) or die('Query to pull reviews has failed. Reason: ' . mysql_error()); -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals – www.phparch.com -- PH

Re: Re: [PHP] Problem of varibles between webpages

2004-12-23 Thread John Holmes
o helping new users. If you don't get a response within the next 10 minutes (he's always available), just continue to write him and ask him for help. It's the Christmas season, right??? Merry Christmas John, ---John Holmes... UCCASS - PHP Survey System http://www.bigredspark.co

Re: Re: [PHP] Problem of varibles between webpages

2004-12-23 Thread John Holmes
this instance, since you haven't specified a method for your form, GET is assumed. So you can access the form variables in $_GET['name'] and $_GET['address']. If you used POST in your form method, then $_POST['name'] and $_POST['address'] can be used.

Re: Re: [PHP] Destroying session data

2004-12-23 Thread John Holmes
a 1% chance of the garbage collection process being started (by default). These old files you see are probably there because you don't have enough traffic to trigger garbage collection or your using a file system that doesn't support atime. ---John Holmes... UCCASS - PHP Sur

Re: Re: [PHP] A serious bug? "or" operator gives out diffferent results dependin

2004-12-23 Thread John Holmes
... but what point are you trying to make that hasn't already been made obvious? ---John Holmes... UCCASS - PHP Survey System http://www.bigredspark.com/survey.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Destroying session data

2004-12-23 Thread John Holmes
e probability, if you want, but I wouldn't worry too much about it. Or you can write your own session handler to handle deleting the files. ---John Holmes... UCCASS - PHP Survey System http://www.bigredspark.com/survey.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] A serious bug? "or" operator gives out diffferent results depending

2004-12-23 Thread John Holmes
or-ing these two, and that gave correct results. = has a higher precedence than OR and OR is not the same as || http://www.php.net/manual/en/language.operators.php#language.operators.precedence So you should use $b1 = is_null($x) || ($y > 5); ---John Holmes... UCCASS - PHP Survey System ht

Re: [PHP] Checking Original URL

2004-12-23 Thread John Holmes
o serving some nasty gay porn image (after they've probably posted it to their site somewhere)... heh... but I digress... ---John Holmes... UCCASS - PHP Survey System http://www.bigredspark.com/survey.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Problem of varibles between webpages

2004-12-23 Thread John Holmes
em in PHP scripts, i.e. using $_GET['var'] instead of $var. > 1, Table form format. wtf is this? > 2, Hyperlink ( click and go to another webpage ) format. The variables passed in a URL are available in $_GET and $_REQUEST. > 3, upload file ( through php into database

Re: Re: [PHP] Compiling PHP Source guides

2004-12-22 Thread John Holmes
;t get any further. I typed in xxx and expected to see xxx, but saw xxx. I'm using xxx as my OS and trying to compile PHP version xxx. Can anyone help me through the next step?" Good luck. :) ---John Holmes... UCCASS - PHP Survey System http://www.bigredspark.com/survey.html --

Re: Re: [PHP] PHP Exploit via phpBB?

2004-12-22 Thread John Holmes
> Stop relying on RPMs and compile Apache + PHP from source. That way you can > get all the latest bugs. Hmmm... I hope you meant "fix" the latest bugs... ;) ---John Holmes... UCCASS - PHP Survey System http://www.bigredspark.com/survey.html -- PHP General Mailing List (ht

Re: [PHP] Strange issues with header output

2004-12-22 Thread John Holmes
way an IF could affect something is if you mistakenly put if($somevar = 'somevalue') which is an _assignment_ instead of an _equality_ check and always comes out true. Then if you used "$somevar" somewhere it's value may be messed up and corrupt your file or head

Re: Re: [PHP] PHP Exploit via phpBB?

2004-12-22 Thread John Holmes
> From: John Nichel <[EMAIL PROTECTED]> > http://www.phpbb.com/phpBB/viewtopic.php?f=14&t=240513 wow... all this fuss because they ran urldecode() on something that was already decoded (and what they do with the data after the fact, of course)... ---John Holmes... UCCASS - P

Re: Re: [PHP] PHP Exploit via phpBB?

2004-12-22 Thread John Holmes
;m also not saying that either of the above are better simply because you pay for them. They are simply better and worth the small cost ($70-80US) for a serious web site. I'd purchase IPB in a second if I had to pay for a forum. It really all comes to personal preference, though.

Re: Re: [PHP] PHP Exploit via phpBB?

2004-12-22 Thread John Holmes
pBB > problem. Many people were trying to tie the vulnerabilities with PHP 4.3.9 to this attack the vulnerabilities in phpBB, but from what I read they were unrelated. Are you on a shared server at all? It may be possible that someone else got attacked and took everyone with them... ---John Holmes...

Re: [PHP] PHP Exploit via phpBB?

2004-12-22 Thread John Holmes
ews sites. The worm actually uses Google to search for sites "Powered by phpBB" and then attacks them. I thought we all knew better than to use phpBB? Why not just install phpNuke and some random guestbook and shell access script while you're at it?!?! ;) ---John Holmes.

Re: [PHP] Replacing whole words only

2004-12-22 Thread John Holmes
$stringToParse = preg_replace("/(^|\\W){$exceptionPhrase}(\\W|$)/i",'\\1',$stringToParse); ---John Holmes... UCCASS - PHP Survey System http://www.bigredspark.com/survey.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] help with coding #3

2004-12-21 Thread John Holmes
']."'"; $movie_result = mysql_query($query,$link) or die(mysql_error()); Shouldn't that be $movie_query in mysql_query()?? ---John Holmes... UCCASS - PHP Survey System http://www.bigredspark.com/survey.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: Re: [PHP] String parsing issue in PHP 4.3.10?

2004-12-21 Thread John Holmes
7; ?> '; ?> will work just fine. If you try to comment out either line, though, the PHP processing will end at the ?> and spit out the rest as plain text. So, text can have as many ?> as you want and the only issue comes when you try to comment one of them out. ---Jo

Re: [PHP] Re: How to set register_globals=off in the script?

2004-12-21 Thread John Holmes
7;t. register_globals cannot be set with ini_set and must be set in php.ini or an .htaccess file. ---John Holmes... UCCASS - PHP Survey System http://www.bigredspark.com/survey.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] How to set register_globals=off in the script?

2004-12-21 Thread John Holmes
t; files set to off? > > How I can do this? You can use an .htaccess file to turn it on or off for directories. I don't think it works for individual scripts, though. ---John Holmes... UCCASS - PHP Survey System http://www.bigredspark.com/survey.html -- PHP General Mailing List (ht

Re: Re: [PHP] OT Re: [PHP] can I compile php source

2004-12-21 Thread John Holmes
> From: "Larry E. Ullman" <[EMAIL PROTECTED]> > Do you honestly think people are learning __anything__ > when you reply with a "Yes"? Yes. ---John Holmes... UCCASS - PHP Survey System http://www.bigredspark.com/survey.html -- PHP General Mailing List (

Re: [PHP] String parsing issue in PHP 4.3.10?

2004-12-21 Thread John Holmes
skips out of the PHP mode and returns to HTML mode, and // cannot influence that. If asp_tags configuration directive is enabled, it behaves the same with // %>. From: http://www.php.net/manual/en/language.basic-syntax.comments.php I remember running into this, also, so don't feel bad a

Re: [PHP] This list is dying: was:can I compile php source OT

2004-12-21 Thread John Holmes
though should be banned... ;) ---John Holmes... UCCASS - PHP Survey System http://www.bigredspark.com/survey.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] sanitizing/security

2004-12-18 Thread John Holmes
lentities() is appropriate for text that'll be shown to users on a web site. Text going into the headers of an email should normally be filtered for newlines so malicious users cannot inject additional headers. Shall I go on?? ;) ---John Holmes... UCCASS - PHP Survey System http://www.bigredspark.com/survey.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] How do I find my php.ini file?

2004-12-17 Thread John Holmes
names that are close to that). Edit and rename to php.ini and place it in the path above (where PHP is expecting to find the file, /etc). -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals – www.phparch.com -- PHP G

Re: [PHP] getting a date 25 years back

2004-12-14 Thread John Holmes
;.$years." year")); Somehow it always ads the years instead of subtracting. Has anybody an idea on how to do that? You can use mktime() and subtract 25 from the year argument. Or just do it in your query... SELECT * FROM yourtable WHERE your_date_column < NOW() - INTERVAL 25

[PHP] Turn off "out of offfice" messages for the list, please

2004-12-14 Thread John Holmes
ite annoying after a while, if you can imagine. Yes, I know how to filter them to my Junk folder, but let's try to stop it at the source instead, eh? ;) Happy Holidays, -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals

Re: [PHP] fopen/fpassthur

2004-12-14 Thread John Holmes
L. So... you can trust data coming from your database only if it was trusted/validated/sanitized going in. :) -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals – www.phparch.com -- PHP General Mailing List (http:/

Re: Re: [PHP] sharing info between websites with XML?

2004-12-12 Thread John Holmes
o so. > > >Why aren't you able to connect to the other databases? > cause hosters forbid it. Then get another host or somewhere else to host your databases. Not a PHP issue, though. ---John Holmes... UCCASS - PHP Survey System http://www.bigredspark.com/survey.html -- PH

Re: [PHP] empty() problem

2004-12-12 Thread John Holmes
ough when it's supposed to just be an integer. -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals – www.phparch.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] I need to pass vars to external cgi script ?

2004-12-11 Thread John Holmes
call this script from inside my php script ? $file = fopen('http://www.example.com/cgi-bin/script.cgi?var1=my_first_php_var&var2=my_second_php_var&var3=...'); or $file = fopen("httpscript.cgi?var1=$phpvar1&var2=$phpvar2..."); although you'd want to urlenc

Re: Re: [PHP] Close all open tags in HTML text

2004-12-10 Thread John Holmes
ou're safe by allowing tags, but I can include onmouseover (or any other) events to trigger javascript and XSS attacks. You're better to roll your own solution or just run everything through htmlentities()/htmlspecialchars() and show the user exactly what they typed. I'm on a crusad

Re: [PHP] Forms and viewing Text Area

2004-12-09 Thread John Holmes
preserved. If you look at the HTML source of your page, you'll see that. HTML does not render line breaks, though, you need tags. So using nl2br() or something similar would work. -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine fo

Re: [PHP] Implementing database cache.

2004-12-08 Thread John Holmes
the best route, imo. -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals – www.phparch.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Security Question with my password protected login script...

2004-12-08 Thread John Holmes
systems, you can use http://php.net/crypt You should not use the MySQL PASSWORD() function within your own applications. MD5() is a good alternative as it's implemented in many programs including PHP and MySQL. Other suggestions were good, though. :) -- ---John Holmes... Amazon Wishlist:

Re: [PHP] PARSE ERROR, unexpected T_$VARIABLE

2004-12-06 Thread John Holmes
ariable names cannot start with a number. -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals – www.phparch.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Please save me from insanity - PHP4 / OO

2004-12-05 Thread John Holmes
ct...which is what the code does... For example, if you added var $foo = 'bar'; to the Test object and then printed out $ob->prop->foo, you'd get 'bar'. -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP P

Re: [PHP] record ID problem

2004-12-03 Thread John Holmes
e using it for the wrong reasons. -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals – www.phparch.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Strange character conversion when converting XML by XSLT in PHP

2004-12-02 Thread John Holmes
ld have &#34;, iirc. Maybe you could run the data through a preparser to match "&#xx;" patterns and convert the & to & ?? -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals – www.phparch.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Organisation of classes

2004-12-01 Thread John Holmes
an "edit" class that'll load 7 of the 10 classes needed for editing, etc... -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals – www.phparch.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Date Manipulation

2004-11-30 Thread John Holmes
at. mktime() or strtotime() -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals – www.phparch.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Have I learned nothing .> Foreach()

2004-11-30 Thread John Holmes
What have you find out? They don't exist. Then print_r($_POST) or print_r($_POST['schools']) and see what they contain. Are you sure you're using POST and not GET? Are you actually selecting any "schools" when you submit the form? If you aren't, the

Re: [PHP] Happy Thanksgiving

2004-11-25 Thread John Holmes
ur message. For each email I get my ISP requires me to give away my first born in order to read it! You are wasting my time. My religion forbids any king of thanks, so now I have to spend the next 4 days in church and my ISP is going to charge me over 1200 dollars just to reply to you. Happy day m

Re: [PHP] Capturing phpinfo()

2004-11-23 Thread John Holmes
can imagine the file getting very large very quick, though. Alternatively, you could put echo ''; or ob_start(); phpinfo(); $phpinfo = ob_get_contents(); ob_end_clean(); echo ""; (from memory, so functions might be slightly different)... ---John Holmes... UCCASS - PHP Surve

Re: [PHP] [php] What does PHP mean?

2004-11-22 Thread John Holmes
I stands for "Personal Home Page / Forms Interpreter" and PHP stands for "PHP: Hypertext Preprocessor"... all of which is explained on the page you linked to... :/ -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP

Re: [PHP] Tabs or Spaces?

2004-11-21 Thread John Holmes
use echo instead of print... are you saying that's silly? Bah! -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals – www.phparch.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] include files, ".php" or ".inc" ?

2004-11-21 Thread John Holmes
ion. I personally use .inc.php (for visual reference of which ones are include files) and stay aware of what could happen if these files are run out of context. -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals – www.phpa

Re: [PHP] Mysql Connect Help

2004-11-21 Thread John Holmes
the MySQL information or does it just show on the options line? I installed MySQL 4.1 from RPM (client and server RPMs) on Redhat 8.0 this morning. You should use the mysqli extension for MySQL 4.1. -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Mag

Re: [PHP] What should I name my base class?

2004-11-17 Thread John Holmes
me it application.class, it'll more than likely be served up as plain text and "main" or "base" are too generic. You could end up with conflicts with other programs that haven't thought this out. -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry

Re: [PHP] How do I get referer in php?

2004-11-17 Thread John Holmes
idn't notice the result is the same either way, eh? ;) -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals – www.phparch.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] How do I get referer in php?

2004-11-17 Thread John Holmes
en more, it adds to confusion because of a '1' appearing all of a sudden on screen. I'm sure he meant echo '',print_r($_SERVER,1),''; then... ;) -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Prof

Re: [PHP] unable to upload a directory using the web brower (HTTP).

2004-11-15 Thread John Holmes
cause the web browser see the folder > as something to open with, like going down one directory. > So, any advice or suggestion?? You can't upload folders over HTTP, only files. ---John Holmes... UCCASS - PHP Survey System http://www.bigredspark.com/survey.html replyAll Description: null -

Re: [PHP] Simple XML

2004-11-12 Thread John Holmes
in PHP? Uhmm... SimpleXML? http://us2.php.net/simplexml -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals – www.phparch.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net

Re: [PHP] Current URL?

2004-11-12 Thread John Holmes
7;PHP_SELF']; or you could add/check for $_SERVER['QUERY_STRING'] here. -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals – www.phparch.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

  1   2   3   4   5   6   7   8   9   >