Re: [PHP] picture(s) in Excel

2003-07-09 Thread Marek Kilimajer
Use this class: http://phpclasses.web4u.cz/browse.html/package/767.html and insert_bitmap() method of a Worksheet object. jan wrote: Hi there! I'd like to ask if there is any work-around available for saving picture(s) (BMP/JPG/PNG) in *.xls file. I need to create (using PHP) dynamically xls file

Re: [PHP] mail() - how to attach file to the message???

2003-07-09 Thread Marek Kilimajer
Use this class: http://www.phpclasses.org/mimemessage szparag wrote: i know that in mail-form i need but i don't know how to write message headers to send file with e-mail. please help me. szparag. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.

Re: [PHP] picture(s) in Excel

2003-07-09 Thread Marek Kilimajer
You can explore the possibility of Web Archives. This is how a web archive starts: MIME-Version: 1.0 X-Document-Type: Worksheet Content-Type: multipart/related; boundary="=_NextPart_01C3461B.AE5C1F00" This document is a Web archive file. If you are seeing this message, this means your brows

Re: [PHP] Re: __get, __set, __clone

2003-07-09 Thread Marek Kilimajer
Yann Larrivee wrote: Hi Greg, thanks for the example. I think i now understand a bit more. I just need a confirmation on this $table->FirstName = 'Greg'; $table->LastName = 'Beaver'; This will actually call __set and it will create a member variable named FristName with the value Greg. Not nec

Re: [PHP] $_SESSION act funny...

2003-07-09 Thread Marek Kilimajer
Scott Fletcher wrote: $SID = session_name()."=".session_id(); if ($_SESSION['test'] == "one") { $_SESSION['test'] = "two" }; $_SESSION['test'] is now 'two', so the next test is true if ($_SESSION['test'] == "two") { $_SESSION['test'] = "three" }; $_SESSION['test'] is now 'three', so t

Re: [PHP] TextArea vs. URLEncode/URLDecode/quotes

2003-07-09 Thread Marek Kilimajer
The correct way is: In validate.php: if(error) { if(magic_quotes) stripslashes(); urlencode(); } else { INSERT INTO ... } In form.php: // urldecode() is not needed, GET variables are already decoded if(magic_quotes) stripslashes(); Arcadius A. wrote: Hello! I have a form w

Re: [PHP] SQL select

2003-07-10 Thread Marek Kilimajer
I did not understand you much but would not this work? SELECT * FROM table WHERE typ='f' OR typ='i' Jiří Němec wrote: hello, i have got a problem with SQL select: I have got a table such this: id_k typ name id 1 f bla1 1 2 f bla2 1 2 i bla3 1 3 z bla4 1 3 f bla5

Re: [PHP] download php

2003-07-10 Thread Marek Kilimajer
Do you use secure connection? Well, you should. Mantas Kriauciunas wrote: Hello php-general, some hacker just tries his luck everyday to get me pissed, is it possible to make php files not downloadable? or coded? or something? because some dude knows my passwords every time, and with them

Re: [PHP] /etc/passwd

2003-07-10 Thread Marek Kilimajer
Mantas Kriauciunas wrote: The problem is if the make script and then just write test.php?id=/etc/passwd , they see all the file. Check if $id is valid. Exact way depends on the structure of the files. Example 1: All included files are in web root and are named something.html, something can c

Re: [PHP] suexec

2003-07-10 Thread Marek Kilimajer
Sure there is, the same way as in the cgi version. Safe mode must be off. Fejes Jozsef wrote: Hi! Is there a way to use suexec with a non-cgi version of php? Or is there any other way to do the same job as suexec would do? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visi

Re: [PHP] Blatant newbie question - killing a session

2003-07-10 Thread Marek Kilimajer
You mean killing the session cookie? setcookie (session_name(), "", time() - 3600); session_unset(); // or $_SESSION = array(); session_destroy(); Bruce Bruen wrote: Hi, this is my first question to the list and ... Yes I'm a newbie, verrry wet behind the ears. I am trying to set up a secured site

Re: [PHP] /etc/passwd

2003-07-10 Thread Marek Kilimajer
/) or its name does contain any other character then letters, numbers or underscore or does not end with html extension. This is pretty strict so a chance you will miss something is 0. The syntex of the regular expression depend on your needs, I don't know them so I can't help you. Mantas

Re: [PHP] suexec

