[PHP] RE: Deleting a string from a text file

2001-07-04 Thread Adrian Ciutureanu
? $textFileName = 'filename.txt'; $strToDel = the_string; $s = implode('', file($textFileName)); $p = strpos($s, $strToDel); $len = strlen($strToDel); if($p) { $s = substr($s, 0, $p) . substr($s, $p+$len);

[PHP] RE: Processing checkboxes in Dynamic tables

2001-07-04 Thread Adrian Ciutureanu
Variables that are not checked are not send by default. Try the code below and see what variables are posted. form method=get action=chkbox.html ?for($i = 0; $i 10; $i++):? input type=checkbox name=p?=$i? value=1p?=$i?br ?endfor? input type=submit /form To process variables you may use

RE: [PHP] loading data into mysql from txt file from php

2001-07-04 Thread Don Read
On 03-Jul-01 Clif Wieden wrote: I have a project where the admin uploads a new data file and it needs to be loaded into a mysql database. What's the best way to do this? The data file is tab-delimted but could be reformatted. Right now the file is uploaded and after copy($new_file,

RE: [PHP] PHP for NetWare?

2001-07-04 Thread Jesse S. Williams
Actually, Netware isn't specifically a direct competitor of Microsloth. Netware is strictly a NOS (network operating System), where as Windows is a network, server and client OS. Now, this certainly isn't meant to make it look as if I like M$, but I used to work on my company's General Motors

[PHP] PHP as external script and Apache : configuring 404 errors

2001-07-04 Thread Laurent INFOS
Hello, I have : - Apache 1.3.x - PHP 4.0.5 (not a module, but a separate script) - the directive ErrorDocument is configurated : ErrorDocument 404 /404.html My problem : - http://server/filenotpresent gives a 404 error, and open 404.html. It's OK. -

RE: [PHP] How to prevent people from downloading images

2001-07-04 Thread Jesse S. Williams
Well- The best form of protection against this that I have seen is on Microsoft's satellite imaging server (can't remember the name off hand, if someone else can, post it please!) Basically it uses Java to display a satellite snapshot and it's broken in pieces (so it's easy to navigate west or

[PHP] php-general subscription test

2001-07-04 Thread Adrian Ciutureanu
Hi all, This is only a test. Sorry for any inconvenience. adu -- 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] uploading directory contents with one click possible?

2001-07-04 Thread muhudin raageh
Hello all For example: I have files(html files plus images) in my local machine and I want to upload all these files and the files in the subdirectory below it with one click. Is that possible in php? Has anyone done anything like that? Thanks muhudin raageh

Re: [PHP] PHP as external script and Apache : configuring 404 errors

2001-07-04 Thread Rasmus Lerdorf
If you make PHP a module this will work just fine. As a CGI I'd have to have a look at the code. There may or may not be a way to solve this, but it would require code changes. -Rasmus On Wed, 4 Jul 2001, Laurent INFOS wrote: Hello, I have : - Apache 1.3.x - PHP 4.0.5 (not a module,

Re: [PHP] Protecting from session hijacking

2001-07-04 Thread Marius Andreiana
hijacking? I thought of checking IP address on subsequent requests, but apparently this cannot be relied on because of HTTP proxies etc. but isn't better than nothing ? I think a session should be from the same IP all it's life, and this should be build into php. Internal networks will be seen

RE: [PHP] Protecting from session hijacking

2001-07-04 Thread Jason Murray
I think a session should be from the same IP all it's life, and this should be build into php. Internal networks will be seen as the same ip, so session can be stolen by somebody else in the same internal net, but not from outside of it. Now tell me what's wrong with my opinion, b/c it's

RE: [PHP] Protecting from session hijacking

2001-07-04 Thread Marius Andreiana
On 04 Jul 2001 19:34:03 +1000, Jason Murray wrote: Now tell me what's wrong with my opinion, b/c it's too simple to work :) Four words: Load Balancing Proxy Servers. I knew it! :) So if someone on the net sees the URL and it has session id in it, that session can be stolen? -- Marius

[PHP] multiple entries in the same field

2001-07-04 Thread Jamie Saunders
Hi, In a MySQL database I have one field that holds several entries seperated by a comma (e.g. item1,item2,item3). What I want to do is to get these items from the db from a PHP script and display each item on it's own line (e.g. item1britem2britem3). Is there anyway of doing this easily by

