[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

[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] 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] 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] 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] 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: 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] 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] 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] 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] 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] 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] 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] 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: 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] #!/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,

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

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] parsing a string

2001-10-18 Thread Mike Eheler
Beyond that, why not keep it conforming to HTML, and use an IMG tag, for example: This is some text img src=name.jpg alt=Alt Text processat=server. That way if you need to view the page as-is in a browser or whatever, it'd still look fine.. go grab yourself some good free html parser code,

Re: [PHP] Newbie in Need of Help!

2001-10-23 Thread Mike Eheler
=WASWashington/option /select Then in your PHP code you can do it like this: ?php foreach ($HTTP_POST_VARS['pick'] as $key = $value) { echo $value.'br /'; } ? or, if you prefer more traditional syntax: ?php for ($i=0; $icount($pick); $i++) { echo $pick[$i].'br /'; } ? Mike

Re: [PHP] Can PHP do what this javascript does...

2001-10-24 Thread Mike Eheler
There's a really long method of doing it that would work, but would involve server-side browser detection, and a database containing a list of browsers that support print shortcuts. Stick with the JS. Mike [EMAIL PROTECTED] wrote: iTo print/i: a href=javascript:if (window.print != null) {

Re: [PHP] conjob etc.

2001-10-25 Thread Mike Eheler
1. Just re-compile with the same options as before, just without --with-apxs or --with-apache (however you did it before). Run make all install and a php binary should be installed in $PREFIX/bin (default: /usr/local/bin). Then to use it to run shell scripts, put #!/usr/local/bin/php -q at

Re: [PHP] SIMPLE, secure user authentication

2001-10-25 Thread Mike Eheler
or something I overlooked. Hope this helps. Mike Eheler Software Developer - Web Division SearchBC.com René Fournier wrote: I'm looking for a good (simple) tutorial on user authentication. I want to create a login system that's secure, but I don't need all the features that PHPBuilder's A Complete

Re: [PHP] MKDIR Permission Denied

2001-10-25 Thread Mike Eheler
a) check to see if the user that apache is running as has access to the directory you're trying to write to. b) try removing the quotes around 0775 Mike Jeff Gannaway wrote: ? $GalleryPHPName = Pins; mkdir (../$GalleryPHPName, 0775); ? Results in... MkDir failed (Permission denied) Any

Re: [PHP] www.php.net offline for a bit

2001-10-25 Thread Mike Eheler
Don't forget www.ca.php.net, for us Canadian PHP junkies. Mike Rasmus Lerdorf wrote: Some servers are being moved around. Use a mirror. Here are some for you to try: us.php.net us2.php.net rack1.php.net uk.php.net dk.php.net dk2.php.net Any one of those will have a full mirror listing

Re: [PHP] while() looping over query results twice?

2001-10-25 Thread Mike Eheler
Trying using mysql_fetch_array, and using the field names. This is the recommended behaviour in PHP4: $result = mysql_query($myQuery) //$myQuery gets defined earlier $resultCount = mysql_num_rows($result); $companyID = array(); while($query_data =

Re: [PHP] What's the difference between mail() in PHP and sendmail?

2001-10-26 Thread Mike Eheler
Nothing, really. I believe PHP's mail() actually calls sendmail directly (or whatever you have configured in php.ini). Also Mike Web user wrote: What's the difference between mail() in PHP and sendmail? Thanks! Mike -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

Re: [PHP] editor for working with php

2001-10-26 Thread Mike Eheler
I've always been partial to TextPad, myself. http://www.textpad.com/ You gotta download the PHP4 Syntax Definition file for syntax hilighting. Mike Pavel Jartsev wrote: Ray Todd Stevens wrote: I ahve been using go-live (4.0) to edit pages containing php scripts. this is not really

Re: [PHP] Best [non-PHP] way to redirect a browser

2001-10-26 Thread Mike Eheler
Before any of your HTML code, put in: header('Location: index.php'); If anything has been sent to the browser yet (through echo/print/etc, or through code outside of the ?php ? tags), though, you will get an error. Mike René Fournier wrote: This is really I guess a non-PHP question, so

[Fwd: [PHP] Best [non-PHP] way to redirect a browser]

2001-10-26 Thread Mike Eheler
Right. My bad. Heh, I have an excuse.. it's before noon here ;) Definitely go with the meta approach, then: Example: html head meta http-equiv=refresh content=0; url=index.php / /head body a href=index.phpClick here to enter the site/a /body /html Mike this wouldn't work from an