2003-07-10 Thread Marek Kilimajer
Sorry, my fault. I was wrong, suexec can work only for cgi. Fejes Jozsef wrote: Sure there is, the same way as in the cgi version. Safe mode must be off. Safe mode is off, suexec is turned on. In the logfiles, I see that suexec engine is turned on or something like that, the path is correct to

Re: [PHP] /etc/passwd

2003-07-10 Thread Marek Kilimajer
Add a check for php files, or any other files you don't want anybody to include: if(ereg('php[0-9]$', $id)) goaway; Fejes Jozsef wrote: My method is: 1. check if id starts with / if(ereg("^\/", $id)) goaway; 2. check if there is .. in it if(ereg("\.\.", $id)) goaway; -- PHP General Ma

Re: [PHP] CHECKING IF A SESSION IS ACTIVE OR NOT

2003-07-10 Thread Marek Kilimajer
You don't realy need it. Session garbage colector removes old session files for you. Nagib Abi Fadel wrote: HI, I'm storing the sessions ids in a database table. I want to run a script that reads from the table every session id and check if this session is active or not. I know that session inf

Re: [PHP] Please assist - been on this for hours - Permissions onserver

2003-07-11 Thread Marek Kilimajer
Write the file with ftp right away: // Define the filename to write to. $filename = 'ftp://username:[EMAIL PROTECTED]/your_webdir/test.txt'; // Open the file for overwriting. $fp = fopen($filename, "w"); // Write the string to the file $write = fputs($fp, $string); // Close the file fclose($fp);

Re: [PHP] Please assist - been on this for hours - Permissions onserver

2003-07-11 Thread Marek Kilimajer
from success with this method? All I wanted was for a file to be written into a safe directory and then moved automatically to the webroot. Steve Jackson Web Development and Marketing Manager Viola Systems Ltd. http://www.violasystems.com [EMAIL PROTECTED] Mobile +358 50 343 5159 -----Original

Re: [PHP] PHP Lang question

2003-07-11 Thread Marek Kilimajer
www.php.net/gettext Dallas Goldswain wrote: Hi All, looking throught the source of squirrelmail, I see he calls a function _("somevalue") What is this and where can i get more info about it? Thanks -- Dallas Goldswain -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] Please assist - been on this for hours - Permissions onserver

2003-07-11 Thread Marek Kilimajer
Steve Jackson wrote: You *are* using the correct user/pass? It should be the same as what you use to upload files to your webroot. If you can't get this to work then try the ftp functions. Yes I am. Alternatively, you could consider storing them in a DB. Yes that's what I was thinking

Re: [PHP] Capturing Windows Login Details

2003-07-11 Thread Marek Kilimajer
If it is REALY needed ask the user. You might want to search for NTLM authentication. Gary Ogilvie wrote: OK - is there any other way of grabbing both the username and password from somewhere else? For example the login details used to login onto the Intranet through the firewall, or IIS? Thanks

Re: [PHP] dump $_POST into variables????

2003-07-13 Thread Marek Kilimajer
Remember this is identical to having register_globals on with the same security risks. Read http://www.php.net/register_globals first. Joe Harman wrote: Ah... Jason Man Of Few Words! THANKs... You have saved me time and lines in my code :-) extract() -- PHP General Mailing List (http://

Re: [PHP] Private and protected variables in PHP 5?

2003-07-13 Thread Marek Kilimajer
Don't have the possibilities to try it out now, but I think you are wrong: Example: class Parent { protected $var = "test"; function blah($somevar) { ... } } class Child extends Parent { ... } $parent = new Parent; print $parent->var; //ouputs "test" This will error out, y

Re: [PHP] Is it possible to test an uploaded file to check the type?

2003-07-13 Thread Marek Kilimajer
If you have compiled php with --enable-mime-magic, you can use mime_content_type() Dan Anderson wrote: Is it possible to check a file in $_FILES['userfile']['tmp_name'] to make sure it is of a certain format? I want to allow a user to only upload jpegs or mpegs, and want to check what format th

Re: [PHP] Is it possible to test an uploaded file to check the type?

2003-07-14 Thread Marek Kilimajer
David Otton wrote: On Mon, 14 Jul 2003 00:24:03 -0400, you wrote: ... The show-resource.php script just has to set the correct mime type header and stream out the contents of the file. And it is safe to use the browser supplied mime type here. -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] imagecreate() error

2003-07-14 Thread Marek Kilimajer
Do you get any error at apache start up or in error logs? Michelle Bernard wrote: Hi Philip, Thanks for your response, I tried those steps, still no go, getting that same error -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] BigEndian to integer

