Re: [PHP] What PHP function can detect session being expired??

2004-02-13 Thread Marek Kilimajer
Scott Fletcher wrote: Hi! When I set the session.cache_expire to 60 minutes then on the webpage, how do I get PHP to tell me that session had expired via PHP function or something? Thanks, Scott F. None, but you can take care of the cleanout yourself. Than you have complete control over the

Re: [PHP] weird header() (bug may be)

2004-02-12 Thread Marek Kilimajer
adwinwijaya wrote: -- ok guys ... thanks for your answer and my another question -- why the php didnt stop processing after sending the header ? -- because in my logic ... after sending the (redirect) to another -- page .. the process shall be stopped and thanks for your -- advise ... I

Re: [PHP] weird header() (bug may be)

2004-02-12 Thread Marek Kilimajer
adwinwijaya wrote: Hello php-generaler's , I have a script like this : if($foo == 'something'){ header('Location:to_another_page.php') ; }else { do another thing in here } header('Location:to_previous_page.php'); I got a problem ... when $foo == 'something' .. it

Re: [PHP] Re: I think this is a mysql question

2004-02-12 Thread Marek Kilimajer
Ronald Ramos wrote: create table oras( NameVARCHAR(30), TimeIn DATETIME, TimeOut DATETIME, Total DATETIME ); insert into oras values('Nhadie','2004-10-10 10:10:00','2004-11-11 12:12:00','TIMEDIFF(TimeIn,TImeOut)'); Hi, Are those correct? Because the value on the Total field is 000-00-00

Re: [PHP] Re: I think this is a mysql question

2004-02-12 Thread Marek Kilimajer
Ronald Ramos wrote: create table oras( NameVARCHAR(30), TimeIn DATETIME, TimeOut DATETIME, Total DATETIME ); insert into oras values('Nhadie','2004-10-10 10:10:00','2004-11-11 12:12:00','TIMEDIFF(TimeIn,TImeOut)'); Hi, Are those correct? Because the value on the Total field is 000-00-00

Re: [PHP] phpMyAdmin Problems

2004-02-11 Thread Marek Kilimajer
Freedomware wrote: I've been using both phpMyAdmin and EMS MySQL Manager to work with MySQL tables and PHP. Things are generally going OK, but I'm still ironing out a few kinks. I suspect some of my problems might be related to an error message I get when I click on a Database in phpMyAdmin:

Re: [PHP] counting downloaded files

