Re: [PHP] php converts \ to \\, how can I stop that

2002-05-03 Thread Mike Eheler
You could also set these values in your php.ini: magic_quotes_gpc = off magic_quotes_runtime = off If you do this, then remember when inserting the data into a mysql database, it still needs to be escaped: $sql = sprintf( insert into table (id, field) values ('', '%s'),

[PHP] Re: Newbie - still working on my first script.

2002-05-03 Thread Mike Eheler
Seems to me that space in the file copy is what's causing problems. Try changing ads/ $File_name to ads/${File_Name}. Just a note that doing things that way can cause big problems, especially on unix systems.. imagine if you went to your website and type:

Re: [PHP] phpMyAdmin

2002-05-03 Thread Mike Eheler
I've always found it's good to set numeric primary keys to UNSIGNED. Gives you a larger range, and it's not very likely those numbers are ever going to be negative. Also, there is absolutely no need to check Index or Unique when you have selected Primary, as Primary implies both (hence why in

Re: [PHP] Controlling Word Files (FDA Concern)

2002-05-03 Thread Mike Eheler
... which still doesn't stop you from taking screenshots of the pages, and printing those. Mike Jay Blanchard wrote: [snip] Does anyone know of how to put a Word file on a web page without the user being able to save it to their hard drive? And also another issue of making it so they can't

Re: [PHP] Turning OFF 'auto_prepend_file' on a page by page basis

2002-05-03 Thread Mike Eheler
In .htaccess: auto_prepend_file /dev/null auto_append_file /dev/null Mike Stefen Lars wrote: Usually, I use the Apache directive to add the prepend option. I already tried setting another prepend option in the apache directives, but it seems one does not overwite the other. I tried

Re: [PHP] php/.htaccess/.htpasswd

2002-05-03 Thread Mike Eheler
It's possible, but is it really recommended? Wouldn't the .htaccess/.htpasswd file have to be owned by the apache user, which might leave it open to being overwritten by any kind of a weak/exploitable script? Mike Josh Valerie McCormack wrote: I've used the script phtaccess, which I think

Re: [PHP] php/.htaccess/.htpasswd

2002-05-03 Thread Mike Eheler
in view of the httpd, which is even worse... miguel On Fri, 3 May 2002, serj wrote: You could use fopen() to connect to the file via ftp therefore keeping the .htaccess file owned by the user for increased security. Josh Boughner On Fri, 3 May 2002, Mike Eheler wrote: It's possible

Re: [PHP] php/.htaccess/.htpasswd

2002-05-03 Thread Mike Eheler
owned by the user for increased security. Josh Boughner On Fri, 3 May 2002, Mike Eheler wrote: It's possible, but is it really recommended? Wouldn't the .htaccess/.htpasswd file have to be owned by the apache user, which might leave it open to being overwritten by any kind of a weak/exploitable

[PHP] Re: php/.htaccess/.htpasswd

2002-05-03 Thread Mike Eheler
On Fri, 3 May 2002, Mike Eheler wrote: If someone can overwrite your .htaccess there's a chance they can also view files through the same exploit (possibly). They could then get your FTP login info, and do a lot more damage than just removing password access to an area. Mike Serj wrote: Im

[PHP] Re: php/.htaccess/.htpasswd

2002-05-03 Thread Mike Eheler
the password anywhere in the script. On Fri, 3 May 2002, Mike Eheler wrote: The problem is not in them being able to overwrite the .htaccess *and* getting your FTP password.. those are the cons for both solutions we have presented, respectfully. Right now the ideal solution seems

Re: [PHP] Re: case-insensitive str_replace

2002-05-02 Thread Mike Eheler
Well to make it case insensitive, you could change them to '/search/i'. Adding that /i makes them case-insensitive. Mike Reuben D Budiardja wrote: On Thursday 02 May 2002 04:08 pm, J Smith wrote: preg_replace() can be used with arrays. Yeah, but how to make it case-insensitive beside

[PHP] session_write_close() bug in 4.1.2?

2002-05-02 Thread Mike Eheler
user-defined session handlers. I'll start with how I have set up the handlers, please correct the process if it is wrong: -- BOF -- function sess_open($save_path, $session_name) { // open a database connection } function sess_close() { // close the database connection } function

[PHP] Re: SESSIONS

2002-05-02 Thread Mike Eheler
Javascript cannot interact with PHP. You have to realise that the PHP code has been already executed long before the javascript gets a chance to. Mike Morten Nielsen wrote: Hi, I got a php and a javascript page. In the PHP page I register a SESSION call 'info'. I would then like to put a

Re: [PHP] srand thought

2002-05-02 Thread Mike Eheler
Yeah. If I understand correctly, if you do, like: ?php $seed = time(); srand($seed); $var = rand(0,50); echo $var\n; srand($seed); $var2 = rand(0,50); echo $var2\n; ? Then, I believe, the theory is that you will get the same random number twice. Mike Miguel Cruz wrote: On Thu, 2 May 2002,

[PHP] more session bugs?

2002-05-02 Thread Mike Eheler
Here's a test you can try yourself. On your server, set up these two files: test.php ?php session_start(); if ($_REQUEST['var']) $_SESSION['var'] = $_REQUEST['var']; ? pre?php print_r($_SESSION); ?/pre a href=test-unset.phpClick here to unset/abr / a href=test.php?var=valueClick here

[PHP] Re: more session bugs?

2002-05-02 Thread Mike Eheler
Pardon the parse error in test-unset.php. change: header(Location: test.php)); to: header(Location: test.php); Mike Mike Eheler wrote: Here's a test you can try yourself. On your server, set up these two files: test.php ?php session_start(); if ($_REQUEST['var']) $_SESSION