[PHP] flush() PHP4 Again

2001-07-04 Thread didier tanti
Hello, Really nobody knows if it is a bug in PHP4 or not ?? (see my previous mail with flush() in the subject) Maybe I should open a ticket on php database ?? (my provider can't figure out the problem). Is there any possibility that this problem is due to browser configuration ?? (but so

Re: [PHP] multiple entries in the same field

2001-07-04 Thread Wieger Uffink
Hi Jamie, use explode() or split(), these will split up your string eand return the resulting elements as an array. Generally speaking its not reaally good practice to store multiple entries as a comma sepparated string in one db field, since it takes down the data integrity of your database.

[PHP] fread from /dev/ttyS0 without EOF

2001-07-04 Thread Tobias Fritz
Hi, I have a GSM modem connected to /dev/ttyS0 and would like to use php to communicate with the modem. Writing works perfectly like this: $fp=fopen(/dev/ttyS0,r+); fwrite($fp,AT+CMGL\r); but reading is a little problem because if the modem for example answers to the AT+CMGL message I sent to

Re: [PHP] mail problem...

2001-07-04 Thread Ivan Balazs
Hi! It seems to be a php-specific problem. Check your php config file (in php4 it is php.ini). There you should find a line related to the smtp server. Fill it with its correct content. Balazs On Wed, 4 Jul 2001, php wrote: hai... I have install php and i want to create email direct

RE: [PHP] capatalising letters

2001-07-04 Thread Adrian Ciutureanu
http://php.net/manual/en/function.ucwords.php -Original Message- From: Jamie Saunders [mailto:[EMAIL PROTECTED]] Sent: 4 iulie 2001 14:57 To: [EMAIL PROTECTED] Subject: [PHP] capatalising letters Hi, I've got a list of strings in the following format: item one item two

[PHP] preg_match

2001-07-04 Thread Daniel Reichenbach
Hy, i've got a string which looks like [EMAIL PROTECTED]. Now i wanted to check it with preg_match like this: if ( preg_match( '/[\][a-z]([-a-z0-9_.])*@([-a-z0-9_]*\.)+[a-z]{2, }[\]/i', $value ) ) { print Valid mail address; } else { print Invalid mail address; } Unfortunatly

RE: [PHP] Sina.com

2001-07-04 Thread Tim Taubert
lol you're right :) - Tim Taubert | [EMAIL PROTECTED] | http://www.shogunat.com/rg/ - -Original Message- From: Don Read [mailto:[EMAIL PROTECTED]]

RE: [PHP] preg_match

2001-07-04 Thread Adrian Ciutureanu
try ereg('^([a-z,A-Z,0-9]|_|-|\.)+@([a-z,A-Z,0-9]|_|-|\.)+\.([a-z,A-Z,0-9]|_ |-|\.){2,3}$', $email) -Original Message- From: Daniel Reichenbach [mailto:[EMAIL PROTECTED]] Sent: 4 iulie 2001 15:05 To: Php-General Subject: [PHP] preg_match Hy, i've got a string which looks

[PHP] Document File Types/Formats

2001-07-04 Thread ReDucTor
Hey, Just wonder if some one has any documents/guides on different file types, i saw one a while ago on WRI(Mircosoft Word) files, Currently i only have normal text, I know can do HTML so don't sent me documents on converting HTML to Text, just other file typesplease...WRI is one of the

[PHP] Security of PHP code

2001-07-04 Thread David A Dickson
Is it possible for others to view the php code for pages I have written? I thought I heard someone say before that they could write a simple script to accomplish this. If anyone knows of any tacticts people might use to attack my code please post them hee. : David A. Dickson : [EMAIL

RE: [PHP] Security of PHP code

2001-07-04 Thread Tim Taubert
i think that you can't attack php code because it's a server side scripting language... just with *echo*(and others) you send some code to the browser... i guess it's secure ;) Tim Taubert - Tim Taubert | [EMAIL PROTECTED]

RE: [PHP] Security of PHP code

2001-07-04 Thread Adrian Ciutureanu
Here is something that happend to me: I forgot to tell Apache that .inc files must be parsed by PHP. All works fine if you include a .inc file, but if somebody guess .inc file name, he can see the content of that file! -Original Message- From: David A Dickson [mailto:[EMAIL PROTECTED]]

RE: [PHP] Security of PHP code

2001-07-04 Thread Tim Taubert
yes i had this problem too... it's easier to rename your .inc files to .inc.php3 ... so nobody can see your code but the output maybe null or some crazy code... but it's not your php code... Tim Taubert - Tim Taubert |

RE: [PHP] Security of PHP code

2001-07-04 Thread Rasmus Lerdorf
The right way to fix this is to add a rule to your Apache configuration that looks like this: Files ~ \.inc$ Order allow,deny Deny from all /Files That will simply prevent any direct access at all to your .inc files. Making the .inc files simply be parsed by PHP could still be a problem

RE: [PHP] Security of PHP code

2001-07-04 Thread PHPBeginner.com
SECURE, SECURE. It is not how secure PHP is, it is how well YOU protect it. For example = make this line show_source($file); then go to your page like file.php?file=/etc/passwd and you're freaked! There is a whole bunch of way to hack your pages if not protected well enough, but PHP itself has

Re: [PHP] Security of PHP code

2001-07-04 Thread ReDucTor
http://sourceforge.net/source.php?page_url=/source.php look at that... - Original Message - From: PHPBeginner.com [EMAIL PROTECTED] To: [EMAIL PROTECTED]; php-general [EMAIL PROTECTED] Sent: Thursday, July 05, 2001 12:08 AM Subject: RE: [PHP] Security of PHP code SECURE, SECURE. It

[PHP] Ghostscript and PHP

2001-07-04 Thread Todd Cary
Can Ghostscript be used with PHP? Todd -- Todd Cary Ariste Software [EMAIL PROTECTED] -- 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]

RE: [PHP] How to prevent people from downloading images

2001-07-04 Thread John Meyer
On Wed, 04 Jul 2001, ..s.c.o.t.t.. wrote: there are two answers to this: 1) it cannot be done. as long as that image is on the person's computer screen, it is physically impossible to prevent that person from saving the image and using it. (a simple tap of the print screen will take a