2004-02-10 Thread Marek Kilimajer
Adriaan Nel wrote: Hi, I am using the following piece of code, to download files, but the files are allways corrupt...what am I doing wrong? if ($submit) { $full_filename = $_POST[full_filename]; $filename = $_POST[filename]; $dir = $_POST['dir']; $size = $_POST[size]; $id = $_POST[id];

Re: [PHP] counting downloaded files

2004-02-10 Thread Marek Kilimajer
at the beginning of the file, how do I remove this warning? I won't tell you unless you tell what warning it is. But I'm sure if you think about the warning a little you will figure it out. Marek Kilimajer [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Adriaan Nel wrote: Hi, I am

Re: [PHP] Submitting several forms

2004-02-09 Thread Marek Kilimajer
make it one form and name the form elements using [], they will become arrays. example: form input type=text name=name[1] value=. input type=text name=surname[1] value=. input type=text name=name[2] value=. input type=text name=surname[2] value=. the numbers (1 and 2) are ids of

Re: [PHP] Linked Tables

2004-02-09 Thread Marek Kilimajer
Sajid wrote: What is the way to generate XML from MySql database using PHP? Is DOMXML the only way? I dont have it installed on my server, can i still get XML output? I know the workaround like i query the database and echo a XML, but i am looking for alternatives. Do it this way. It's easy and

Re: [PHP] XML and Excel

2004-02-09 Thread Marek Kilimajer
Create native xls files, there are at least two classes that can help you, here is one: http://www.bettina-attack.de/jonny/view.php/projects/php_writeexcel/ Jake McHenry wrote: Hi everyone. Since my last post of outputing to excel, I have converted my output to XML, quite happy with myself. It

Re: [PHP] connecting with C-code

2004-02-08 Thread Marek Kilimajer
E.H.Terwiel wrote: I have a tried-and-tested (15 years of it) piece of C code that I could port from Windows to Linux, and I thought I put a PHP front on it. Is there a way to interface the C-code with PHP 4.3.4 ? If so, could you point me to docs ? frgr Erik Hello, there are two ways - you can

Re: [PHP] getting classname of current class

2004-02-06 Thread Marek Kilimajer
Not an answer to your question, but you should not use function names beginning with 2 underscores (__arr in your case) unless you want to use special functionality associated with that name (e.g. __construct). This will avoid possible conflicts with future version of php. Vivian Steller

Re: [PHP] Undefined Index Errors

2004-02-06 Thread Marek Kilimajer
You can either: 1. put @ in front of each variable, e.g. $adminID = @$_ENV['HTTP_REMOTE_USER']; 2. change your error reporting level: error_reporting(E_ALL ^ E_NOTICE); Cameron B. Prince wrote: Hey guys, Here's a chunk of code from the top of a multi-function page I converted

Re: [PHP] CMS Question

2004-02-06 Thread Marek Kilimajer
You should search for php document management system, not cms. I quickly found http://terracotta.sourceforge.net/ and http://dms.markuswestphal.de/about.html Ashley M. Kirchner wrote: Does anyone know of any open source, document management type CMS? Basically what we need is a way to keep

Re: [PHP] PHP, Excel, and tab delimited files question

2004-02-06 Thread Marek Kilimajer
Do double quotes around help? Jay Blanchard wrote: [snip] Don't do it in the header, but in the field itself just put a ' before the first character and excel will interpret it as a text field. [/snip] Tried that, the ' shows up. Don't want that to happen -- PHP General Mailing List

Re: [PHP] PHP, Excel, and tab delimited files question

2004-02-06 Thread Marek Kilimajer
jon roig wrote: Nah... Try it in excel itself and you'll see what I'm talking about. You have to do it in numeric fields. Do this in an excel field: - Type 10 and hit return. ... It becomes 10, right? Now try it like this: '000100 ... Tada! It stays as 00100 and puts a little green tab in the

Re: [PHP] SQL Query Not Kosher?

2004-02-03 Thread Marek Kilimajer
The argument to mysql_affected_rows must be mysql CONNECTION identifier (from mysql_connect), not RESULT identifier (from mysql_query). Removing the argument will work for you. Mr. Austin wrote: Hi all: I am trying to get this to work, but always get the same error: that the resource in

Re: [PHP] Print page with default margins

2004-02-02 Thread Marek Kilimajer
Narcis Florea wrote: Hi, Hello, I'm using Apache/PHP/MySQL in my business project Thank you for using php! My big problem now is: How can I print a page on a standard page format, like Letter, left margin: 0.25 inch, etc.) When I print, I must every time set page margin manually, and I want this

Re: [PHP] Can't delete cookies

2004-02-02 Thread Marek Kilimajer
Are you sure that the cookie is not unset? You might have an old cookie with / as its path that you see now. Andrew Wood wrote: Can anyone fathom out why I can't get the setcookie function to delete a cookie? I'm calling it with the same arguments as I used to set it originally, but with a

Re: [PHP] Can't delete cookies

2004-02-02 Thread Marek Kilimajer
Please, reply to the whole list, you will have a better chance you will get the right answer. Andrew Wood wrote: No because even if I manually delete all the cookies in the browser from my domain, then reload the page to set them again, then run the PHP code to delete them they're still

Re: [PHP] modify an XML file

2004-02-01 Thread Marek Kilimajer
Decapode Azur wrote: What is the best one for large files? (something about 8Mo) Parse with SAX, use printf to produce output. Ok, it seems this method is defenitly a good one. I was wondering if it was a good one too, to read the XML file with fgets, and using ereg fonctions to make the

Re: [PHP] Am I missing Something

2004-01-30 Thread Marek Kilimajer
You have: select date_format('%c', date_column) You need: select date_format('%c', date_column) AS date_column Else the column name in the result is date_format('%c', date_column). Phillip S. Baker wrote: Greetings all, I am running version 4.3.4 of PHP. Fairly recently. I am trying

Re: [PHP] How do you guys do this?

2004-01-30 Thread Marek Kilimajer
Ryan A wrote: Hey all, I needed to make a simple upload script so users could upload their images but had a small extra requirment, after searching google, hotscripts and all the other usual places and downloading code, i realized its better to write the whole damn thing myself, so i did. Now that

Re: [PHP] addslashes stripslashes

2004-01-28 Thread Marek Kilimajer
Will wrote: I'm a little confused with these functions. How I here you ask. Well I thought I understood what they were for: Escaping characters that might cause a problem when you enter your data into a database query. i.e. \ ' Anyway what is confusing me is, say I have a string which

Re: [PHP] Size of session?

2004-01-27 Thread Marek Kilimajer
php memory limit if php has been compiled with --enable-memory-limit and the limit is enabled, else it is limited by the platform php runs on motorpsychkill wrote: I'm not sure if this has been covered (I searched the archives) but does anyone know if there is a size limit on what a session can

Re: [PHP] su idn't working from within php

2004-01-27 Thread Marek Kilimajer
Why do you need su? Set up sudo for apache user. Nitin Mehta wrote: hi all i was trying to execute some commands as an authorized user from within my php script with exec (su username -c \sudo command\ 21;, $output); but it gives me standard in must be a tty how can i make it work? it runs

Re: [PHP] order by

2004-01-27 Thread Marek Kilimajer
... ORDER BY points [DESC|ASC], score [DESC|ASC] christian tischler wrote: Is there a way wuth php to create a list ordered by more than one column like in excel or access. something like ORDER BY points AND score -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] MS SQL / PHP

2004-01-27 Thread Marek Kilimajer
try print_r($Msku) and see what comes out Enda Nagle wrote: I have a potentially stupid problem with PHP and MSSQL on a Windows server... I can connect to the database and insert data to the tables etc but cannot retrieve data... This is the code I'm using:

Re: [PHP] MS SQL / PHP

2004-01-27 Thread Marek Kilimajer
id #15 ) COM Object ( [0] = Resource id #21 ) There are 4 records in the table at the moment, and its performing the loop etc for the recordset but just isn't returning the data (or returning data in a readable format). Thanks Enda -- -Original Message- From: Marek Kilimajer [mailto

Re: [PHP] Script timeout?

2004-01-27 Thread Marek Kilimajer
set_time_limit() This function has no effect in safe mode, you will need another workaround, for example send fisrt 400 emails and redirect the browser to send next 400 emails and so on untill you are done. Ben Ramsey wrote: I'm trying to run a query against a database with a PHP script that

Re: [PHP] Script timeout?

2004-01-27 Thread Marek Kilimajer
You should. I know I did in older version of php, now I don't. Ben Ramsey wrote: Ah... I was trying to lookup the word timeout, which was giving me nothing. Thanks! Also, shouldn't I be receiving an error message if the script is, in fact, timing out? I have checked display_errors and it

Re: [PHP] su idn't working from within php

2004-01-27 Thread Marek Kilimajer
You need to edit /etc/sudoers file and allow apache to execute command. And you also need to be carefull what you are doing or you will create a security hole. Nitin Mehta wrote: but how would i store keys for apache? - Original Message - From: Marek Kilimajer [EMAIL PROTECTED

Re: [PHP] Register Globals is_upload_file

2004-01-27 Thread Marek Kilimajer
You are working with Register globals turned off, so try is_upload_file($_FILES['tmp_name']['filename']) bill wrote: I'm converting old code to work with Register globals turned off in php.ini. With it on, is_upload_file($filename) works fine but when turned off doesn't work at all. What am I

Re: [PHP] Return-Path header and sending email with php

2004-01-26 Thread Marek Kilimajer
You can use a class that sends mails by connecting directly to smtp server, e.g. http://www.phpclasses.org/mimemessage Chris Balay wrote: Good Day Coders - I have built a newsletter program with php. It sends out an e-mail to a couple thousand subcribers every day. All works well. My problem

Re: [PHP] How to prevent - Page has expired

2004-01-26 Thread Marek Kilimajer
Use get instead of post method Steen Rabøl wrote: Hi Sorry, my fault, I did not explain myself correctly Let's say that you have a search functions, then the user press the search button brows the result, and then press the 'Back' button of the browser, then you can get this 'Page has

Re: [PHP] Can I run it on any OS?

2004-01-26 Thread Marek Kilimajer
Radwan Aladdin wrote: Hi all.. Can I run my PHP project on any server and OS? I used the timetamp, random string, UNIQUE fields and many many other feaures for PHP.. Hm, are you sure you are talking about php? unique is from sql syntax -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] Very Simple one for u all :-)

