RE: [PHP] accessing files not in www root directory.

2001-07-02 Thread scott [gts]
do you have the image data in the database, or are all the images stored in the filesystem? it appears to be the latter... so i'd say either: 1) move the images into the webserver's document root, or somewhere web-accessable. 2) symlink them permanently. i can't understand why you'd wan

RE: [PHP] apache+php chroot

2001-07-02 Thread scott [gts]
using the full pathname of the uptime binary should work. although, there are issues on some servers that user 'nobody' (a common owner for apache) cannot get 'uptime' information... so even if you get uptime to work correctly, beware that it may return bogus data. > -Original Message-

RE: [PHP] sending 5000+ emails - use PHP?

2001-07-02 Thread scott [gts]
of course it can ;) > -Original Message- > From: Matthew Delmarter [mailto:[EMAIL PROTECTED]] > Sent: Sunday, July 01, 2001 9:13 PM > To: PHP Mailing List > Subject: [PHP] sending 5000+ emails - use PHP? > > > I at looking at using PHP to send a monthly newsletter to 5000+ users who > h

RE: [PHP] Pricing Advice Needed

2001-07-02 Thread scott [gts]
it's also a dangerously common misconception among non-programmer manager-types that the more important or essential a program is, the more lines of code it will require > -Original Message- > From: Brad Hubbard [mailto:[EMAIL PROTECTED]] > Subject: Re: [PHP] Pricing Advice Needed >

RE: [PHP] Can any one spot the Parse error Here

2001-07-02 Thread scott [gts]
confucious say: typing it up in 20 minutes and then spending 2 hours debugging is much worse than taking an hour to type it up and spending only 20 minutes debugging ;) > -Original Message- > From: ReDucTor [mailto:[EMAIL PROTECTED]] > Sent: Monday, July 02, 2001 3:31 AM > To: [EMAIL PR

RE: [PHP] How to execute passwd with php?

2001-07-02 Thread scott [gts]
exec('passwd'); that's how you do it. now figure out why it wont work. :) > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On > Behalf Of Moise Bertrand TACHAGO > Sent: Monday, July 02, 2001 5:33 AM > To: [EMAIL PROTECTED] > Subject: [PHP] How to execute passwd

RE: [PHP] How can i read php from browser??

2001-07-02 Thread scott [gts]
how did you install PHP? as CGI or apache module? > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > Sent: Monday, July 02, 2001 7:31 AM > To: [EMAIL PROTECTED] > Subject: [PHP] How can i read php from browser?? > > > Hello, > i have apache 1.3.19 configured wi

RE: Re[2]: [PHP] Problems with Netscape

2001-07-02 Thread scott [gts]
did you try viewing source to make sure that the ACTION="" tag actually contains something? AFAIR, MSIE will post to the same location if there's no ACTION="", but netscape will not... so it looks like your ACTION="" tag is empty, but becuase IE and Netscape handle things differently, you're ge

RE: [PHP] Function Reqest/Question

2001-07-02 Thread scott [gts]
i dont know of a function to skip to the end of the nearest ?>, and i suspect that there isn't one... you can use other control func's to do what you need, in the context that you're working in... read up on: goto, break, continue, return > -Original Message- > From: Anil [mailto:[EMAI

[PHP] session handler class

2001-07-02 Thread scott [gts]
ession->data['something'] = "someone" // to count how many times this session was loaded $session->data['counter']++; // to save the $session->data[] array to the DB $session->UpdateData(); // and if you use authentication on your site, and want // to quickl

RE: [PHP] setcookie problem

2001-07-02 Thread scott [gts]
this is my guess at what's happening... i dont know 100% if that's why cookies aren't setting properly, but here's an educated guess on my part: probably becuase time() is seconds since 1970, and as far as i understand, once it gets over 999,999,999 it will not work correctly becuase it will roll

RE: [PHP] Installation PHP on W2K and Apache

2001-07-02 Thread scott [gts]
does your browser prompt you to download the file when you try and look at *.php files? did you make the appropriate entires into the apache httpd.conf and restart apache? > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > Sent: Monday, July 02, 2001 1:26 PM > To

RE: [PHP] Best Way to set cookies

2001-07-02 Thread scott [gts]
you could print "Set-Cookie: name=value; etc. etc. etc." but setcookie(); is really what you want. > -Original Message- > From: Gonyou, Austin [mailto:[EMAIL PROTECTED]] > Sent: Monday, July 02, 2001 12:40 PM > To: [EMAIL PROTECTED] > Subject: [PHP] Best Way to set cookies > > > Id lik

RE: Re[4]: [PHP] Problems with Netscape

2001-07-02 Thread scott [gts]
nal Message- > From: Richard Kurth [mailto:[EMAIL PROTECTED]] > Sent: Monday, July 02, 2001 3:28 PM > To: php > Subject: Re[4]: [PHP] Problems with Netscape > > > Hello scott, > You are right the Action tag is empty in Netscape but in IE it is in > there. How come it puts

[PHP] array_traverse

2001-07-02 Thread scott [gts]
Here's a little function i use to traverse an array of arbitrary complexity... it uses recursion. function array_traverse ($ary, $b=array()) { while ( list($k,$v) = each($ary) ) { print (join("", $b)) . "$k = $v\n"; array_push($b, "\t"); if ( is_array($ary[$k]) ) {

RE: [PHP] session handler class

2001-07-02 Thread scott [gts]
July 02, 2001 4:26 PM > To: scott [gts]; php > Subject: Re: [PHP] session handler class > > > Hi Scott, > > I'd love to see the class you made but couldn't find a link in your email. > Could you let me know where to find it? > > Thanks :) > > Aral >

