Re: [PHP] Linux Question

2002-11-24 Thread Marek Kilimajer
You might solve this by providing different style sheet to on linux running browsers: if(ereg('Linux',$_SERVER['HTTP_USER_AGENT'])) { echo ''; } else { echo ''; } conbud wrote: Hey. This really isnt a PHP question. but what fonts do you reccomend using so they look decent on linux. Mainly

Re: [PHP] Insert file into sql server binary field.

2002-11-24 Thread Marek Kilimajer
Read the file, addslashes(), and then insert it Naif Al-Otaibi wrote: How can I insert a file into a binary field in sql server 2000. Do I need some function in the query like upload or just read the file and insert it. Thanks, -- PHP General Mailing List (http://www.php.net/) To unsubs

Re: [PHP] Insert file into sql server binary field.

2002-11-24 Thread Marek Kilimajer
Never heard of that, in fact, addslashes escapes also NUL, so it must be binary, and BLOB is like TEXT, except for comparison is case sensitive in BLOB. And what if the file contains malicious code - it might come from remote user's upload Sterling Hughes wrote: Read the file, addslashes(), and

Re: [PHP] Creating mySql search feature.....

2002-11-24 Thread Marek Kilimajer
You first need to separate the words and then build your query: $words = explode(' ',$S_For); $cond=''; foreach($word as $str) { $cond .= " $S_From LIKE '%$str%' AND "; // replace AND with OR if you want ANY word } // remove trailing AND(last 4 chars) or OR(last 3 chars) $cond = substr($cond,

Re: [PHP] php and caching

2002-11-24 Thread Marek Kilimajer
Provide a back_to_the_form link and pass all values, then on the form assign them to the fields. Alex wrote: Hi, I have a few pages on my site that contains dynamical content that must be "processed" each time the page is loaded. But I'd also want to allow the users to be able to use the back b

Re: [PHP] Insert file into sql server binary field.

2002-11-25 Thread Marek Kilimajer
store binary objects in text. Chris Shiflett wrote: --- Marek Kilimajer <[EMAIL PROTECTED]> wrote: BLOB is like TEXT In what way? BLOB is binary large object. Text is ... text. One is binary, and the other is ASCII. The only similarity I can think of is that they both represent data. H

Re: [PHP] Re: File Write Permission Errors - HELP! URGENT!!!

2002-11-25 Thread Marek Kilimajer
If you want to create a file, the directory must be writeable to the server proces, so if the directory is owned by you do chmod o+w chat Phil Powell wrote: I did just that. Permissions are set the /chat folder as it is in all other folders. This is the first time I've ever done fopen with "w

Re: [PHP] Upgrade issues

2002-11-25 Thread Marek Kilimajer
Check the owners of directories and files, they must be the same as for /usr/local/www/v-webs/games.savage.za.org/html/index.php, then it should work under safe mode too. Chris Knipe wrote: if (file_exists("themes/$ThemeSel/modules/$name/$mod_file.php")) { $modpath = "th

Re: [PHP] & in Query String

2002-11-26 Thread Marek Kilimajer
Get mailed also $_SERVER['HTTP_USER_AGENT'], I would like to see which browser does that. & should get translated to &, but not vice versa Jonathan Rosenberg wrote: I have a page with thumbnail pictures that can be clicked on to see a larger picture. Each picture is hyperlinked as follows I

Re: [PHP] array manipulations

2002-11-26 Thread Marek Kilimajer
if all you might have there is 'error', try if(array_search('error',$array) === FALSE) { echo 'not ok'; } if you might have different strings, do $result='ok'; foreach($array as $v) { if($v) { $result ='not ok'; break; } } Mattia wrote: Can anyone suggest an ELEGANT way t

Re: [PHP] Confirm message box

2002-11-27 Thread Marek Kilimajer
I use this javascript code: function confirmAction(question, uri) { if(confirm(question)){ document.location=uri + '&confirm=1'; } return false; } create link like this: delete If user has javascript enabled, on delete.php you will get $_GET['confirm']=1, and you know the action

Re: [PHP] Identifying users

2002-11-27 Thread Marek Kilimajer
Try http://www.xpenguin.com/ip-atlas.php Craig wrote: Anyone know off of hand - Is there a reliable/semi-reliable way of looking users up by country. e.g - On the likes of altavista or google, I have noticed that if you type in www.altavista.com and you are in the uk, it will redirect to uk.alt

Re: [PHP] Is it possible to do this in PHP ? If it is then, how ?

2002-11-27 Thread Marek Kilimajer
Using javascript you can change the src of image. So you start with blank image, and if onchange event handler finds out the input field has two chars, changes the src of the image to say show_image.php?id=input.value Axis Computers wrote: Hi, I was wondering if this is possible to in PHP ...

Re: [PHP] sorting files in directory

2002-11-27 Thread Marek Kilimajer
Yes, you do. Add each dir to an array, sort the array, then loop through it printing the dirs out. Nick Wilson wrote: Hi all, I have several directories filled with files written like this: * 02-09-19-filename.etc * 02-10-02-anotherfile.whatever How does php order these files if read fr

Re: [PHP] Redirecting after changing server's IP address!

2002-11-27 Thread Marek Kilimajer
Is the connection still valid after changing the IP? I think this should work: You should run your perl script from within shutdown function, so it is run after the connection is closed and any output is sent to the browser. Send header('Refresh: 5; url=http://NEW_IP/next_page.php'); to redirect

Re: [PHP] sorting files in directory

2002-11-27 Thread Marek Kilimajer
Justin French wrote I think PHP reads them in date created order, or something else... The order is not guarantied, it just happens to be so. I suppose most filesystems return files in the order they were added to the directory, but also reuse the space left after deleting a file. -- P

Re: [PHP] controlling ownership on file uploads ...

2002-11-28 Thread Marek Kilimajer
Besides what was said before, you don't even need to delete it, it will be deleted when your script is done. If you want to keep it, you have to move it elsewhere. Kenn Murrah wrote: Greetings. I've written a simple form to allow my clients to upload files to me, and it works fine EXCEPT that t

Re: [PHP] Bad File Mode?

2002-11-28 Thread Marek Kilimajer
You can stat (get filesize, modification time, permissions) only local files - download it first and then get its filesize if you need it. Steve Keller wrote: I'm still trying to get a file posted to another server, but I seem to have run across an odd snag, and I was hoping someone can point o

Re: [PHP] **** Converting dynamic webpages into static HTML pages

2002-11-28 Thread Marek Kilimajer
Easy and intuitive are all the programs that allow you to download the whole website http://download.com.com/3150-2071-0.html?tag=dir Ron Stagg wrote: I have an interesting challenge. I have built an online product catalog that is driven entirely by the contents of the product database (MySQL).

Re: [PHP] printing screen without the print dialog

2002-11-28 Thread Marek Kilimajer
No, this is not possible - security restrictions Duky Yuen wrote: I am having this problem, I want to print something directly to my printer without having that print dialog. What to do know? Is this possible? Duky -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] session problems again

2002-11-28 Thread Marek Kilimajer
Check your session files (usually in /tmp) if they are what they are supposed to be Jason Romero wrote: --when using session registered variables --i can only get them to save as session variables for one page --then on the next page they are gone --far as i can tell the variables are not gettin

Re: [PHP] Multidimensional arrays (more and more...)

2002-11-28 Thread Marek Kilimajer
if [$number] is unique, use it as the key: // $issue[]["number"] = "number"; -- removed $issue[$number]["headline"] = "headling"; $issue[$number]["writers"] = "writers"; $issue[$number]["list"] = "list"; $issue[$number]["senttosubscribers"] = "0"; $issue[$number]["month"] = "05"; $issue[$number]["

Re: [PHP] Detecting email bounces sent by the mail function?

2002-11-28 Thread Marek Kilimajer
Added to this: you won't receive the immediately, so you are not able to tell the user that sending the mail has failed. DL Neil wrote: Hello Ade, Is it possible to detect with PHP whether an email sent using the PHP 'mail' function has bounced back or has not been delivered? I currently al

Re: [PHP] Is it possible to do this in PHP ? If it is then, how ?

2002-11-29 Thread Marek Kilimajer
In the browser it might look something like this: Pizza place
function add(n) {
document.pizza.num.value=document.pizza.num.value + n;
if(document.pizza.num.value.length!=2) {
document.pizzaimage.src='blank.jpg';
} else {
// alert("Pizza is " +

Re: [PHP] includes & globals

2002-12-02 Thread Marek Kilimajer
Is it not set or is it empty? Try adding this code to menu function after global $LOCATION; if(!isset($LOCATION) die('$LOCATION is not set!'); Cesar Aracena wrote: Hi all, I'm making a site with a dynamic menu based on IF statements and DB queries, but have this little problem which I can't und

Re: [PHP] page auto reload after new window closed

2002-12-02 Thread Marek Kilimajer
This would prevent nonjavascript browsers from submiting the form. Better would be to use the page that comes after submiting: Form submited successfully Form submited successfully Ernest E Vogelsinger wrote: At 09:21 02.12.2002, Michael P. Carel said: [s

Re: [PHP] some data output formatting and grouping question...

2002-12-02 Thread Marek Kilimajer
you got the results, now loop it, and if you find Y is different from the previous one, print it: $previous=''; while($row=mysql_fetch_array($res) { if($row['Y']!=$previous) echo "$row[Y]"; echo "$row[X]"; } Victor wrote: I just have a fucking mental block; I cannot at all conceive the ne

Re: [PHP] How do I run a command as root?

2002-12-02 Thread Marek Kilimajer
As your server process run as nobody or apache, you need a wrapper setuid root program that will execute the command you want, but you must be very carefull so it is not exploitable. Luke van Blerk wrote: Hi I'm trying to find out how to run a command on the server as root. Does anybody know h

Re: [PHP] Disable refresh?

2002-12-02 Thread Marek Kilimajer
Ernest E Vogelsinger wrote: This will not stop the user from hitting the "Back" button and refreshing the form... If the user wants it he can do it even with your method. My point is he don't do it unintentionally, so I use just the Location method -- PHP General Mailing List (http://w

Re: [PHP] How to get/wait for user-input?

2002-12-02 Thread Marek Kilimajer
For console app you can use readline functions Martin Thoma wrote: Hello! I'm using a PHP-script as a small console-app. Is the only way to give parameters to it the $QUERY_STRING, or can I wait for the user to input something (like scanf in C)? I couldn't find anything in the docs, so perhaps

Re: [PHP] Passing arguments to the same script

2002-12-02 Thread Marek Kilimajer
what abou using action=questions instead of questions=1, then you can use array: $links=array('questions'=>"Questions link content will go here", 'samples'=>"Samples link content will go here", echo $links[$_GET['action']] this would be neater. Troy May wr

Re: [PHP] Howto: run local script to update remote script

2002-12-04 Thread Marek Kilimajer
You need to open http connection to the server from you local php: http://server/script.php?password=yoursecretstring','r'); fclose($f); ?> in the script.php check the password and then $_SERVER['REMOTE_ADDR'] eriol wrote: I was wondering how I could have a local PHP (4.2.3) script running on A

Re: [PHP] [SEMI-OT] Making secure flash high scoring?

2002-12-04 Thread Marek Kilimajer
If you mean the score cannot be cheated, the answer is no. You can make only more obscure. Leif K-Brooks wrote: Sorry for the semi-ot post, but this is both a flash and php question, and I'm not a member of any flash lists, so I decided to post it here. Anyway, I have a game site with virtual

Re: [PHP] Creating dynamic names for images

2002-12-05 Thread Marek Kilimajer
I use this function: function sec_move_uploaded_file($tmp_name,$dir, $name) { if(file_exists($dir.'/'.$name)) { $ext=strrchr($name,'.'); $basename=substr($name,0,strlen($name)-strlen($ext)); $i=2; while(file_exists($dir.'/'.$basename.$i.$ext) ) { $i++;

Re: [PHP] Copy question

2002-12-05 Thread Marek Kilimajer
No, you can use ftp functions. Evandro Sestrem wrote: Hi, Can I use the copy function to copy a file to a remote computer? Ex: // copy a file from my computer to a remote computer copy('c:\teste.txt', '200.xxx.xx.xx/temp/teste.txt') How can I do it? Thanks in advance, Evandro Sestrem

Re: [PHP] Repeating Decimals

2002-12-06 Thread Marek Kilimajer
0.3 Stephen wrote: Hello again, This is another PHP mathematical question. How can I display a bar over a number (overline) if it's a repeating decimal? When the user types in 1 by 3, they get 0.. I want it to display as 0.3 with the 3 overlined. How can I do this keeping in mind th

Re: [PHP] PHP query to javascript array

2002-12-06 Thread Marek Kilimajer
for numbers: jsarray= new Array(); for strings: jsarray= new Array(""); Christian Ista wrote: Hello, Could you tell me how to transform a PHP query result to a javascript array ? Same question, if you want to store several field from the query to the javascript. Christian, -- PHP G

Re: [PHP] How to loop diplays of 4 column of items, every row?

2002-12-06 Thread Marek Kilimajer
asuming $res holds your query result: $col=0; echo ''; while($img=mysql_fetch_array($res)) { if($col==0) echo ''; echo " "; $col++; if($col==4) { echo ''; $col=0; } } if($col!=0) str_repeat('', 4 - $col); echo ''; Not tested Wee Keat [Amorphosium] wrote: Hi all...

Re: [PHP] mail function() with MS

2002-12-06 Thread Marek Kilimajer
Your ISP should set it up, if not, I believe there is a class that can comunicate with SMTP server directly, check www.phpclasses.org Anthony Ritter wrote: Hi, I'm using MS Win 98 and my ISP has PHP installed on a MS server. I'd like to display a HTML form box on my site for users to type in a

Re: [PHP] PHP adding slash to MySql results

2002-12-06 Thread Marek Kilimajer
You ISP turned magic_quotes_runtime on, use set_magic_quotes_runtime() to override it. Kevin Lowe wrote: Hi, I have just noticed a problem reading MySql data with PHP running as an apache module. Basically, any data retrieved from MySql that contains a single quote (and no doubt other characte

Re: [PHP] Output of MySQl sorted query to text or Word file.

2002-12-06 Thread Marek Kilimajer
newline in windows is "\r\n" - $newline="\r\n"; [EMAIL PROTECTED] wrote: I found all this and have worked on getting the file output and formated to my (actually my boss') liking. The text file gets formatted just fine when read in Linux but the newlines appear as blocks when viewing in Window

Re: [PHP] PHP Editor Browser View? (Beginner Question)

2002-12-11 Thread Marek Kilimajer
Simply make a test directory on your provider's webserver and test the changes there Paul Lazare wrote: A Company Programmed my Homepage in PHP. Now I want to make simple changes like changing some text. And I want to try it alone, so I got myselv PHPEdit. I copied the complete Homepage on my h

[PHP] changing endianness

2002-12-12 Thread Marek Kilimajer
Hello, Does anyone know a way to change endianness of a binary string? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PHP shell scripting not working right?

2002-12-16 Thread Marek Kilimajer
You don't have ./ in your $PATH so you must type ./test.php to execute it Leif K-Brooks wrote: I'm trying to do shell scripting in PHP. I have PHP installed in /usr/bin/php. I have the following script: #!/usr/bin/php -q print "Success!\n"; ?> It's saved as test.php and CHMODed to 777. When

Re: [PHP] Error 155 using exec - please help !

2002-12-17 Thread Marek Kilimajer
Take a look at http://cvs.php.net/co.php/php4/php.ini-dist The part that should you look at is Resource Limits (max_execution_time,memory_limit) and set up your php.ini accordingly. [EMAIL PROTECTED] wrote: Here is what i do to parse a file with a perl script from PHP to get a formatted output

Re: [PHP] Help for Undefined variable

2002-12-17 Thread Marek Kilimajer
You have error reporting set to display notices, either set your error_reporting to error_reporting = E_ALL & ~E_NOTICE or use if (isset($Array) && eregi($Pattern, $Array["URL"])) { New B wrote: Please help! I am a beginner of php, I got an error from my own webpage: Notice: Undefined var

Re: [PHP] [php] INSERT INTO

2002-12-17 Thread Marek Kilimajer
For 40 variables I would recomend keeping them in a single array and then loop the array: $vars['part1']='something'; $vars['part2']='something else'; foreach($vars as k => $v) { $vars[$k]=addslashes($v); } John Taylor-Johnston wrote: Yes I'm reading the FM :) http://www.php.net/manual/en/

Re: [PHP] need help with sessions

2002-12-17 Thread Marek Kilimajer
You don't need to call session_start twice. And you are right, the problem is in that line: you want to show your login screen if both $_POST['uid'] and $_SESSION['uid'] are not set, therefor instead of OR use AND. Anders Thoresson wrote: Hi again, I'm still trying to understand sessions, an

Re: [PHP] Number of sessions

2002-12-17 Thread Marek Kilimajer
You can open the directory where your session files are stored and count the files beginig with "sess_" and are owned by apache, but this should be restricted on a shared host (and would give you the number of ALL opened sessions on that server anyway). You can set your own session handler. fra

Re: [PHP] Problem with static call of method - class::method

2002-12-20 Thread Marek Kilimajer
From what I know about OOP, $this should be undefined if the method call is static. Mirek Novak wrote: Hi everybody, I've problem deciding whether is method call static or dynamic. How can I find it? mirek -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://ww

Re: [PHP] mkdir() makes dir, but with wrong owner

2002-12-20 Thread Marek Kilimajer
Another option is to use ftp functions. John W. Holmes wrote: i had a few problems with mkdir() ane uploading files using php. i have a simple script, which is making a dir. but everytime, it makes a dir with totally wrong user. chown wont work. any expirience with this?? i have found

Re: [PHP] Finding # of weekdays between 2 dates..

2002-12-26 Thread Marek Kilimajer
WFM: $nowdate = mktime(0, 0, 0, 4, 1, 2002); $futuredate = mktime(0, 0, 0, 5, 2, 2002); echo weekdaysBetween ($nowdate,$futuredate,2); I get 5 Chad Day wrote: I found this function in the list archives while searching on how to find the number of a weekday (say, Tuesdays) between 2 dates..

Re: [PHP] Installing PHP on XP

2002-12-26 Thread Marek Kilimajer
I did 2 days ago - Apache 1.3.27 + PHP/4.2.3. Did you follow the other instructions too? What is the error saing? Todd Cary wrote: I have Apache running on Windows XP, however I am having problems installing PHP. My PHP directory is C:\Active_Php and the documents say that I should add the f

Re: [PHP] Unable to set permissions

2002-12-26 Thread Marek Kilimajer
You should check the owner. However, this is not a php question, you should really ask your ISP. You did not even tell what kind of file manager it is. Alberto Brea wrote: When I upload php and other files and set the permissions on my ISP's (CPanel) file manager screen, sometimes the new permi

Re: [PHP] Selecting what's for deletion

2002-12-27 Thread Marek Kilimajer
Make the "Delete" button a link with href="delcategory.php?catid=$catid", maybe with additional information so you can redirect the browser back to where it has been (page #, parent category ...) Cesar Aracena wrote: Hi all, I'm making the administration part of a site which handles categories

Re: [PHP] language internationalisation

2002-12-27 Thread Marek Kilimajer
Look at projects where it is done already (e.g. PhpNuke) If the strings are static (simple translation of static strings), keep it in a file as variables or constants, for dynamic content you may use separate table for language independent information and another table for language dependent info

Re: [PHP] CLI delay

2002-12-27 Thread Marek Kilimajer
sleep(); usleep(); Maciek Ruckgaber Bielecki wrote: Hi guys !! im starting on this list today so hello to everyone :-) i have been programming in php for 2 years now, so i hope i may be helpfull. on the other hand im quite new to CLI PHP, an here my first question on the list : has anyone an id

Re: [PHP] php+gd 2.0.7 problems take 2

2002-12-27 Thread Marek Kilimajer
Check the gd library, you should likely install the one on the other machine cj wrote: Hi would any one know what the following error's are for/mean I am using gd 2.0.7 with gif support built in and php4.2.3 I am using the exact same gd version and php version as I used on another machine and it

Re: [PHP] Nested Arrays

2002-12-27 Thread Marek Kilimajer
Simple: while($rows[]=mysql_fetch_array($res)) {} ($res is a mysql result resource) Beauford.2002 wrote: Thanks for the info, but maybe I didn't give enough info. I have a mysql database with up to 10 rows and 5 fields in each row.. I have been reading up on some of the array functions, but h

Re: [PHP] Nested Arrays

2002-12-27 Thread Marek Kilimajer
Sorry, now I reminded myself this would cause a false element at the end of $rows, use this: while($tmp=mysql_fetch_array($res)) { $rows[]=$tmp; } Marek Kilimajer wrote: Simple: while($rows[]=mysql_fetch_array($res)) {} ($res is a mysql result resource) Beauford.2002 wrote: Thanks for

Re: [PHP] executable

2002-12-27 Thread Marek Kilimajer
No, you cannot execute commands on the users machine. However, if you use the right content-type header and the user browser is set up to open movie streams in a player, you don't need it. Edward Peloke wrote: Hello all, Can php call an executable on the users machine? I have some divx movies

Re: [PHP] Does PHP recognize multiple selections in a form?

2002-12-27 Thread Marek Kilimajer
^^ Then $_POST['submitID'] will be an array with selected options Micah Bushouse wrote: grrr... I am trying to get several values from a selection form field (using multiple) into PHP. Is this possible? The code I'm using to test this is below. After running the code

Re: [PHP] Nested Arrays

2002-12-27 Thread Marek Kilimajer
why this works. I'm confused at how PHP knows this is a multidimensional array. I was trying something like $tmp[][]=???. TIA - Original Message - From: "Marek Kilimajer" <[EMAIL PROTECTED]> Cc: "Beauford.2002" <[EMAIL PROTECTED]>; "PHP General"

Re: [PHP] function misfunction

2002-12-30 Thread Marek Kilimajer
Besides what Michael and jason said, you seem not have the $tracking initialized (it is not an object). You need to call $tracking=new tracking(); somewhere in your code. Martin S wrote: I'm trying to redo a db lookup into a function. The function is placed in a class called tracking and declar

Re: [PHP] php+html help

2002-12-30 Thread Marek Kilimajer
still you forgot " ;-) Print "Organisation name : ".$row[OrgName]."\n"; R'twick Niceorgaw wrote: Print "Organisation name : size=\"5\">.$row[OrgName]."\n".""; - Original Message - From: "Denis L. Menezes" <[EMAIL PROTECTED]> To: "PHP general list" <[EMAIL PROTECTED]> Sent: Monday

Re: [PHP] Re: SELECTing a row by maximum value

2002-12-30 Thread Marek Kilimajer
You cannot mix grouping columns without a group by clause. This would work: SELECT * FROM MYTABLE order by ifield desc limit 1 Elna Moorhouse wrote: TRY: SELECT id,Max(ifield) from MYTABLE. What I don't understand is why you specify id=$id in the where clause. If you already specify the id

Re: [PHP] Function misfunction - 2

2002-12-31 Thread Marek Kilimajer
You forgot global $adb; at the beginning of your function, or use $sth = $GLOBALS['adb']->prepare($query); Martin S wrote: NOW what am I doing wrong?? function setCurrentDevGroup($devID) { $query = "SELECT dev_group FROM tracking WHERE (computer = $devID)"; $sth = $

Re: [PHP] chunking a blob field. adding a large object chunk bychunk

2002-12-31 Thread Marek Kilimajer
You could do UPDATE table SET blob_field = CONCAT(blob_field, '$next_chunk') but I'm not sure if your sql server will not read the whole field into memory anyway. Mike Brancato wrote: if I wanted to read a very large object into a blob field, is there a way i could do it in 1MB chunks. using an

Re: [PHP] PHP Error

2002-12-31 Thread Marek Kilimajer
This is just a notice, somewhere in the code is something like this if($array['index']=='something') do_something(); but $array['index'] is undefined. Should be if(is_array($array) && array_key_exists('index',$array) && $array['index']=='something') ... (which is quite long). Another option is to

Re: [PHP] Arrays of strings from regex

2002-12-31 Thread Marek Kilimajer
David Pratt wrote: Am working through document to collect pieces that match and then insert them into an array so they can be used to construct another file. Looking in my doc for lines like this: {\*\cs43 \additive \sbasedon10 db_edition;} {\*\cs44 \additive \sbasedon10 db_editor;} {\*\cs45

Re: [PHP] Making with $values!!!

2002-12-31 Thread Marek Kilimajer
escape $ with \, Alexander Guevara wrote: hi.. i have this and i cant get it work!!.. HERES THE CODE --- for ($i=1;$i<11;$i++){ echo" TEXT "; }

Re: [PHP] Function misfunction - 2

2002-12-31 Thread Marek Kilimajer
so you want $lookuptable=setCurrentDevGroup($devID); switch($lookuptable) { ... Martin S wrote: Jason Wong wrote: On Tuesday 31 December 2002 20:48, Martin S wrote: This is the function which should return e.g. "printers" for $lookuptable. But doesn't. function setCurrentDevGroup($dev

Re: [PHP] prevent session_replay

2003-01-02 Thread Marek Kilimajer
This is how it works, but you can tie session to a specific IP (still not 100% safe) scott wrote: hi I'm running PHP 4.2.3 as module with Apache 1.3.26 on OpenBSD 3.2 with the chroot turned off (as it stopped the php_mail() funtion working, but if anyone has the fix for that I will re-implement

Re: [PHP] killing child process

2003-01-02 Thread Marek Kilimajer
Michael J. Pawlowsky wrote: Actually to kill all of them would not be hard Try something like ps -eaf | grep httpd | awk '{print $2}' actualy it will be named only other_script.php (it doesn't go through httpd). You can execute the scripts with a dummy parameter that will be a random

Re: [PHP] help with form adding to database!!

2003-01-03 Thread Marek Kilimajer
|$sql = "INSERT into $table_name (f_name, l_name, username, password) Values ('$f_name', '$l_name', '$username', '$password')";| notice the single quotes Karl James wrote: Hey guys, I cant figure out what’s wrong with this code. Im sure its syntax can some one take a look at it and Help me ou

Re: [PHP] include/require vs performance

2003-01-03 Thread Marek Kilimajer
He likely ment that his local server is simply fast enough that any speed defference is unnoticeable, but on a shared host this might make some difference. Use include/require as you are more comfortable with it. Rasmus Lerdorf wrote: Is there, was there ever issue around including a lot files v

Re: [PHP] Possible bug with PHP v4.1.1 and bits?

2003-01-03 Thread Marek Kilimajer
inverting value: $action = ($value==='1' ? '0' : '1' ); Daevid Vincent wrote: I'm not even sure how to classify this... Given: Where $Enabled is either a 0 or 1 as read from a database ( TINYINT(1) ); And echo "action = ".$_POST[action].""; if ($_POST[action] == "1" || $_POST[action] == "0

Re: [PHP] File Modification Date/Time

2003-01-03 Thread Marek Kilimajer
you must prepend $DirToCheck to $file: filemtime($DirToCheck . $file) Christopher J. Crane wrote: I am trying to parse through a directory and get the modification dates of the file. $DirToCheck = "tempdata/"; if ($handle = opendir($DirToCheck)) { while (false !== ($file = readdir($handl

Re: [PHP] File Modification Date/Time

2003-01-05 Thread Marek Kilimajer
Check . $file)) . " - $TimeDiff\n"; if($TimeDiff > 1) { unlink($DirToCheck . $file); } $TimeDiff = 0; } closedir($handle); } ?> "Marek Kilimajer" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... you must prepend $Di

Re: [PHP] please help me, y have a error

2003-01-05 Thread Marek Kilimajer
Means php tried to access memory page address it did not have. Try to find out if it was php itself or a loaded module, then upgrade the offending part and see if it still happens again. Ysrael Guzmán wrote: this is the message of the ERROR: PHP has encountered an Access Violation at 012B7DE7

Re: [PHP] Perl > PHP

2003-01-05 Thread Marek Kilimajer
Jurre Thiel wrote: That doesn't make any sense and has nothing to do with Perl, since PHP will magically convert perl.pl to 'perl.pl'. I think perl will be magically converted to perl and pl to pl, and those two strings concatenated together using . inbetween will be perlpl -- PHP Ge

Re: [PHP] web reload

2003-01-05 Thread Marek Kilimajer
TACKEL wrote: Hi, I have a php file that set up a cookie that receives from a form and also uses it. My problem is the first time the value is submitted via form. The cookie is setup but I cannot not use it so I'd need to reload the web after setting up the cookie. Myfile.php if ($form_va

Re: [PHP] web reload

2003-01-05 Thread Marek Kilimajer
eing reloaded but is not what is desired on the first page load. Jason On Sun, 2003-01-05 at 09:50, Marek Kilimajer wrote: TACKEL wrote: Hi, I have a php file that set up a cookie that receives from a form and also uses it. My problem is the first time the value is submitted via form.

Re: [PHP] Fw: Session ID changes

2003-01-07 Thread Marek Kilimajer
Scott Fletcher wrote: "[-^-!-%-" <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>. .. Hello all, I need some clarification. To my understanding, each visit to php site creates a UNIQUE Session ID (SID). Only when you call session_start() - this function checks for $_REQUEST

Re: [PHP] Far out!!!! More IIS problems.....

2003-01-07 Thread Marek Kilimajer
phpinfo will tell you which php.ini is used Scott Fletcher wrote: I tried various methods on IIS after configuring hte PHP.INI. Such as shutting down IIS, restarting IIS and rebooting hte machine. Here's one latest addition that I found to be very far out!! What I did was I renamed the p

Re: [PHP] ftp and www

2003-01-07 Thread Marek Kilimajer
There are many of them: http://www.hotscripts.com/PHP/Scripts_and_Programs/File_Manipulation/File_Management/ Mukta Telang wrote: Hi, I am told to " merge ftp and www " ! I cant understand what it means.. May be it means that it should be possible to browse ftp directory from a browser? What is

Re: [PHP] No input file specified. Please help.

2003-01-07 Thread Marek Kilimajer
Try using full URI, e.g. http://localhost/index.php David Scott wrote: I am running this file from a tutorial: Something Useful Tutorial echo $_SERVER["HTTP_USER_AGENT"]; ?> When this file is run from my webserver (IIS) I get a page that says: No input file specified. What can I

Re: [PHP] Re: Forwarding POST info from a PHP script

2003-01-07 Thread Marek Kilimajer
David Barrett wrote: Think you may have misread the problem, or I am not good at explaining it ;-) I can receive POST variables fine, and GET. My problem is that when a frameset (which my script renders) contains a form, I need to retrieve the OUTPUT from the form's target (i.e. ACTION tag),

Re: [PHP] Undefined index a different problem

2003-01-07 Thread Marek Kilimajer
Mekrand wrote: my problem is, i have a script that works well before php 4.2.3 its sth like that {.. for($i=0; $i should not be echo("$GLOBALS[$i]"); and it gives me notice that undefined index i. how can i solve this problem? thanks -- PHP General Mailing List (http://www.php.n

Re: [PHP] Undefined index a different problem

2003-01-07 Thread Marek Kilimajer
index i for $GLOBALS[$i] "Marek Kilimajer" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Mekrand wrote: my problem is, i have a script that works well before php 4.2.3 its sth like that {.. for($i=0; $i ... } //2nd part { echo

Re: [PHP] Issues w/ WHOIS and Fgets

2003-01-07 Thread Marek Kilimajer
try if(($packet = fgets($fp, 4096)) === false) die(...); instead. The same for array_push Ben Vaughn wrote: Hello, Long time reader, first time e-mailer :-). I am having a pretty strange issue with fgets and a socket, and was hoping that perhaps someone here can help me. First, my code: fu

Re: [PHP] Re: PHP and MySQL bug

2003-01-07 Thread Marek Kilimajer
@mysql_select_db("be"); -- this failed do echo mysql_error(); to see what went wrong Nuno Lopes wrote: I done a echo of Mysql_error and it returned: 'Nenhum banco de dados foi selecionado' (I have the mysql server in portuguese, but the translation is something like 'no db was selected') --

Re: [PHP] EOF: how to generate one in a string

2003-01-08 Thread Marek Kilimajer
$result = `echo | /path/prog $arg`; should work Jean-Christian Imbeault wrote: I am trying to use a command line program in Linux using this form: $result = `/path/prog $arg`; But this doesn't work as the program is expecting and EOF that never comes. If I use the program on the command lin

Re: [PHP] Re: Double entry into MySQL..

2003-01-08 Thread Marek Kilimajer
You should be able to get around it also by checking if $_SERVER[REQUEST_METHOD]=='HEAD' Timothy Hitchens (HiTCHO) wrote: When they first click on the file their browser will make a request for type, size etc then when it display's the dialog box on the screen of the client it will make another

Re: [PHP] EOF: how to generate one in a string

2003-01-08 Thread Marek Kilimajer
ian Imbeault wrote: Marek Kilimajer wrote: $result = `echo | /path/prog $arg`; should work That didn' work ... don't know why. Isn't there a way to say echo "EOF"? There must be a way to specify the ascii or hex value for EOF in an echo statement no? Jc -- PH

Re: [PHP] $_SERVER content

2003-01-08 Thread Marek Kilimajer
You did not see HTTP_REFERER likely because there was none Fritzek wrote: Hi folks, I've seen a lot phpinfo() on different platforms, different PHP versions with different web servers. Always the content of $_SERVER is different. i.e PHP4.3.0 on win32 with Apache2 doesn't show PATH_TRANSLATED

Re: [PHP] $_SERVER content

2003-01-08 Thread Marek Kilimajer
Fritzek wrote: Hmmm. What does it mean? Is PHP deciding at runtime which variable in $_SERVER have to be filled? PATH_TRANSLATED should always be filled because you always have a path where your script is located. Also HTTP_REFERER because in easiest case you refering on the same script at loca

Re: [PHP] PHP mySQL Syntax problem

2003-01-08 Thread Marek Kilimajer
MYSQL($Dbname, "INSERT INTO $Tbname_1 VALUES(1, 'John Doe', '$color')"); - single quotes around $color Jo Ann Comito wrote: I'm working in PHP4 and have suceeded in creating a mySQL table. I can fill the table using the INSERT command as follows: The above works fine. Here is the problem: In

Re: [PHP] How do I get the entire data sended to the web server?

2003-01-08 Thread Marek Kilimajer
I don't think there is a single variable, but you can build it from various variables and functions: $_SERVER array: REQUEST_METHOD REQUEST_URI SERVER_PROTOCOL function getallheaders() |$HTTP_RAW_POST_DATA| |this should be all you need| Heiko Mundle wrote: Is it possible with php t

Re: [PHP] graph libs

2003-01-08 Thread Marek Kilimajer
http://www.aditus.nu/jpgraph/ Larry Brown wrote: Can anyone give any suggestions on the best/most intuitive tools or libraries for generating graphs with PHP? Larry S. Brown Dimension Networks, Inc. (727) 723-8388 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

  1   2   3   4   5   6   7   8   9   10   >