Re: [PHP] Troubleshooting syntax ?

2001-07-04 Thread Kurt Lieber
That domain name doesn't appear to be valid. Perhaps you meant: http://validator.w3.org ? --kurt - Original Message - From: Christian Reiniger [EMAIL PROTECTED] To: Jack Sasportas [EMAIL PROTECTED]; php [EMAIL PROTECTED] Sent: Wednesday, July 04, 2001 3:19 AM Subject: Re: [PHP]

[PHP] ereg_replace

2001-07-04 Thread Marc Logemann
Hi, short question: i want to use ereg_replace to replace something with an array-element, this is my code and its not working: ereg_replace(\\$([0-9]), \$parmarray[\\1], $string); parmarray is of course an array with some elements, Here are the facts: $parmarray = array (, value1, value2);

Re: [PHP] How to prevent people from downloading images

2001-07-04 Thread Todd Cary
At http://www.floatographs.com , I reduce the resolution and put a watermark in the JPEG. Not very clever, but it works. Todd P.S. The site is using PHP and Interbase plus a lot of help from all of you folks!! Many thanks -- Todd Cary Ariste Software [EMAIL PROTECTED] -- PHP General

RE: [PHP] Security of PHP code

2001-07-04 Thread Tim Taubert
you're totally right.. look at this http://www.ssw.uni-linz.ac.at/Teaching/Lectures/Sem/2000/Alexander/source.ph p3?url=/etc/passwd *no comment* and not my site... Tim Taubert - Tim Taubert | [EMAIL PROTECTED] |

RE: [PHP] Security of PHP code

2001-07-04 Thread Tim Taubert
mh =) contacted the admin to fix this problem ;) Tim Taubert - Tim Taubert | [EMAIL PROTECTED] | http://www.shogunat.com/rg/ - .o] -Original

RE: [PHP] Security of PHP code