RE: [PHP] newbie has include path error & new problem

2001-07-02 Thread scott [gts]
you will probably need to use two programs to properly configure your linux box for networking you have to configure a default gateway to tell the linux networking stuff how to get out to the internet. read the man pages on 'route' and 'ifconfig', the binaries should be here: /sbin/route /

RE: [PHP] session handler class

2001-07-03 Thread scott [gts]
ok, grab all the files in this directory: http://furt.com/php/session/ ** read the "readme.txt" file > -Original Message- > From: Joe Rice [mailto:[EMAIL PROTECTED]] > Subject: Re: [PHP] session handler class > > i would love to see this too, i think it was stripped. > > thanks, > joe

RE: [PHP] php intall

2001-07-03 Thread scott [gts]
you could either: 1) re-install apache with PHP as a module 2) install PHP as CGI and leave apache alone if you're new to linux, and the box is not a production machine, i highly reccomend option #2... if apache ain't broke, dont fix it ;) > -Original Message- > From: Juan Pablo Rivera

RE: [PHP] second try - Mysql php install

2001-07-03 Thread scott [gts]
try using "safe_mysqld &" if 'mysqld' is not in your 'ps' list, then the daemon is not running, and you cannot connect to it. (check the mysql error logs for possible reasons) > -Original Message- > From: Daniel Guerrier [mailto:[EMAIL PROTECTED]] > Sent: Monday, July 02, 2001 10:38 PM >

RE: [PHP] Using PHP to test if server is online