2004-01-15 Thread Marek Kilimajer
http://sk2.php.net/manual/en/language.operators.logical.php either one of OR or || would do Dave Carrera wrote: Hi List, My brain needs a kick start this morning and I ask you this basic question. How do I do a if statement asking if 1st var = a value OR 2nd var = value I have tried this

Re: [PHP] PHP Includes versus sloppy Dreamweaver code and split elements

2004-01-15 Thread Marek Kilimajer
Freedomware wrote: My first question is really trivial, but I noticed that Dreamweaver likes to display my PHP includes code like this... ?php include (../../../../includes/state/themes.php); ? When I do a search and replace function, it often jumps onto another element's line,

Re: [PHP] addslashes

2004-01-15 Thread Marek Kilimajer
Send us the resulting javascript code. João Cândido de Souza Neto wrote: Hello to all. I'm using str_replace(\r\n,\\r\\n,addslashes($campo)) to add \ in mysql data to send to javascript variable. Running in my machine with win xp + iis it's all ok, but in server with linux + apache, the

Re: [PHP] How can I read 8 bytes from a binary file and cast it as a double?

2004-01-15 Thread Marek Kilimajer
http://www.php.net/unpack SVERRE WISLØFF wrote: How can I read 8 bytes from a binary file and cast it as a double? sw -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] is ' or different in MS-Word then ascII?