2003-07-14 Thread Marek Kilimajer
http://www.php.net/pack Gerard Samuel wrote: A bit off topic Im trying to figure out how to convert BigEndian byte words to integers. For example -> 0 0 0 18 = 18 The only way I know how to convert this is by writing down on paper, and writing 8 4 2 1 above the numbers and adding up the value

Re: [PHP] PHP and JAVA

2003-07-14 Thread Marek Kilimajer
Have you tried looking at http://www.php.net/java ? J.F.Kishor wrote: Hello all, I would like to know if there is a possibility in php to invoke JAVA RMI from php by enabling some options in php in php.ini file. If there is a possibility please let me know, where I can get a document ab

Re: [PHP] About fopen() for write and PHP settings

2003-07-14 Thread Marek Kilimajer
George Papatheodorou wrote: First of all I apology for my poor use of English of my newbish(?) questions because I didn't find any solutions the first time I e-mailed this list. What my problem is: I am on a server that has these configurations like these: http://kainga.quasarnet.org/php.php . Let

Re: [PHP] elegant way of doing something else the last time througha loop?

2003-07-14 Thread Marek Kilimajer
I always do it this way: $condition=''; foreach ($phrases as $key=>$val) { if (($val != "the") && ($val != "and")) { $condition.= "name like '%$val%' $logic"; } } $condition=substr($condition, 0, strlen($condition) - strlen($logic)); $sql .= $condition; $length = s

Re: [PHP] PHP, Excel, jpgraph - can the graph be included in theExcel output?

2003-07-14 Thread Marek Kilimajer
You need a class that can create xls files with images. Or you can create a Web Archive: http://officeupdate.microsoft.com/office/webarchive.htm Jay Blanchard wrote: Good morning! I have several reports that are generated using PHP & MySQL for which I would like to include a graph using the exc

Re: [PHP] PHP, Excel, jpgraph - can the graph be included in theExcel output?

2003-07-14 Thread Marek Kilimajer
Jay Blanchard wrote: [snip] You need a class that can create xls files with images. Or you can create a Web Archive: http://officeupdate.microsoft.com/office/webarchive.htm [/snip] Thanks! We have looked at this, but have arrived at the problem of opening the file for the user. This should be

Re: [PHP] Logging PHP Execution time to a file?

