Re: [PHP] thanks

2001-12-15 Thread Michael Sims
At 07:56 PM 12/15/2001 +, [EMAIL PROTECTED] wrote: been using php for a few months now, just wanted to say a big THANK YOU to all the developers for such a wonderful language, thanks guys! Well, I have to second that. If it weren't for PHP I probably would have never gotten into web

Re: [PHP] sytax to remove specifc item in string-indexed array???

2001-12-16 Thread Michael Sims
At 05:53 PM 12/14/2001 +1100, Vincent Ma wrote: Hi everyone: I would like to know how to specific item in array. For the add new item to array, we know just : $array += array($key = $value); How to remove specific item in array??? unset(array[specific_item_index]); ...has always

Re: [PHP] Why don't ...

2001-12-16 Thread Michael Sims
At 09:14 AM 12/16/2001 -0500, Yoel Benitez Fonseca wrote: Hi! The following code fragment tries to read a sequence of digits from a file but it doesn't work, only the first character is read, Which is my error?. $str = ; while( ($c = fgetc($this-m_file)) ereg([0-9],

Re: [PHP] addslash/stripslashes

2001-12-18 Thread Michael Sims
to pass them as an URL parameter... http://www.php.net/manual/en/function.header.php - Michael Sims mhsims at midsouth dot rr dot com The Web site you seek Can not be located but Countless more exist

Re: [PHP] Help with Sessions - Should be easy =]

2001-12-20 Thread Michael Sims
At 01:53 AM 12/21/2001 +1100, Tomasz Jachimczak wrote: I am retreiving user information from a database after verification, and would like to place certain feilds into a session variable for easy access/retreival. I can get the information out of the database, but cannot place it into any sort of

RE: [PHP] How can I have CVS ?

2001-12-20 Thread Michael Sims
At 10:19 AM 12/20/2001 -0800, Nathan Cassano wrote: And the answer is... WinCVS Check it our at. http://www.cvsgui.org/ And don't forget TortoiseCVS. http://www.cvsgui.org/TortoiseCVS/index.shtml -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED]

Re: [PHP] Mommy, is it true that...?

2001-12-20 Thread Michael Sims
At 03:39 AM 12/21/2001 +0200, Bogdan Stancescu wrote: Hi everybody! Two things I consider urban myths about PHP (plus MySQL) - please let me know what you think of these: 1. The evil global variables [...] My question to you guys is this: does anybody know of a real example of reasonably

Re: [PHP] Re: Mommy, is it true that...?

2001-12-20 Thread Michael Sims
At 06:03 PM 12/20/2001 -0800, Philip Hallstrom wrote: I've done something similar in the past just for kicks, and I got the same result you did (i.e. an error). I believe this is because mysql_query() expects ONE query at a time and will break if you send two or more. I could be

Re: [PHP] Re: Mommy, is it true that...?

2001-12-20 Thread Michael Sims
At 04:26 AM 12/21/2001 +0200, Bogdan Stancescu wrote: Philip Hallstrom wrote: A definite possibility, but it does depend on the hacker in question knowing exactly how your script is written... True, but in a shared hosting environment this is very likely. ...not to mention open source

Re: [PHP] Re: Mommy, is it true that...?

2001-12-20 Thread Michael Sims
At 04:51 AM 12/21/2001 +0200, Bogdan Stancescu wrote: True, but in a shared hosting environment this is very likely. ...not to mention open source code. Oh yeah. Guess I had a mental lapse there. If you are using, say, a script downloaded from freshmeat.net and it happens to be

Re: [PHP] Re: Mommy, is it true that...?

2001-12-20 Thread Michael Sims
At 11:28 PM 12/20/2001 -0500, Billy Harvey wrote: Freshmeat.net is a very popular database of linux software and includes a wide variety of PHP scripts. My point was that if you downloaded an insecure script from such a popular site then you are asking for trouble because chances are

Re: [PHP] Beginner question?

2001-12-20 Thread Michael Sims
At 12:13 AM 12/21/2001 -0500, jtjohnston wrote: This seems newbie. So what am I doing wrong? I want to print the contents of the file. I get resource id #1 instead. Do I need to add a header or what? ?php //$fp = fopen (C:/Program Files/localhost/info.txt, r); //$fp = fopen

Re: [PHP] Beginner question?

2001-12-21 Thread Michael Sims
At 01:59 AM 12/21/2001 -0500, jtjohnston wrote: Michael, $fp = fopen (./users.txt, r); while (!feof ($fp)) { $buffer = fgets($fp, 4096); echo $buffer; } fclose($fp); Ok. But $buffer is not an array, is it? Why/what is 4096? What is !feof ? Don't you have access to the WWW? You need to