2001-07-03 Thread scott [gts]
try: fopen('http://server.com/index.php'); or you could probably grab the output of 'ping server.com' (assuming server.com accepts pings) > -Original Message- > From: Vikram Vaswani [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, July 03, 2001 1:48 AM > To: [EMAIL PROTECTED] > Subject: [PHP

RE: [PHP] Fatal Error: Call to undefined function: sybase_connect() in

2001-07-03 Thread scott [gts]
it might help. it also helps to scour the configure output, looking for all the lines that contain "sybase", becuase sometimes even if you ask configure to use something, it might not be properly found... and configure might spew out a "sybase support ... no" in the configure output. i r

RE: [PHP] Mysql

2001-07-03 Thread scott [gts]
from the shell: mysql -u[username] -p[password] [database] < dumb.sql > -Original Message- > From: Roman [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, July 03, 2001 3:43 AM > To: Php-General > Subject: [PHP] Mysql > > > How to run mysql batch program im mysql terminal. > for example in fo

RE: [PHP] any reasons to compile apache instead of using distributionbinaries ?

2001-07-03 Thread scott [gts]
for a production machine, i'd say that compiling from sources should always be the first option. rpm's are great for ease of maintenence and simplicity of intallation, but are not flexible at all. sources are usually a tiny bit more complicated, becuase you've got to figure out what to tell 'co

RE: [PHP] Processing checkboxes in Dynamic tables

2001-07-03 Thread scott [gts]
instead of giving them unique names, put them all into a single array: or, to automatically number them: this way, you can deal only with $p[...] instead of $p101, $p202, $p203 > -Original Message- > From: Michael Benbow [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, July 03, 2001 5:

RE: [PHP] search

2001-07-03 Thread scott [gts]
use split(); > -Original Message- > From: AJDIN BRANDIC [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, July 03, 2001 6:10 AM > To: [EMAIL PROTECTED] > Subject: [PHP] search > > > Hi all > > I've got search facility (php-mysql) which is very simple. If i search > for 'dog' it will find an

RE: [PHP] Basic multi-dimensional array help

2001-07-03 Thread scott [gts]
that's stanard array behaviour... $Info contains two elements, $Info[0] and $Info[1] $Info[0] contains four elements, $Info[0][0], $Info[0][1], $Info[0][2], $Info[0][3] try this function on your $Info variable to see what it contains: array_traverse($Info); func

[PHP] php serialize

2001-07-03 Thread scott [gts]
does anyone know any good places to look for detailed information about PHP's serialize(), unserialize() (besides the PHP sources, becuase i'm already going thru them) i want to write serialize() and unserialize() in perl so that arrays (no objects or references yet) can be read/written by both P

RE: [PHP] php serialize

2001-07-03 Thread scott [gts]
From: Alexander Wagner [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, July 03, 2001 1:46 PM > To: scott [gts]; php > Subject: Re: [PHP] php serialize > > > scott [gts] wrote: > > i want to write serialize() and unserialize() in perl > > so that arrays (no objects or refer

[PHP] perl serialization

2001-07-03 Thread scott [gts]
i've been working on porting the functionality of PHP's serialize() and unserialize() functions that will turn an array/hash into a simple string. so far, i've got serialize() working in perl... i attached the files, but you can also get them at: http://furt.com/code/serialize/ if anyone feel

RE: [PHP] Fatal Error: Call to undefined function: sybase_connect() in

2001-07-03 Thread scott [gts]
L PROTECTED] > Subject: RE: [PHP] Fatal Error: Call to undefined function: > sybase_connect() in > > > hi Scott, > > i've tried below by deleting the old config.cache then run > ./configure -with-apxs=/usr/sbin/apxs -with-sybase=/opt/sybase > i am still getting the m

RE: [PHP] Something weird

2001-07-06 Thread scott [gts]
check the browser cache settings. for some bizarre reason, almost every browser i've seen has the default option set to "cache everything and never look for updates" > -Original Message- > From: David OBrien [mailto:[EMAIL PROTECTED]] > Subject: [PHP] Something weird > > > Sorry... >

RE: [PHP] Something weird

2001-07-06 Thread scott [gts]
maybe it's just me, but caches drive me nuts... i know... but IMO, i'll take a slight performance hit any day to make sure i get the most recent page... > -Original Message- > From: Inércia Sensorial [mailto:[EMAIL PROTECTED]] > Subject: Re: [PHP] Something weird > > > for some bizarre r

RE: [PHP] is_alpha_numeric ?

2001-07-06 Thread scott [gts]
you could also use this: function is_alphanum($data) { return preg_match('/^\w+$/', $data); } > -Original Message- > From: Steve Werby [mailto:[EMAIL PROTECTED]] > Sent: Friday, July 06, 2001 3:32 PM > To: John Monfort; [EMAIL PROTECTED] > Subject: Re: [PHP] is_alpha_numeric ? > > >

RE: [PHP] Creating a Variable with the Name of a string

2001-07-06 Thread scott [gts]
try using assoc. arrays also... they're much nicer to deal with ;) > -Original Message- > From: James Atkinson [mailto:[EMAIL PROTECTED]] > Sent: Friday, July 06, 2001 4:20 PM > To: Chris Anderson; [EMAIL PROTECTED] > Subject: RE: [PHP] Creating a Variable with the Name of a string > >

RE: [PHP] Something weird

2001-07-06 Thread scott [gts]
even when i had 28.8, i'd always turn the cache off ... a cache isnt a feature, it's a bug. :) i wish everybody did the same... i get calls every once in a while from clients asking "why isnt our page updated" or "why doesnt this work" 9 times out of 10, it's their browsers showing them outda

RE: [PHP] Storing serialized classes in database

2001-07-09 Thread scott [gts]
you could use a simple assoc. array for all the user's information, and store that serialized in the database rather than serialize the entire object. that way, you'd have to store less information in the DB, and wouldnt have to worry about breaking any of your code in the future (or the object b

RE: [PHP] session variable name into form

2001-07-09 Thread scott [gts]
this also works: but the way you have it currently written is perfectly OK. it seems as if the problem is with your variable not being set, rather than with your PHP code. try explicitly setting the variable a few lines above the output of the INPUT field blah blah blah PS: is the output ha

[PHP] a recent 2600 article about PHP/CGI vulnerabilities

2001-07-09 Thread scott [gts]
i just read an article in 2600 yesterday about supposed PHP/CGI vulnerabilities. anyone else catch it? personally, when i read the article, i started chuckling, becuase the supposed "vulnerability" is not with PHP or any particular language, but with shoddy "secure" programming practises (which

RE: [PHP] max_execution_time & header

2001-07-09 Thread scott [gts]
do you have shell access, and do they have the CGI version of PHP? you could always try running it from the command line if you have access > -Original Message- > From: mike cullerton [mailto:[EMAIL PROTECTED]] > Sent: Monday, July 09, 2001 10:25 AM > To: [EMAIL PROTECTED] > Subject: Re:

RE: [PHP] PHP array information.

2001-07-09 Thread scott [gts]
i dont quite think i understand the question, but if you want to fetch results as an array with mysql, do this: $result = mysql_query(" sql "); mysql_fetch_array($result); > -Original Message- > From: Chris Oxenreider [mailto:[EMAIL PROTECTED]] > Sent: Monday, July 09, 2001 12:39

RE: [PHP] Name of an array???

2001-07-09 Thread scott [gts]
you mean output the name of the variable?? what are you trying to do with that? > -Original Message- > From: Dallas K. [mailto:[EMAIL PROTECTED]] > Sent: Monday, July 09, 2001 4:04 PM > To: [EMAIL PROTECTED] > Subject: [PHP] Name of an array??? > Importance: High > > > I need to echo t

[PHP] caller() function

2001-07-09 Thread scott [gts]
i cannot seem to find any function that's similar to perl's "caller()" function - to get information about the file/function that is calling the current function. for example, the test() function is called from scott.php scott.php Hello there test.php function test() { without passing in

RE: [PHP] PHP as a shell script

2001-07-09 Thread scott [gts]
dont use --with-apxs or --with-apache ./configure --my-options make make test make install that should do it. > -Original Message- > From: Tyler Longren [mailto:[EMAIL PROTECTED]] > Sent: Monday, July 09, 2001 3:07 PM > To: Kevin Pratt; [EMAIL PROTECTED] > Subject: Re: [PHP] PHP as a sh

[PHP] Thumbnail code that will do an entire directory at once

2001-07-09 Thread scott [gts]
i wrote a little subroutine to make a directory full of images into thumbnails... it'll make thumbnail images of a specified height and width and properly resize the original image to preserve the height to width ratio. the syntax of make_thumbs() is this: make_thumbs($imagedir, $thumbsdir, $siz

RE: [PHP] how to hide dbconnect file if its in published directory?

2001-07-11 Thread scott [gts]
try putting an .htaccess file into that directory. or (as someone else already suggested) tell apache to disallow access to *.inc files (or to the entire directory) > -Original Message- > From: Noah Spitzer-Williams [mailto:[EMAIL PROTECTED]] > Subject: [PHP] how to hide dbconnect file if

[PHP] date change for unix platforms on sept 9th

2001-07-11 Thread scott [gts]
Has anybody heard if this will affect PHP in any way? Copied from the "Unix Guru mailing list": -=-=-=-=-=-=-=-=-=-=-=- The unix time() value becomes 10 digits for the first time on Sun Sep 9 01:46:40 2001 For the first time in modern computer history, the timestamp will be something besid

RE: [PHP] Wierd cookie behiavor

2001-07-11 Thread scott [gts]
if you dont specify an expiration time, the cookie will hang around in memory until the browser is closed... even if it's an empty cookie. (AFAIK) if you really want it deleted, when the user "logs out" setcookie("membership", "", time()-1); that'll set the expire time to one second in the past,

RE: [PHP] counter using PHP or Javascript?

2001-07-11 Thread scott [gts]
of course ;) try this method: link to the counter with an IMG from your page have counter.php increment a log file and output an image showing the current number of hits that "pagename" has gotten, so that the IMG SRC will be digits. (although, this is like reinventing the wheel, there are pl

RE: [PHP] Variable Next To Variable?

2001-07-11 Thread scott [gts]
you should change the form field names to $Children_Last[1], $Children_Last[2] instead of hardcoding $Children_Last1 to make iteration thru the form easier and handling of the data easier... you can handle it all like this: $Number_Children = 5; $i = $Number_Children; while ($i--) { i

RE: [PHP] Wierd cookie behiavor

2001-07-11 Thread scott [gts]
of HTML you give it... > -Original Message- > From: david jarvis [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, July 11, 2001 12:54 PM > To: scott [gts] > Subject: Re: [PHP] Wierd cookie behiavor > > > hmm, still no luck. The problem isnt that the cookie in in memory, the &

RE: [PHP] Function call from a hyperlink

2001-07-11 Thread scott [gts]
you can't. you have to write handler code to read in the information being passed to the script and properly execute a function. (if anyone could arbitrarily execute any function they wanted just by passing in the function name, havoc would be wreaked on PHP programs everywhere :) > -Origin

RE: [PHP] Function call from a hyperlink

2001-07-11 Thread scott [gts]
i agree that putting it all into one file is usually bad form, but for small sites that dont change much, it's usually OK to do something like: file.php?page=Main file.php?page=News file.php?page=Contact anything above 5-10 pages probably requires a separate-page-per-section or fusebox-style de

RE: [PHP] Speed of loding PHP pages

2001-07-11 Thread scott [gts]
well... ahem... netscape 4.x is 1996-97 technology. 4-5 years since the last major release of netscape is an eternity of internet time in those years, microsoft has been pouring money and time into their browser no duh it kicks the crap outta netscape 4.x :) > -Original Message

RE: [PHP] Variable Next To Variable?

2001-07-11 Thread scott [gts]
personally, that's what i would do. dealing with arrays usually makes the code a lot cleaner and easier to follow than using awkward constructs like ${$C_Last}{$i} and besides, if you ever wanted to expand your code, you could easily pass the entire array to a function like so: children( $C_La

RE: [PHP] HTML tags in database fields

2001-07-11 Thread scott [gts]
or throw in the needed number of closing tags at the end of that specific message... > -Original Message- > From: Matthew Luchak [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, July 11, 2001 2:09 PM > To: php php > Subject: RE: [PHP] HTML tags in database fields > > > > sure. Quick and

RE: [PHP] Running for loop and concat. variables...

2001-07-11 Thread scott [gts]
this is like the last post on form submissions with individually numbered elements... if you can use an array, you should... it'll make things easier for you in the long run. > -Original Message- > From: Jeff Lewis [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, July 11, 2001 2:15 PM > To

RE: [PHP] .htaccess php_value

2001-07-11 Thread scott [gts]
making them relative is probably the best option for portability and maintainability... that way, you can change the underlying directory structure and not have to change any of the actual code... it's great if you ever have to change servers, or if the directory structure undergoes any structura

RE: [PHP] Back/Forward

2001-07-11 Thread scott [gts]
how do you have the data stored? by ID number? if you have it stored by ID number, just put next/back links something like this: 0)? $id-1 : 0 ); $next = (($id<$max)? $id+1 : $max ); ?> previous next > -Original Message- > From: Devin Atencio [mailto:[EMAIL PROTECTED]] > Sent: Wednes

RE: [PHP] Back/Forward

2001-07-11 Thread scott [gts]
nal Message- > From: Matthew Loff [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, July 11, 2001 3:59 PM > To: 'scott [gts]'; 'php' > Subject: RE: [PHP] Back/Forward > > > > > Since IDs can disappear when records are delted, I think

RE: [PHP] Fatal error: Call to undefined function: mysql_pconnect() in ...

2001-07-11 Thread scott [gts]
perhaps they didnt compile PHP with mysql support... > -Original Message- > From: Matthew Loff [mailto:[EMAIL PROTECTED]] > Subject: RE: [PHP] Fatal error: Call to undefined function: > mysql_pconnect() in ... > > Have you tried a non-persistant connection? Does that work? > > mysql_co

RE: [PHP] using GetImageSize in a directory of images

2001-07-11 Thread scott [gts]
try this: $files = opendir($dir) or die("Cannot opendir $dir"); while ($file = readdir($files)) { // do whatever } > -Original Message- > From: Rory O'Connor [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, July 11, 2001 3:09 PM > To: [EMAIL PROTECTED] > Subject: [PHP] using GetImageSize i

RE: [PHP] Re: Warning: mail() is not supported in this PHP build

2001-07-12 Thread scott [gts]
run 'make clean' find out where your current PHP stuff is *now*. use that directory as --prefix=[dir] for the configure script. make; make test; make install; then, restart apache. always do this whenever you make any changes to anything even remotely apache-related. > -Original Message-

RE: [PHP] php mail form with predefined subject

2001-07-12 Thread scott [gts]
link to the mail form like this: mailform.php?subject=Requesting+information+on and in the mailform, have a subject field something like this: > -Original Message- > From: Ed Peddycoart [mailto:[EMAIL PROTECTED]] > Subject: [PHP] php mail form with predefined subject > > > I am in

RE: [PHP] Re: $HTTP_REFERER < 10

2001-07-12 Thread scott [gts]
a partial suggestion would be to try an fopen() on the HTTP_REFERER if it was a static document like .html or .txt but if someone is being redirected from a CGI script or dyanmic page of any sort, it'll be virtually impossible to find out exactly where they came from and if that page is valid

RE: [PHP] building a search engine ??

2001-07-12 Thread scott [gts]
and to answer one of the previous questions, yes... it is *very* resource intensive to scan an entire directory tree full of files every single time a user wants to search as far as i know, htdig indexes the information into one big file, and just reads thru that... which will save you load

RE: [PHP] Alternative to phpMyAdmin

2001-07-12 Thread scott [gts]
i manage the production mysql database on a linux server from my windows desktop at work it's an extremely nice program. :) many compliments to the authour, if he reads this list. > -Original Message- > From: Alexander Skwar [mailto:[EMAIL PROTECTED]] > Sent: Thursday, July 12, 200

RE: [PHP] Re: $HTTP_REFERER < 10

2001-07-12 Thread scott [gts]
P_REFERER < 10 > > Thank you Scott for the various ideas. I am preventing an eventual 'no > referer' situation with a default url provided by who opens an account. > > I am getting (and trying to give :)) help on this list, so I will ask > first before doing... Is it no

RE: [PHP] browser tries to download not display

2001-07-12 Thread scott [gts]
some questions ;) have you tried accessing the script non-secure? is php properly installed and running on your server? did you restart the server after installing PHP? are you using a different server to handle secure queries? does that server have php installed and configured properly? > -

[PHP] apache not handling 404 errors for .php pages

2001-07-12 Thread scott [gts]
I have custom 404 error handling setup on my linux apache box, however, there's a problem with files that have a PHP extension. it seems that apache itself does not check for the existence of the requested .php file and fires up PHP no matter what. if PHP does not find the requested file, it'll

RE: [PHP] apache not handling 404 errors for .php pages

2001-07-12 Thread scott [gts]
thanks... cant believe i didnt think of capturing 500 errors myself... must mean the coffee's wearing off :) > -Original Message- > From: DAve Goodrich [mailto:[EMAIL PROTECTED]] > Subject: Re: [PHP] apache not handling 404 errors for .php pages > > ErrorDocument 500 /path/to/my_error_

RE: [PHP] installation

2001-07-12 Thread scott [gts]
the RPM is a binary. if mysql support is not in the RPM, there's no way to add it if you want to install PHP the simplest way, get the sources and compile it yourself as a stanalone binary (NOT using --with-apache or --with-apxs) then you can tweak it however you want, and compile in suppor

RE: [PHP] quotes

2001-07-12 Thread scott [gts]
also: mysql_escape_string() will format data properly for use in MySQL queries > -Original Message- > From: Alexander Wagner [mailto:[EMAIL PROTECTED]] > Subject: Re: [PHP] quotes > > > Heidi Belal wrote: > > I have a problem using apostrophes/single quotes. > > I am using PHP and MySQL

RE: [PHP] Thumbnail Generation from DB Stored Images.

2001-07-13 Thread scott [gts]
Here is my code to turn a directory full of *files* into thumbnail images. im sure you can adapt it to your own needs... the code is a bit long-winded, but it was my first attempt at writing thumbnail code, so forgive me ;) // example call to the function make_thumbs('./pictures/cavern/', './

RE: [PHP] Strong typing?

2001-07-13 Thread scott [gts]
and as far as i know, perl's 'strict mode' has absolutely nothing to do with typing of variables... use strict; will force you to define all variables with "my $var;" or "local $var;" before you assign values to them or try and use them... but it doesnt do anything about enforcing typing... in

RE: [PHP] The need for strong typing...

2001-07-13 Thread scott [gts]
you could easily write yourself a typing function to take care of all that (as someone suggested previously) using the same familiar syntax as you want to use in the function definition. function pay($fromaccount, $toaccount, $amount, $memo) { $good = checkInput($fromaccount, "int", $toaccount

RE: [PHP] Enabling short tags in PHP 4.0.6

2001-07-13 Thread scott [gts]
what do the tags look like? or <% %> the first is a short tag the second is an asp style tag maybe you're looking at the wrong option in the 'ini' file. > -Original Message- > From: Ralph Guzman [mailto:[EMAIL PROTECTED]] > Sent: Thursday, July 12, 2001 11:17 PM > To: Coulee Web; [EM

RE: [PHP] Re: How to maintain a variable between PHP pages (sessions?).

2001-07-13 Thread scott [gts]
sessions or cookies is the way you probably want to go. you could pass the variable around to each and every form, but that is a pain in the ass, and extremely prone to errors. on the first page, where you check the user's ability to use attachments, you could simply set a cookie setcookie('co

RE: [PHP] Alternative to phpMyAdmin

2001-07-13 Thread scott [gts]
like you said... as long as the database provider accepts connections from outside, you can administer it from anywhere. if the provider doesn't accept incoming connections, no amount of tools and software will work for you. > -Original Message- > From: Alexander Skwar [mailto:[EMAIL PRO

RE: [PHP] forms and IP numbers

2001-07-13 Thread scott [gts]
no offense, but that's a bad kludge for the problem. however, if you really want to do that, you could try checking $SERVER_NAME and $HTTP_REFERER and other enviornment variables like that... what would be easier (and better practise) to do is to verify that the incoming username is valid...

RE: [PHP] forms and IP numbers

2001-07-13 Thread scott [gts]
stat() > -Original Message- > From: Randy Johnson [mailto:[EMAIL PROTECTED]] > Sent: Friday, July 13, 2001 4:09 PM > To: scott [gts]; php > Subject: RE: [PHP] forms and IP numbers > > > I would like to pull the date and time of the creation of a file via a php

RE: [PHP] Re: How to convert a string into a mathematical expression?

2001-07-13 Thread scott [gts]
be *extremely* careful. eval() is like spawning another PHP interpreter... it'll execute *any* code that you give it. people could type in unlink(); and such commands and really trash your webserver. > -Original Message- > From: Philip Hallstrom [mailto:[EMAIL PROTECTED]] > Subject: [PH

RE: [PHP] session problem using headers

2001-07-13 Thread scott [gts]
you're passing the PHPSESSID incorrectly, it seems you must do something like this: or header("Location: nextpage.php?$SID"); what you're doing now will go to page "input.php?=SID" instead of "input.php?938sa9fa98f7daf987a9s" (or similar) > -Original Message- > From: David Allen [

[PHP] peculiar behaviour of large integers with "<" and ">"

2001-07-13 Thread scott [gts]
Has anyone come across this before? // compare 5 to the max value of an integer if (5 < -2147483647) { print "This is"; } // knock a digit off the max and compare again if (5 < -214748364) { print "weird"; } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL P

RE: [PHP] peculiar behaviour of large integers with "<" and ">"

2001-07-13 Thread scott [gts]
" > > > // compare 5 to the max value of an integer > if (5 < -2147483647) { > print "This is"; > } else { > print "Nothing "; > } > > // knock a digit off the max and compare again > if (5 < -214748364) { > print "weird"

RE: [PHP] peculiar behaviour of large integers with "<" and ">"

2001-07-13 Thread scott [gts]
MAIL PROTECTED]] > Sent: Friday, July 13, 2001 2:47 PM > To: php > Subject: RE: [PHP] peculiar behaviour of large integers with "<" and ">" > > > I am running 4.0.6. Nothing prints to the screen using a cut and paste of > the code below. > > &g

RE: [PHP] Variable name declarations?

2001-07-13 Thread scott [gts]
> -Original Message- > From: Matthew Aznoe [mailto:[EMAIL PROTECTED]] > Subject: [PHP] Variable name declarations? > > However, I do have one complaint about PHP that seems to have a tendency to > bite me far too often, and that is the lack of variable declaration. While > I do not thi

RE: [PHP] sessions . . . .

2001-07-16 Thread scott [gts]
any number of things could happen to the $directory variable... it could be out of scope, gotten overwritten or unset by another function, or it might just never have been saved to the database... but the real problem with that code is that there are no error checks on the file functions. that

RE: [PHP] echo vs printf

2001-07-16 Thread scott [gts]
from the manual: [print is a language construct [EMAIL PROTECTED]] The print() function returns a boolean indicating the status of the call. If the write was successful, print() returns 1. If not, it returns 0. This can be used to detect when the client has closed the connection, and appropriate m

RE: [PHP] RE: string search

2001-07-16 Thread scott [gts]
read the docs for ereg... i hardly use it, so i dont know for certain if it will match. (althouth the use of "^" at beginning *and* end suggests that it wont do what you expect) preg will match "aol.com" with this regexp: preg_match('/aol.com/', $string ) > -Original Message- > From: J

RE: [PHP] How can I see if variable is a odd or an even number?

2001-07-16 Thread scott [gts]
even numbers are even becuase they're divisible by 2 w/o a remainder... use this property to your advantage: if ( $num % 2 ) { print "$num is odd"; } else { print "$num is even"; } > -Original Message- > From: SED [mailto:[EMAIL PROTECTED]] > Sent: Monday, July 16, 2001 1

RE: [PHP] string replace using ereg

2001-07-16 Thread scott [gts]
$text = "Hello there, <>. My name is <>"; $ASSIGN = array(test => "this is a test", 'name'=> 'BOB', ); $OPENTAG = "<<"; $CLOSETAG = ">>"; print preg_replace( "/$OPENTAG(.*?)$CLOSETAG/e", '$ASSIGN[$1]', $text ); prints: Hello there, this is a test. My name is BOB To do what you want, throw

RE: [PHP] string replace using ereg

2001-07-16 Thread scott [gts]
12:45 PM > To: [EMAIL PROTECTED] > Subject: Re: [PHP] string replace using ereg > > > Mmmm, thx , but I can't get it to work when I run your code, > > Parse error: parse error, expecting `T_VARIABLE' or `'$'' in Eval code on > line 1 > > Fat

RE: [PHP] RE: string search

2001-07-16 Thread scott [gts]
hehe... that's what regular expressions are for. they're extrememly powerful... but that doesnt mean that you should only use them for extremely complicated situations. they work great everywhere... if you dont like "overdoing it", you might as well loop thru the string character by character, C

RE: [PHP] Do not get any PHP-binary in install?

2001-07-16 Thread scott [gts]
i know it's silly to ask -- but did you look for "php" in /usr/local/bin/ > -Original Message- > From: Lasse Andersson [mailto:[EMAIL PROTECTED]] > Sent: Monday, July 16, 2001 2:49 PM > To: [EMAIL PROTECTED]; [EMAIL PROTECTED] > Subject: [PHP] Do not get any PHP-binary in install? > >

RE: [PHP] submitting free-form text to a database

2001-07-16 Thread scott [gts]
for the quotes thing. you must have single quotes around the values that will go to the database, and you must escape single quotes inside the value with either "''" or "\'" (at least in MySQL, both work) and as for the database... IMO, you should download MySQL now and save yourself a ton of t

RE: [PHP] Exec, system, passthru didn't work

2001-07-16 Thread scott [gts]
did you try and capture error messages from the system calls? webserver probably doesnt have permission to do what you want it to do. > -Original Message- > From: Reuben D Budiardja [mailto:[EMAIL PROTECTED]] > Subject: [PHP] Exec, system, passthru didn't work > > Hi, > I tried to execu

Re: [PHP] auto link?

2001-07-16 Thread Bob Scott
Take a look at http://www.php.net/manual/en/function.ereg-replace.php There's a bit of sample code up there that may help... -bob -- Bob Scott Web / DB Developer http://www.covalent.netCovalent Technologies, Inc. On Mon, 16 Jul 1979, [EMAIL PROTECTED]

RE: [PHP] wordwrap()

2001-07-17 Thread scott [gts]
i know this is a silly question, but you're not looking at it thru a web browser, are you? browsers are for HTML and markup code. the output on my computer is the same as the manual output: A very long wooo ord. > -Original Message- > From: Tyler Longren [mailto:[EMAIL PROTECTED]

RE: [PHP] Need help with formatting time

2001-07-17 Thread scott [gts]
This will convert minutes to hours, then convert to 12-hour am|pm based time. all hours have 60 minutes. it's simple mathematics to convert. $m = 780; $h = 0; // convert to hours:minutes while ($m >= 60) { $h++; $m -= 60; } print "$h:$m \n"; // convert to 12-hour am|pm if (!$h) { $suf

<    6   7   8   9   10   11   12   13   14   15   >