[PHP] Re: more session bugs?

2002-05-02 Thread Mike Eheler
. -- Yasuo Ohgaki Mike Eheler wrote: Here's a test you can try yourself. On your server, set up these two files: test.php ?php session_start(); if ($_REQUEST['var']) $_SESSION['var'] = $_REQUEST['var']; ? pre?php print_r($_SESSION); ?/pre a href=test-unset.phpClick here

[PHP] Re: PHP with MySQL

2002-05-02 Thread Mike Eheler
Typically it's done like: $db = mysql_connect('localhost','username','password'); The MySQL database detects what host you're connecting from, and appends that to your username. I'm not sure if it's possible to specify an alternate host. So if both PHP and MySQL are on the same machine, and

[PHP] #!/usr/bin/php in output?

2002-03-05 Thread Mike Eheler
Having a bit of a weird problem with using PHP as CGI. The problem is this.. the output is returning the #!/usr/bin/php line from the file. Example: /cgi-bin/test: #!/usr/bin/php ? echo Hello World!\n; ? Then in a web browser: http://www.example.com/cgi-bin/test: #!/usr/bin/php Hello

[PHP] Re: Help with an error I can't solve!

2002-03-05 Thread Mike Eheler
Is the line within a function? If so, it's possible that $HTTP_POST_VARS hasn't been globalled. Check to see if within the function that line is on that the line global $HTTP_POST_VARS; exists. Mike On Tue, 05 Mar 2002 12:32:59 -0800, Lic. Carlos A. Triana Torres wrote: Hello all, I

[PHP] Re: Webmail

2002-03-05 Thread Mike Eheler
It's really quite simple. Here's a quick script that will dump all variables sent in a form to an email address: $email = '[EMAIL PROTECTED]'; $subject = 'Form Posted on ' . date('r'); $from = 'Your Website [EMAIL PROTECTED]'; $message = ''; // PHP up to 4.0.6 foreach ($HTTP_POST_VARS as $key =

[PHP] Re: Value of $_* variables

2002-03-05 Thread Mike Eheler
$result = mysql_query(select user from users where id = $_SESSION[id], $db); No need to quote the key name in a string Mike James Taylor wrote: I'm sure this has been asked before, but at least not within the last 600 messages (i checked): I have the session variable $_SESSION['id'] set

Re: [PHP] #!/usr/bin/php in output?

2002-03-05 Thread Mike Eheler
argument to the end of that line: #!/usr/bin/php -q -- Aaron Gould [EMAIL PROTECTED] Web Developer - Original Message - From: Mike Eheler [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, March 05, 2002 3:43 PM Subject: [PHP] #!/usr/bin/php in output? Having

Re: [PHP] #!/usr/bin/php in output?

2002-03-05 Thread Mike Eheler
. Mike Anas Mughal wrote: Why do you have #!/usr/bin/php in your script?! You are running it thru the webserver. You shouldn't need that line. --- Mike Eheler [EMAIL PROTECTED] wrote: Having a bit of a weird problem with using PHP as CGI. The problem is this.. the output is returning

[PHP] Re: Basic help for radio buttons needed