2001-07-04 Thread PHPBeginner.com
Yup, I believe you - that's not your site. That is what I meant: It is no PHP, it is how you use PHP. DISCLAIMER: No one's fault (except the programmer) that there was THAT BIG security hole on the site. -maxim maletsky -Original Message- From: Tim Taubert [mailto:[EMAIL

RE: [PHP] Security of PHP code

2001-07-04 Thread Tim Taubert
oh thanks for the disclaimer ;) forgot it.. richard: didn't think about it.. but should have done it.. first and last time i did it *promised* :) Tim Taubert - Tim Taubert | [EMAIL PROTECTED] | http://www.shogunat.com/rg/

RE: [PHP] Security of PHP code

2001-07-04 Thread PHPBeginner.com
Just for the respect of the community, Tim, you shouldn't have posted that. Poor them, they are under the risks, of course the things will be probably fixed, but if someone cares he might be already in the machine just for the sake of it. -maxim maletsky -Original Message- From: Tim

[PHP] Undefined variables

2001-07-04 Thread Uri Even-Chen
To PHP-general group, I have configured PHP to report all errors warnings (error_reporting = E_ALL on php.ini file), but since then I get tons of warning messages for Undefined variables. For example, referring $HTTP_HOST directly leads a message like Undefined variable: HTTP_HOST in

RE: [PHP] Security of PHP code

2001-07-04 Thread Tim Taubert
mh i know it was the wrong decision. didn't think about it. already said that. feeling guilty now *argh* Tim Taubert - Tim Taubert | [EMAIL PROTECTED] | http://www.shogunat.com/rg/

RE: [PHP] Security of PHP code

2001-07-04 Thread Tim Taubert
found 2 other servers having the same problem... mailed to the webmasters and admins instead of posting it.. now i feel a little bit better :) Tim Taubert - Tim Taubert | [EMAIL PROTECTED] | http://www.shogunat.com/rg/

Re: [PHP] Security of PHP code

2001-07-04 Thread Delbono
would be really silly if http://www.php.net/source.php?url=/index.php - Original Message - From: Tim Taubert [EMAIL PROTECTED] To: PHP Mailingliste [EMAIL PROTECTED] Sent: Wednesday, July 04, 2001 5:27 PM Subject: RE: [PHP] Security of PHP code found 2 other servers having

RE: [PHP] Security of PHP code

2001-07-04 Thread Hankley, Chip
OK, I'm pretty new to PHP, and have been reading this thread, and am just a little freaked. If I understand this right, the only way reason we can view the source code of those pages is that the web server on which the page resides essentially has a PHP page somewhere on their site that has

Re: [PHP] Security of PHP code

2001-07-04 Thread Delbono
maybe one could be ? $allowed_path = /www/sites/mysite/teaching; if (substr($file, 0, str_len($allowed_path)) $allowed_path ) { die(not allowed!); } else { show_source($file); } ? - Original Message - From: Hankley, Chip [EMAIL PROTECTED] To: PHP Mailingliste [EMAIL PROTECTED]

RE: [PHP] Security of PHP code