2003-07-14 Thread Marek Kilimajer
I use this function: function echo_pt($add='') { static $pt = 0; if($pt==0) { $pt = miro_time(); return; } $time_start = explode(' ', $pt); $time_end = explode(' ', microtime()); $parse_time = number_format(($time_end[1] + $time_end[0] - ($time_start[1] + $time_start[0]

Re: [PHP] textarea rich replacement?

2003-07-15 Thread Marek Kilimajer
Just remove the appropriate buttons. Justin French wrote: Hi all, I've looked at both editize(.com) and HTMLArea, both of which are in-browser Rich Text editor replacements (written in java) for the standard . Unfortunately, they both allow far too much control... at most I only want to offe

Re: [PHP] variable sized arrays & global vars - another newbie question

2003-07-15 Thread Marek Kilimajer
Every array does not have a fixed size: while($temp=mssql_fetch_array($tmresult)){ $array[] = $temp["fieldname"]; // ads an element at the end // or $array[$temp["id"]]= $temp["fieldname"]; // the table id is the key } You can access global variables in functions or class methods by: 1. declarin

Re: [PHP] Verifying a certain amount of numbers

2003-07-16 Thread Marek Kilimajer
if(!ereg('^[0-9]{6}$',$string) die('not six numbers'); you might want to trim off white space first. Ron Allen wrote: I would like to know how to verify that there are 6 numbers (only numbers in a field) that will be submitted to a database? Any clues! -- PHP General Mailing List (http://ww

Re: [PHP] Problem with Apache Web Server config file and PHP (pleasegive advice on what problem may be me)

2003-07-16 Thread Marek Kilimajer
Did you add these lines to http.conf?: LoadModule php4_module c:/php4/sapi/php4apache.dll AddModule mod_php4.c AddType application/x-httpd-php .php If you did, did you restart apache afterwards? karen santmyer wrote: HI: Can anyone refer me to someone that can help with the problem below.

Re: [PHP] MySQL query problems

2003-07-16 Thread Marek Kilimajer
Change $email_error to $mysqlerror and hopefully some error message will appear. Beauford.2005 wrote: if ($mysqlerror) { $error = "$d_base_error$email_error"; include("trades-input.php"); exit; } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://w

Re: [PHP] include statement giving me hives! - help

2003-07-17 Thread Marek Kilimajer
DougD wrote: I am new to all this, but here is the basic code: $link_titles = file('links/master.txt'); $links_include = $link_titles[$point]; // path to directory include $links_include; If I echo the value of $links_include just prior to the include() function it contains what I would expect

Re: [PHP] session objects crossing applications

2003-07-17 Thread Marek Kilimajer
Set up cookie parameters before calling session_start(): void session_set_cookie_params ( int lifetime [, string path [, string domain [, bool secure]]]) Jason wrote: I need help. I've got two copies of my application.foobar and foobar_dev When I go to http://foo.com/foobar/ a session is c

Re: [PHP] retrieving form checkbox values

2003-07-17 Thread Marek Kilimajer
This is not necessary, you can do foreach($_POST['File'] as $file) { // ... } George Pitcher wrote: Here's my register globals off version: Make sure that your form send a post with the highest index value [howmany]. $howmany=$_POST['howmany']; for ($index = 1; $index < $howmany; $index+

Re: [PHP] Recomposed per instructions??? jpeg photo file upload problem

2003-07-17 Thread Marek Kilimajer
I don't understand how it has been working till now! My IE6.0 and IE5.0 sends image/pjpeg for jpg files. John T. Beresford wrote: At 8:13 AM + on 7/17/03, Curt Zirzow wrote: The relevent PHP code from my system for the checking is: if ($type != "image/jpeg") { $ReturnSaying = "!! The fi

Re: [PHP] scoring/sorting db search results based on score

2003-07-17 Thread Marek Kilimajer
Try SELECT , (((keywords LIKE '%$search%') * 5) + ((title LIKE '%$search%') * 3) + (description LIKE '%$search%')) score FROM . ORDER BY score DESC Dave [Hawk-Systems] wrote: looking for code snippets or links to examples of the following; - Have a database with multiple fields that wil

Re: [PHP] scoring/sorting db search results based on score

2003-07-21 Thread Marek Kilimajer
I use mysql, so this was for mysql - LIKE is case insesitive and returns 0 for false and 1 for true. Dean E. Weimer wrote: Try SELECT , (((keywords LIKE '%$search%') * 5) + ((title LIKE '%$search%') * 3) + (description LIKE '%$search%')) score FROM . ORDER BY score DESC PostgreSQL canno

Re: [PHP] scoring/sorting db search results based on score

2003-07-21 Thread Marek Kilimajer
I don't know how postgres server would optimize the query, but in teory there should be only a slight overhead as the (I)LIKE results should be cached. How much takes to order by depends on the number of rows returned. Dave [Hawk-Systems] wrote: Appreciate the responses... We are talking a db o

Re: [PHP] Image Stored in DB has errors

2003-07-21 Thread Marek Kilimajer
I'm not sure if this solves you problem, but addslashes escapes BOTH single and double quotes. Use str_replace("'", "\\'", ) instead Guru Geek wrote: Hello, I went to bed last night and this was working. I woke up this morning and something has happened or someone has tampered with it. I

Re: [PHP] GD2 makes black thumbnails

2003-07-21 Thread Marek Kilimajer
Use imagecreatetruecolor() instead of imagecreate() Jiří Němec wrote: hello everyone, i have got a question about creating thumbnails from original JPG files. users upload their own pohotos in JPG format to server, and system makes a thumbnails. these thumbnails are sometime black. probably ther

Re: [PHP] Enough is Enough.......

2003-07-22 Thread Marek Kilimajer
I used to have the same problem. It seems it's not safe to include a file you have just writen. Beauford.2005 wrote: Done. You must have read my mind. I just finished putting the whole thing in MySQL - since I am using it anyway to hold all my other data it was easy to do. Took me about 45 minute

Re: [PHP] Problem with Adding info into an array

2003-07-22 Thread Marek Kilimajer
Phillip Blancher wrote: if($array[0]=="") { $array[0]="0"; } else { } if($array[1]=="") { $array[1]="0"; } else { } if($array[2]=="") { $array[2]="0"; } else { } if($array[3]=="") { $array[3]="0"; } else { } if($array[4]=="") { $array[4]="0"; } else { } if($array[5]=="") { $array[5]="0"; } else

Re: [PHP] Shell_exec() [ or what else? ] to kill root-started FTPdaemon

2003-07-22 Thread Marek Kilimajer
Try sudo (man sudo) Pietuka Krustiņš wrote: Hello. I am trying to restart my FTP daemon by killing it and then starting it using the shell_exec() function: shell_exec('kill '.$pid ); Shell_exec does nothing by this - when i do ps -ef later, i see the daemon with the same pid still running. Bu

Re: [PHP] Newbie lost in array

2003-07-22 Thread Marek Kilimajer
$res=mysql_query("SELECT P_Code, P_Value FROM table WHERE P_ref='somevalue'"); while(list($code, $value)=mysql_fetch_row($res)) { // now I'm not sure if you want $$code=$value; // or you want $array[$code]=$value; } Tony Crockford wrote: I've got brain fade today and am in need of a clue, pl

Re: [PHP] PHP-mySQL-opensource-shop - solution

2003-07-22 Thread Marek Kilimajer
http://www.oscommerce.com/ Alexander wrote: Hi to all, I'm looking for a PHP-mySQL-opensource-shop - solution. Any suggestions or experiencies that could be usefull. Wich TIA Alexander -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Array Sorting, 2 items...

2003-07-22 Thread Marek Kilimajer
Your array seems like a result of mysql_fetch_array(), cannot you order it in the sql query? Dan Joseph wrote: Array ( [0] => Array ( [0] => CHECKING [ba_type] => CHECKING [1] => 10132200 [loan_number] => 10132200 Keep e

Re: [PHP] reading in files

2003-07-23 Thread Marek Kilimajer
www.php.net/uploads 1. use $_FILES 2. $_FILES['file'] would be na array holding info about the uploded file bob pilly wrote: Hello all I have a page where a user uses a browse button in html to upload a file from there client pc. They then click upload which submits the form to the second page:

Re: [PHP] header & headers_sent BUG

2003-07-23 Thread Marek Kilimajer
Added to this, your later header replaces the earlier one of the same type, unless you specify false to the second parameter of header() function. More in the manual. Ford, Mike [LSS] wrote: -Original Message- From: James M. Luedke [mailto:[EMAIL PROTECTED] Sent: 22 July 2003 07:07 I

Re: [PHP] walking through database one record at a time with forms.

2003-07-23 Thread Marek Kilimajer
Better would be to make combos (reject, accept) and then submit them all at once. Displaying a separate html page for each row is slow and pain to work with. Artoo wrote: I'm tring to create a script for the WEBMASTER to go through a temporary table in a MySQL database, and either accept or rej

Re: [PHP] Difference between equal $_SERVER variables?

2003-07-24 Thread Marek Kilimajer
server name - real name of the server, ie when you do a reverse dns lookup you get (usualy) this http host - content of the Host: header, that is virtual host Ivo Fokkema wrote: Hi list, Just out of curiosity I would like to know if anyone can tell me the difference between some $_SERVER variabl

Re: [PHP] Load in a dedicated server

2003-07-24 Thread Marek Kilimajer
Globals off should help you gain performance, but safe mode on is expensive. [EMAIL PROTECTED] wrote: Hit to all, i have a Sun cobalt Raq 550, with php 4.1 as a module with apache 1.3 The load average of my server is ever above 0.20 to 0.60 whith the same users When i turn off register globals and

Re: [PHP] Re: Please help!!! thx a lot~~~

2003-07-24 Thread Marek Kilimajer
What is remote in your circumstances? FTP, HTTP, ... ? Joe wrote: any alternative method is also welcome "Joe" <[EMAIL PROTECTED]> ¼¶¼g©ó¶l¥ó·s»D :[EMAIL PROTECTED] I have written a php to show file in directories. The problem is due to is_dir() can't opearate on remote files. What should I do

Re: [PHP] Re: Please help!!! thx a lot~~~

2003-07-24 Thread Marek Kilimajer
_dir=false; $sock=fsockopen('server', 80); fputs($sock,"GET /something\r\n\r\n"); while (!feof($fp)) { if(strpos(fgets($fp,128),"301 Moved Permanently")) $is_dir=true; } fclose ($fp); Joe wrote: HTTP my department disable the function of listing file "Marek

Re: [PHP] sorting multi-array

2003-07-24 Thread Marek Kilimajer
www.php.net/usort - slight modification of the example (hint: add [0] to $a and $b). Jiří Němec wrote: hello, i have got a problem, tehere is an array: $x = array( array(15,55,array(1,2,3),3,5,array(1,2,5)), array(25,55,array(1,2,3),3,5,array(1,2,5)), array(5,55,array(1,2,3),3,5,array

Re: [PHP] command line or http browser?

2003-07-25 Thread Marek Kilimajer
My uneducated guess is you are running cgi version of php binary, which is different from cli version. ermelir wrote: Hi list, I search to detect if a script is call from command line or if the call from a client http browser. for doing that, I test if: php_sapi_name()=='cli' which returns TRUE

Re: [PHP] uploading a file from a form

2003-07-25 Thread Marek Kilimajer
Don't you need to use $HTTP_POST_FILES array because you have register_globals off? Amanda McComb wrote: I am having a problem with uploading a file from a form. I changed the permission on the directory, but I am still getting an error. Here is my error: Copy failed./home/vencel/www/images/ap

Re: [PHP] PHP Webpage like MySql- need to be able to see all fieldsand edit

2003-07-25 Thread Marek Kilimajer
You guys should not forget htmlspecialchars() :) Jay Blanchard wrote: > Adam Voigt wrote: > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PHP webpage like MySQL, PART 2

2003-07-25 Thread Marek Kilimajer
Matt Hedges wrote: Update Sister Info. Why $id=1, you want to edit any sister info $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"); if (@$first == "no"

Re: [PHP] 4.3.3-RC1 => possible bug in in_array()?

2003-07-25 Thread Marek Kilimajer
in_array searches for a value, you suply key. This will work as you expect: $data = array(); foreach ($this->_array_a as $key => $value) { if (! in_array($value, $this->_array_b) $data['added'][$key] = $this->_array_a[$key]; } Branko F. Grac(nar wrote: -BEGIN PGP SIGNE

Re: [PHP] Sending POST-data

2003-07-25 Thread Marek Kilimajer
Output the required form with hidden fields from your script and use onload="document.forms[0].submit();" Simon Fredriksson wrote: I'm making a search-engine script for my site that redirects users to other search engines. Point is that on the website, there's a drop-down box with some engines

Re: [PHP] create pop account via fsockopen...

2003-07-25 Thread Marek Kilimajer
Brian McGarvie wrote: All, I'm having trouble creating an pop account usaign fsockopen(), here is whaty I have... is connects ok but does not seem to execite the GET. $fp = fsockopen ($host, 2082,$errno,$errstr); if (!$fp) { echo "$errstr ($errno)\n"; } else { $auth

Re: [PHP] incrementing string value

2003-07-25 Thread Marek Kilimajer
JavaScript has arrays too. I'm sure you will find it easier to work with them.
var a=new Array();

a[]="";

Jeremy wrote: writing some client side javascript with some dynamic php, and I need to be able to print a dynam

Re: [PHP] How Do I Change A Number to Percentage

2003-07-25 Thread Marek Kilimajer
*=100 ? Joe Harman wrote: Hey, hope all are doing fine. can someone help me be showing me how to change the following numbers to represent percentages 0.92857142857143 0.071428571428571 1.0 Thanks Joe Harman http://www.HarmanMedia.com So we went to Atari and said, `Hey, we've got this a

Re: [PHP] XML handlers in classes

2003-07-25 Thread Marek Kilimajer
If I remember well you can pass an array with object as the first element, function name as second: xml_set_element_handler($xml_parser, array($this,'startElement'),array($this,'endElement')); Robert Fitzpatrick wrote: I have a class that receives an XML response from a HTTP request and I am t

Re: [PHP] PHP Email use alternate SMTP

2003-07-26 Thread Marek Kilimajer
www.phpclasses.org/mimemessage it contains a class that can send directly to SMTP server Tom Vogel wrote: Hi, i'm trying to set up an email form on my website. When I originally ran the server from windows I could simply set SMTP = mailhost.ucalgary.ca and it would work. After moving the server t

Re: [PHP] Half solved...............what the @#%# is PHPSESSID?

2003-07-26 Thread Marek Kilimajer
You have cookies disabled and session.use_trans_sid is enabled in php.ini. So the session module parses your html output and adds PHPSESSID to all internal links, forms and everything else that is needed. However it does not add session id to Location header, it is your responsibility. Use head

Re: [PHP] Re: header & headers_sent BUG

2003-07-27 Thread Marek Kilimajer
read www.php.net/variables.scope Eric Fleming wrote: I am having some problems using variables in included files. Can someone please look at my code below and see how I might accomplish what I am trying to do? The content would go here. Now, when I try to reference the subnav variable in

Re: [PHP] using SESSIONS to store page 2 page variables

2003-07-28 Thread Marek Kilimajer
No problem, but remember the user might want to bookmark the page. Ow Mun Heng wrote: Hi, Is it advisable to use SESSIONS to store variable from one page to another page instead of using something like a hidden field? eg: $_SESSION['sql_sort_cat'] $_SESSIOn['sql_sort_dir'] instead of

Re: [PHP] variable in function parameter

2003-07-28 Thread Marek Kilimajer
www.php.net/variables.scope You need "global $a;" as the first line in your function. 386-DX wrote: Hello. Let's say I have something like this: function aa($test) { $a = 8; echo $test; } $a = 2; aa("a is ". ($a>5?"greater":"equal to or less"). " than 5".); I want this to output "a is g

Re: [PHP] $_GET['sort'] & argument separator

2003-07-28 Thread Marek Kilimajer
If your table column is named Eval #, you need to use backtick quotes: `Eval #` Ow Mun Heng wrote: Hi, I have this problem, which could easily be solved through a name change but I would like to learn more. There's a table set up from a MySQL query like this row1) Eval # Title

Re: [PHP] Absolute and relative paths ..... a quick explanation required

2003-07-28 Thread Marek Kilimajer
relative to a.php Kevin McGinley wrote: Hi all, can anyone tell me how php paths are worked out Im just starting to use php over asp so would appreciate the answer to the following If a file a.php includes a file b.php which includes a file c.php is the include in file b.php relative to itse

Re: [PHP] uploading a file from a form

2003-07-28 Thread Marek Kilimajer
Everything is in the manual: http://www.php.net/features.file-upload Amanda McComb wrote: I'm not sure what that means...how do I use it, and where? On Fri, 25 Jul 2003, Marek Kilimajer wrote: Don't you need to use $HTTP_POST_FILES array because you have register_globals off? Ama

Re: [PHP] Absolute and relative paths ..... a quick explanation required

2003-07-28 Thread Marek Kilimajer
ensuring the system is correct but at the mo Im working on an existing system ?? B.T.W Thanks for your previous answer "Marek Kilimajer" <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>... relative to a.php Kevin McGinley wrote: Hi all, can anyone tel

Re: [PHP] debuging and getting mor information about failures

2003-07-29 Thread Marek Kilimajer
Check semicommas too. Peter James wrote: These errors are usually caused by an extra or missing brace or quote/apostrophe/backtick. The best way to find where this is happening is to use another error. Start at the bottom of your script and introduce some garbage on a line by itself. "asdf" for

Re: [PHP] debuging and getting mor information about failures

2003-07-29 Thread Marek Kilimajer
Yes, you are right. But this depends on your perspective ;) Adam Voigt wrote: Umm, semicolons? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Curl alternative?

2003-07-29 Thread Marek Kilimajer
Search www.phpclasses.org, I'm sure you'll find an alternative there. Steven Kallstrom wrote: Dear List, I am currently working on a UPS Web Service Interface and was wondering if you thought that I could accomplish such a thing without the Curl libraries. since unfortunately the se

Re: [PHP] System() works on /usr/sbin commands

2003-07-31 Thread Marek Kilimajer
Check out sudo (man sudo), but you must be carefull. tirumal b wrote: hello, yes the /usr/sbin commands require root permissions but is there any way to run these commands using system() through suid or something.please let me know Thank you __ Do you Yahoo!? Y

Re: [PHP] install php-gtk on mdk9.1

2003-07-31 Thread Marek Kilimajer
http://sk.php.net/mailing-lists.php Decapode Azur wrote: hi, where do I have to post to bring help about how to install php-gtk ? Cheers -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Multiple targets with fscanf

2003-08-01 Thread Marek Kilimajer
Try (untested) $a = fscanf($fp,"%s"); if that does not work use regular expresions Denis 'Alpheus' Cahuk wrote: Hello! I'll get strait to the point: I want to include a header from another site ($fp = fopen("www.something.info/news.html", "r")) using the fscanf command, The headers are in "..."

Re: [PHP] Upload scripts timing out

2003-08-01 Thread Marek Kilimajer
check php.ini for max_input_time Josh Abernathy wrote: My current upload script times out too quickly when users are uploading large files. How can I stop this from happening? Thanks! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Purging old files from directories

2003-08-01 Thread Marek Kilimajer
Verdon vaillancourt wrote: Hi :) I need to write a script that will scan/read a given directory's contents and delete files older than a certain date. Ideally, this will be a script that runs via cron once a week and deletes all files it finds in the directory older than 2 weeks from the curren

Re: [PHP] Using eregi_replace()

2003-08-01 Thread Marek Kilimajer
And besides ereg_replace would not work becase it's greedy, .* would match "going", than "going" would not be found and the whole match would fail. messju mohr wrote: you mean $newtext= ereg_replace(".*?(hello.*going).*","\\1",$text); ?? i would suggest preg_replace in favour to ereg_replace: $

Re: [PHP] XmlRPC Extension in Apache 4.2.3

2003-08-01 Thread Marek Kilimajer
If I remember well this error is output even if the php_*.dll is found, but php fails to load it, possibly because of missing library/dll. Maybe xmlrpc.dll? Donald Tyler wrote: Hi Everyone, I posted this on the PHP install list but didn't get a reply. I hope you guys/gals can be more helpful.

Re: [PHP] A better solution?

2003-08-04 Thread Marek Kilimajer
Ryan A wrote: Hi, I have a table called the_slave where i am entering differient types of data and 5 specific "types", to get a count of each of the types i used: $tt = "SELECT ptype, count(*) FROM the_slave WHERE ptype IN ('1', '2', '3','4','5') and user='".$user."' and no='".$no."' GROUP BY p

Re: [PHP] greedy preg

2003-08-07 Thread Marek Kilimajer
And what about [^>]* -if there are no html tags skate wrote: Do you need to use ".*?"? If there will be only white characters, use \s* instead. unfortunately there's some content either side of $file before this content is different for each item, so i can't define it in the pattern. -- P

Re: [PHP] bug in code - can't find it!

2003-08-08 Thread Marek Kilimajer
Is it realy so? I remember someone noting on this list it also work if short tags are off. I have never tested it and I'm not going to restart our server now, but I will try it at home. John W. Holmes wrote: AciD wrote: just a little point; u can replace by which is better imho. and you're

Re: [PHP] [PROBLEM] Killed sshd, want to start it via PHP script.

2003-08-11 Thread Marek Kilimajer
edit /etc/inittab and add line ssh:345:respawn:/usr/bin/sshd Then tell init to reread its configuration: kill -1 1 Simon Fredriksson wrote: Oops, I did it again! Once again, I've managed to kill SSHd on my server. Hurray! >_< What I want to do now, is make a script start it again. I could just

Re: [PHP] greedy preg

2003-08-11 Thread Marek Kilimajer
Do you need to use ".*?"? If there will be only white characters, use \s* instead. skate wrote: $contents = preg_replace( "|.*?".$file.".*?|si", "", $contents ); okay, so i figured out that it's matching the first occurence of which will always be the first record and then going on to match the

Re: [PHP] Restricted access

2003-08-14 Thread Marek Kilimajer
I'm sorry, should be readfile(). Switched keyboard. Ciprian Trofin wrote: What is readfile90 ? I tried google and nothing. MK> Yes, put the files outside of web root or protect them using .htaccess MK> file. After authorization use readfile90 to serve the file. There are MK> lots of tutorials o

Re: [PHP] Restricted access

2003-08-14 Thread Marek Kilimajer
Yes, put the files outside of web root or protect them using .htaccess file. After authorization use readfile90 to serve the file. There are lots of tutorials on authentization and if you are using some CMS you might have all you need. Ciprian Trofin wrote: Hi All, I want to give access to re

Re: [PHP] send group of files at once to website administrator

2003-08-14 Thread Marek Kilimajer
Or you can use a zip class and create an archive. There are at least 2 free classes that can create zip files. skate wrote: Hi, I have the following code which I use to make regular backups of my databases. Is there a way to have all backup files sent at once after they are created, istead of p

Re: [PHP] Cannot add header information - headers already sent

2003-08-14 Thread Marek Kilimajer
output started at /usr/local/www/vhosts/aurelis.org/htdocs/header_aurelis.php:95 says it all. Look into the file at line 95. frederik feys wrote: Hi all, I’m stuck with this one: I have an checkout procedure: when people come to the overview page(step 2), they get: Warning: Cannot add header

Re: [PHP] Some SOAP samples

2003-08-14 Thread Marek Kilimajer
google -> PHP/SOAP Samples Pascal Miquet wrote: Hello, I'm looking for PHP/SOAP Samples. Where should I found some ? Thanks for your help. Regards Pascal Miquet -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] problem using unlink()

2003-08-14 Thread Marek Kilimajer
You need to chmod or chown the directory where the file is located. James Brash wrote: Hi, I have a problem using unlink(); on a system using FreeBSD and Apache... where my local system using Windows and Apache experiences no problems. On the windows system is deletes the file, but on the FBSD s

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