Re: [PHP] Function definition: how to make default argument an empty array?

2001-12-22 Thread Michael Sims
At 01:17 PM 12/22/2001 +0100, Michael Jurgens wrote: I'm now looking for a way to have the second (optional) argument be an array of strings. I can't get it to work though... In pseudo-code: function makeyogurt ($flavour, $type = 'EMPTY ARRAY') { } Does this work? function makeyogurt

Re: [PHP] strtoupper and HTML entities

2001-12-22 Thread Michael Sims
At 11:32 PM 12/22/2001 +0100, mweb wrote: Hello, I know I can convert a string to all uppercases with the strtoupper() function. However, what if the original string contains HTML entities? EXAMPLE: original string = funkstouml;rung Try this: ? function htmltoupper($str) { $trans =

Re: [PHP] Why Can't I Get PHP to Work with MySQL??

2001-12-23 Thread Michael Sims
At 12:16 PM 12/23/2001 -0800, Ben Ocean wrote: Hi; I get this error when I try to restart Apache: Syntax error on line 236 of /etc/httpd/conf/httpd.conf: Cannot load /etc/httpd/libexec/libphp4.so into server: /etc/httpd/libexec/libphp4.so The above file does, of course, exist. I'm running RH71

Re: [PHP] If/else conditional statement ...

2001-12-23 Thread Michael Sims
At 01:11 PM 12/23/2001 -0700, Robert Dyke wrote: Hello: In ASP I can write a Conditional statement like this: % If $varA == True Then % Straight HTML in here that only displays if $varA == True % Else % Straight HTML in here that only displays if $varA != True % End if % Translating this to

Re: [PHP] One good thing about $_SESSION

2001-12-26 Thread Michael Sims
At 11:59 AM 12/26/2001 -0200, Julio Nobrega Trabalhando wrote: Is that while porting a script to PHP 4.1.0, where I used to check: if (session_is_registered('del_power') $del_power == 1) { // del stuff } Because $del_power could be registered as 1 or 0, now I can do: if

Re: [PHP] Warning: Cannot send session cookie

2001-12-26 Thread Michael Sims
At 08:54 PM 12/26/2001 -0500, David Jackson wrote: I'm trying use the script( and html page) to below to set session variables, but keep getting the follow errors: [...] Browser Error Messages - Warning: Cannot send session cookie - headers already sent by

Re: [PHP] Testing: DON'T Ignore This Message

2001-12-31 Thread Michael Sims
At 05:07 PM 12/31/2001 +0200, you wrote: It seems to work. I'll use this thread to ask an admin question: why doesn't the mailing list daemon add a reply-to address similar to the one I manually added here? Wouldn't it be more comfortable for all parties concerned? I agree. It's a pain to have

Re: [PHP] Testing: DON'T Ignore This Message

2001-12-31 Thread Michael Sims
At 11:45 PM 12/31/2001 +0100, B. van Ouwerkerk wrote: u.. I can give you one good reason.. Out Of the Office replies don't get to the list.. M$ Lookout is specilized in bombing lists with those stupid messages. Seems a complete list with reasons why you shouldn't set reply to to the

Re: [PHP] What the hell?!?!

2001-12-31 Thread Michael Sims
At 10:10 PM 12/31/2001 +, LaserJetter wrote: Also, apart from my coding being rubbish and causing lots of errors, does anyone know of any reason why an error log file would grow to such a huge size? Why don't you actually look at the error log and see what it contains? -- PHP General

Re: [PHP] How to clear a populated array

2002-01-04 Thread Michael Sims
I've got an array $Erros[] and I would like to be able to clear it entirely. Is there any builtin function that acomplishes that? Why not: unset($Errors); ?? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL

Re: [PHP] regular expressions

2002-01-05 Thread Michael Sims
At 10:16 PM 1/5/2002 -0500, Gerard Samuel wrote: Need some help with this one. Dont know where to begin. I have content in a string and a constant that changes depending on if yourre in the root or in a directory. The purpose of the constant is to provide dynamic links. The string will have

Re: [PHP] regular expressions

2002-01-05 Thread Michael Sims
At 10:22 PM 1/5/2002 -0600, Michael Sims wrote: function insertpath($string) { return preg_replace(/(a href=\)(.*\.*\/a)/i,$1._CONSTANT.$2,$string); } ? Forgot to mention that the i at the end of the regex means to make the match case-insensitive... -- PHP General Mailing List

Re: [PHP] Zhang Session Expiration

2002-01-07 Thread Michael Sims
At 07:20 AM 1/7/2002 -0600, phantom wrote: Hey all, I am using the Zhang session method from http://www.phpbuilder.com/columns/ying2602.php3 and it works great with a mysql database. Does anyone out there know how to tell if a session is expired using this method? Yep. The expiry field

[PHP] Question about HTTP_ENV_VARS, PHP, and Apache

2002-01-15 Thread Michael Sims
This may be more of an Apache question, but I was hoping that someone here would have an idea about this. I tracked down a bug in one of my scripts that was caused by environment variable that was being registered as global without my knowledge (due to the register_globals setting). My

Re: [PHP] Question about HTTP_ENV_VARS, PHP, and Apache

2002-01-15 Thread Michael Sims
At 09:32 PM 1/15/2002 -0600, Michael Sims wrote: On both the Redhat 7.1 servers, phpinfo() reports the following environment variables: user: michaels logname: michaels [...] I'm confused as to why these variables exist. I know for a fact that Apache is running as nobody. That's what

Re: [PHP] how to check REMOTE_ADDR to see if it contains PART of an ip

2002-01-16 Thread Michael Sims
At 10:58 AM 1/16/2002 -0800, Police Trainee wrote: in a nutshell: if (150.200.250.x is within $REMOTE_ADDR){dowhatever} There are a couple of different ways to accomplish this. One is: if (strpos($REMOTE_ADDR,150.200.250.) !== false) { //do whatever } You have to be careful with

Re: [PHP] Addslashes not working correctly?

2002-01-18 Thread Michael Sims
At 10:43 AM 1/18/2002 -0600, Gonzalez, Zara E wrote: Now I am using MSSQL via freetds and since the commands for MSSQL and Sybase are basically identical as far as php is concerned, I am assuming that I have to use the sybase method to escape quotes. However, I can't seem to figure out how to

Re: [PHP] httpd.conf config options?

2002-01-18 Thread Michael Sims
At 05:19 PM 1/18/2002 -0600, Henrik Hudson wrote: When I do this: php_flag display_errors yes inside that same VirtualHost block the errors are not displayed to the screen, but still logged to the main log file. Any thoughts if I can modify it so that VirtualHost logs to the screen? First of

Re: [PHP] INSERT statement for JOINed tables

2002-01-18 Thread Michael Sims
At 01:05 PM 1/18/2002 -0500, Erik Price wrote: I was hoping someone could share with me their code for situations like this, since I'm pretty sure it's a common situation: I need to insert a record into a table files, and simultaneously insert a record into a table files_users. files_users

Re: [PHP] Re: I need help

2002-01-19 Thread Michael Sims
At 05:13 PM 1/19/2002 +, David wrote: If i\'m not wrong, you did not specify the php extensions dir in php.ini correctly, [...] pls tell me if it works, i\'ve got some oracle questions to ask u if u don\'t mind ;) LOL! Somebody needs to turn off magic_quotes_gpc on their PHP web-based

Re: [PHP] smarter code (mySQL arrays)

2002-01-21 Thread Michael Sims
At 11:12 AM 1/22/2002 +1100, Justin French wrote: Hi all, I've got into the habbit of pulling data out of a table something like this: [...] $id = $sql_myrow[id]; $date = $sql_myrow[date]; [...] Now, I reckon there must be a way of automating the task of making the $title var out of

Re: [PHP] smarter code (mySQL arrays)

2002-01-21 Thread Michael Sims
Just curious, but why are you having to stripslashes() on the data coming out of the database? Do you have magic_quotes_runtime enabled on your server? I honestly don't know... all I know is that I'm adding slashes on the way into the database, and stripping them on the way out, because

Re: [PHP] emulate a browser

2002-01-23 Thread Michael Sims
At 01:45 AM 1/24/2002 +0100, Frank Benady wrote: Hi All Can I emulate the first request of a browser when it tries to connect to a distant server using a domain name and parse the answer from the remote server to know if there is a website located there or if there is no hosting (or even some

Re: [PHP] emulate a browser

2002-01-24 Thread Michael Sims
At 10:33 AM 1/24/2002 +0100, Frank Benady wrote: It works really nice, Michael, thanks again. I have one more question, maybe you can answer me : If the domain name has been redirected with hte permanent redirect, I get the 301 Moved Permanently header response. But if the domain name has been

Re: [PHP] Porting from Linux to Windows!?$#

2002-01-27 Thread Michael Sims
At 01:02 PM 1/27/2002 -0500, Andre Amaral wrote: Thank you for the wuick response. Now. Can I make a script that works in both Linux and Windows without much headache? I'm currently working with a few developers to redesign my company's website using PHP. I am developing on a Linux platform

Re: [PHP] undefined symbol: uncompress

2002-01-27 Thread Michael Sims
At 12:11 PM 1/27/2002 -0700, David Jackson wrote: I've seen similar question in the archive, but here it goes? Setup: Slackware-8.0, Apache-1.3.23, mysql-3.23.47-pc-linux-gnu-i686 [...] Config options: Syntax error on line 236 of /usr/local/www/conf/httpd.conf: Cannot load

Re: [PHP] undefined symbol: uncompress

2002-01-27 Thread Michael Sims
At 12:50 PM 1/27/2002 -0700, David Jackson wrote: Mike -- Thanks for you reply, I made the changes an am stilling getting the same error? On the other hand if I compile PHP with out specifing mysql home. I don't get the error. Check and see which directory libmysqlclient.so is in, and make sure

Re: [PHP] Re: sockets

2002-01-29 Thread Michael Sims
At 01:22 AM 1/30/2002 +0530, Kunal Jhunjhunwala wrote: Hey Mike, I am looking for PHP sockets.. hence the php mailing list :P I hvent found any decent resource on it.. orielly article is good for complete beginers.. but i was looking for something more detailed... any books anyone can recommend

Re: [PHP] Testing Hyperlinks on in a database.

2002-01-30 Thread Michael Sims
At 03:04 PM 1/31/2002 +1300, Philip J. Newman wrote: Is there anyway using PHP to send a command to a server to get the get eather a 404 or 200 reply? Here's a function I put together to do just that. It takes a full URL as an argument and returns either boolean true, boolean false, or a

Re: [PHP] Re: Sending an e-mail to 1,000 people

2002-02-02 Thread Michael Sims
At 11:42 PM 2/2/2002 -0200, Manuel Lemos wrote: I think you are confused... Unsolicited e-mail is in fact the definition of spam! No, with time, people started confusing definitions. You may not be aware of it because you were too young and by that time you probably even did not knew about

Re: [PHP] !isset ??

2002-02-06 Thread Michael Sims
At 03:06 PM 2/6/2002 -0500, Erik Price wrote: Pretty confusing. Can anyone shed some light on whether or not there is a final definite way to do this? I've used (!($_POST['var'])) with no problems in the past, but does good coding style suggest that I use (!isset($_POST['var'])) now? The

Re: [PHP] set_error_handler() not catching some errors

2002-02-09 Thread Michael Sims
At 04:36 PM 2/9/2002 -0800, Charlie Killian wrote: But others like not including a semicolon returns nothing: $d = 3 The page is not returned there is no error and the page is stopped being parsed. This is by design. Quoting from http://bugs.php.net/bug.php?id=9386: quote [17 Jun 2001 4:56am]

Re: [PHP] backslashes added to POST value

2002-02-11 Thread Michael Sims
At 12:34 PM 2/11/2002 -0600, news.php.net wrote: My post values have backslashes added to them (such as to protect a double-quote). All the magic_quote_* settings are turned off in php.ini. Any ideas why this is happening? As someone else has already mentioned, this setting could be coming from

Re: [PHP] MsSQL PASSWORD()

2002-02-11 Thread Michael Sims
At 06:34 PM 2/11/2002 +0200, val petruchek wrote: Hello, list! I'm looking for analog of Mysql password() func in MsSQL. My goal is not to store certain field (i.e. user passwords) as a clear text. I don't know the equivalent off the top of my head, but a coworker of mine has used it before.

Re: [PHP] REMOTE_ADDR probs

2002-02-11 Thread Michael Sims
At 09:41 AM 2/11/2002 -0600, cyberskydive wrote: $user = getenv('REMOTE_ADDR'); [...] It works great on windows running apache php 4.0.1 but on solaris php 4.06 if I add a print($first); it returns the servers IP address, but everywhere else it returns the users IP address. On the Solaris

Re: [PHP] can I sandwich html docs with PHP

2002-02-11 Thread Michael Sims
At 04:46 PM 2/11/2002 -0600, Peter J. Schoenster wrote: How can I do this with PHP? I want the urls to be like: http:://www.mydomain.com/page.html http:://www.mydomain.com/page2.html http:://www.mydomain.com/page3.html etc. One motive is to be sure that no search engines are discouraged from

Re: [PHP] MsSQL PASSWORD()

2002-02-12 Thread Michael Sims
At 09:26 AM 2/12/2002 +0200, val petruchek wrote: My current project runs on Win2k, MsSQL 2k, and PHP 4.0.6 My problem is that i can not enable md5 extension because of Unable to load dynamic library 'c:\windows\php\extensions/php_mcrypt.dll' - The specified procedure could not be found. in

Re: [PHP] Increment alphabetical character (simple question)

2002-02-12 Thread Michael Sims
At 04:58 PM 2/12/2002 -0600, phantom wrote: How do I get the ASCII value of a character increment it by one... and convert back to a character. For example: I want to grab a char such as C and increment it to D ??? To answer your first question: ? $letter = C; echo $letter.br; //Outputs

Re: [PHP] PHP Work in New York

2002-02-12 Thread Michael Sims
At 06:27 PM 2/12/2002 -0500, J Smith wrote: Last week I looked at some VBScript/ASP code that I kind of need to port to PHP. I was mortified. It is truly appalling, isn't it? ;) I have actually converted a large portion of my companies website from VBScript to PHPthankfully most of the

Re: [PHP] Re: The ASP application object in PHP?

2002-02-15 Thread Michael Sims
At 02:21 PM 2/15/2002 -0500, Michael Kimsal wrote: I've been here all along! :) Seriously, we cover some of this in our class as well, and at our monthly PHP user group meetings. I'm actually writing up a small paper on this and other topics. If you're interested in it, let me know. I can

Re: [PHP] scheduled tasks

2002-02-15 Thread Michael Sims
At 10:03 AM 2/15/2002 -1000, Rodney Davis wrote: Is currently anyway of doing scheduled tasks with PHP (without using crontab)? For example, using an email script to send out e-mail reminders every Monday or something like that? What's wrong with using cron? -- PHP General Mailing List

Re: [PHP] COOKIE HEADER????

2002-02-15 Thread Michael Sims
At 02:33 PM 2/15/2002 +0100, marcbey wrote: i dont know how i have to send it back, because i dont kown where and how to put the ASPSESSIONIDKJHKJHHKJH=HJVHJGHJGJGHJGJHGKJ information (in the header?) This document may help:

Re: [PHP] Is there an MSSQL limit function?

2002-02-16 Thread Michael Sims
At 05:54 PM 2/16/2002 +0800, Jason Wong wrote: On Saturday 16 February 2002 17:48, Dean Householder wrote: Is anyone familiar with how exactly to use the TOP command in MSSQL? Is it in it's own SQL query or built into the select query? I'm looking at the help and it doesn't seem very

Re: [PHP] scheduled tasks

2002-02-16 Thread Michael Sims
At 06:41 AM 2/16/2002 -0800, [EMAIL PROTECTED] wrote: Is currently anyway of doing scheduled tasks with PHP (without using crontab)? What's wrong with using cron? I'm building an OSS site where the PostgreSQL data base maintenance, email sending, stats gathering, number crunching and graph

Re: [PHP] Where To Find Resources About Programming Style (my bleedin' code is so darn ugly)

2002-02-16 Thread Michael Sims
At 12:26 AM 2/17/2002 +0100, Frank Joerdens wrote: I am looking for a good manual or introduction on how to write readable, extensible code (in any programming language). To give you an example, this bit looks pretty darn horrible and I just don't know how to rephrase it to make it more concise

Re: [PHP] Could this be a configuration directive?

2002-02-16 Thread Michael Sims
At 11:22 PM 2/16/2002 -0800, Anas Mughal wrote: I get a parse error using my CGI version of PHP on the following line: $message = $$this-func_name($string); However, the same above line works fine with my ISP's CGI version of PHP. That is strange. Just for kicks, try using curly braces to

Re: [PHP] Logging Users In - What is the Best Way

2002-02-19 Thread Michael Sims
At 06:17 PM 2/18/2002 -0800, Phillip S. Baker wrote: I have a MyQSL back end. It houses a users user_name and password. I have a secure area of the site that I only want members to view. The way I have it now is that the user logs in. If user_name and password match cookies are set. Each page

Re: [PHP] A function that turns special charcters into html codes?

2002-02-19 Thread Michael Sims
At 08:15 PM 2/19/2002 -0500, Leif K-Brooks wrote: I'm looking for a function that turns special charcters into html charcter codes ( into quot;). Is there one? http://www.php.net/manual/en/function.htmlspecialchars.php and http://www.php.net/manual/en/function.htmlentities.php -- PHP

Re: [PHP] INT function?

2002-02-20 Thread Michael Sims
At 05:06 PM 2/20/2002 -0800, James Taylor wrote: $x = 7; $y = 3; $z = $x / $y; I want $z to equal 2. In perl it would be $z = int($x / $y); This is untested, but: $z = (int) ($x / $y); Should work. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP] Configuring /etc/syslog.conf to redirect PHP errors to a separate file

2002-03-08 Thread Michael Sims
... - Michael Sims mhsims at midsouth dot rr dot com The Web site you seek Can not be located but Countless more exist. - -- PHP General Mailing List (http://www.php.net/) To unsubscribe

Re: [PHP] Configuring /etc/syslog.conf to redirect PHP errors to a separate file

2002-03-08 Thread Michael Sims
At 12:07 AM 3/9/2002 +0800, Jason Wong wrote: I'd love to be able to send any errors from PHP to a completely separate file, say something like /var/log/php_errors. Does anyone know of a way to do this? I gather it has to do with using /etc/syslog.conf to redirect messages from a

Re: [PHP] undefined symbol: compress during install?

2002-03-11 Thread Michael Sims
At 05:58 PM 3/11/2002 -0500, Erik Price wrote: Ho! I have just RTFG'd, which I wish I had done before posting. Looks like I have omitted the --with-zlib parameter in the ./configure of PHP. I had it last time b/c I was following a tutorial, and omitted it this time since I didn't think I

[PHP] Double free zlib bug ... does PHP need to be recompiled?

2002-03-12 Thread Michael Sims
Some of you may have heard news about the double free bug in the zlib libraries that many Linux programs use: http://www.kb.cert.org/vuls/id/368819 http://www.redhat.com/support/errata/RHSA-2002-026.html There is a quote on the Redhat errata page that got me thinking: Additionally, if you

Re: [PHP] regular expression for (NOT 'word')

2002-03-14 Thread Michael Sims
At 05:52 PM 3/14/2002 +0200, Ando Saabas wrote: Ok let me explain my problem further some. I need the regular expression to purify the html page from script tags: I used: $file = eregi_replace((script(.*).*/script), , $file); Now this works fine, until theres a webpage like: script

Re: [PHP] Deleteing folders containing files...

2002-03-15 Thread Michael Sims
At 09:36 AM 3/15/2002 +, Philip Jeffs wrote: Hi, Does anyone know of an 'easy' way to delete folders that contain files and sub-folders? Here's what I use (use rmdirRf($folderthatcontainsotherstuff)): ? function rmdirRf($file) { if(file_exists($file)) { chmod($file,0777); if

Re: [PHP] Mulitple ini files?

2002-03-15 Thread Michael Sims
At 03:59 PM 3/15/2002 -0600, charlesk wrote: I have many sites and all are virtual hosts. I would like IIS to specify the home directory, for html, gifs, jpgs... and all of the php files to be somewhere else in the filesystem, specified by the php.ini. There is a thread archived on Google

Re: [PHP] replacing all non [a-z] chars possible?

2002-03-17 Thread Michael Sims
At 02:31 PM 3/17/2002 +0100, andy wrote: Hi there, I am wondering if it would be possible to replace all chars which are not inbetween [a-z] with a valid asccii coresponding to it. I have a db with a bunch of citynames and I would like to create valid filenames out of those. The prob is, that I

Re: [PHP] $$

2002-03-18 Thread Michael Sims
At 03:58 AM 3/19/2002 +, mm fernandez wrote: variables begin with a $ sign. but what does it mean if it begins with 2 $ signs? (i.e. $$var) http://www.php.net/manual/en/language.variables.variable.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] anyone using CVS for PHP dev?

2002-04-03 Thread Michael Sims
On Wed, 2002-04-03 at 04:00, Michael Zornek wrote: I've been learning a little bit about CVS and am considering using it for dev of some group PHP sites. Anyone doing this? comments? I've been using CVS for all of my PHP projects for the past several months. Now that I have been using it I

Re: [PHP] FTP routine

2002-07-04 Thread Michael Sims
On Thu, 4 Jul 2002 20:43:25 +0100, you wrote: Not really a PHP question - more an FTP protocol question - try reading the FTP RFC at http://www.ietf.org/rfc/rfc959.txt However, in a nutshell, to get all of the files in a directory - 1. get a listing of that directory (read the RFC for

Re: [PHP] Dos Paths

2002-07-10 Thread Michael Sims
On Wed, 10 Jul 2002 13:14:44 +0100, you wrote: I've got an application that requires dos folder names (8.3 standard) as input. I also have PHP, which quite happily can cope with both. Can someone help me write a function to translate full paths to dos paths Thanks Maybe this can get you

Re: [PHP] Dos Paths

2002-07-10 Thread Michael Sims
On Wed, 10 Jul 2002 13:14:44 +0100, you wrote: I've got an application that requires dos folder names (8.3 standard) as input. I also have PHP, which quite happily can cope with both. Can someone help me write a function to translate full paths to dos paths Also, go to groups.google.com and

Re: [PHP] Dos Paths

2002-07-10 Thread Michael Sims
Danny. Yeah, I mentioned that in my original post (see below). I left that particular issue as an exercise for the reader. :-) - Original Message - From: Michael Sims [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, July 10, 2002 1:48 PM Subject: Re: [PHP] Dos Paths [...] One last

Re: [PHP] good article on creating a subscription form/script

2002-07-12 Thread Michael Sims
On Thu, 12 Jul 2001 14:32:57 -0600, you wrote: I've looked on php.net, phpbuilder.com, and zend.com, but to no avail. Any suggestions? I don't know of any articles, but I'm actually working on a project that is exactly what you are talking about. I'm going to code the signup interface in PHP,

Re: [PHP] ErrorDocument 404 Form

2002-07-17 Thread Michael Sims
On Thu, 18 Jul 2002 03:21:48 +0200, you wrote: Then again, I might not be remembering correctly, so ... Well it could have been it, but it doesn't work neither trying to set the ErrorDocument into a .htaccess file. The problem is I am not even sure where is the trouble, and if it should work

Re: [PHP] Re: Includes vs. Functions

2002-07-17 Thread Michael Sims
On Wed, 17 Jul 2002 17:46:25 -0400, you wrote: Chris, thanks for describing your method. The reason I really dislike Functions in PHP is because you have to pass every variable needed by a function, even if that variable is global in the main script, which is a pain in the ass when a function

Re: [PHP] Running a PHP Script from UNIX Command Line?

2002-07-17 Thread Michael Sims
On Wed, 17 Jul 2002 16:25:10 -0600, you wrote: Check the archives on this... But you need the executable php Also in the archives are discussions on how to do this using lynx, which does not require an executable PHP, but does require that the script reside somewhere in the document root of

Re: [PHP] Creating Dynamic Variables

2002-07-17 Thread Michael Sims
On Wed, 17 Jul 2002 22:39:10 -0400, you wrote: Hello, I have captured variables from any HTML that is POSTed to me from a 'foreach' clause. Now, possibly in this foreach clause I want to register these name/value pairs into a session var. I have tried : session_start(); foreach ($HTTP_POST_VARS

Re: [PHP] Re: Includes vs. Functions

2002-07-18 Thread Michael Sims
On Thu, 18 Jul 2002 08:40:08 -0600, you wrote: See below... At 09:20 PM 7/17/02 -0500, Michael Sims wrote: $superglobals = array(var1, var2, var3, var4, var5, ...); Now inside the function you can do this: function somefunction ($somevar) { global $superglobals; foreach($superglobals

Re: [PHP] Grab value of mail headers

2002-07-24 Thread Michael Sims
On Thu, 25 Jul 2002 05:47:57 +0200, you wrote: Bonus points if you could tell me a way to parse the entire headers into something useful like a set of key, value pairs using the header name as key and the value as value. $lines = split(\r?\n,$headerstring); foreach($lines as $line) {

Re: [PHP] preg_match() occurence position

2002-07-25 Thread Michael Sims
On Thu, 25 Jul 2002 15:05:36 +0200, you wrote: l for example: l $mem='this is a test'; l preg_match('/test/', ...) should return me somehow: 10 How about this: $mem='this is a test'; if(preg_match(/(.*)test/,$mem,$matches)) { echo strlen($matches[1]); } Of course, if test occurs more

Re: [PHP] Getting only 255 chars from SQL Server

2002-05-13 Thread Michael Sims
On Sun, 12 May 2002 18:43:47 -0700, you wrote: I have an SQL Server database running on a server on the internet. I need to have php connecting to the db and returning values. Simple stuff. No problem making the connection and getting data using the mssql functions. The weird thing is that 4

Re: [PHP] Leading zeroes

2002-05-23 Thread Michael Sims
On Thu, 23 May 2002 09:26:05 -0700 (PDT), you wrote: Does anybody have a clever and efficient way of getting rid of leading zeroes in a string? How about: $str = preg_replace(/^0+/,,$str); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Regular Expressions...

2002-05-31 Thread Michael Sims
On Fri, 31 May 2002 12:32:29 +0100, you wrote: example of the contents of $file that might pass is: advance_racingx_14_4_29.pdf another might be, which would not pass is: advance_fork10_3_4_11.pdf If you need it to be in that specific order, use the following:

Re: [PHP] reg exp problems

2002-06-01 Thread Michael Sims
On Sat, 1 Jun 2002 16:56:04 +0100, you wrote: Hi, I've never used a reg exp, but I was trying to do something simple, and I just can't seem to do it :) I have a varible $fdata which contains the contents of a webpage, and I want to strip out the base tag. I try: $fdata =

Re: [PHP] How do I show the sourse code?

2002-07-27 Thread Michael Sims
On Sun, 28 Jul 2002 03:41:19 +0200, you wrote: I have seen on some of the script-sites around some nice ways of presenting the source code. Often in nice colors. So, the natural question is: how is that done (cause I don't think anyone has the patience to put lt; and gt; around all the )

Re: [PHP] running php with .html files?

2002-07-28 Thread Michael Sims
On Sun, 28 Jul 2002 08:18:40 +0100, you wrote: Hi All, [...] I have a php script that I wish to execute but I want to put it in index.html (not index.php) I know there is a solution involving configuration files in either the directory wher the file is held or specifically for the server.

Re: [PHP] Encrypting Passwords - Is it really necessary??

2002-07-29 Thread Michael Sims
On Mon, 29 Jul 2002 17:30:48 -0400, you wrote: Is it really necessary to store passwords encrypted in a mySQL DB for a membership site if you're not storing sensitive info such as credit card numbers? How much security does that offer, really, and for whom? [...] The reason I ask is because I'm

Re: [PHP] mailing list managers

2002-08-13 Thread Michael Sims
On Wed, 14 Aug 2002 01:09:32 +1000, you wrote: I was hoping that maybe there's an opensource or commercial product out there that I can install in my doc root (ie, PHP + MySQL support) which will handle this in a more effective manner (ie, space the mailout across an hour or so, etc etc). Take

Re: [PHP] Comparing Data

2002-08-13 Thread Michael Sims
On Tue, 13 Aug 2002 21:31:22 -0400, you wrote: Well, the only problem is, the data will be outputted into a dropdown box, so a loop would cause duplicates of the ID. Guess I should have mentioned that there are approx 50 ID's and they are not unique. The only way I can think of doing it is

Re: [PHP] howto disable cron output

2002-08-13 Thread Michael Sims
On Tue, 13 Aug 2002 18:42:17 -0700 (PDT), you wrote: i wrote an ecard script and added 'send at a future date' feature. this feature is implemented via cron that runs daily at 1200 hours $ crontab -l looks like: 00 00 * * * wget http://ecard.domain.com/futuresend.php 21 /dev/null it works

Re: [PHP] location headers are crisco to cookie headers?

2002-08-13 Thread Michael Sims
On Tue, 13 Aug 2002 22:14:28 -0500, you wrote: I had some headers that were working on one server (4.0.6), but isn't working on my (nearly) fresh install of 4.2.2. Here's the conundrum: header(Set-Cookie: mid=$mid); header(Location: $location); exit; worked just fine. I moved it

Re: [PHP] stupid question

2002-08-15 Thread Michael Sims
Liam MacKenzie wrote: Ok, I'm having a blonde day... If $idx == 1, 4 or 9 I don't want it to echo $results. I have this, what's the syntax to put multiple values in there? if ($idx != 1) { echo$results; } Another way to do it is by using in_array(), like so: if

Re: [PHP] how to fight backslash in char variable???

2002-08-20 Thread Michael Sims
On Tue, 20 Aug 2002 15:13:53 +0300, you wrote: the problem is that from out.php I need to echo this $intext but I get: blablabla \' blablabla the question is.. how to fight this backslash out of there? The magic_quotes_gpc setting is enabled on your server. If you have access to the server

Re: [PHP] Embeding images in HTML emails

2002-08-20 Thread Michael Sims
On Tue, 20 Aug 2002 14:52:21 +0300, you wrote: Hi, Does anyone know how to embed images in HTML emails in order to avoid a server request (no img src=http://server/foo.img;)? Is this possible? It is possible. If you are sending a multipart MIME message, attach the image as MIME type image/gif

Re: [PHP] trouble with function

2002-08-25 Thread Michael Sims
On Mon, 26 Aug 2002 01:12:56 +1000, you wrote: However, I was hoping to use it in a similar way that I use mysql in the above code... something like: ? while($song = getSongByArtist(4)) { echo song['title']; echo song['writers']; echo song['video']; echo song['artist_id'];

Re: [PHP] trouble with function

2002-08-25 Thread Michael Sims
On Sun, 25 Aug 2002 10:49:00 -0500, you wrote: static $myrow; if($myrow = mysql_fetch_array($result)) { [...] Oops. We want to remember the position of the result set, so it's $result that should be static, not $myrow. In addition, you'll have to put a check at the top of the function to see

  1   2   3   >