2004-01-14 Thread Marek Kilimajer
I don't know what the character is but if you paste it into the textarea, ord() will tell you. Roger Spears wrote: Hello, This question may border on OT... I have a web form where visitors must enter large amounts of text at one time (text area). Once submitted, the large amount of text is

Re: [PHP] Re: session expires

2004-01-13 Thread Marek Kilimajer
Manuel Vázquez Acosta wrote: A tricky way to achive this is: 1. Start the session when the user request the login page 2. Send a hidden field with the PHPSESSID 3. When receiving the post compare the current session id with the submitted by the form, if they match it's likely the

Re: [PHP] writing Excel files through PHP

2004-01-12 Thread Marek Kilimajer
Binay wrote: + How to create web archvie which will be mime encoded file and then saving as excel file .. plz direct me to the resources where i can find more information about it .. or tell me how can i proceed to it. Thanks + Web archive

Re: [PHP] I am totally nuts/banana. Please somebody help me with an include problem.

2004-01-12 Thread Marek Kilimajer
Webmaster wrote: Hello, please can somebody help me. I am going nuts. Really I am close to totally freaking out. I have a problem that seems minor and ridiculous but cost me already 3 working days. I have a working php/mysql homepage and used to use Ommnihttpd until 3 days ago. I installed the

Re: [PHP] view outputed headers?

2004-01-12 Thread Marek Kilimajer
http://sk2.php.net/manual/en/function.headers-list.php says: no version information, might be only in CVS Scott Taylor wrote: What is the easiest way to view the headers that a PHP page has put out? I've seen the |var_dump(headers_list()); on php.net but this always gives me an error (such

Re: [PHP] _(What does this do?)

2004-01-12 Thread Marek Kilimajer
It's an alias to this function: http://sk2.php.net/manual/en/function.gettext.php Kelly Hallman wrote: I just ran across this syntax in someone else's code. I can't detect any difference between these two expressions: _(String value) and String value Is there a difference? What does _(xyz) do,

Re: [PHP] session expires

2004-01-12 Thread Marek Kilimajer
Andreas Magnusson wrote: Hi, I wonder if anyone knows of a way to detect if a session has expired (when your session.cookie_lifetime != 0). I've tried to see if the session-vars are unset, but that doesn't seem to be the case, still everythings seems to be lost. My problem is that I have a page

Re: [PHP] Re: deamon / server

2004-01-11 Thread Marek Kilimajer
Decapode Azur wrote: Is it possible to make php scripts working like deamons and build something like a server? What you trying to achieve... Well nothing particular, just wondering howto... For exemple, the script make some calculations, but niced 19 in background and/or when the computer is

Re: [PHP] writing Excel files through PHP

2004-01-10 Thread Marek Kilimajer
Use full uri. But the user needs to be online while viewing the xls file. Other option is to create web archive. It's a mime encoded file, save an excel file with an embeded image and you will see what it is. Binay wrote: Hi all, I m generating an Excel file though PHP by sending the

Re: [PHP] Dynamically Created Arrays