Re: [PHP] Re: Best [non-PHP] way to redirect a browser

2001-10-26 Thread Mike Eheler
Actually beyond that, for #1, if you server allows you to create .htaccess files, simply create a .htaccess file in your root directory, and put this in it: DirectoryIndex index.php Mike Mike Frazer wrote: Two ways: #1 - If you have server admin access, just add to the default page list

Re: [PHP] Advanced. Trapped in architecture.

2001-10-26 Thread Mike Eheler
I know in ASP it's as easy as doing: Response.Clear Response.Redirect But PHP doesn't seem to have that feature. My best suggestion would be to try and re-work your code so that the redirect can be detected *before* any html code is written to the browser. Mike Andy wrote: Hi there, I

Re: [PHP] Excel to MySQL

2001-10-27 Thread Mike Eheler
Yet another good way (if you have Windows) is to grab a copy of the MSDE (comes with most distros of Office, on the CD.. you'll hafta search for it), which is essentially a stripped down version of Microsoft SQL Server. Install that, and on your start menu somewhere (it'll say like MSDE or

Re: [PHP] Getting arrays out of HTTP_POST_VARS

2001-10-27 Thread Mike Eheler
$HTTP_POST_VARS['middlecasts']['key']['subkey']['wecould']['go_on']['forver']; ;) Mike Ian Evans wrote: My mind is going blank here and I feel like I'm missing something basic. I have an insert form for movie profiles that takes cast members, writers and directors and inserts them into

Re: [PHP] Getting arrays out of HTTP_POST_VARS

2001-10-27 Thread Mike Eheler
: $HTTP_POST_VARS[key1][subkey]; The output should be: key1/subkey: Array[subkey] So what you want to do is: echo 'key1/subkey: ' . $HTTP_POST_VARS['key1']['subkey']; Which will get you the desired output of: key1/subkey: Hello World! Mike Mike Eheler wrote: $HTTP_POST_VARS['middlecasts

Re: [PHP] HELP: Re: Table comments

2001-10-27 Thread Mike Eheler
?php $db = mysql_connect('localhost','user','password'); mysql_select_db('database', $db); $sql = 'SHOW TABLE STATUS LIKE table_name'; $result = mysql_query($sql); // Only returning 1 row, but I put it in a while() loop in case the result is empty // Then I don't get any

Re: NOPE: [PHP] HELP: Re: Table comments

2001-10-27 Thread Mike Eheler
That's because you're not selecting a database. You need to either put the database name in mysql_select_db, or change the query to: SHOW TABLE STATUS FROM databasename LIKE 'table_name'; so change the line to: $sql = SHOW TABLE STATUS FROM db_name LIKE 'bookmark_unit4'; Mike jtjohnston

Re: [PHP] How Do I Re-Compile PHP4

2001-10-28 Thread Mike Eheler
I'm not sure if you can add functionality using ./config.status, but inside that file is the command line you used to originally compile it, so what you can do is copy that ./configure line, then add your --enable-ftp, and go. Might wanna run make clean first (not distclean!) Mike Jeff

Re: [PHP] Where are lists of PHP's predefined constants and keywords?

2001-10-31 Thread Mike Eheler
Don't forget true, false, and null. :) A good place to look might be to grab a syntax definition file for some sort of popular editor (like textpad), and just go through it. Not the best way, for sure. The best place to look easily is http://www.php.net/manual/en/ Mike Johnson, Kirk wrote:

Re: [PHP] Question about MySQL, ORDER

2001-11-01 Thread Mike Eheler
SELECT Main.title, Replies.date FROM (Main LEFT JOIN Replies ON Main.id = Replies.main_id) ORDER BY Replies.date That should do it. Mike BlueBytes wrote: http://paa.fragland.net/hosted/myquestion/ here you find my question, thx -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] javascript to php ????

2001-11-14 Thread Mike Eheler
No. You have to realise that JavaScript is client side, and PHP is server side, so -- apart from inserting those javascript values into a form and submitting it using code -- PHP and JavaScript cannot interact. Mike fitiux wrote: Hi =) is it possible to pass a javascript array to php ???

Re: [PHP] silly question

2001-11-14 Thread Mike Eheler
I assume that you have input type=text name=field1 value=?= $field1 ? / or some variation thereof. In that case, just set $field1 = after you save the record, or remove the value= statement altogether. Mike Rodrigo Peres wrote: Hi list, I have PHP code to insert the result of a form into

  1   2   >