Re: [PHP-WIN] Installation probs...

2003-11-01 Thread Dash McElroy
Perhaps an AddModule line? I've run into several machines that would not work if the AddModule line wasn't there. After your other AddModule lines, put this: AddModule mod_php4.c Don't worry about the "missing" mod_php4.c file. Restart the Apache server then. -Dash Every journalist has a no

RE: [PHP-WIN] POST and GET form

2003-11-01 Thread Dash McElroy
This sounds stupid, but I've found it way wasier to read code one has written with the _POST, _GET, _ETC arrays. Especially so when you haven't looked in a file for a few months or so. Yeah, it's a good habit. -Dash If you eat a live frog in the morning, nothing worse will happen to either of yo

Re: [PHP-WIN] Sending a PDF page

2003-07-03 Thread Dash McElroy
Todd, What does this letter_new.php file do? Anything that spits out any kind of output after the PDF doc is sent will result in a corrupted PDF (unless it's valid PDF stuff...). What I do when I have an issue like that is to open up Sam Spade (samspade.org - download the windows client) and do an

Re: [PHP-WIN] absolute include files

2003-06-14 Thread Dash McElroy
daz, This should be easy enough. First, have you checked to see if register_globals is on or off on your local machine? It defaults to off, so $DOCUMENT_ROOT would become $_SERVER['DOCUMENT_ROOT']. Check a phpinfo() screen and see what variables are different between your host and your local box.

Re: [PHP-WIN] Error, does anyone see anything wrong?

2003-03-28 Thread Dash McElroy
Take a look at http://www.php.net/manual/en/function.pdf-rect.php. Works just fine. -Dash vipula wrote: Hi, I'm trying to draw a table in a PDF with php. At the moment I can draw it as a combination of lines by giving cordinates. Is there any easy or systamatic way to do this. Thanks in advance

RE: [PHP-WIN] Re: Include virtual?

2003-02-28 Thread Dash McElroy
I assume you don't want site A to include site B's PHP files, correct? The best solution I can think of (I hope you are using Apache...) would be to have php configuration items set on a per virtual host directory. For site a you would have: php_flag openbasedir e:\sites\sitea and site b would h

Re: [PHP-WIN] fsockopen() doesnt work

2003-02-21 Thread Dash McElroy
It looks like the host cannot be resolved. Can you do a DNS query from that machine successfully? -Dash Cogito cogito ergo cogito sum -- "I think that I think, therefore I think that I am." -- Ambrose Bierce, "The Devil's Dictionary" On Fri, 21 Feb 2003, Arne Schumann wrote: > H

Re: [PHP-WIN] ereg_replace

2003-02-12 Thread Dash McElroy
I would just cut the text off via explode at the ? mark. i.e.: $shorturl = explode("?", $str, 1); //may or may not work... then echo $shorturl[0]; -Dash Sturgeon's Law: 90% of everything is crud. On Wed, 12 Feb 2003, Bobo Wieland wrote: > I'm using ereg_replace to find urls as said i

Re: [PHP-WIN] general question on Globals

2003-02-12 Thread Dash McElroy
I actually just did this last night. I could not for the life of me figure out why my variable wasn't working. Until I remembered it was in a function and I had to do a global $varname; command. Works just fine. -Dash Age before beauty; and pearls before swine. -- Dorothy Parker

Re: [PHP-WIN] Re: Parsing Error

2003-02-12 Thread Dash McElroy
Wade, Is the variable table_name you're passing an array? If so, you would want to do something more like this: $array = $_POST['table_name']; foreach ($array as $table) { $sql = "CREATE TABLE ".$table."("; for($i = 0; $i < count($field_name); $i++) ///etc

Re: [PHP-WIN] opendir

2003-02-09 Thread Dash McElroy
Evan, Here is a super simple function I wrote to help things out with directories. function dir_list($input) { $dir = @opendir($input) or die ("Invalid Directory"); $dirlist = array(); while ($dirlist = readdir($dir)) { $file[] = $dirlist; } clo

Re: [PHP-WIN] SSI, SHTML and PHP, INCLUDES...

2003-01-31 Thread Dash McElroy
Check this out: http://www.php.net/manual/en/function.virtual.php That just very well could be what you need. Otherwise, you may have to rewrite your stuff. Keep in mind Apache 1.3.x can only process one file via one 'addtype' thing. Apache2 has support for more that one 'filter', but I have not

Re: [PHP-WIN] Wierd Windows Problems

2003-01-30 Thread Dash McElroy
Looks like a missing quote could be a culprit here. Add Would you not also need a value="Add" in the tag? IE borks on stuff like that. -Dash For those who like this sort of thing, this is the sort of thing they like. -- Abraham Lincoln On Thu, 30 Jan 2003, Chris Deam wrote:

Re: [PHP-WIN] Register globals on and off

2003-01-30 Thread Dash McElroy
Yes. Either via a .htaccess file or in your httpd.conf in a Directory entry put this: php_value register_globals on See the following URL's for more info: http://www.php.net/manual/en/configuration.changes.php http://www.php.net/manual/en/function.ini-set.php -Dash AQUARIUS (Jan 20 - Feb 18)

Re: [PHP-WIN] Passing Variables and Internal Variables

2003-01-29 Thread Dash McElroy
You are referencing the variables properly on the first if line, but then you're calling $var1 and $var2 w/o using $_GET. Add that or do this: $var1 = $_GET['var1']; $var2 = $_GET['var2']; You may also want to use !isset($varname) instead of checking to see if the variables are equal to a space c

Re: [PHP-WIN] htpasswd question

2003-01-28 Thread Dash McElroy
I would try something like this instead: $params = escapeshellarg($params); $output = system(c:\path\to\htpasswd $params); //check for output errors or what not There very well could be a better solution (especially since I have not tried the above code...). I remember seeing somewhere that the

Re: [PHP-WIN] Newbie email question

2003-01-25 Thread Dash McElroy
orbs 47 times it's weight in excess Reality. On Sat, 25 Jan 2003, Alex Davis wrote: > Is there a way to debug the script on remote server? > > > "Dash McElroy" <[EMAIL PROTECTED]> wrote in message > news:<[EMAIL PROTECTED]>... > > Alex, > > &g

Re: [PHP-WIN] Newbie email question

2003-01-24 Thread Dash McElroy
Alex, You have to point it at your ISP's SMTP server (assuming this is for home). Check your mail program for your SMTP server. Sendmail is a unix thing, although there are similar programs available for Windows, your best bet is to use an existing server. Mail from unknown sources is likely to be

Re: [PHP-WIN] Configuring a web server I haven't written yet...

2003-01-24 Thread Dash McElroy
Why would you do a system("php something.php")? Just put the code in the php file and you're good to go. i.e. /something.php contains: -Dash I can't understand it. I can't even understand the people who can understand it. -- Queen Juliana of the Netherlands. On Fri, 24 Jan 2

Re: [PHP-WIN] Help!

2003-01-23 Thread Dash McElroy
Check your php.ini. register_globals = off would be your culprit. Check www.php.net/register_globals for instructions on how to use the new "superglobals" ($_POST, $_GET, etc) or change it to on. Restart Apache after you change it. (one more vote for a register_globals email bot...) -Dash One P

Re: [PHP-WIN] MySQL Statement Failing in PHP

2003-01-23 Thread Dash McElroy
I think you need to do a while() loop there instead of trying to grab the results in one shot: $row_rsRegisteredClasses = array(); while ($row = mysql_fetch_assoc($rsRegisteredClasses)) { $row_rsRegisteredClasses[] = $row; //populate this array with the $row array } That may or may not work,

Re: [PHP-WIN] PDF extensions seems to do not work properly on IE

2003-01-23 Thread Dash McElroy
I've used PDFlib a reasonable amount on *nix platforms, but it works just fine in IE. Try saving the file to disk and opening it with a text editor to see if there are any PHP errors corrupting the PDF output. I had this happen a few times with uninitialized variables, or undefined functions or wha

Re: [PHP-WIN] arrays and nested arrays and loops and databases...

2003-01-20 Thread Dash McElroy
data. > but the address bar should not be hold if a large number of address > presents. > Is that have any suggestions?? > Thanks yours > > tarn@hk > > - Original Message - > From: "Dash McElroy" <[EMAIL PROTECTED]> > To: "H Marc Bower"

Re: [PHP-WIN] arrays and nested arrays and loops and databases...

2003-01-18 Thread Dash McElroy
If I understand correctly, you want to have an array containing an array with people's email address and name from your db like this: $to[0]['address'] = [EMAIL PROTECTED] $to[0]['name'] = Bob Smith $to[1]['address'] = [EMAIL PROTECTED] $to[1]['name'] = John Jones (the above is obviously not vali

Re: [PHP-WIN] SQL-query

2003-01-17 Thread Dash McElroy
work to change all the > related tables before you combine them. If I was Prime Minister I would > immediately pass legislation outlawing autoincrement fields ( my chances are > not good however). > > > > - Original Message - > From: "Dash McElroy" <

Re: [PHP-WIN] Re: PHP Search

2003-01-17 Thread Dash McElroy
Radovan, Searching for words that are not the same color as the background could be interesting depending on a lot of things. 1. Does the page use CSS? 2. Are background/font colors defined as "red" or "#FF"? 3. Where are background colors defined? (i.e. or or or ...) (you already answered

Re: [PHP-WIN] $PHP_SELF & change of bgcolor ?

2003-01-17 Thread Dash McElroy
Sure thing. Hopefully you have a central include() file... that would make this easier so you don't have to put this code in all of your pages. if ($_SERVER['PHP_SELF'] == "blahblah.php") { $bgcolor = "white"; //change as needed $text = "blue"; //change as needed } else { $bgcolor = "b

Re: [PHP-WIN] PDF

2003-01-17 Thread Dash McElroy
If the PDF forms you "print on top of" are forms, you can use FDF (Forms Data Format) to fill out the form. There are several FDF options. One is to use Adobe's FDF program thingie. Others are listed in the comments on this page (http://www.php.net/manual/en/ref.fdf.php). I used one of the ones lis

Re: [PHP-WIN] SQL-query

2003-01-17 Thread Dash McElroy
Piotr is right. SQL shouldn't let you do that, if only for possible consistency errors. Imagine if you had id 3 referenced in some other table and then you put new data in the primary table with id of 3. Then all the other stuff referring to 3 would then refer to the new data. Not a good thing. I'

Re: [PHP-WIN] Help needed about mailing!

2003-01-17 Thread Dash McElroy
Try telnetting to port 25 of the server (armed with SMTP commands, of course) and see if it will let you connect. Perhaps the new exchange server of yours is disallowing relaying or something else odd. Works great with mine, as long as I email to my internal domain (won't let me relay. I've tried

RE: [PHP-WIN] RE: What kind of Editor you used to build PHP script?

2003-01-17 Thread Dash McElroy
Just give us a couple of years :) In the meantime, I'll use editplus (on win32) and pico (on *nix). -Dash In a medium in which a News Piece takes a minute and an "In-Depth" Piece takes two minutes, the Simple will drive out the Complex. -- Frank Mankiewicz On Fri, 17 Jan 2003, U

Re: [PHP-WIN] date and time operation

2003-01-17 Thread Dash McElroy
By any chance have you looked at the date() function in PHP? Check the manual at http://www.php.net/manual/en/function.date.php. date() pairs up nicely with checkdate and with mktime (http://www.php.net/manual/en/function.mktime.php). Thusly, Use the following examples: $year = date("Y"); //4 dig

Re: [PHP-WIN] Php module

2003-01-16 Thread Dash McElroy
Here's a silly question: Have you installed a web server? If not, that could very well be your problem... This list seems to reccomend Apache (If you're working on a small traffic, Apache 2 is just as fine as Apache 1.3). I personally have used Apache on Win32 for about 3-4 years now with no probl

Re: [PHP-WIN] Help using Mail() on XP standalone config

2003-01-16 Thread Dash McElroy
Allan, You need some kind of an SMTP server for mail() on Win32. Either find a free one that you can load on your machine for testing, or use your ISP's (or if you're at work, possibly their internal mail server) mailserver. Then point your php.ini's 'SMTP = ' line towards the mailserver. Note th

RE: [PHP-WIN] Reading in text file characters

2003-01-15 Thread Dash McElroy
You could also do this: $fp = fopen($filename, "r"); while(!feof($fp)) { $string = fgets($fp, 25); //25 specifies how many chars to read in //process string here } fclose($fp); The above code has not been tested, but it should give you an idea. One thing I have noticed is that reading an

Re: [PHP-WIN] Windows Service interactions with PHP

2003-01-14 Thread Dash McElroy
There is a tool I have installed on my machine - I believe it came with the Windows 2000 Resource kit (of sorts... obtained via TechNet) that gives a lot more data. It's called 'netsvc'. Here's what it outputs: C:\>netsvc Controls and displays the status of services. NETSVC servicename \\compute

Re: [PHP-WIN] Installation problems =(

2003-01-13 Thread Dash McElroy
Bobo, Perhaps your zlib issue could be due to an old php_zlib.php dll file. I would definitely upgrade your MySQL to at least 4.0.8, if you're set on 4.0. There were a few nasty bugs in the older versions (4.0.4 in particular bugger'd me up big time). -Dash The only possible interpretation of a

Re: [PHP-WIN] initialize variables (was: Using the GET Method)

2003-01-13 Thread Dash McElroy
On Mon, 13 Jan 2003, Bobo Wieland wrote: > Just wanted to say thanks to those of you who've helped me on this one! =) > Thanks... > > One more question to clarify one thing, though: > > if someone is calling 'index.php' like this: 'index.php?i=10' > > and on that page I have: > > while ($i <= 10)

Re: [PHP-WIN] PHP + Win98 Question

2003-01-13 Thread Dash McElroy
Dean, What kind of problems are you encountering? I have done reasonable testing on Win9x and a huge amount of testing on Win2k with the only problems relating to pathnames or special extensions (i.e. PDFLib). So far... I have not tested session code on Win9x, but it works flawless on Win2k. Hav

RE: [PHP-WIN] HTTP 404 File not found error

2003-01-10 Thread Dash McElroy
Don't delete that line - make it reference whatever DocumentRoot specifies. If C:/chuck is where DocumentRoot should be, change your DocumentRoot. -Dash -Original Message- From: paradiddles [mailto:[EMAIL PROTECTED]] Sent: Friday, January 10, 2003 1:18 PM To: Dash McElroy Cc: [

RE: [PHP-WIN] HTTP 404 File not found error

2003-01-10 Thread Dash McElroy
You have an interesting line on your httpd.conf on line 329: Where are you putting your phpinfo.php file? In line 304, you have this: DocumentRoot "C:/Program Files/Apache Group/Apache/htdocs/" Which one are you using? -Dash -Original Message- From: paradiddles [mailto:[EMAIL PROT

RE: [PHP-WIN] HTTP 404 File not found error

2003-01-10 Thread Dash McElroy
Silly question: If your C drive is formatted as NTFS, have you checked permission issues to make sure Apache can actually access those files? Since you're running Apache from the command prompt, I would assume this wouldn't be an issue, but you never know. Win2k does have a tendency to do Funky S

RE: [PHP-WIN] newbie ...instal question.

2003-01-06 Thread Dash McElroy
Did you copy the php4ts.dll file to c:\winnt\system32 (or windows or whatever your w2k dir is)? If that doesn't do the trick, you may have to do an 'AddModule mod_php4' in the Apache config. I had to do this on a Win98 machine yesterday, but have so far not had to load that line on any Win2k machi

RE: [PHP-WIN] Re: Subject: getting the OS

2003-01-03 Thread Dash McElroy
I can confirm that on Windows. My linux box has PHP 4.1.2. You could also check some of the other environment variables. I just compared my phpinfo() screens on my w2k box and my linux box. Looks like the solution mentioned below is the cleanest, however. Hopefully you don't need to differentiate

RE: [PHP-WIN] Warning: Page has Expired, HELP

2002-12-26 Thread Dash McElroy
David, By any chance are you using sessions? I had an error like this once (Mozilla didn't bark about it but I still have to code for IE :-<) and I had to change the session_cache_limiter to public or private (private would likely be preferrable). See http://www.php.net/manual/en/function.session-

Re: [PHP-WIN] header functions and ... ?

2002-12-23 Thread Dash McElroy
You could just redo your scripts to not spit out any text until you issue the header("Location: URL") command. One questions why a script would spit out text if it will be redirecting the user to another page... -Dash A chubby man with a white beard and a red suit will approach you soon. Avoid hi

Re: [PHP-WIN] 2 dimension Array...

2002-12-19 Thread Dash McElroy
You are missing an opening quote: echo ""; Try that. -Dash -shad No committee could ever come up with anything as revolutionary as a camel -- anything as practical and as perfectly designed to perform effectively under such difficu

RE: [PHP-WIN] Re: PHP$ and Apache2 Configuration

2002-12-16 Thread Dash McElroy
That won't work - PHP 4.3.0 RC3 /or/ Apache 2.0.40. PHP4.2.x is linked to Apache2 versions (Apache2 support is experimental in 4.2.x). -Dash -Original Message- From: Alvarez, Anthony [mailto:[EMAIL PROTECTED]] Sent: Monday, December 16, 2002 1:05 PM To: 'Juan Rosero'; [EMAIL PROTECTED] S

RE: [PHP-WIN] Warning messages

2002-12-16 Thread Dash McElroy
Alright - looks like your host is a *nix host. Do you have shell access to the system or are you stuck with FTP? Either way, you should be able to chmod the file. You'll most likely need to chmod it 666 (don't worry - it's not evil!). Example: shell$ chmod 666 /path/to/guestbook.txt ftp open web

RE: [PHP-WIN] PHP$ and Apache2 Configuration

2002-12-16 Thread Dash McElroy
ax: +1 770 338 6238. http://www.panasonic-wireless.com PGP Fingerprint: 9A2C E2D6 1D8E 96B4 CC57 9268 380B 00A6 A92D 9586 > -Original Message- > From: Dash McElroy (php) [mailto:[EMAIL PROTECTED]] > Sent: Monday, December 16, 2002 1:49 PM > To: Alvarez, Anthony; '[EMAI

RE: [PHP-WIN] PHP$ and Apache2 Configuration

2002-12-16 Thread Dash McElroy (php)
Try PHP 4.3.0 RC3 OR Apache 1.3.x. Works for me :) -Dash -Original Message- From: Alvarez, Anthony [mailto:[EMAIL PROTECTED]] Sent: Monday, December 16, 2002 10:14 AM To: '[EMAIL PROTECTED]' Subject: [PHP-WIN] PHP$ and Apache2 Configuration I couldn't find it or elsewhere in the forum

RE: [PHP-WIN] Dealing with Mac files

2002-12-13 Thread Dash McElroy (php)
Check this out - it just might be helpful: http://www.php.net/manual/en/ref.filesystem.php#ini.auto-detect-line-endings Does require PHP 4.3.0 (currently at RC3) though. Here's what it says: auto_detect_line_endings boolean When turned on, PHP will examine the data read by fgets() and file

RE: [PHP-WIN] newbie question (forms)

2002-12-12 Thread Dash McElroy
This probably has to do with one/both of two things: 1. register_globals is off (not a bad thing - just requires a tidbit more code. see http://php.net/register_globals) 2. A variable is being called before it has been initialized. Example PHP script: First you will get the undefined variable

RE: [PHP-WIN] ordering results

2002-12-11 Thread Dash McElroy
You could either sort in PHP after you return the resultset, or you could use a sort option in your sql query. In MySQL, sorting is easy. I imagine it should be just as easy in any other db. Unless you are sorting the resultset by something odd, it's probably best to have the database sort it. Mak

Re: [PHP-WIN] Re: DOCUMENT_ROOT on Apache

2002-12-09 Thread Dash McElroy
echo $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'] You can also use the following for PHP_SELF: $_SERVER['REQUEST_URI'] <- has GET string as well $_SERVER['SCRIPT_NAME'] <- haven't used this one yet You could also use $_SERVER['SERVER_NAME'] instead of HTTP_HOST, but HTTP_HOST is what the user ty

RE: [PHP-WIN] Event Viewer Entries

2002-12-05 Thread Dash McElroy
Confirmed on Windows 2000 SP2 Apache 2.0.43 PHP 4.3.0 RC2. -Dash Event Type: Information Event Source: c-client Event Category: (6) Event ID: 2000 Date: 12/5/2002 Time: 2:12:21 PM User: N/A Computer: DASH Description: The description for Event ID (

RE: [PHP-WIN] mystery line

2002-12-04 Thread Dash McElroy
Here's what I do: Page1.php submits info to page2.php. In page2.php: Viola. -Dash -Original Message- From: freeman [mailto:[EMAIL PROTECTED]] Sent: Tuesday, October 15, 2002 12:56 AM To: PHP Windows Help List Subject: Re: [PHP-WIN] mystery line Can anyone tell me how to make a scr

RE: [PHP-WIN] checking if is FORM is POSTED

2002-12-03 Thread Dash McElroy
You can check $_SERVER['REQUEST_METHOD'] to see if the data has come from POST, and check $_SERVER['HTTP_REFERER'] to see what page the data came from. However, note that the HTTP_REFERER method cannot be trusted because the following are possible: 1. User could have referers turned off (Mozilla c

RE: [PHP-WIN] Redirect browser to another URL?

2002-11-27 Thread Dash McElroy
Just for feedback (note: I don't run Apache on win32 live anywhere - it's primarily a test bed), Apache has worked flawless for me. However, I tend to put Apache on Linux when I get the chance. Stability of NT still scares me. I like using Apache for a few reasons: 1. It's cleaner (simple text con

RE: [PHP-WIN] Redirect browser to another URL?

2002-11-26 Thread Dash McElroy
Jack, If your script which has to redirect the user spits out _ANY_ output (i.e. carrige return, space, HTML of any sort) then it will be unable to send header info to the browser. If the script is not supposed to send any data to the browser other than a redirect, you have some whitespace or some

RE: [PHP-WIN] get Url

2002-11-25 Thread Dash McElroy
PHP with register_globals = on: $PHP_SELF PHP with register_Globals = off: $_SERVER['PHP_SELF'] (4.1.x or greater) Check a phpinfo() screen for more variables. There are some other ones that can be extremely helpful (if you have a GET string you want to save too, use $_SERVER['REQUEST_URI'], etc).

RE: [PHP-WIN] PHP 4.2.3 + Apache 2.0.43

2002-11-25 Thread Dash McElroy
Use Apache 1.3.x (easy), search this list for PHP 4.2.3 and Apache 2 (not that hard - there are instructions for downloading a new php4apache2.dll file), or if you're daring, possibly try PHP 4.3.0 RC1. Apache2 support in PHP 4.2.x is experimental (and breaks with new versions of either - PHP 4.2.

Re: [PHP-WIN] Unable to upload.. :(

2002-11-24 Thread Dash McElroy
Toby, Your ISP may be using 'safe_mode'. Try the move_uploaded_file function() instead of copy(). This is taken off php.net/move_uploaded_file: Note: move_uploaded_file() is not affected by the normal safe-mode UID-restrictions. This is not unsafe because move_uploaded_file() only operates

Re: [PHP-WIN] Help required... Simple File Upload

2002-11-24 Thread Dash McElroy
I haven't done but one file upload, but it seems from the error message that maybe PHP is trying to write the file to d:\raheel\w3sites\txtfiledemo\uploads\ (as a file?). Perhaps you should include the $_FILES['userfile']['name'] to the ending statement (which I believe is what the file's original

RE: [PHP-WIN] Filling out PDF Forms Dynamically

2002-11-22 Thread Dash McElroy
Ron, You should look into FDF. (http://www.php.net/manual/en/ref.fdf.php). I tested it out (using the function in the second to last comment - I didn't want to recompile PHP for a one PDF file script) and it seems to work rather well. I'm not sure if this is exactly what you want, though. -Dash

Re: [PHP-WIN] Question from a total newb

2002-11-21 Thread Dash McElroy
So, if you want to use MySQL, create yourself a database and some tables with the fields you like in phpMyAdmin, then connect PHP to the database. If you download a PHP script that requires MySQL support, you'll likely have to tell it what host, user and password MySQL requires. Depending on the s

Re: [PHP-WIN] Question from a total newb

2002-11-21 Thread Dash McElroy
"You musn't produce sloppy code with no comments, no error checking, no indentation and no proper presentation of results until you're an expert!" Great... So as soon as I started programming in PHP, I became an expert... and now that I'm properly indenting my code and (finally) starting to use co

Re: [PHP-WIN] Question from a total newb

2002-11-20 Thread Dash McElroy
ndar scripts, although I have no > idea how they are actually to be implemented into my site. I really > appreciate your comments and help... you are saving me hours of > frustrations. > > http://www.luciddesigns.com/calendar/ > > http://myphpcalendar.sourceforge.net/ > >

Re: [PHP-WIN] mysql loop problem

2002-11-20 Thread Dash McElroy
Gareth, PHP has a default 30 second timeout. This can be changed in php.ini (not reccomended) or by set_time_limit (http://www.php.net/manual/en/function.set-time-limit.php). Set it to "0" to disable the timout script. -Dash "I think the sky is blue because it's a shift from black through purple

Re: [PHP-WIN] Question from a total newb

2002-11-20 Thread Dash McElroy
confused. I setup a user and > password but at the command prompt I can't manage to log in. How do you do > the sql stuff? Also, once all this is going how would I go about actually > installing a php script into my webpage... or better yet... what kinds of > tools are ou

Re: [PHP-WIN] Question from a total newb

2002-11-20 Thread Dash McElroy
Alright, I'll take the bait. 1. If you've got IIS installed, why are you trying to install Apache? Choose one or the other. 2. Configuration for either server should be drop dead easy. The PHP installer exe file should configure IIS (I don't use IIS, fortunately), and the zip file contains what y

RE: [PHP-WIN] PHP variable

2002-11-19 Thread Dash McElroy
Do this: The @ turns off error reporting for that function. -Dash -Original Message- From: F.Anneveld [mailto:[EMAIL PROTECTED]] Sent: Monday, November 18, 2002 7:58 AM To: [EMAIL PROTECTED] Subject: [PHP-WIN] PHP variable Hello, When I use the following code my browser comes with

Re: [PHP-WIN] parse error

2002-11-18 Thread Dash McElroy
What line number are you getting the parse error at? It's amazing what that can tell you. -Dash On Tue, 19 Nov 2002, zeus wrote: > Nope! i try that one too, but the parse error thing still exist > > > Howard, Robert P wrote: > > >change your else($submit) statement to else > > > >-Origi

RE: [PHP-WIN] file_exists()

2002-11-18 Thread Dash McElroy
DaMouse: Try looking at www.php.net/fopen : the 3rd comment should work: To check if a file exists using http or ftp use the following: $fp = @fopen("http://www.someurl.com/testfile.php3","r";); if ($fp) { print"The file exists!"; } else { print"The file does not exi

RE: [PHP-WIN] set up mysql without winmysqladmin?

2002-11-15 Thread Dash McElroy
Make yourself a simple batch script: amp.bat: @echo off start c:\path\to\apache\apache.exe c:\path\to\mysql\bin\mysqld.exe --console echo Press ^C to stop stuff pause>NUL c:\path\to\apache\apache.exe -k stop or something (I'm guessing on the mysqld option). The start command may be particularly o

RE: [PHP-WIN] Problem escaping characters

2002-11-14 Thread Dash McElroy
Lars, Looks like you have an error in your syntax on the ereg line. It should most likely look like this: if (ereg([^0-9], $num)) { print "That's not a number!"; } And your second thing is not a failure of PHP, it's a "feature" of web browsers reading stuff in HTML. Try either wrapping i

RE: [PHP-WIN] Windows XP setup problem with Apache 1.3 and PHP

2002-11-14 Thread Dash McElroy
Scott, Did you copy the php4ts.dll file into your c:\%WINDIR%\system32 dir? I'm not sure what PHP does without that file, but it's one place to look. I've been using Apache 2 lately (2.0.40 works with 4.2.3 with no problems, but Apache2 support in 4.2.x is "experimental". PHP 4.3.x shouldn't be b

RE: [PHP-WIN] incrementation error

2002-11-14 Thread Dash McElroy
DaMouse, Toss in a few extra 'echo' and 'print_r($array)' statements regarding to your number and you'll figure it out. That's what I just did. Make it work before you make it pretty :) I fill my code with echo and print_r statements so I know what the code further down is getting. Here's the fix

Re: [PHP-WIN] php with mssql

2002-11-12 Thread Dash McElroy
I wish I could offer more assistance... Here's an odd thought: Can you show me an example of where INSERT or UPDATE code returns with '1'? What does it return for pconnect? -Dash Celebrate Hannibal Day this year. Take an elephant to lunch. On Wed, 13 Nov 2002, soff wrote: > With normal connec

Re: [PHP-WIN] php with mssql

2002-11-12 Thread Dash McElroy
Honestly - I have no idea how to do this in MSSQL. Those instructions are for limiting the Apache server. The mssql_connect shouldn't be an issue because the connection is torn down when the php page is done (or mssql_close (?) is called), but you said you have experienced issues with that call.

Re: [PHP-WIN] php with mssql

2002-11-12 Thread Dash McElroy
This could be the configuation entry for Apache2 on Win2k: http://httpd.apache.org/docs-2.0/mod/mpm_common.html#threadsperchild Or this: http://httpd.apache.org/docs-2.0/mod/mpm_common.html#maxclients If not, look here: http://httpd.apache.org/docs-2.0/mod/quickreference.html and search for M

Re: [PHP-WIN] php with mssql

2002-11-12 Thread Dash McElroy
Soff, What web server are you using? I know that if you use Apache (which has a max threads (?) paramater of 150) against MySQL (default: 100) and pconnect, the database can start to deny new connections. You may be running into the same issue here. Look at your max number of connections. I have

RE: [PHP-WIN] Problem with sessions

2002-11-12 Thread Dash McElroy
Look at your session.save_path line: session.save_path .c:/php/sessions/tmp .c:/php/sessions/tmp Change this to c:\php\sessions\tmp and you'll find yourself without a problem (as long as that directory exists. The dot in front of the pathname is most likely failing the script. session.save_path

RE: [PHP-WIN] Re: Sending mail is so slooooooow

2002-11-12 Thread Dash McElroy
I've had speed issues when using mail() on a win32 machine that has the php.ini set towards an Exchange 5.5 server. It seems to take a while to open the connection, verify, send it and then close the connection. I haven't traced the problem though, and it's not much of an issue considering my produ

RE: [PHP-WIN] IIS 5.0 and cache

2002-11-12 Thread Dash McElroy
Step, Have you looked at the headers that are being received by the client? A good tool for this is Sam Spade (www.samspade.org) if you don't already have one. Another idea to try is this: http://www.php.net/manual/en/function.session-cache-limiter.php. I haven't had to use this, but it seems to

RE: [PHP-WIN] update tablename

2002-11-12 Thread Dash McElroy
$query = "ALTER TABLE `foo` RENAME `bar`"; $result = mysql_query($query); Obviously you need to be connected to the database first, and should also do error checking after to make sure the table was in fact renamed. p.s. I use phpMyAdmin to find out how to do stuff I don't yet know. Good Software

Re: [PHP-WIN] HTML email marketing tool

2002-11-11 Thread Dash McElroy
Have a look at phpclasses.org. There are most likely quite a few HTML mail classes. As long as you're opt in, you're fine by me :) -Dash Only presidents, editors, and people with tapeworms have the right to use the editorial "we." On Tue, 12 Nov 2002, [big5] Terence Ng wrote: > Could someone p

RE: [PHP-WIN] mysql_fetch_array problem

2002-11-09 Thread Dash McElroy
will not have any slashes embedded in normal > circumstances, so there is no reason to stripslashes() any data coming from > a database column... > > Rich > -Original Message- > From: Dash McElroy [mailto:dash.php@;westonefcu.org] > Sent: 08 November 2002 16:53 > To:

RE: [PHP-WIN] mysql_fetch_array problem

2002-11-08 Thread Dash McElroy
Zeus, 2 notes: 1. Data you insert into a database should be addslashes($varname) first (or another encoding) to protect against MySQL injection vulnerabilities. A nice stripslashes($varname) on the way out gets rid of the slashes. You could also use urlencode($varname) and urldecode($varname). He

Re: [PHP-WIN] Re: PHP Editor

2002-11-06 Thread Dash McElroy
www.editplus.com Works rather well. I've still yet to touch on a lot of it's capabilities. -Dash "Nuclear war can ruin your whole compile." -- Karl Lehenbauer On Wed, 6 Nov 2002, Radovan Radic wrote: > Hi > > We could use some url for this editor, pls? > > Radovan > > "Seung Hw

Re: [PHP-WIN] dynamic font

2002-11-05 Thread Dash McElroy
I have on my to do list this exact item. Unfortunately, I believe it will require some javascript (Ugh...) or a fancy HTML trick that won't be well supported on the different browsers. As of right now, I'm working on a cookie based font size selector. That seems to be easy enough. -Dash Some prog

RE: [PHP-WIN] 2 Issues for Mail() in Win/PHP4-

2002-11-04 Thread Dash McElroy
Read this link: http://www.php.net/manual/en/security.registerglobals.php Having register_globals set to on can make it easier for someone to exploit poorly written code (there are examples on the page). I like to use register_globals=off too because I know explicitly where each variable is comin

RE: [PHP-WIN] ordering vars in an array

2002-11-01 Thread Dash McElroy
Try sort (http://www.php.net/manual/en/function.sort.php ). You're sorting numbers, so you'd probably want to do this: $array = sort($array, SORT_NUMERIC); -Dash -Original Message- From: DaMouse [mailto:damouse@;ntlworld.com] Sent: Frid

RE: [PHP-WIN] file download .......

2002-11-01 Thread Dash McElroy
Toby, Look at this page: http://www.php.net/manual/en/function.header.php (excerpt below) If you want the user to be prompted to save the data you are sending, such as a generated PDF file, you can use the Content-Disposition header to supply a recommended filename and force the browser to displ

RE: [PHP-WIN] Form text with reserved chars

2002-11-01 Thread Dash McElroy
Or, to strip slashes off a specific variable (set_magic_quotes will affect all variables) try: $text = stripslashes($text); -Dash -Original Message- From: Miha Nedok [mailto:mike@;voyager.unix-systems.net] Sent: Friday, November 01, 2002 5:00 AM To: news.php.net Cc: [EMAIL PROTECTED]

Re: [PHP-WIN] Session Persistance (urgent help required)

2002-10-31 Thread Dash McElroy
Raheel, Have you done a session_start() on each page that requires session variables? Or set the php.ini Session Auto Start to 1 (true, if I recall correctly) if you want sessions enabled on all your page calls, then restart your http server. -Dash Heaven, n.: A place where the wicked ce

Re: [PHP-WIN] 404 documents

2002-10-29 Thread Dash McElroy
>From Rasmus' tips and tricks presentation at PHPcon: (www.lerdorf.com/tips.pdf) Apache's ErrorDocument directive can come in handy. For example, this line in your Apache configuration file: ErrorDocument 404 /error.php Can be used to redirect all 404 errors to a PHP script. The following serv

RE: [PHP-WIN] spam protection boxes

2002-10-28 Thread Dash McElroy
TE OF THE DAY: ` On Mon, 28 Oct 2002, Svensson, B.A.T. (HKG) wrote: > It will just last a matter of time before the spam devils applies > patter recognition algorithms to circumvent this things. :( > > > -Original Message- > > From: Dash McElroy [mailto:php@;l1

RE: [PHP-WIN]

2002-10-27 Thread Dash McElroy
y tightly except ONE. The admin of that > page refuses to use PHP and is in love with ASP. I need to run some PHP > code from within ASP. How can this be done? My first idea was to use > but I noticed that ASP doesn't parse > that. Any ideas? > > > -Original Messa

Re: [PHP-WIN]

2002-10-26 Thread Dash McElroy
I just took a look in my php.ini file and I didn't see any restrictions about the

  1   2   >