2004-01-09 Thread Marek Kilimajer
This should be what you need: if(!is_array($conf[$name])) $conf[$name] = array($val); else $conf[$name][] = $val; Cameron B. Prince wrote: Hey guys, I'm making progress on my perl to PHP conversion project but I need some help... I have a configuration table in MySQL made up like this: CREATE

Re: [PHP] php5 overload()

2004-01-08 Thread Marek Kilimajer
Alex Crivat wrote: Hallo, I;ve just installed php5 and found that overload() function does not work. Actually it does not exist...I get this error : Fatal error: Call to undefined function overload() in /usr/share/pear/DB/DataObject.php on line 2889 Any ideas ? 10x overload is the standard

Re: [PHP] Verifying a url

2004-01-07 Thread Marek Kilimajer
There is a official variable - $_SERVER['HTTPS'] - that is defined only if https protocol is used. Ivo Pletikosic wrote: It did not work for me but since I have only one http port and one https port on my server i use instead if( $_SERVER['SERVER_PORT'] == 80 ) echo 'http'; C. -Original

Re: [PHP] i need help help with include

2004-01-07 Thread Marek Kilimajer
include('../../../functionfile'); or something similar PHP wrote: Hi I created a directory and files 3 directory's down root/dir1/dir2/dir3/files now i need to include my function file out of the root root/dir/funtionfile How do i do this? I cannot create a htacess file on this server nor

Re: [PHP] generating .doc on the fly

2004-01-06 Thread Marek Kilimajer
Simply create a html file and give the user impression that it's in doc format - output the right header and give it .doc extension Naveed Ahmad wrote: I want to save a document in .doc format on the fly but my server is running on a linux machine. Can I still make use of COM object? Or there is

Re: [PHP] finding phpize

2004-01-04 Thread Marek Kilimajer
Install php*-devel package for your distribution. I'm sure there is a x-window application in your distribution that will help you in the future, or use rpmfind.net to search for the filename you are missing. Ryan A wrote: Hi guys, I am trying to install Turck MMCache on our server but have no

Re: [PHP] cache_limiter cache_expire

2004-01-04 Thread Marek Kilimajer
Eli Hen wrote: Hello All, I would like to do that the session will expire after X minutes, and the page at the client will expire after Y minutes. How can I do that? I understand that session_cache_limiter() function determines who can cache the page: - pulic:proxies and clients. -

Re: [PHP] php files not looking right

2004-01-04 Thread Marek Kilimajer
1. Use an editor that can work with unix newlines, most developer editors can. 2. Use some tool that can convert between various newlines - search the web. Command line utility todos/fromdos is one, but it might be available only on unices. John wrote: hi, i must have downloaded my php files

Re: [PHP] Production Websites (error loggin)

2004-01-03 Thread Marek Kilimajer
Does apache have permissions to write to the file and directory? Aidan Lister wrote: If anyone has successfully got php error logging working on a production website, could you please reply with the steps taken? I'm using RH7.3, Apache1.3x, PHP4.3x My php.ini has: log_errors = On error_log =

Re: [PHP] Is a while loop the most efficient way to send out multiple emails?

2003-12-30 Thread Marek Kilimajer
Dave G wrote: So my question is, is there a way more efficient than while loops to send out multiple emails with personalized information? Is it the mail() command that takes time, or the mysql_fetch_array(), or both? Any suggestions would be greatly appreciated. It's the mail()

Re: [PHP] Problem with INSERT Query

2003-12-30 Thread Marek Kilimajer
Do you understand the request - response process? User requests a page, php buids the page and sends it to the user, user's browser displays the page, users views it and takes some action (follows a link, submits a form) and the whole process repeats. [EMAIL PROTECTED] wrote: Hi all: Well,

Re: [PHP] Can't upload file greater than 11kb

2003-12-29 Thread Marek Kilimajer
post_max_size should be greater than upload_max_filesize. What is the setting for max_input_time? Chris wrote: post_max_size: 8M upload_max_filesize: 10M what quota and disk space affect the web server process and temp dir This site is hosted by a third party: Disk space is 400MB only a

Re: [PHP] multiple select option alternative to field_name[]

2003-12-29 Thread Marek Kilimajer
Use this.form.elements['select1[]'] Terence wrote: Dear All, The only way I know to retrieve all the values from a multiple select field is to use the square brackets after the field name ie. user_id[] The problem however is that when I use a javascript function to transfer the items from