2002-03-05 Thread Mike Eheler
First, change your form tag to: form method=post action=adminphp Post's are better, and to be standard-compliant it should be defined lower-case Then in adminphp, just to see what is being returned, do: pre? print_r($_POST); ?/pre Replace $_POST with $HTTP_POST_VARS if you're using a version

Re: [PHP] timestamp iin MySQL not compatible to the one in PHP???

2002-03-05 Thread Mike Eheler
The long way, but it will help in the understanding of it: $timestamp = 20020305211704; $year = substr($timestamp, 0, 4); $month = substr($timestamp, 4, 2); $day = substr($timestamp, 6, 2); $hour = substr($timestamp, 8, 2); $minute = substr($timestamp, 10, 2); $second = substr($timestamp, 12,

[PHP] Re: Problems with date function

2002-02-01 Thread Mike Eheler
? echo date(m d Y,strtotime(odbc_result($resultado,'fechaasignacion')));? date accepts unix timestamps, not strings, so you have to convert that string to a unix time with strtotime. Mike Jorge Arechiga wrote: Hi everybody I hope someone can help me in an issue on where i've been

[PHP] getting a list of all php functions

2002-02-01 Thread Mike Eheler
Okay, my goal is to compile an array of *all* functions currently defined and available in PHP 4.1.1. That's a simple task if all I want is functions for the extensions I chose to compile into PHP (get_defined_functions()), but what about the other ones? Is there a place somewhere that has a

Re: [PHP] getting a list of all php functions

2002-02-01 Thread Mike Eheler
That'll do! Thanks! Mike Jason Wong wrote: On Saturday 02 February 2002 02:29, Mike Eheler wrote: Okay, my goal is to compile an array of *all* functions currently defined and available in PHP 4.1.1. That's a simple task if all I want is functions for the extensions I chose to compile

[PHP] Re: Email Attachment

2002-02-01 Thread Mike Eheler
would be http://phpclasses.upperdesign.com/ Mike Eheler SearchBC.com Technical Support Mauricio Sthandier wrote: Hello, I'm new in php development... I was wondering how can I attach a Word (.doc) Document in an email sent with the mail() function (if I can do it just with it). I know it has

[PHP] Reading config files

2002-01-24 Thread Mike Eheler
Hiya, Just looking for some tips on reading formatted config files. The config file is pretty strictly formatted.. here's an example: # this is a comment. any text on a line after a # should be ignored section section1 { option value; option-array { value 1; 1234; #

[PHP] Re: MySQL query question

2002-01-24 Thread Mike Eheler
Let's say you have this table, pseudo-coded: TABLE table tableid int auto_increment, value text ; You could run this query on it: insert into table values ('','value'); And the id will be auto generated. Same would apply with: inert into table (value) values ('value'); Mike Phil

[PHP] Re: RFE: $HTTP_POST_VARS = $_POST;

2002-01-24 Thread Mike Eheler
I disagree based simply on two points: a) Ideally, the $HTTP_POST/GET and $_POST/$_GET vars should be treated as read only. b) There is no good reason to mix the two. Consistancy is the ideal. If you are working on an existing project, and you have the implied need to assign values to keys

[PHP] Re: RFE: $HTTP_POST_VARS = $_POST;

2002-01-24 Thread Mike Eheler
Just a correction on that. It started as two points, then grew into 4.. I should proof read more often ;) Mike Mike Eheler wrote: I disagree based simply on two points: a) Ideally, the $HTTP_POST/GET and $_POST/$_GET vars should be treated as read only. b) There is no good reason

[PHP] Re: Speed test: mysql query vs. file_exists()

2002-01-24 Thread Mike Eheler
That would probably give you more control over the data.. however is not really an ideal solution. Also, if you want speed.. go with the file method. That's how I'd do it, anyhow. Mike Qartis wrote: I'm running a logs system where log entries are .log files with filenames like 03012002.log

[PHP] Re: wierd function behavior within classes.. Bug?

2002-01-24 Thread Mike Eheler
PHP doesn't support that. Dunno if it plans to, either. There are workarounds.. can't remember exactly how it's done, but I think I saw it on phpbuilder.com in a tutorial somewhere. Mike Marc Swanson wrote: I'm not sure if this is a known feature in php.. but the following code will

[PHP] Re: Feature Suggestion

2002-01-18 Thread Mike Eheler
://sourceforge.net/projects/toca Ajudei? Salvei? Que tal um presentinho? http://www.submarino.com.br/wishlistclient.asp?wlid=664176742884 Mike Eheler [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... If this is the wrong place for it, please point me to the rig