2001-07-04 Thread Jon Haworth
Yes, I would have thought this would do it: if (strstr($file, /usr/local/apache/htdocs/) { show_source($file); } else { echo File must be in /usr/local/apache/htdocs!; } Modify as appropriate. Have I missed anything, or will this do the trick? Cheers Jon -Original

RE: [PHP] Security of PHP code

2001-07-04 Thread Christopher Ostmo
Adrian Ciutureanu pressed the little lettered thingies in this order... Here is something that happend to me: I forgot to tell Apache that .inc files must be parsed by PHP. All works fine if you include a .inc file, but if somebody guess .inc file name, he can see the content of that file!

Re: [PHP] Security of PHP code

2001-07-04 Thread Tyrone Mills
I use something that accomplishes the same (displays the source of a file), but doesn't accept the file name as a parameter. The script is also in a directory with a password and is restricted by ip. Not perfect, but alot better. - Original Message - From: Hankley, Chip [EMAIL PROTECTED]

Re: [PHP] Security of PHP code

2001-07-04 Thread james
? $allowed_path = /www/sites/mysite/teaching; if (substr($file, 0, str_len($allowed_path)) $allowed_path ) { die(not allowed!); } else { show_source($file); } ? I've missed part of the discussion, but if my understanding of the issue is correct (accepting a filename and path from

Re: [PHP] Security of PHP code

2001-07-04 Thread Steve Werby
Jon Haworth [EMAIL PROTECTED] wrote: Yes, I would have thought this would do it: if (strstr($file, /usr/local/apache/htdocs/) { show_source($file); } else { echo File must be in /usr/local/apache/htdocs!; } Modify as appropriate. Have I missed anything, or will this do the trick?

Re: [PHP] Security of PHP code

2001-07-04 Thread Sascha Schumann
On Wed, 4 Jul 2001, Steve Werby wrote: Jon Haworth [EMAIL PROTECTED] wrote: Yes, I would have thought this would do it: if (strstr($file, /usr/local/apache/htdocs/) { show_source($file); [..] Something along those lines will work. Without some kind of limitations built in, the page

Re: [PHP] Security of PHP code

2001-07-04 Thread Delbono
Yes, I supposed there could be that eventuality... I supposed or hoped that wasn't a valid path. /usr/local/apache/htdocs/../../../../etc/passwd as path.. I'm not very practice of paths... actually On Wed, 4 Jul 2001, Steve Werby wrote: Jon Haworth [EMAIL PROTECTED] wrote:

Re: [PHP] Security of PHP code

2001-07-04 Thread Phil Driscoll
Surely the lesson here is to NEVER NEVER NEVER write PHP code which accepts a filename of any kind as one of its arguments. Yes, it will make some of your code a bit less versatile and more long winded, but you can bet your bottom dollar that someone can find a crafty way around whatever

Re: [PHP] Security of PHP code

2001-07-04 Thread Christopher Ostmo
Delbono pressed the little lettered thingies in this order... maybe one could be ? $allowed_path = /www/sites/mysite/teaching; if (substr($file, 0, str_len($allowed_path)) $allowed_path ) { die(not allowed!); } else { show_source($file); } ? The only foolproof method for

Re: [PHP] RE: Protecting from session hijacking

2001-07-04 Thread Christopher Ostmo
Ian Bagley pressed the little lettered thingies in this order... One thing which would prevent hijacks from simply guessing SIDS would be to add an md5 hash to the end of a url e.g. If a page was:- doit.php?item=4SID=237478 then append the url with the md5 of the url PLUS a

[PHP] writing a query that returns similar numbers

2001-07-04 Thread [EMAIL PROTECTED]
I have a database with numbers in one of the tables I'd like to ask mysql to renturn all numbers with say 10 of mynumber Sort of like this: $sql = SELECT rowid FROM numbers WHERE (mynumer is within 10 of number); but I've gotten stuck do I have to do this: $sql = SELECT rowid FROM numbers

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

2001-07-04 Thread Daniel Goldin \(E-mail\)
Mike, I do believe you are right. Here are my apache logs for today, after I attempted to connect to localhost: [Wed Jul 4 09:43:33 2001] [crit] (98)Address already in use: make_sock: could not bind to port 80 [Wed Jul 4 09:43:37 2001] [crit] (98)Address already in use: make_sock: could not

[PHP] Formular problem

2001-07-04 Thread Tim Taubert
hi i have a problem with variables received from a formular.. imagine this is the important part of the form: select multiple name=extras optionCheese/option optionTomatoes/option optionOnions/option /select and now.. what does the variable $extras

Re: [PHP] writing a query that returns similar numbers

2001-07-04 Thread Chris Anderson
Try the LIKE wording in your statement. That should workI think - Original Message - From: [EMAIL PROTECTED] To: PHP Mailingliste [EMAIL PROTECTED] Sent: Wednesday, July 04, 1979 12:48 PM Subject: [PHP] writing a query that returns similar numbers I have a database with numbers in

[PHP] Execing a command in safe mode

2001-07-04 Thread Srinivasan Ramakrishnan
Hi, I need to execute a command on my web host's machine. However they have safe mode enabled. PHP Version 4.0.3pl1 runs as a module on Apache. From php.ini ; Safe Mode safe_mode = On safe_mode_exec_dir = /etc/php4/execdir Will a symlink located in

RE: [PHP] Formular problem

2001-07-04 Thread Tim Taubert
Thanks a lot Alex! Tim Taubert - Tim Taubert | [EMAIL PROTECTED] | http://www.shogunat.com/rg/ - .o] -Original Message- .o] From: Alex Piaz

[PHP] Division Problems

2001-07-04 Thread ReDucTor
Hey, I made this little script, quiet useful on windows and unix machines, but i have a problem, division isn't returning a float, it just returns 0, would i need to do something like convert $totalsize into a float? html body?php $SecondsToTimeout = 120; ini_alter(max_execution_time,

Re: [PHP] Division Problems

2001-07-04 Thread James Mitchell
Found it, I had it returning mbyte not mbytesarrrg - Original Message - From: ReDucTor [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, July 05, 2001 3:43 AM Subject: [PHP] Division Problems Hey, I made this little script, quiet useful on windows and unix machines, but i have

[PHP] php3 and php-4.0.5

2001-07-04 Thread Ramón Alvarez Rayo
I had some sites that uses php3 but i did a upgrade to php-4.0.5, after that my web server doesn´t works with files .php3, how can i make to recognize .php3 please i need your help. thanks. Saludos fraternos, *** Ramón

Re: [PHP] writing a query that returns similar numbers

2001-07-04 Thread mike cullerton
select rowid from numbers where number between mynumber-10 and mynumber+10; on 7/4/79 10:48 AM, [EMAIL PROTECTED] at [EMAIL PROTECTED] wrote: I have a database with numbers in one of the tables I'd like to ask mysql to renturn all numbers with say 10 of mynumber Sort of like this: $sql

Re: [PHP] php3 and php-4.0.5

2001-07-04 Thread Brave Cobra
Depends of course of which server you use. Which one is it? Brave Cobra - Original Message - From: Ramón Alvarez Rayo [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, July 04, 2001 8:01 PM Subject: [PHP] php3 and php-4.0.5 I had some sites that uses php3 but i did a upgrade to

[PHP] Removing Invalid Users

2001-07-04 Thread Clayton Dukes
Howdy folks, How can I write code that will search the database and check the validity of an email address, and if it's bad, to remove that entry from the database? Here's a dump one of the tables: INSERT INTO users VALUES (1,'','username','[EMAIL PROTECTED]','','','001.gif','Jul 04,

Re: [PHP] Removing Invalid Users

2001-07-04 Thread Tom Carter
You can check that the *format* of the address is valid by using regular expressions.. look at the regular expression pages on php.net (especially the users comments.. they do exactly that!) As for checking whether it is a real email or not.. you can't test this without actually sending them an

[PHP] Want to know what people think of my little script(Great for Personal and Pro Use)

2001-07-04 Thread ReDucTor
Hey, First off grab the Developer Timer from http://newbienetwork.net/phpcodems.php?as=viewcodeid=7 thats a great little class, then make a .php file and paste the following in html body?php include(class.timer.php); $timer = new timer(viewfiles); $timer-start_timing(); $SecondsToTimeout =

Re: [PHP] Troubleshooting syntax ?

2001-07-04 Thread Christian Reiniger
On Wednesday 04 July 2001 16:58, Kurt Lieber wrote: That domain name doesn't appear to be valid. Perhaps you meant: http://validator.w3.org ? Um, yes. Why can't the w3c simply have w3c as domain name? *sigh* http://validator.w3c.org/ -- Christian Reiniger LGDC Webmaster

Re: [PHP] Security of PHP code

2001-07-04 Thread Christian Reiniger
On Wednesday 04 July 2001 16:12, ReDucTor wrote: http://sourceforge.net/source.php?page_url=/source.php look at that... No problem. Have a look at what is done before the show_source () call. That script *is* safe :) It is not how secure PHP is, it is how well YOU protect it. For example

[PHP] split() function

2001-07-04 Thread David A Dickson
I have a comma separated spreadsheet with one field that contains two dates. the dates are formatted as dd/mm/yy and separated by either '' or '//' ex:3/12/9228/1/93 or 3/12/92//28/1/93 Problem: I need to split the field at the '' or '//' separator but if I do split('[//]', $field); it splits

[PHP] mssql returnin type date all wrong

2001-07-04 Thread Christian Dechery
In a script I have a query that gets the time of a desired track. It is in SQL Server table with the smalldatetime type, whihc returns me something that looks like '2001-07-04 12:04:12', but PHP is giving me 'Jul 04 2001 12:04AM'. Why does this happen? I want the seconds, where are they??? .

Re: [PHP] Getting Information from a CGI POST

2001-07-04 Thread Don Read
On 03-Jul-01 Brad Hubbard wrote: On Tue, 3 Jul 2001 02:51, Don Read wrote: $pstr='FltNum=2972page=fiselectDay=July+02'; $fp=openpost('dps2.usairways.com', '/cgi-bin/fi', $pstr); // i'm not so sure about that selectDay, javascript ain't my thing. This is implementation dependant (it's

Re: [PHP] split() function

2001-07-04 Thread David A Dickson
Thanks for replying ReDucTor but that didn't work either. I tried $line = explode([(|//)], $field); and $line = explode([(|)], $field); and $line = explode([(|\/\/)], $field); with no success. Any other ideas? On Thu, 5 Jul 2001 04:50:29 ReDucTor wrote: $line = explode([(|//)],$field);

Re: [PHP] split() function

2001-07-04 Thread David A Dickson
Thanks that helped, this is what I used: if (ereg(, $field)) $line = explode(, $field); else $line = explode(//, $field); On Thu, 5 Jul 2001 05:29:11 ReDucTor wrote: ?php $line2 = explode(, $field); for($i = 0; $i sizeof($line2); $i++){ if($line2[$i] == ) $useand = 1; else

Re: [PHP] split() function

2001-07-04 Thread Steve Edberg
You don't need a character class here (signified by [] brackets); you can use $line = split('|//', $field); As you can see, this is identical to ReDucTor's solution, except that the brackets are omitted. Character classes only work for single characters, not multiple character strings

RE: [PHP] writing a query that returns similar numbers

2001-07-04 Thread Matthew Loff
This should work too: $sql = SELECT rowid FROM numbers WHERE ABS(number - mynumber) = 10; -Original Message- From: Chris Anderson [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 04, 2001 1:24 PM To: [EMAIL PROTECTED]; PHP Mailingliste Subject: Re: [PHP] writing a query that returns

[PHP] Executing UNIX commands with PHP

2001-07-04 Thread Tim Taubert
Hi all, how can i execute a UNIX command like 'newuser Tim Taubert tim password' ? and am i able to fetch the results of such commands? Please help. Tim Taubert - Tim Taubert | [EMAIL PROTECTED] |

[PHP] [ANNOUCE] PHPAUCTION 1.0 is out

2001-07-04 Thread Gianluca Baldo
It is (finally!) available at http://www.phpauction.org - Everyone interested in helping with the localization project, translating to other languages than english is welcome! Thanks Gianluca -- ALBASOFTWARE C/ Mallorca 186 - 3º 1ª 08036 Barcelona (Spain) Tel. +34 93454009 - +34 934549324

Re: [PHP] Executing UNIX commands with PHP

2001-07-04 Thread Henrik Hansen
Tim Taubert [EMAIL PROTECTED] wrote: Hi all, how can i execute a UNIX command like 'newuser Tim Taubert tim password' $output = system(unix_command); echo The result was . $output; more info at: www.php.net/system -- Henrik Hansen -- PHP General Mailing List

RE: [PHP] Executing UNIX commands with PHP

2001-07-04 Thread Tim Taubert
Thanks a lot Henrik! - Tim Taubert | [EMAIL PROTECTED] | http://www.shogunat.com/rg/ - .o] -Original Message- .o] From: Henrik Hansen

RE: [PHP] Executing UNIX commands with PHP

2001-07-04 Thread Tim Taubert
mh this is bad... can i do anything else instead of this ? - Tim Taubert | [EMAIL PROTECTED] | http://www.shogunat.com/rg/ - .o] -Original

RE: [PHP] Executing UNIX commands with PHP

2001-07-04 Thread Matthew Loff
You could popen() the command, I believe, and do it interactively... -Original Message- From: Tim Taubert [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 04, 2001 4:47 PM To: PHP Mailingliste Subject: RE: [PHP] Executing UNIX commands with PHP mh this is bad... can i do anything

[PHP] MySQL problem

2001-07-04 Thread Simon Kimber
Hi All, Does anyone know if this can be done with one query? I have to create a chart based on info in two tables that are four tables apart. Here are the relevant tables and just the most relevant fields... accident_report - ID - weekending (this is a -MM-DD format date) - (and others)

Re: [PHP] Executing UNIX commands with PHP

2001-07-04 Thread Henrik Hansen
Tim Taubert [EMAIL PROTECTED] wrote: mh this is bad... can i do anything else instead of this ? crypt the password before inserting it into the user account? -- Henrik Hansen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional

RE: [PHP] Security of PHP code

2001-07-04 Thread Brian White
Possibilities for improving security on a sourec displayer. 1) Maybe you could restrict your source shower to only look at particular types of files - maybe the file has to end in .php or .inc before it is even considered. 2) Given that something that displays the source needs to read

RE: [PHP] MySQL problem

2001-07-04 Thread Don Read
On 04-Jul-01 Simon Kimber wrote: Hi All, Does anyone know if this can be done with one query? I have to create a chart based on info in two tables that are four tables apart. Here are the relevant tables and just the most relevant fields... accident_report - ID - weekending

[PHP] Best way to put text on image

2001-07-04 Thread Todd Cary
If I have a JPEG image, what is the best way to put text or another image at a certain place using the gd library? Todd -- Todd Cary Ariste Software [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail:

RE: [PHP] MySQL problem

2001-07-04 Thread Simon Kimber
Sorry!!! I'm stupid! I forgot to mention that the list of causes has to be for a specified accident_report.weekending Cheers Simon -Original Message- From: Don Read [mailto:[EMAIL PROTECTED]] Sent: 04 July 2001 23:21 To: Simon Kimber Cc: [EMAIL PROTECTED] Subject: RE: [PHP]

Re: [PHP] Removing Invalid Users

2001-07-04 Thread Steve Werby
Clayton Dukes [EMAIL PROTECTED] wrote: How can I write code that will search the database and check the validity of an email address, and if it's bad, to remove that entry from the database? Like Tom said, use regex to check the email is of a valid format. A small percentage of servers can be

[PHP] checking if checkbox is checked

2001-07-04 Thread Richard Kurth
I have 5 checkbox's in a form that I what to make sure at least one of the checkbox is checked. input type='checkbox' name='interest' value='basic' input type='checkbox' name='interest3' value='Internet access ' input type='checkbox' name='interest1' value='pro' input type='checkbox'

[PHP] Apache, PHP4 amd mySQL with SuSE 7.2

2001-07-04 Thread Chuck Lalli
I am a newbie attempting to get Apache working with PHP 4 and MySQL on 7.2. All three are installed, Apache is running, it says that the PHP module is installed and I can manually log into mysql. From http://localhost: Operating system: [ SuSE Linux 7.2 (i386) ] Host: [ linux.local, Kernel:

Re: [PHP] Security of PHP code

2001-07-04 Thread Steve Werby
Sascha Schumann [EMAIL PROTECTED] wrote: On Wed, 4 Jul 2001, Steve Werby wrote: Jon Haworth [EMAIL PROTECTED] wrote: Yes, I would have thought this would do it: if (strstr($file, /usr/local/apache/htdocs/) { show_source($file); [..] Something along those lines will work.

Re: [PHP] checking if checkbox is checked

2001-07-04 Thread Steve Werby
Richard Kurth [EMAIL PROTECTED] wrote: I have 5 checkbox's in a form that I what to make sure at least one of the checkbox is checked. input type='checkbox' name='interest' value='basic' input type='checkbox' name='interest3' value='Internet access ' input type='checkbox' name='interest1'

[PHP] Is it me or my server company?

2001-07-04 Thread [EMAIL PROTECTED]
Okay I'm trying to use fopen() to open a file just uploaded via a form. like this: echo brparsing uploaded file . . .; $path = fopen($form_data, r); echo bropeing a path . . .; $thesize = filesize($form_data); echo brgetting size . . .; $tmpdata = fread($path, $thesize); echo brreading data

[PHP] Basic fopen() question

2001-07-04 Thread JCampbell
I had an example of a function to open a file and read its contents into an array. It worked so that each line of the file was one element of the array. I can't find my example, nor can I get it to work the way I'd like. Any help? =- Jonathan Campbell ( [EMAIL PROTECTED] ) Mid days haze and

RE: [PHP] Best way to put text on image

2001-07-04 Thread Jeff Lewis
Todd, I'm not sure if you can write text to an existing image as I add to a new one but here is the code I use... $updateTime = date(F d, Y - h:ia); $text = New Movie Reviews @hyrum.net .$updateTime; $image = ImageCreate(500, 70); $bg = ImageColorAllocate($image, 255, 255, 255); $blue =

Re: [PHP] Basic fopen() question

2001-07-04 Thread ReDucTor
file() http://php.net/file - Original Message - From: JCampbell [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, July 05, 2001 10:48 AM Subject: [PHP] Basic fopen() question I had an example of a function to open a file and read its contents into an array. It worked so that

Re: [PHP] Basic fopen() question

2001-07-04 Thread Philip Olson
Normally when I'm looking for a function I start at a given spot, for example, you've found yourself here : http://www.php.net/manual/en/function.fopen.php From there, a good place to go is the given section, which in this case is here : http://www.php.net/manual/en/ref.filesystem.php

  1   2   >