Re: [PHP] Is It Just a Matter of Getting the Pathname Righr?

2003-12-29 Thread Marek Kilimajer
[EMAIL PROTECTED] wrote: Again, I am on a Macintosh PowerBook, where my hard drive is, in fact, named a variation of My Hard Drive (with cap letters and spaces, as the Macintosh allows). So this brings me to my first questions: Do I change the line $dirName = c:/csci/mm to something like $dirName

Re: [PHP] magic_quotes_gpc setting question.

2003-12-26 Thread Marek Kilimajer
Rajesh Kumar wrote: Hello, Here I've got a few related questions, which are not stated explicitly in the manual. 1. The manual says that the magic_quotes_gpc setting cannot be set at runtime. Is it not possible to set this setting in an ini file, and parse it with the parse_ini_file()

Re: [PHP] Insert into array...

2003-12-26 Thread Marek Kilimajer
Please don't start a new thread by hijacking an existing thread. Always start with new massage. Simple answer for your question is: foreach($orders as $order_key = $dummy) { $orders[$order_key]['Newitem'] = something; } Andras Kende wrote: Hello All, I would like to put 1 new field

Re: [PHP] serialize and unserialize

2003-12-22 Thread Marek Kilimajer
You should use stripslashes to get rid of escaped characters in $_COOKIE['data']. Then remember to use addslashes when you want to use $data or $chksum in sql queries. [EMAIL PROTECTED] wrote: Hello all i need a little help with serialize and unserialize here is my code ?php

Re: [PHP] Working pop-up progress window

2003-12-22 Thread Marek Kilimajer
Ed Curtis wrote: If I understand you correctly, when you call window.close on the next page you want it to close the child window. I am not sure if this is possible with Javascript if you go to a new page, it might be. You would want to not call window.close but something like myPopUp.close()

Re: [PHP] Re: HTTP headers, IE and downloading

2003-12-22 Thread Marek Kilimajer
Did you try session_cache_limiter('private_no_expire')? Andreas Magnusson wrote: Thanks for your reply! Have a look at: http://pear.php.net/package/HTTP_Download I looked at it and it's hard to see what it does differently from what I do... And the first comment of:

Re: [PHP] Re: Script timeout Problem

2003-12-19 Thread Marek Kilimajer
Haseeb Iqbal wrote: how can i do that? btw the script runs on a local machine but updates the records on a webserver i mean live server. this is also a factor for the timeout. the script was running smoothly for 24000 recods before but now it suddenly timeout after 800records. i dont know what is

Re: [PHP] Re: Script timeout Problem

2003-12-19 Thread Marek Kilimajer
Haseeb Iqbal wrote: i tried this but to noavail. anyother sugestion really this problem is really annoying me now Haseeb The browser might be timing out. You should regulary send out some dummy output and flush() -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] session / garbage collection problem

2003-12-19 Thread Marek Kilimajer
What filesystem and OS is this? Anthony Kaufman wrote: PHP Version 4.2.2 Apache 2 RH 9 The problem is that session files in the /tmp directory are completely cleared out at random intervals of time. We assume that the randomness is due to our session.gc_probability setting of 1 causing it to run

Re: [PHP] include files

2003-12-19 Thread Marek Kilimajer
See function debug_backtrace(), it's available since 4.3.3 Todd wrote: Hi, Is it possible under PHP4 to get the name of the file that a function was called from? To clarify, here's an example of what I'd like to do: --- main.php --- ?php include('include.php');

Re: [PHP] Regex to grab a Windows Path from a String...

2003-12-17 Thread Marek Kilimajer
if(preg_match('/img[^]+src[ ]*=[ ]*(||\')[a-z]{1}:\\\/i', $string)) echo local links used; [EMAIL PROTECTED] wrote: My regex skills are serious lacking and after scouring the net for relevant links I'm a bit stuck. I've got a textarea field where I pull user input from, and I'd like to search

Re: [PHP] Where'd my session go??

2003-12-17 Thread Marek Kilimajer
It's the garbage collector - session.gc_maxlifetime setting. The setting is server wide, unless you use your own session storage functions. Anthony wrote: I've got an issue with an app I wrote. I store some information about the user and if they are logged into the app in session variables.

Re: [PHP] Addslashes limit