[PHP] Feature Suggestion

2002-01-17 Thread Mike Eheler
If this is the wrong place for it, please point me to the right place. This is real small, though.. I'd like to see a shorthand for defining arrays.. for example $ucase_alphabet = array(['A'..'Z']); (creates an array of all alphabet characters, uppercase) $numeric = array([1..100]); Or

[PHP] Compiling PHP with imap recode support

2002-01-15 Thread Mike Eheler
I get this error when compiling php with ./configure --with-imap=../imap-2001a --with-record Any ideas on a workaround for this? /web/src/imap-2001a/c-client/libc-client.a(misc.o): In function `hash_lookup': /web/src/imap-2001a/c-client/misc.c:311: multiple definition of `hash_lookup'

[PHP] Re: Compiling PHP with imap recode support

2002-01-15 Thread Mike Eheler
Of course by --with-record I meant --with-recode Mike Mike Eheler wrote: I get this error when compiling php with ./configure --with-imap=../imap-2001a --with-record Any ideas on a workaround for this? /web/src/imap-2001a/c-client/libc-client.a(misc.o): In function `hash_lookup

[PHP] Limiting CPU usage/time of spawned processes

2002-01-09 Thread Mike Eheler
Hi There, Okay, I have a server that allows a couple hundred virtual hosts that we have run websites as we are a hosting company. Recently one of our customers decided to spawn lynx through PHP. The process was running at 80% cpu for over 400 minutes, and it appears that Apache's RLimitCPU

[PHP] Re: PHP vs. ASP

2002-01-09 Thread Mike Eheler
Well being a former ASP programmer and a current PHP programmer I think I can help you there. The key point is ease of use. PHP provides far more functionality than ASP (try finding a function to print out the date in ASP.. yeah, I thought so), while at the same time giving you access to

[PHP] PHP 4.1 crypt()

2002-01-08 Thread Mike Eheler
Is there any way to force PHP 4.1's crypt to generate crypt's with 2-letter salts? We've written some apps that do things the hack way -- if (crypt($pass,substr($pass,0,2)) == $cryptpass) -- and changing all of them to work the extended way is a real pain the arse. That includes changing all

Re: [PHP] PHP 4.1 crypt()

2002-01-08 Thread Mike Eheler
It's too late for that. And I don't believe that the system's crypt() function just magically changed at exactly the same time we upgraded to PHP 4.1 Mike Patrik Wallstrom wrote: On Tue, 8 Jan 2002, Mike Eheler wrote: Is there any way to force PHP 4.1's crypt to generate crypt's with 2

Re: [PHP] PHP 4.1 crypt()

2002-01-08 Thread Mike Eheler
help! I'll see what I can do. Mike Patrik Wallstrom wrote: On Tue, 8 Jan 2002, Mike Eheler wrote: It's too late for that. And I don't believe that the system's crypt() function just magically changed at exactly the same time we upgraded to PHP 4.1 According to the crypt() man page, crypt

[PHP] Re: Date

2002-01-08 Thread Mike Eheler
echo date('m/d/Y', strtotime('September 1, 2002')); http://www.php.net/manual/en/function.date.php Mike Aurelio wrote: hi, how i make to catch a future date, with this formatting 09/01/2002.??? thanks, Aurélio Sabino -- PHP General Mailing List (http://www.php.net/) To

[PHP] IMP 3.0 out!

2002-01-03 Thread Mike Eheler
So is Horde 2.0. And Turba 1.0 I think Chora 1.0 is due any day, as well. Just noticed this at http://www.horde.org/ For anyone who doesn't know, Horde is an application framework built upon the PEAR style of coding. IMP is *the* webmail solution for anyone looking to provide webmail to

[PHP] Re: More on images...

2002-01-03 Thread Mike Eheler
$HTTP_SERVER_VARS['HTTP_REFERER'] or (php 4.1.x) $_SERVER['HTTP_REFERER'] Mike Matthew Walker wrote: Related to my last question about the cookies in images, is there any way to get the referrer from the calling page without passing it as an argument to the image generation script?

[PHP] An idea for a PHP tool

2002-01-03 Thread Mike Eheler
Like google has it's toolbar, why not have a PHP Manual toolbar? That would be *great*. Just type in the function name and hit go and the manual comes up. One for Moz one for IE I'm sure would be appreciated. I'd do it myself, but I have not the ability to code in C (or C++ for that

[PHP] User-friendly URI's

2002-01-03 Thread Mike Eheler
http://www.somesite.com/news/2002/01/02/keyword I've seen some sites do this with other scripting languages (maybe even PHP.. I just don't know).. I like the look of this *way* better. Anyone have any insight as to how I can make that work with an Apache 1.3.xx + PHP 4.1.x setup? news would

Re: [PHP] User-friendly URI's

2002-01-03 Thread Mike Eheler
A 404 ErrorDoc would still reply with a 404 code, which could mess up some search engines. I was thinking of the .htaccess solution, but I'm not sure if that's possible to force only certain files or perhaps all files in just a certain directory to all be application/x-httpd-php? I guess

[PHP] Re: User-friendly URI's

2002-01-03 Thread Mike Eheler
I don't want to mess with the whole site, just a file or 10, or one directory, etc. Mike Jason Murray wrote: True, but if I remember right, the hit will end up in your error_log not in your access_log. Ah. Bugger. But since this would require messing with your Apache config you could

[PHP] Re: User-friendly URI's

2002-01-03 Thread Mike Eheler
news.php and not worry about it? On Thu, 3 Jan 2002, Mike Eheler wrote: A 404 ErrorDoc would still reply with a 404 code, which could mess up some search engines. I was thinking of the .htaccess solution, but I'm not sure if that's possible to force only certain files or perhaps all files

Re: [PHP] An idea for a PHP tool

2002-01-03 Thread Mike Eheler
Through suggestions of people here is the code I produced for a bookmark: javascript:void(srch=prompt('Function Name?',''));if(srch) {self.location.href='http://download.php.net/search.php?pattern=' +srch+ 'show=quickref';}; Of course that should all go on one line. That is a good hack for

[PHP] Re: Select box won't display in Netscape 4.xx

2001-12-31 Thread Mike Eheler
This happens when a select tag is not within a form block in netscape 4.. if the select isn't meant to be part of a form, and is just for navigation (javascript onchange or whatever), then just do formselect.../select/form Mike Edwin Boersma wrote: Hi, I'm developing a website for

[PHP] Re: web mail clients?

2001-12-31 Thread Mike Eheler
Depends what you want to do with it. If you want it to grab messages from a POP server, and download them to your local machine, then some sort of cyclic folders database structure would help: int auto_inc folderid int default(0) parentid (= 0 if root, otherwise id of parent folder) str

[PHP] Re: How to strip off all html-comments

2001-12-31 Thread Mike Eheler
Checkout the preg_replace page in the PHP manual (at http://www.php.net/manual/en). There is an example there on removing all HTML tags. You can just modify it to work on just comments. Mike Martin wrote: Hello! How can I easily strip off all html-comments (! Comment ) from a string?

[PHP] Re: Exec as user

2001-12-27 Thread Mike Eheler
There's no way that I have found to actually execute a script as a specified user, however: ?php passthru('whoami'); ? Should tell you what user the web server is running as. Mike Charlesk wrote: I have been looking through the docs and found no help on either finding which user the

[PHP] Re: php code beautifier

2001-12-27 Thread Mike Eheler
I'm working php script that would perform such a feat. I'll post news on php.general when/if it's finished. Mike George Nicolae wrote: do you know if exist a php code beautifier for win32? pls tell me the address. -- Best regards, George Nicolae IT Manager ___

Re: [PHP] Exec as user

2001-12-27 Thread Mike Eheler
Try doing this ? echo 'pre'; print_r(array($HTTP_SERVER_VARS,$HTTP_ENV_VARS)); echo '/pre'; ? And see if the information you want is in there anywhere. Mike I don't believe that the system variables are available to php. I work on *nix mostly, but I have a windows machine at

[PHP] Re: PHP 4.1.0 patch for Quanta IDE, The Sequel

2001-12-20 Thread Mike Eheler
of Kate allow you to define highlighting rules in XML files, and the highlighting instructions are set up at run-time rather than compile time. Maybe over the XMas break I'll be able to finish it up. J Mike Eheler wrote: http://sourceforge.net/tracker/index.php?func=detailaid

Re: [PHP] Re: PHP 4.1.0 patch for Quanta IDE, The Sequel

2001-12-20 Thread Mike Eheler
to code using MySQL_Connect().. people driven to PHP from ASP might code like this when they start. Mike Jack Dempsey wrote: really? ? $THIS_IS_A_VARIABLE=1; $this_is_a_variable=2; echo $THIS_IS_A_VARIABLE\n; echo $this_is_a_variable\n; ? seems sensitive to me... Mike Eheler wrote

[PHP] Re: undefined function: ftp_connect()

2001-12-20 Thread Mike Eheler
You need to compile with ftp support. --with-ftp is not the right command, it should be --enable-ftp Mike Sam Schenkman-Moore wrote: I've compiled php 4.0.6 on Darwin as CGI. --with-ftp shows up in the php configuration display but I still get this message: undefined function:

[PHP] Quanta IDE - PHP Highlighing for 4.0.1

2001-12-19 Thread Mike Eheler
Attached is a text file that will update Quanta IDE 2.0.1 syntax highlighting for PHP. Simply use your favourite text edit quanta/kwrite/highlight.cpp in your quanta-2.0.1 source tree, and paste the text from this attached file overtop of the phpKeywords and phpTypes variables. If anyone

[PHP] Re: Quanta IDE - PHP Highlighing for 4.0.1

2001-12-19 Thread Mike Eheler
Shoot.. it didn't attach. That's probably a good thing. I'll put together a diff patch and put it somewhere for download. Mike Mike Eheler wrote: Attached is a text file that will update Quanta IDE 2.0.1 syntax highlighting for PHP. Simply use your favourite text edit quanta/kwrite

[PHP] PHP 4.1.0 patch for Quanta IDE, The Sequel

2001-12-19 Thread Mike Eheler
http://sourceforge.net/tracker/index.php?func=detailaid=495239group_id=4113atid=304113 Download the attached file, and run patch -p1 -i quanta-2.0.1-php-4.1.0.diff That will patch your source tree.. then just configure, make, install. I've actually tested this one, so go nuts people. :)

[PHP] Re: Slash problem

2001-12-19 Thread Mike Eheler
This is done because magic_quotes_gpc is turned on. This makes it possible to just insert submitted data into a MySQL database, without preparing it first. You can turn it off if you have access to the server config, or.. you can do this: if (get_magic_quotes_gpc()) { foreach

Re: [PHP] Slash problem

2001-12-19 Thread Mike Eheler
I disagree. That doesn't affect whether or not GPC variables are addslashes()'d. Mike Bas Van Rooijen wrote: set_magic_quotes_runtime (false) bvr. On Thu, 20 Dec 2001 09:43:28 +1100, Martin Towell wrote: either set magic_quotes_gpc to off in you .ini file - or use stripslashes()

[PHP] Working with designers...

2001-12-18 Thread Mike Eheler
Hi There, I'm looking for some community feedback on being a coder working with designers. Techniques that work that allow my php-inept page/graphic designer comrade make changes to the layout of the page without destroying my code, or requiring me to make any changes whatsoever. Or what is

[PHP] Re: sql password

2001-12-18 Thread Mike Eheler
yeah if you just installed, root doesn't have a password.. so you need to not specify -p (this tells the server to try and authenticate with an empty password, as opposed to attempting to authenticate with no password.. there is a difference): mysqladmin -u root password mypassword Mike

Re: [PHP] Working with designers...

2001-12-18 Thread Mike Eheler
They sound like good ideas, with one quisp.. the sites are currently being designed in *shudder* Dreamweaver. They absolutely refuse to chop files up into header/footer includes, and they want to be able to do all their colour customisation through their beloved .css files. Mike Jimtronic

Re: [PHP] Working with designers...

2001-12-18 Thread Mike Eheler
LOL. Use Netscape 4. Now there's a condtradiction you don't hear every day. Mike Jim Lucas wrote: hope you don't plan to use that example table in netscape 4.x - Original Message - From: Mark [EMAIL PROTECTED] To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, December

[PHP] Re: streaming media via php

2001-12-17 Thread Mike Eheler
Try re-writing your script to accept the url as such: http://server/content.php/media/file.asf Mike Stephen Vandyke wrote: Hello PHP people :) I have a tough one here, I wrote a content script that plays media files, but I can't seem to get things to actually buffer and stream as they

[PHP] Filenames with spaces in them

2001-12-14 Thread Mike Eheler
Consider this code for traversing through a directory structure: ?php function traverse($path='.') { $path = realpath($path); $dir = opendir($path); echo \nDirectory : $path\n; echo str_pad('',76,'-').\n; while (false !== ($file = readdir($dir))) { if (is_dir($file) $file

[PHP] Re: Filenames with spaces in them

2001-12-14 Thread Mike Eheler
I'll note that the erroneous command is the is_dir($file).. this causes the problem. Mike Mike Eheler wrote: Consider this code for traversing through a directory structure: ?php function traverse($path='.') { $path = realpath($path); $dir = opendir($path); echo \nDirectory

[PHP] Re: Filenames with spaces in them

2001-12-14 Thread Mike Eheler
Ahh forget it .. I figured it out change to is_dir($path/$file).. *smack* ignore this altogether mike Mike Eheler wrote: Consider this code for traversing through a directory structure: ?php function traverse($path='.') { $path = realpath($path); $dir = opendir($path); echo

Re: [PHP] Performance

2001-12-13 Thread Mike Eheler
Yes! Please release some of these results. I am *very* interested. I have been coding using the method you demonstrate (terminating PHP any time possible, and rarely, if ever, using echo and print). I would love to know how much, if any, difference it makes. Mike Jim Lucas wrote: the site

[PHP] Re: ordered alpabeticaly list

2001-12-13 Thread Mike Eheler
If I understand you correctly, you want to put a separator when the letter changes. Try this: $result = mysql_query('select name from people order by name'); $lastletter = ''; while ($data = mysql_fetch_array($result)) { $curletter = strtolower(substr($data['name'],0,1)); if

Re: [PHP] Performance

2001-12-13 Thread Mike Eheler
The problem with that is giving feedback to the user. If you're busy generating a string to display to the user and the mysql server is running slow, or for whatever reason, the user is looking at a blank page until the process is completed entirely, then they have all the data dumped on them

[PHP] Re: very urgent assistance

2001-12-13 Thread Mike Eheler
http://home.rica.net/alphae/419coal/ Mike Adewale.Johnson wrote: Dr.Adewale.Johnson. 16 Kingsway Road Ikoyi, Lagos Nigeria.. [EMAIL PROTECTED] 6th, December , 2001. Sir, Request for Urgent Business Relationship. First I must solicit your confidence in this transaction.

[PHP] Re: test

2001-12-12 Thread Mike Eheler
Syntax error Andrey Hristov wrote: test -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]

[PHP] Re: CDBaby.com

2001-12-12 Thread Mike Eheler
I'm not sure what to make of this? Is it spam? Is it an acclaim? What is it? Mike Richard Lynch wrote: As you may know, I run a tiny record label No Genre in Chicago. Ulele's Seed CD released last week on No Genre has been selected as a Featured CD on the FRONT PAGE of http://cdbaby.com/

[PHP] Re: PHP 4.x on Apache 2.x?

2001-12-12 Thread Mike Eheler
You can build php as an apache2 DSO by using --with-apxs2=/path/to/apache/bin/apxs make sure you have built apache with the 'so' module enabled. mike Jon Niola wrote: With all the architectural changes to the Apache platform for 2.x, will PHP 4.x run as a module still, or is that TBD?

[PHP] Re: Searching for a new provider

2001-12-12 Thread Mike Eheler
What's a speicherplatz? Mike Andy wrote: Hi there, I am searching for a provider who fullfills those criterias and does not cost a fortune: - PHP = 4.06 bzw. PHP 4.x mit GDLibrary ab 2.0 - GDLibrary = 2.0 - PHP installed as module - mind 5 Subdomains - mind 100 MB

[PHP] PHP 4.1.0 actually out this time -- questions about zend products

2001-12-11 Thread Mike Eheler
Does anyone here subscribe to the Zend developer's suite? We have the optimizer and debugger installed with a 4.0.5 installation and are looking into upgrading to 4.1.0 but being a production machine, we don't want to do anything that would jeopardize the stability of the machine. Has anyone

[PHP] Re: deleting file contents

2001-12-11 Thread Mike Eheler
$fp = fopen('/var/mail/myaccount','w'); fwrite($fp,''); fclose($fp); that could work. I was going to suggest doing: unlink('/var/mail/myaccount'); touch('/var/mail/myaccount'); But I assume that since you're against deleting it, then there must be some sort of permissions in place that you

[PHP] Re: File Name and Path

2001-12-11 Thread Mike Eheler
Do a variable dump and see if any variables have that value: pre?php print_r(get_defined_vars()) ?/pre Mike Pong-Tc wrote: Hello Listers I have a question on how to get the full path of source file. I have a form like this: form enctype=multipart/form-data action=myupload.php

[PHP] Re: Emailing attachments upload to a form

2001-12-11 Thread Mike Eheler
Yeah.. code to divide the message into multiple parts, base64_encode the file, and attach it that way. I suggest looking for some kind of Email class that can do that for you. Try http://phpclasses.upperdesign.net/ Mike Ben Clumeck wrote: When I use the script to upload an attachment to my

[PHP] Re: PHP 4.1.0 actually out this time -- questions about zend products

2001-12-11 Thread Mike Eheler
Excellent. Keep me up to date on your findings. Our license only allows for the software to be used on one machine so I can't build a test machine. :/ Mike J Smith wrote: Seconds after I write this, I see on zend.com that the Optimizer has a new version for 4.1.0. Don't see anything about

[PHP] Re: replacing Carriage Return

2001-12-11 Thread Mike Eheler
Could this be solved in any way by using nl2br()? Mike Phantom wrote: I solicit information from a text field and save the data in mysql to be pulled out later and displayed as text on a webpage. However, Carrage Returns in the text field do not appear in the webpage text. With

[PHP] Re: Date

2001-12-11 Thread Mike Eheler
If you only have the text directory listing and don't have access to the file to do a filetime() call on, you can try this: $modified = stat('header.php'); echo 'Last Modified: ' . date('F j, Y, g:i a', strtotime(substr($modified[9],35,12))); Tha's a really long way around it, and a much

[PHP] Re: [ADMIN] spam protection for lists.php.net lists

2001-12-11 Thread Mike Eheler
I was a bit surprised by it when I posted to the newsgroup earlier, but I think it's a great idea. Mike Jim Winstead wrote: as some of you may have noticed over the last few days, a new method of spam protection has been implemented on lists.php.net. if you post to one of the

Re: [PHP] PHP XML

2001-12-07 Thread Mike Eheler
You could also do it like: ?= '?xml version=1.0 encoding=UTF-8?' ? Mike Steve Haemelinck wrote: Hi Guys I am developing with PHP and XML. Now I experience some problem with the processing instructions of xml (?xml version=1.0 encoding=UTF-8?) which causes PHP to return a parsing error. This

Re: [PHP] Using HEADER to redirect

2001-12-06 Thread Mike Eheler
More than likely not. Putting an exit statement after a header redirect is just good practice and ensures that nothing gets executed after redirecting. Mike Don wrote: Hi, I have a PHP script that uses the following code to redirect to a page of the user's choice: header(Location:

Re: [PHP] Creating multidimensional array dynamically

2001-12-06 Thread Mike Eheler
$result = mysql_query(select NAME,ATTEMPTS,COMPLETIONS,YARDS,TD,INT from players where pos = 'QB'); // or whatever it takes to get just qb's while ($data = mysql_fetch_array($result)) { foreach ($data as $key = $value) { // I've noticed that $data stores numeric and text keys, this

Re: [PHP] Creating multidimensional array dynamically

2001-12-06 Thread Mike Eheler
Oops.. my bad $quarterbacks[$data['NAME']][$key] = $value; Mike Mike Eheler wrote: $result = mysql_query(select NAME,ATTEMPTS,COMPLETIONS,YARDS,TD,INT from players where pos = 'QB'); // or whatever it takes to get just qb's while ($data = mysql_fetch_array($result)) { foreach ($data

Re: [PHP] multi-dimensional array

2001-12-05 Thread Mike Eheler
Should work. Why not give it a try, and let the good people of this list know? Mike Jordan wrote: Is there any way to pass a multi-dimenstional through a url. something like /cart.exe?item[1][1]=3 just curious. -Jordan -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] multi-dimensional array

2001-12-05 Thread Mike Eheler
Sorry, I sent that too soon.. here's my test results: http://localhost/test.php?var[test][5][]=test [HTTP_GET_VARS] = Array ( [var] = Array ( [test] = Array ( [5] = Array

Re: [PHP] Compare strings

2001-12-05 Thread Mike Eheler
if ($str1 == $str2) ? If that's not it, check http://download.php.net/manual/en/ref.strings.php Mike Mainolfi, Joe wrote: Is there another way to compare the values of 2 strings other than strcmp(). This function is not consistent with its results and is causing so many headaches. I am

Re: [PHP] RE: MySQL ORDER BY or PHP Sort?

2001-12-03 Thread Mike Eheler
Don't forget LIMIT 0,25 (I want to select about 25 rows from a table...) SELECT * FROM mytable ORDER BY series,price LIMIT 0,25 Mike Rick Emery wrote: SELECT * FROM mytable ORDER BY series,price; -Original Message- From: René Fournier [mailto:[EMAIL PROTECTED]] Sent: Monday,

  1   2   >