Re: [PHP] directory listing

2003-08-19 Thread Marek Kilimajer
Wrong place, look at directory functions ;) Matthias Wulkow wrote: Hi php-general, I'm reading through the filesystem function of php and I can't find any function which will list me all the files which are in a certain directory. Am I blind or do I have to "create" myself one? Thanks for help

Re: [PHP] How to open a save-as dialog and then redirect after donwload?

2003-08-20 Thread Marek Kilimajer
I'm not sure, did you get my post? It is exactly what you want. But instead of downloading first and then redirecting, html page is generated first (like redirect), this page is displayed, and then starts the download. Jean-Christian IMbeault wrote: Jason Sheets wrote: Use PHP's file function

Re: [PHP] Problem with mktime, need to add 30 days to current date

2003-08-20 Thread Marek Kilimajer
$endDate=date('Y-m-d',strtotime("+30 day")); James Johnson wrote: Sorry about the previous post. Hi, I need to make a date that is 30 days from the current date, and, am having problems with mktime Here's what I've tried: $endDate=date('Y-m-d',mktime(0,0,0,date('m',time()),30,date('y',time())

Re: [PHP] is the list getting virus spammed?

2003-08-20 Thread Marek Kilimajer
And besides, does everyone after posting receives email from [EMAIL PROTECTED] and [EMAIL PROTECTED] Both seem to be mailing list management softwares. If anyone subscribed these addresses to php-general, it is a bad joke and he/she should fry in hell for eternity. Matt Babineau wrote: Hmm

Re: [PHP] Warning: dl(): Unable to load dynamic library

2003-08-20 Thread Marek Kilimajer
Are all libraries required by php_API.a in your library path? Ashish Borkar wrote: Hello , I have installed apache and php on AIX. I compiled my extension module and put it in the usr/local/lib/php/extensions/no-debug-non-zts-20020429 directory. In my PHP script i have the code dl('php_API.a');

Re: [PHP] How to open a save-as dialog and then redirect after donwload?

2003-08-20 Thread Marek Kilimajer
Yes, I think sf uses this too. [EMAIL PROTECTED] wrote: is this something like what sourceforge has? Marek Kilimajer wrote: I'm not sure, did you get my post? It is exactly what you want. But instead of downloading first and then redirecting, html page is generated first (like redirect),

Re: [PHP] error in apache log

2003-08-20 Thread Marek Kilimajer
Should be application/x-httpd-php. I bet you have this mistake in your apache config files. Peter Berglund wrote: I got alot of this error in my apache log, how do I fix it? [warn] Cannot get media type from 'application-x-httpd-php' -- PHP General Mailing List (http://www.php.net/) To uns

Re: [PHP] error in apache log

2003-08-20 Thread Marek Kilimajer
grep -r application-x-httpd-php /etc/httpd/conf/ now you now the filename, change application-x-httpd-php to application/x-httpd-php and restart apache Peter Berglund wrote: How to fix, where's the problem? "Marek Kilimajer" <[EMAIL PROTECTED]> skrev i meddelandet news:[EM

Re: [PHP] This is getting rediculus

2003-08-20 Thread Marek Kilimajer
I was thinking about it, but how did he manage to send the confirmation email. Maybe the list admin did it ;) Curt Zirzow wrote: Some joker is somehow making all are posts being sent to request subscriptions, help-list, unsubscriptions.. etc. I'm not sure how we can stop this nonsense. Part of

Re: [PHP] back button and forms

2003-08-21 Thread Marek Kilimajer
If the form changes the state on the server, ie inserts something to the db, you should not output html but instead redirect to another page. Then Back button does not go to the post page but to the form page. Tim Winters wrote: Hello, I have a series of forms set over a few pages. The entrie

Re: [PHP] Re: rich text editing

2003-08-21 Thread Marek Kilimajer
Tan Ai Leen wrote: You can also use dhtml/js to code a html editor. But it will work in IE only. And also mozilla 1.3+ http://prdownloads.sourceforge.net/itools-htmlarea/ Download version 3.0 beta -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub

Re: [PHP] datetime

2003-08-22 Thread Marek Kilimajer
Best and fastest way is to let mysql format the date, look into mysql manual for DATE_FORMAT() function. Dale Hersh wrote: I am using a mssql database and I have a question regarding the datetime type. When I write a date to the database it store the date in the following format: 6/8/03 But when

Re: [PHP] text area question

2003-08-22 Thread Marek Kilimajer
Your textarea should be: and not Angelo Zanetti wrote: Hi this is slightly off topic but i hope i will be forgived. I have a textarea and whenever my page loads and I click in it the cursor nevers starts at the very beginning and I have to push the backspace buttton until i get to the start

Re: [PHP] text area question

2003-08-23 Thread Marek Kilimajer
ever overestimate the sanity of your sysadmin." No trees were killed in the creation of this message. However, many electrons were terribly inconvenienced. -Original Message- From: Marek Kilimajer [mailto:[EMAIL PROTECTED] Sent: Friday, August 22, 2003 07:08 AM To: [E

Re: [PHP] need help figuring out how to delete rows?

2003-08-23 Thread Marek Kilimajer
DELETE FROM table ORDER BY timestamp DESC LIMIT 40, 1000 untested, but should work Deadsam wrote: Hi Im making a chatroom using flash and php, the one problem Im having is deleting rows. What I'm looking for is when they click on the button to send the message into php-->mySql it will also

Re: [PHP] need help figuring out how to delete rows?

2003-08-23 Thread Marek Kilimajer
Actualy, it will not. LIMIT can have only one argument with DELETE. This will ($count is the number of rows you need to get in a previous query): DELETE FROM table ORDER BY timestamp ASC LIMIT $count-40 Marek Kilimajer wrote: DELETE FROM table ORDER BY timestamp DESC LIMIT 40, 1000

Re: [PHP] if seat is sold

2003-08-26 Thread Marek Kilimajer
Make an array of sold seats and use in_array() to determine if the seat number should be "strike-through" (and combo box disabled). Jay Fitzgerald wrote: 1. here is my code: http://codedump.phpfreaks.com/viewcode.php?id=1162 2. here is a screenie of my seating chart: http://www.bayou.com/jay/c

Re: [PHP] onchange = "$_SESSION['Alarm'] = getelementbyid('alarmReport').value;"

2003-08-26 Thread Marek Kilimajer
getelementbyid('AlarmReport').value will not get the value of the selected option. Use this.options[this.selectedIndex].value Session var can be set only on the server, you must post the form to get the value or use some javascript to do it, eg: img = new Image(); img.src="set_session_var.php?va

Re: [PHP] verifying sql INSERTs

2003-08-26 Thread Marek Kilimajer
mysql_query() will return true for queries that don't return rows and were executed without error, so you can use return mysql_query(); You should also make a UNIQUE index on email column, then you can check the number returned by mysql_errno(), one number I don't remember signals duplicate entr

Re: [PHP] XmlRPC - Server did not understand request

2003-08-26 Thread Marek Kilimajer
Donald Tyler wrote: sending http request: POST Test_Server/XML/PHP_Servers/XMLTEST.php HTTP/1.0 should be POST /Test_Server/... (asuming Test_Server is a directory) User-Agent: xmlrpc-epi-php/0.2 (PHP) Host: localhost:80 should be Host: localhost Content-Type: text/xml Content-Length: 111 test

Re: [PHP] case insensitive sort

2003-08-26 Thread Marek Kilimajer
It right there under your nose: strcasecmp() Steve Buehler wrote: I am using the following function for a sort on an array. I hope someone can help me out here and let me know how to change it to make it a "case insensitivie" sort. Right now, it is "case sensitive" so the sort of the array wi

Re: [PHP] Re: permission problem - i guess

2003-03-17 Thread Marek Kilimajer
This is wrong: extension_dir => /root/php-4.3.0/php-4.3.0/modules => /root/php-4.3.0/php-4.3.0/modules apache does not run as root, so it does not have access to the directory. Move the content of the directory to another suitable directory (e.g. /usr/local/lib/php4) and change its permisions. Al

Re: [PHP] Compiled PHP ?

2003-03-17 Thread Marek Kilimajer
There are comertial solutions, check out http://www.zend.com Niks wrote: Dear All, I am in Application Developlment in PHP and currently developing a project in PHP. I need to know if there is a way that i do not need to give source code for the product i develope i.e. is there any way to compil

Re: [PHP] Log file details required !! Help

2003-03-17 Thread Marek Kilimajer
Monil Chheda wrote: Am I MISSING SOMETHING ? $flag = "false"; if ($fp = fopen("web.log","r")) { while (!feof($fp)) { $line = fgets($fp,1024); Here you check if there is an end of string $line, sure there is, there are no infinite strings if (ereg("\$",$line))

Re: [PHP] copy ...

2003-03-17 Thread Marek Kilimajer
I have a strong feeling that POSIX regexs cannot do multiline, try using perl-compatible, or make a loop to read the textarea content line by line John Taylor-Johnston wrote: I need to process the contents of SU: something ... blah blah¶ TI: Title ... asasa asasas asas¶ AU: author field ... as

Re: [PHP] sorting results in PHP

2003-03-17 Thread Marek Kilimajer
Use temporary table, it is simple and fast bill wrote: I have a query that returns results including the fields Year, Month, and Day that I want to sort by date. Because of the nature of the query (it includes a GROUP BY statement), I cannot sort it in the query. How can I sort the results? kind

Re: [PHP] script conflicts

2003-03-18 Thread Marek Kilimajer
I can't see mysql_fetch_row() function anywhere in your code. Sebastian wrote: i have two scripts included into one page, one of them i have been running for a long time .. i recently made another script and when i include it into the same page the other script returns this error: Warning: mysql_

Re: [PHP] script conflicts

2003-03-18 Thread Marek Kilimajer
, and i cannot figure out why. - Original Message - From: "Marek Kilimajer" <[EMAIL PROTECTED]> | I can't see mysql_fetch_row() function anywhere in your code. | | Sebastian wrote: | | >i have two scripts included into one page, one of them i have been running | >fo

Re: [PHP] MySQL qusetion

2003-03-19 Thread Marek Kilimajer
I don't know about the tool, but maximum file upload is set in php.ini - upload_max_filesize, post_max_size must be higher. Restart apache afterwards Marc Bakker wrote: Hello, I want have a Apache/PHP/MySQL configuration running on Win2000 (SP3). In my website I have a file-upload page where us

Re: [PHP] Proc_open() problems

2003-03-19 Thread Marek Kilimajer
The problem is that ssh (and various others, like passwd) command does not use the standard input/output functions, but there is a workaround program for this, but I don't remember its name. Piero B. Contezini wrote: I'm having problems while opening a ssh session thru proc_open(), anyone knows

Re: [PHP] Subtotal

2003-03-19 Thread Marek Kilimajer
SELECT *, SUM(units) subtotal FROM table GROUP BY date - do you mean this? Mike Smith wrote: I'm trying to present a simple SELECT statement "GROUPED" by date. Ex. WOUNITSOEMCOMMENTSDATE 123 10MeNotes03/18/2003 456 5

Re: RES: [PHP] Proc_open() problems

2003-03-19 Thread Marek Kilimajer
search freshmeat.net Piero B. Contezini wrote: Do you have any idea where I can find more info about it? Piero -Mensagem original- De: Marek Kilimajer [mailto:[EMAIL PROTECTED] Enviada em: quarta-feira, 19 de março de 2003 12:02 Para: Piero B. Contezini Cc: [EMAIL PROTECTED] Assunto

Re: RES: [PHP] Proc_open() problems

2003-03-19 Thread Marek Kilimajer
Just found it: http://expect.nist.gov/ Piero B. Contezini wrote: Do you have any idea where I can find more info about it? Piero -Mensagem original- De: Marek Kilimajer [mailto:[EMAIL PROTECTED] Enviada em: quarta-feira, 19 de março de 2003 12:02 Para: Piero B. Contezini Cc: [EMAIL

Re: [PHP] Zip Way of life.

2003-03-19 Thread Marek Kilimajer
readgzfile is for *.gz files. Either use zip file functions (rarely supported) or PclZip (http://www.phpconcept.net/pclzip/index.en.php) Vincent M. wrote: Hello, I'd like to uncompress to the Hard disk a zip file send by the browser. At this time I do this: function uncompresszip($zipfile) {

Re: [PHP] error message ... never seen this one before.

2003-03-19 Thread Marek Kilimajer
Put single quotes around the strings in your sql statementS: $sql2 = "SELECT id FROM store_name WHERE name = '".$name[$i]."'"; ^ ^ if this does not help, print out the query strings. Daniel McCullough wrote: I get this error. Unknown c

Re: [PHP] function for $array

2003-03-21 Thread Marek Kilimajer
I would use foreach instead of for, your function does not guarantie checking all elements and also checks elements that might not have been set. pei_world wrote: I want to use the following function the test the array elements, if all element is number return true, otherwise false; but the comm

Re: [PHP] last modification date of remote files

2003-03-21 Thread Marek Kilimajer
If it is a http, you can use HEAD request and check Last-Modified header, if it is ftp, use ftp functions, namely ftp_mdtm() Christian Rosentreter wrote: Hello, Is there a way to get the last modification date of a remote file? fstat() seems not to work on remote files. Also filemtime() not w

Re: [PHP] How to prevent re-entry of data upon page refresh?

2003-03-21 Thread Marek Kilimajer
use redirect - after inserting the data into the database redirect the user to another page WMB wrote: Am using dreamweaver and hv an entry form on a page, which works fine, unfortunately upon page refresh the data gets entered another time and another time again on refresh. Any solutions on thi

Re: [PHP] Array_search wildcard

2003-03-21 Thread Marek Kilimajer
$found=array(); foreach($array as $key => $value) { if(ereg('RE.+',$value)) { // optionaly use eregi for case insensitiveness $found[$key]=$value; } } Liam Gibbs wrote: Is there such a thing as an array_search wildcard? Say I want to find anything beginning with RE and having zero o

Re: [PHP] Is there a way to access all the variables in my script?

2003-03-21 Thread Marek Kilimajer
$GLOBALS Daevid Vincent wrote: Is there some global array or something that contains all the variable names (not even values per se) that are used in my script. Here's the scenario. Like most of you, I do a lot of mySQL db work. So I tend to use this: if (mysql_num_rows($result) > 0) { $row = m

Re: [PHP] PHP preg_match_all()

2003-03-21 Thread Marek Kilimajer
It's in the manual: /U/ (PCRE_UNGREEDY) This modifier inverts the "greediness" of the quantifiers so that they are not greedy by default, but become greedy if followed by "?". It is not compatible with Perl. It can also be set by a (?U) modifier setting within the pattern. Jay Fitzg

Re: [PHP] Setprecision ?? pls help

2003-03-24 Thread Marek Kilimajer
number_format Adriaan Nel wrote: Hi all, I'v got the following: round ($val1,4); echo "$val1"; It works fine, but when $val which is a float, contains for instance 1.1 I want it to output 1.1000 instead of just 1.1 I know in C++ this can be done with setprecision(), but I can't seem to fin

Re: [PHP] How to count & check # of user connected

2003-03-24 Thread Marek Kilimajer
This has been discussed before. It depends on what kind of authentication you use. Sessions are great for this, but you need to use your own session save handler, save sessions to sql db, and then use select count(*) P Lok wrote: Does anyone know how to count & check # of user logged on (and

Re: [PHP] Getting linux server's country

2003-03-24 Thread Marek Kilimajer
Manual: string *setlocale* ( mixed category, array locale) If /locale/ is zero or "0", the locale setting is not affected, only the current setting is returned. Martin Towell wrote: So noone has any ideas at all ? Surely not ? If my question's too vague, please let me know and I'll try to expand

Re: [PHP] Apache environment variables

2003-03-24 Thread Marek Kilimajer
I think this can be acoplished with some apache configuration directives. Php has nothing to do with this, as it funtions besides CGI's Jeremy Russell wrote: Hello list.. I have an issue.. I have users athenticating to apache using the ldap_mod_auth module, when they authenticate it populates t

Re: [PHP] can't make str_replace work with single quote

2003-03-24 Thread Marek Kilimajer
works for me: echo str_replace('2003','2002', "'2003-1;1 00:00:01' AND '2003-3-1 23:59:59'"); DomIntCom wrote: this should be pretty straight forward, but I cannot make this work for some reason. $ndate = str_replace("'",'', "'2003-1;1 00:00:01' AND '2003-3-1 23:59:59'"); to extrapolate we have

Re: [PHP] Interesting Error??

2003-03-24 Thread Marek Kilimajer
This is either bug in the extensions, or you give wrong parameters to a function or method. Fatih Üstündağ wrote: I'm using Command Line php and php-xslt functions ( sablotron 0.96 ) I have got an error such that : php: output.cpp:1554: Bool OutputterObj::eventAttributeStart(Situation &, const

Re: [PHP] How to write a module for php?

2003-03-24 Thread Marek Kilimajer
I think there is a module example/template in the php sources hzqbbc wrote: >Hi all: > > I want to write a small module for php and reduce some overhead while doingthe same > job with PHP scripts. > > But i'm new to php dev, and even don't konw about the archtecture of phpmodule.. So > could

Re: [PHP] Feasability of Serial functions and constantly runningprogrms

2003-03-24 Thread Marek Kilimajer
CLI does not have time limit by default, and memory should not be a problem too, but you will need to use unset() more often than it is used to in web scripts. Also look at direct IO functions, there is something about serial ports Jason Young wrote: After upgrading to RedHat 8.0 and effective

Re: [PHP] php regexp question

2003-03-25 Thread Marek Kilimajer
Just an idea: In $string replace any occurence of ç to c, search for offsets of francoise, and then add bold tags at the offsets (and end tags at offsets +strlen('francoise')) in the original string. cpaul wrote: hi i've made a small php site that is searching against french documents stored i

Re: [PHP] Changing variables in a text file

2003-03-25 Thread Marek Kilimajer
If you know what is suposed to be in the file you can simply build up a new file. If you don't know what is in there but only that you need to change this to that, use file functions and regexes. You might also consider using an array instead of plain variables, so your file will become $config

Re: [PHP] Array query

2003-03-25 Thread Marek Kilimajer
www.php.net/array_diff shaun wrote: Hi, say I have two arrays: X and Y. How can i get the values I X that arent in Y and assign them to another array? Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] How to solve include_path / safe_mode / open_basedir /document_root?

2003-03-25 Thread Marek Kilimajer
/safe_mode_include_dir/ *string* UID/GID checks are bypassed when including files from this directory and its subdirectories (directory must also be in include_path or full path must including). As of PHP 4.2.0, this directive can take a

Re: [PHP] substr() on part an ereg() capture

2003-03-25 Thread Marek Kilimajer
$str = preg_replace('|(]*>[^<]{55})[^<]+()|','$1...$2', $str); Justin French wrote: Hi, I have this ereg to turn URLs into links: eregi_replace("([[:alnum:]]+)://([^[:space:]]*)([[:alnum:]#?/&=])", "\\1://\\2\\3", $str); ... found it in the manual i think, or maybe on weberdev.com examples Anyh

Re: [PHP] warning when I compile PHP

2003-03-25 Thread Marek Kilimajer
As long as everything is working, ignore it. Richard Kurth wrote: What does this mean I get this when I compile PHP. It is all through the out put when make is run. What can I do to make it not be there cc1: warning: changing search order for system directory "/usr/include" cc1: warning: as i

Re: [PHP] Zip Way of life.

2003-03-26 Thread Marek Kilimajer
So use PclZip class, it is pure php without the need to have nay special extension installed Vincent M. wrote: Daevid Vincent wrote: You could use the exec() or shell_exec() and just do it via command line method... Yes but gunzip does not work when there are more than one file in the zip file

Re: [PHP] substr() on part an ereg() capture

2003-03-26 Thread Marek Kilimajer
Forgot to mention this is to be run after eregi_replace("([[:alnum:]]+)://([^[:space:]]*)([[:alnum:]#?/&=])", "\\1://\\2\\3", $str); as it only replaces long strings within tags Marek Kilimajer wrote: $str = preg_replace('|(]*>[^<]{55})[^<]+()|',&#x

Re: [PHP] Getting Results for a month from a date field

2003-03-26 Thread Marek Kilimajer
|MONTH(date)| Returns the month for |date|, in the range |1| to |12|: SELECT * FROM employees WHERE MONTH(hiredate)='$month' Hunter, Jess wrote: I have a field named "hiredate" and it is in the typical MySQL format (-MM-DD) what I am trying to do it be able to create a query that when I

Re: [PHP] What am I not understanding about $GLOBALS['myvar'] vsglobal $myvar?

2003-03-26 Thread Marek Kilimajer
Daevid Vincent wrote: This one does NOT work the way I would expect it to? function clearContactVars() { foreach ($GLOBALS as $key => $value) { if ( substr($key,0,8) == "contact_" ) { //echo "GLOBALS['$key'] = $va

Re: [PHP] ISP Blues

2003-03-26 Thread Marek Kilimajer
Try executing dl('php_gd.dll'); first (before calling any gd functions), also check the output of phpinfo() if they have gd enabled Anthony Ritter wrote: The following script works fine when I test it at home using localhost on: MS Win 98 Apache Server PHP 4.1.1 php_gd.dll I then publish the scri

Re: [PHP] What am I not understanding about $GLOBALS['myvar'] vsglobal $myvar?

2003-03-27 Thread Marek Kilimajer
s. For shits and giggles however I tried your way and it made no difference to the code. Still didn't work right. -Original Message- From: Marek Kilimajer [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 26, 2003 1:16 PM To: Daevid Vincent Cc: [EMAIL PROTECTED] Subject: Re: [PHP]

Re: [PHP] What am I not understanding about $GLOBALS['myvar'] vsglobal $myvar?

2003-03-27 Thread Marek Kilimajer
there is no $ in front of GLOBALS ;) Ernest E Vogelsinger wrote: At 09:24 27.03.2003, Marek Kilimajer said: [snip] echo "GLOBALS['$key'] = $value\n"; is right because $key is in double quotes (the outermost qoutes) -

Re: [PHP] user permission system (integer to small)

2003-03-27 Thread Marek Kilimajer
I would use array $user_perm ( 1 => false, // for admin 2 => true // for news 4 => true // news_create 8 => false // news_delete . . . ) as you can see there are gaps that you can use for other permissions, and this way all you need is to rewrite if($user_perm & $perm == $perm ) to if($user_p

Re: [PHP] MD5 in PHP and MD5 in Perl dont match up.

2003-03-27 Thread Marek Kilimajer
In PHP.. $data = "Cheese\n"; - trailing newline char Steven Carr wrote: Hello All, Im having trouble with compatibility between MD5 Digest in Perl and in PHP. They dont give the same results. Perl #!/usr/local/bin/perl use strict; use Digest::MD5 (); my $to_be_hashed = "Cheese"; my ($hash)

Re: [PHP] version

2003-03-27 Thread Marek Kilimajer
It's right at the top. I guess it is so big you could not see it ;-) Diana Castillo wrote: How can I tell which version of php I have? I didnt see it with phpinfo() -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] getimagesize

2003-03-27 Thread Marek Kilimajer
Where you get this error from? Does it come from the browser or is it the script output? Diana Castillo wrote: anyway to not get an error when doing getimagesize if you get this response? HTTP request failed! HTTP/1.1 404 Not Found -- PHP General Mailing List (http://www.php.net/) To unsu

Re: [PHP] Uploading Files Via PHP

2003-03-27 Thread Marek Kilimajer
not necesserily both, either of them is enought: drwxrwxrwt2 root root 188416 Mar 27 11:23 /tmp or drwx--2 apache apache 188416 Mar 27 11:23 /var/www/uploads daniel wrote: possibly a permissions problem , dir needs to be 777 and owned by httpd -- PHP General

Re: [PHP] Uploading Files Via PHP

2003-03-27 Thread Marek Kilimajer
read it ? chmod 777 + owned by httpd -Original Message- From: Jason Wong [mailto:[EMAIL PROTECTED] Sent: Thursday, March 27, 2003 9:40 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] Uploading Files Via PHP On Thursday 27 March 2003 18:25, Marek Kilimajer wrote: not necesserily both, ei

Re: [PHP] Pipe broken

2003-03-28 Thread Marek Kilimajer
Manual -> Features -> Connection handling Benja wrote: Hi all, is it possible to know in PHP if the client hit the stop button or close the browser ? Here is what I read on a forum : I was told you cannot when I asked 'way back when. When the user hits stop, the pipe is brok

Re: [PHP] Anything that is changed when the browser is closed

2003-03-28 Thread Marek Kilimajer
If you set cookie with lifetime set to 0, the cookie is erased. Sure this will work only if the user has cookie enabled Haseeb Iqbal wrote: hi, just wanna know if there is anything in php that can be used (besides sessions) to get anything from the $_SERVER that is unique and gets changed each

Re: [PHP] tips on sorting an array of objects by an attribute?

2003-03-28 Thread Marek Kilimajer
use usort neko wrote: Hi Guys, Just after some experience... What's the best way to sort an array of objects by one of their attributes, accessed by $obj->getFoo() (its a number) ? I was thinking a bubble-sort, making multiple passses and switching array elements until there are no more switches

Re: [PHP] Problem with PHP

2003-03-28 Thread Marek Kilimajer
My guess is you have register_globals off. You need to use $_GET['get_variable'] or $_POST['post_variable'] '; echo $_POST['post_variable'].''; ?> Navratil, Jan wrote: Hallo, i have problem with running PHP4.3.1 on Apache1.3.19 on W2K. I instaled everithng by install.txt. Is posible to

Re: [PHP] Session Theft

2003-03-28 Thread Marek Kilimajer
You can give the users the oportunity to turn ip check on (a checkbox in the login form). There is also a header that is set by many proxies to the ip address of the client, but I don't remember its name (maybe (X-)Forwarded-For) Haseeb Iqbal wrote: i just want to figure out a way by which i c

Re: [PHP] preg_replace_callback and brackets

2003-03-30 Thread Marek Kilimajer
Maybe you should use /\b/ word boundary instead of all the or's Joshua Moore-Oliva wrote: I'm kind of confused right now... when I call preg_replace_callback with a regular expression with brackets, sometimes I get an array back with multiple elements like array(3) { [0]=> string(19)

Re: [PHP] File access denied!!!

2003-03-31 Thread Marek Kilimajer
You need to chmod o+r them (in the ftp client). Also the path must be readable by the web server. You might want to set up the ftp server to give these permisions automaticaly Joakim Larsson wrote: I am running a ftp server on my mac along with the webserver on OS 10.2. The files that i upload

Re: [PHP] Classes

2003-03-31 Thread Marek Kilimajer
including or requiring a file does not change the working directory, so if you have this structure: index.php A/ClassA.class.php B/ClassB.class.php and index.php includes A/ClassA.class.php, from ClassA.class.php you need to use include('B/ClassB.class.php'); Donahue Ben wrote: I have a ClassA

Re: [PHP] line feeds

2003-03-31 Thread Marek Kilimajer
$string = str_replace("\n",'', str_replace("\r",'', $string)); Diana Castillo wrote: How can I remove all line feeds from a document? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] accessing protected remote files

2003-03-31 Thread Marek Kilimajer
You need to use socket functions and check the response headers David Feldman wrote: I have a script that needs to open a remote file on another Web server, which may or may not be protected (for example, by an htaccess file). What would be the best way to check if it's protected, and if so, p

Re: [PHP] PHP and Front Page XP

2003-03-31 Thread Marek Kilimajer
$f1 is the temporary file namen your server, you need to use $f1_name, or even better $_FILES['f1']['name'] Tomás Liendo wrote: Hello people, I have the following strange problem: I designed a form with Front Page XP, and with PHP I save the fields in a MySQL data base. All fields work perfect,

Re: [PHP] Problem installing PHP 4.3.1 - won't compile due to odderror.

2003-04-01 Thread Marek Kilimajer
Run ./configure --help, it will tell you how to specify the path to curl libraries Don wrote: Hi, Trying to install PHP 4.3.1 but getting the following error message: "configure error: cURL version 7.9.8 or later is required to compile php with cURL support" I have curl installed; when I issue

Re: [PHP] can't get imagecopy, etc. function to work.

2003-04-01 Thread Marek Kilimajer
If imagecopy function does not exists, gd is not either installed or enabled. Check your php.ini if it is enabled and the extension dir if the extenssion is there. If it is not there, run configure once again with the right options, also read INSTALL. Wo Chang wrote: Dear Experts, Seems like

Re: [PHP] excel 2 csv 2 mysql

2003-04-01 Thread Marek Kilimajer
The quotes are valid, use fgetcsv() function, it will strip them daniel wrote: ok guys are you ready , /www_tools/apache/catdoc/bin/xls2csv test.xls > test2.csv gave me this "column1`","column2","column3" "faffafs","fsafsa","fsafs" "fssfa","fasfs","fasfs" "fasaf","fasfs","asffaf" "fafs","sfafs

Re: [PHP] Problem installing PHP 4.3.1 - won't compile due to odderror.

2003-04-01 Thread Marek Kilimajer
on to say --> --with-curl=/usr/bin as that is the location of the curl executable but I am still getting the compile error. Any other suggestion? - Original Message - From: "Marek Kilimajer" <[EMAIL PROTECTED]> To: "Don" <[EMAIL PROTECTED]>

Re: [PHP] Another Problem installing PHP 4.3.1 - won't compile dueto odderror.

2003-04-01 Thread Marek Kilimajer
: error: snmp.h not found. Check your SNMP installation." I've installed the ucd-snmp rpms so what am I missing? Thanks, Don - Original Message - From: "Marek Kilimajer" <[EMAIL PROTECTED]> To: "Don" <[EMAIL PROTECTED]> Cc: "php list"

Re: [PHP] Another Problem installing PHP 4.3.1 - won't compile dueto error.

2003-04-02 Thread Marek Kilimajer
My guess you have a mess in your curl library installation. For example you use header from version 7.9.5 and specify that you have version 7.10.3. Find all libcurl.so and curl.h files on your system and check if they are really the version you think they are. You may try running rpm -V libcurl

Re: [PHP] PHP and Front Page XP

2003-04-02 Thread Marek Kilimajer
No, this information is not provided by the browsers. Tomás Liendo wrote: Thanks! Your help solved my problems! Is there some form of obtaining the complete path??? I tried $f1_path, but don't work... :-) Thank you very much, -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

Re: [PHP] security flaw?

2003-04-02 Thread Marek Kilimajer
It should not be too difficult to change the delphi utility to post a sql or csv file to a php script, in the script you can check the sql commands and then execute them or parse the csv file respectively. The password is not really hidden, maybe it is not even scrambled in the binary, and can

Re: [PHP] UTF-8 encoding/decoding

2003-04-02 Thread Marek Kilimajer
There are 2 separate extenssions - iconv and recode Michael Mulligan wrote: Hi So say I have some UTF-8 (not certain, but probably in UTF-8 format, I need to check some more) encoded text. The text comes in encoded already, so it's not an htmlspecialchars kind of quick fix. For instance, I get '

Re: [PHP] uploading entire directory, with or without compression...

2003-04-02 Thread Marek Kilimajer
Your clients can zip the folder, upload the zip file, and then you can on the server side use PclZip class to read the content Kenn Murrah wrote: Greetings. I have a web site which permits my clients to upload a file via php4, and it works great ... however, some clients have requested that the

Re: [PHP] QUESTION - user management

2003-04-02 Thread Marek Kilimajer
Check the archives, this has been discused many times before [EMAIL PROTECTED] wrote: How do applications know how many users are logged into the system? For example postnuke will tell you '3 users online, 2 members'. Im gussing it uses sessions, but how? Edd Barrett (http://www.filibusta.net)

Re: [PHP] accessing protected remote files

2003-04-02 Thread Marek Kilimajer
Check examples and user notes in the manual: http://www.php.net/manual/en/function.fsockopen.php David Feldman wrote: How would that work? --Dave On Monday, March 31, 2003, at 09:27 AM, Marek Kilimajer wrote: You need to use socket functions and check the response headers David Feldman wrote

Re: [PHP] Check For Space

2003-04-02 Thread Marek Kilimajer
if(strpos($string, ' ') === false) { //space found } if you don't want any white character: if(ereg('\s',$string)) { //white character found } shaun wrote: Hi, How can i make sure a value sent from a form has no spaces in it? -- PHP General Mailing List (http://www.php.net/)

Re: [PHP] Warning Extract

2003-04-02 Thread Marek Kilimajer
Andy wrote: (and Marek fixed) $connection = mysql_connect($host, $user,$password) or die ("Couldn't connect to server."); $db = mysql_select_db($database, $connection) or die ("Couldn't select database."); $sql = "SELECT name FROM members WHERE username=

Re: FW: [PHP] Html forms to php scripts

2003-04-02 Thread Marek Kilimajer
VanZee, Timothy wrote: Repost because no one replied originally. Are there any other lists that anyone knows of for php that could be more helpful? I'm quite disappointed in this one because I thought this was a fairly easy question for those who have been working with php for a while. Sorry,

Re: [PHP] Warning Extract

2003-04-02 Thread Marek Kilimajer
O login (username,loginTime) VALUES ('$logname','$today')"; does that make any sense? Andy "Marek Kilimajer" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Andy wrote: (and Marek fixed) $connection = mysql_connect($hos

Re: [PHP] Ok, problem found, but that makes way for another...

2003-04-03 Thread Marek Kilimajer
The old installation is likely in /usr, and you installed in /usr/local. Simply remove the old installation (man rm ;-) and change httpd.conf to look for php in the new place Ryan Vennell wrote: ok, my last post stated that i've tried reconfigureing.making/makeinstalling php 4.3.1 a tons of ti

Re: [PHP] *Umlauts/UTF-8

2003-04-03 Thread Marek Kilimajer
Where do you get the ?'s and squares? In the browser? Did you specify encoding? Alexey Lysenkov wrote: Hello, I am having a problem with umlauts in utf-8 encoded txt file, which is being read by my script. Instead of umlauts I get ? or squares or anything else, but not those umlauts. What is

Re: [PHP] newbie2

2003-04-03 Thread Marek Kilimajer
You need to restart http server, php is loaded usually as module. For apache on unix: apachectl restart or /etc/init.d/httpd restart on windows close the apache console and start apache again Ilyas wrote: It is an online shop : oscommerce How can I restart Php? Any ideas??? Ilyas At 06:42 02.04.

Re: [PHP] Re: Database Question

2003-04-03 Thread Marek Kilimajer
What is the problem? You need to be more clear about it, especially you did not tell anything about the tables, how they are related and what they contain José Pereira wrote: I Posted this and no one has helpedis this possible to get working or do I have to do it differently?? Thanks in adv

Re: [PHP] uploading entire directory, with or without compression...

2003-04-04 Thread Marek Kilimajer
David T-G wrote: It's certainly a start :-) Remember that your clients would have to install the java application on their computer, because java applets (the one running from web) don't have permission to access files on local computer. The same limitation has javascript. I have heard abo

<    1   2   3   4   5   6   7   8   9   10   >