2003-12-17 Thread Marek Kilimajer
Cesar Cordovez wrote: HI! Is it just me or addslahes truncates the result to 65535 chars? Any comments? Or can it be that a blob field in a MySQL database is just 65535 chars, I don't think so... Cesar. BLOB is just 65535 chars. Use MEDIUMBLOB (2^24 bytes) or LONGBLOB (2^32 bytes). Also

Re: [PHP] Your Opinion

2003-12-16 Thread Marek Kilimajer
For correct benchmarking you should run the test also when $foo == 'string' Gerard Samuel wrote: Looking to squeeze as much out of my core scripts (not that they are slow ;) ). The thought arose that I can replace simple functions like is_string(), is_array() with simpler php code. For example

Re: [PHP] sending a pdf document to a network printer

2003-12-16 Thread Marek Kilimajer
There's no other way, only system command. Shay wrote: I am trying to senf a pdf (or any other file for that matter) to a network printer. i would rather not do it with a system command, is there a bulildin way of doing so. i am going in circuls an d could't find anyway to do it. Thanks. -- PHP

Re: [PHP] How do i save images created using PHP

2003-12-15 Thread Marek Kilimajer
Please be more specific. [EMAIL PROTECTED] wrote: hi, i am able to create images in php (png, jpeg) in IE. What has IE with creating images? when i try to save the image it gets saved to the directed path. when i try to open the saved document i get an error message What error message? Where

Re: [PHP] session_start() make netscape 4.7 reload page.

2003-12-14 Thread Marek Kilimajer
Jonathan Zhang wrote: test.php -- ? session_start(); ? form input type=text name=test /form For Win2kpro+netscape 4.7,all form data you enter in this page will lost when resize the browser's window size, ns4.7 have reload this page when resize the window. But if you remove the session_start() from

Re: [PHP] count the elements of each dimension of the array

2003-12-13 Thread Marek Kilimajer
[EMAIL PROTECTED] wrote: I have this script: ? $ojpp[] = 1; $ojpp[] = 2; $ojpp[] = 3; $ojpp[] = 4; This is illegal. Only one pair of empty square brackets is allowed. How whould php know where to add the new key? $ojpp[][] = 1; -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

Re: [PHP] Undefined index???

2003-12-12 Thread Marek Kilimajer
[EMAIL PROTECTED] wrote: On Friday 12 December 2003 15:43, [EMAIL PROTECTED] wrote: I keep getting this error: Notice: Undefined index: tutor_id in /usr/local/.. What does undefined index exactly mean?? I did a search on the web but couldn't find any solutions. Basically it

Re: [PHP] Re: Write on image in faint color

2003-12-10 Thread Marek Kilimajer
Ryan A wrote: Hey, Thanks for the heads up but I have a heck of a lot of images and the site has pretty good traffic so I cant afford to do this on the fly, I was looking for something where you just drop all the images into a folder, run the script and pick it up in the output folder all ready

Re: [PHP] count()

2003-12-06 Thread Marek Kilimajer
Anthony Ritter wrote: Greetings- I'm have the follwing string called $text and throughout this string I'd like to split this into an array by calling spliti() at the tag called PAGEBREAK. So, I count the array elements starting at 0 and get to 9. When I call count(), I get 11. Could somebody

Re: [PHP] preg_match

2003-12-05 Thread Marek Kilimajer
If $thumbname does not contain any regular expression syntax characters, it mean $item must begin with $thumbname to match the expression. Even a dot is a syntax character, the code should better be: if (!preg_match(/^.preg_quote($thumbname)./,$item)) preg_quote will escape special characters.

Re: [PHP] PHP5 XSLT how to.

2003-12-05 Thread Marek Kilimajer
snip XML support has been completely redone in PHP 5, all extensions are now focused around the excellent libxml2 library (http://www.xmlsoft.org/). /snip Try libxml2 documentation. William Bailey wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello again. I am currently testing the

Re: [PHP] Premature end of script headers: php.exe

2003-12-04 Thread Marek Kilimajer
This is a common error with php/iis combination, google for the error string to find possible solutions. Goran Ristic wrote: Hello, I have a problem. When I start my PHP script, I get message Premature end of script headers: php.exe. How can I solve this problem? -- PHP General Mailing List

Re: [PHP] CHMOD...

2003-12-04 Thread Marek Kilimajer
Jay Blanchard wrote: Yes you can, but 'tis not a swell idea. You can exec the chmod command exec(chmod 0777 /directory/*); You still cannot set all sub directory and files within those permissions. Best to loop through and set each as needed, don't forget to cahnge them back. Yes, you can:

Re: [PHP] Re: for help :how to detect norton client through php socket

2003-12-04 Thread Marek Kilimajer
Why are you asking this on php list? You might want to do it in php, but it's not a php problem. Ask the sofware vendor if it is possible. lph wrote: why ? I manager a network including 2000 hosts, and i want to post the hosts ip and department not installing the norton client on our web

Re: [PHP] SID problem

2003-12-04 Thread Marek Kilimajer
Before session_start() Binay wrote: I have one more question. Is it necessary to call ini_set before session_start()?? or any where in the scope of the script? - Original Message - From: Wouter van Vliet [EMAIL PROTECTED] To: 'Binay' [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Thursday,

Re: [PHP] CHMOD...

2003-12-04 Thread Marek Kilimajer
Justin Patrin wrote: In all fairness, that's not a very good solution. Using system commands makes your script not cross platform, meaning it can't work on Windows. For a better solution try writing a recursive chmod script that sets the permission, the loops through the files and calls itself

Re: [PHP] Upload issue - The 2MB barrier...

2003-12-02 Thread Marek Kilimajer
Kim Steinhaug wrote: That leaves me with the httpd.conf settings which is supposed to work, also according to the PHP documentation. Just need to locate this file first... $ locate httpd.conf -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Best way to split a string of numbers into segments.

2003-12-02 Thread Marek Kilimajer
list(, $year, $month, $day) = Tom wrote: I agree that preg_match generates an array, but I cannot assign to it directly, and in your example I have 4 elements in the array, not three. Array ( [0] = 20031202 [1] = 2003 [2] = 12 [3] = 02 ) I suppose something like

Re: [PHP] XML, strings and foreign (swedish/danish) characters

2003-12-02 Thread Marek Kilimajer
Victor Spng Arthursson wrote: I'm on the point of almost giving up trying to get XML and PHP to sing along, but I'll throw out a question here first. I'm having severe problems getting PHP and XML to work with XML-files that contains foreign characters. Doesnt matter if i type the foreign

Re: [PHP] Finding array in MySQL (I'm not asking the right question)

2003-12-02 Thread Marek Kilimajer
SELECT email FROM table WHERE id IN (' . implode(',',$array) . '); And don't forget to check if $array really contains only numeric values. Dave G wrote: PHP Gurus, What I'm trying to do must be both common and simple, but I'm not asking the question right because I can't find the

Re: [PHP] Refreshing in forms using post

2003-12-01 Thread Marek Kilimajer
What header are you using? If you use Location header, this should not happen. Matt Grimm wrote: Suppose I have a form. Upon submission, the metadata is posted to a processing script (a separate PHP file), which parses it and then sends the user back to a particular page using the header

Re: [PHP] array problems

2003-11-28 Thread Marek Kilimajer
Curtis Maurand wrote: OK. That worked, thanks. Is it me, or is that rather odd behavior? It is you ;) Shouldn't array elements set within a loop be available to me outside the loop if the loop exits normally? A loop is not a function (well it is, sort of.) Should I declare the variable

Re: [PHP] Call to undefined function: imagecreatefromjpeg()

2003-11-28 Thread Marek Kilimajer
Philip J. Newman wrote: http://www.php.net/manual/en/function.imagecreatefromjpeg.php After using this code for some time it suddenly returns ... It's not suddenly, someone must have recompiled php without gd/jpg support. Fatal error: Call to undefined function: imagecreatefromjpeg() in

Re: [PHP] how can i get rid of newlines?

2003-11-28 Thread Marek Kilimajer
$string = str_replace(\n, 'br', $string); David T-G wrote: Hi, all -- As has been discussed before, the nl2br function doesn't actually convert newlines to breaks but instead is more like nl2nlbr. That is, input like this becomes input brlike brthis instead of inputbrlikebrthis

Re: [PHP] how can i get rid of newlines?

2003-11-28 Thread Marek Kilimajer
David T-G wrote: Marek, et al -- ...and then Marek Kilimajer said... % % $string = str_replace(\n, 'br', $string); That didn't work for me. Interestingly enough, in light of Leif's post, neither did \r\n in the search pattern. Hmmph. Well, thank heavens once again for preg_replace

<    4   5   6   7   8   9   10   11   12   13   >