Re: [PHP] help with preg_replace please

2003-03-25 Thread Jason Paschal
what that guy said, or use ereg_replace instead of preg_... From: Jason Wong <[EMAIL PROTECTED]> Reply-To: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Re: [PHP] help with preg_replace please Date: Wed, 26 Mar 2003 14:08:44 +0800 On Wednesday 26 March 2003 13:59, Justin French wrote: > Pa

Re: [PHP] help with preg_replace please

2003-03-25 Thread Jason Wong
On Wednesday 26 March 2003 13:59, Justin French wrote: > Parse error: parse error, expecting `T_VARIABLE' or `'$'' in > /usr/local/apache/htdocs/lib/lib_string.inc on line 218 > > Using this code: > $str = > preg_replace("!([[:alnum:]]+)://([^[:space:]]*)([[:alnum:]#?/&=])!ei", " href=\"{$1}://{$2

[PHP] help with preg_replace please

2003-03-25 Thread Justin French
Hi, Total newbie on reg exps, and even worse with preg!!! I get the following error: Parse error: parse error, expecting `T_VARIABLE' or `'$'' in /usr/local/apache/htdocs/lib/lib_string.inc on line 218 Using this code: $str = preg_replace("!([[:alnum:]]+)://([^[:space:]]*)([[:alnum:]#?/&=])!ei

Re: [PHP] NewB Q on Arrays.

2003-03-25 Thread Frappy John
> What i want to be able to do is determine if a certain > user has watched a movie. If you want to check the log to see if a single user has viewed a particular movie, then include the user and movie in the select statement: select uid, mvid from mvlogtbl where uid = $userID and mvid = $movi

[PHP] RE: connecting to mysql db

2003-03-25 Thread Uttam
Yes, It is necessary because script executes & ends for every request. Variables can be made persistent by using cookie/sessions but mysql connection is a resource which can not be saved & restored as session variable. For efficient use of resources, you may use mysql_pconnect() (only when php is

[PHP] Re: ho to remove an empty space

2003-03-25 Thread chris
On Mon, 24 Mar 2003 22:10:28 -0800, Webdev <[EMAIL PROTECTED]> wrote: somehow when I have try to develop an application where I read five or six values into an individual arrays the array who carries the emails has the email and an additional empty field after the email somehow complex well

[PHP] RE: session id

2003-03-25 Thread Uttam
session_start(); should be on the first line in the script. regds, -Original Message- From: Iggy [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 25, 2003 20:08 To: [EMAIL PROTECTED] Subject: session id can somebody tell me why I am getting this: Warning: session_start() [function.session

[PHP] Re: NewB Q on Arrays.

2003-03-25 Thread chris
On Tue, 25 Mar 2003 21:18:48 +1000, Inpho <[EMAIL PROTECTED]> wrote: Hey All, I'm still a newB in php and mysql so I'm asking for your patience up front. i want to get a list of results from an array, which I can do with: $result=mysql_query("select * from mvlogtbl",$db); while ($row=mysql_fet

[PHP] imap_open Error

2003-03-25 Thread Brian Mitchell
I'm using the following code to try to open a stream to access my email: $user_id = "userid"; $password = "password"; $inbox = @imap_open("{mail.host.com:143}INBOX", $user_id, $password); I've verified the correct username, password, hostname combination by setting up an IMAP account thr

RE: [PHP] Mac IE File download problem - any solutions?

2003-03-25 Thread Daniel Leighton
Actually, I think you may have misunderstood. On Mozilla (Mac), Netscape (Mac) and Safari the script works exactly as I have intended: sending the "Content-Type: application/octet-stream" header causes the file to download; sending the "Content-Type: video/quicktime" causes the file to be playe

RE: [PHP] variables??

2003-03-25 Thread John W. Holmes
Okay, true. But they key here is the "act accordingly", meaning you sanitize and validate the variable before using it anywhere. Sometimes the way it's represented is that just using $_GET['var'] is going to make things more secure than using $var, which is not the case unless you know what exact

RE: [PHP] Difference between months

2003-03-25 Thread John W. Holmes
> How do I subtract the difference of months between two dates? > > For instance, if one date is 2003-12 and the other is 2002-08, I need to > know that there are 16 months between them. If one date is 2003-04 and the > other is 2003-01, I need to know that there are 3 months between them. How > c

Re: [PHP] variables??

2003-03-25 Thread Leif K-Brooks
No, it is more secure. The problem with register_globals is that ALL variables become global - not just the ones you want to be. Example: if(something) $authorized = true; if($authorized){ ...do something requiring security... } A hacker could easily go to script.php?authorized=1, and gain acce

RE: [PHP] Benchmarking

2003-03-25 Thread John W. Holmes
> I've been making a web ap PHP based, but I fear the number of arrays it > has > is too big. Is there any way to benchmark a script, or are there any > recomendations or standards about how much time execution takes and how > many > resources it takes? The benchmarking is just a matter of subtrac

RE: [PHP] Changing variables in a text file

2003-03-25 Thread John W. Holmes
> I have a text file with a series of project variables. > > For example > $var1=""; > $var2=""; > $template="blue"; > $anothervar="foo"; > > Let say I need to change $template="blue"; to $template="red";. How can I > do > that keeping the rest of the file intact? You have to write the w

[PHP] How to prevent execution of PHP in specific directory.

2003-03-25 Thread Heo, Jungsu
Hello, there. (Sorry to bother you if this kind of message already posted, but I cannot find the answer) My system hosts customers using Apache Virtual Host. If a customer has www.a.com, image.a.com , DocumentRoot of http://www.a.com is /usr/local/apache/htdocs/ and http://image.a.com is /home/

RE: [PHP] Default setting garbage

2003-03-25 Thread John W. Holmes
> Why is it that when I send call this function: > function GetNextDate($whichfriday, $month = "", $frequency = 1, $basedate > = "") > > with this line: > GetNextDate("4", "2003-03", "5"); > > that $frequency ends up ""? Whether I set it myself when I call the > function, or I leave it blank and

RE: [PHP] variables??

2003-03-25 Thread John W. Holmes
> It is considered more secure to declare the variable explicitly. > > $var = $_GET["var"]; Ummm... that's the same result as having register_globals on (basically). You're not helping anything and it's certainly not any more "secure". ---John W. Holmes... PHP Architect - A monthly magazine for

RE: [PHP] Disabling output control when using "ob_start"

2003-03-25 Thread John W. Holmes
> Is there a way to disable the call back function set by "ob_start"? > I tried: > ob_end_flush(); > ob_end_clean(); > ob_implicit_flush(true); > > Nothing seams to work. I can't detect the call back function and I can't > prevent it either. The call back function is called no matter what! > > Mi

[PHP] can i ask?

2003-03-25 Thread M.N. Ikhwan S.
ScriptAlias /php/ "c:/php/" AddType application/x-httpd-php .php Action application/x-httpd-php "/php/php.exe" i'm using apache 2.0 as my web server. and i'm about to ask these question, where am i going to put these three lines? under what line in httpd.conf? ikhwan

Re: [PHP] foreach statement

2003-03-25 Thread Jim Lucas
i have this little function that I wrote to do just that. function alternate(&$a, $b) { return($a = ($a?$a:$b) ); } just call it like this alternate($myArr, array()); foreach($myArr AS $k => $v) { do something here } Jim - Original Message - From: "Jennifer Goodie" <[EMAIL PROTECTED

RE: [PHP] formatting textarea input on output

2003-03-25 Thread daniel
umm nl2br doesnt work most the time , "nl2br -- Inserts HTML line breaks before all newlines in a string " sorry to give a wrong example this is for splitting your content into paragraphs obviously where there is a break in the content like so efwojeiowerjwetwpjwewoj eioptejoiejiojtei it won

RE: [PHP] foreach statement

2003-03-25 Thread Jennifer Goodie
You don't. >From http://www.php.net/manual/en/control-structures.foreach.php "Note: foreach does not support the ability to suppress error messages using '@'." You should check the validity of your argument before passing it to foreach if(is_array($array)){ foreach($array as $key=>$val){

Re: [PHP] foreach statement

2003-03-25 Thread Richard Whitney
Get rid of the error Quoting shaun <[EMAIL PROTECTED]>: ### how do i surpress an error message for a foreach statement? ### ### ### ### -- ### PHP General Mailing List (http://www.php.net/) ### To unsubscribe, visit: http://www.php.net/unsub.php ### ### -- Richard Whitney * Transcend D

[PHP] foreach statement

2003-03-25 Thread shaun
how do i surpress an error message for a foreach statement? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] formatting textarea input on output

2003-03-25 Thread CPT John W. Holmes
> /** > * converts line break and spaces to page break > * > * @access public > */ > > function nlbr($string) { > return preg_replace("/(\r\n|\n|\r)/", "\n", $string); > } ummm www.php.net/nl2br() ?? Start a new thread for your question, don't hijack someone else's thread. ---John H

[PHP] Object Aggregation - does anyone have experience with it?

2003-03-25 Thread Christopher E. Welton
I am using php 4.2.2 with Apache 2.0 on Red Hat 8.0 When I attempt to dynamically aggregate two objects using the aggregate() call, I get the following message: Fatal error: Call to undefined function: aggregate() the man page for aggregate() lists the following info: aggregate (PHP 4 >= 4.2.0)

RE: [PHP] flush not flushing?

2003-03-25 Thread Bryan Koschmann - GKT
Daniel- I just tried this, didn't seem to make a difference. Thanks for the reply! Bryan On Tue, 25 Mar 2003, daniel wrote: |hi , i have had similar issues its worked by doing a ob_flush before flush |then u want a sleep statement so maybe try | |ob_flush(); |flush(); |sleep(2); | |??

Re: [PHP] formatting textarea input on output

2003-03-25 Thread Charles Kline
I hang my head in shame... yes. As a matter of fact, I did on my second skim through my PHP ref. manual... thanks for the pointer just the same. - charles On Tuesday, March 25, 2003, at 05:38 PM, CPT John W. Holmes wrote: i have a textarea in a form which gets inserted into a table in my databa

RE: [PHP] formatting textarea input on output

2003-03-25 Thread daniel
/** * converts line break and spaces to page break * * @access public */ function nlbr($string) { return preg_replace("/(\r\n|\n|\r)/", "\n", $string); } here is one i use , what i'm still trying to work out , its a way

Re: [PHP] formatting textarea input on output

2003-03-25 Thread CPT John W. Holmes
> i have a textarea in a form which gets inserted into a table in my > database (mySQL). When displaying this text back to the screen, how do > i retain the line breaks etc. that were in the original input? I bet if you searched for "textarea" and "line breaks" you'd of found the nl2br() function.

Re: [PHP] formatting textarea input on output

2003-03-25 Thread Ernest E Vogelsinger
At 23:30 25.03.2003, Charles Kline said: [snip] >i have a textarea in a form which gets inserted into a table in my >database (mySQL). When displaying this text back to the screen, how do >i retain the line breaks etc. that were in the original input? -

RE: [PHP] Backing Up Tables Using PHP

2003-03-25 Thread Jennifer Goodie
Most RDB programs come with an integrated backup solution. You might want to look into those. As far as why your code is not working, you are not looping through the result set, you are only pulling one result. A database does not store data in order, it puts it where ever there's a hole, so the

Re: [PHP] MySQL and phpMyAdmin Issues

2003-03-25 Thread Charles Kline
I am by no means an expert (even remotely) but I do recall instructions on exactly how to do this in the documentation for MySQL - I think under the "how to upgrade" section. - Charles On Monday, March 3, 2003, at 06:53 PM, Stephen Craton wrote: Hello, Yesturday I made a big mistake. I had to

RE: [PHP] Re: Formatting code.

2003-03-25 Thread daniel
this code doc is excellent thanks , although some of it i agree on but i do differently , naming conventions etc .. i usually follow the PEAR standard although i dont do any pear code , its been the best thing ever to happen for php , as for a newbie when pear first came around it helped alot ,

[PHP] formatting textarea input on output

2003-03-25 Thread Charles Kline
hi all, i have a textarea in a form which gets inserted into a table in my database (mySQL). When displaying this text back to the screen, how do i retain the line breaks etc. that were in the original input? thanks charles -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit

Re: [PHP] is this correct? regular expressions

2003-03-25 Thread Ernest E Vogelsinger
At 23:22 25.03.2003, Jay Paulson said: [snip] >just trying to say if $phone isn't all numbers set it to all zeros.. so is >that right? cause i can't seem to get it to work. > > if (!ereg("^[0-9]$",$phone)) { >$phone = "00"; > } > >thanks! ---

[PHP] is this correct? regular expressions

2003-03-25 Thread Jay Paulson
just trying to say if $phone isn't all numbers set it to all zeros.. so is that right? cause i can't seem to get it to work. if (!ereg("^[0-9]$",$phone)) { $phone = "00"; } thanks!

RE: [PHP] flush not flushing?

2003-03-25 Thread daniel
hi , i have had similar issues its worked by doing a ob_flush before flush then u want a sleep statement so maybe try ob_flush(); flush(); sleep(2); ?? >= Original Message From Bryan Koschmann - GKT <[EMAIL PROTECTED]> = >Hello, > >I'm including a script I use to automatically e-mail ov

[PHP] Backing Up Tables Using PHP

2003-03-25 Thread Guru Geek
Hello, Trying to author my own PHP database table back up utility. A very simple one at that... Here's my sql statement to select everything in the table: $sql_daily = "SELECT * FROM dailytable"; $run_sql_daily = mysql_query($sql_daily); $result_sql_daily = mysql_fetch_array($run_sql_daily); H

Re: [PHP] Finding out which file is retrieved over HTTP

2003-03-25 Thread Jens Lehmann
Ernest E Vogelsinger wrote: At 20:48 25.03.2003, Jens Lehmann spoke out and said: [snip] To actually check on the HTTP status codes you need to run your own, either using cURL, or by doing your own stuff using fsockopen(). I tried using fsockopen(), but still

[PHP] Re: Formatting code.

2003-03-25 Thread Philip Hallstrom
here's one. http://utvikler.start.no/code/php_coding_standard.html google will probably find a lot more... maybe not all PHP specific, but still relevant. On Wed, 26 Mar 2003, Philip J. Newman wrote: > Is there any documents on how code should be layed out? > > > -- > Philip J. Newman. > He

[PHP] Formatting code.

2003-03-25 Thread Philip J. Newman
Is there any documents on how code should be layed out? -- Philip J. Newman. Head Developer [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] forcing a reload from a redirect

2003-03-25 Thread Mike Scalora
I have two pages, foo.php and bar.php. bar.php redirects the user to foo.php with the following code: header("Location: http://".$_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']) . "foo.php"); Normally, I want the browser to cache foo.php, it's content is fairly static. But, bar.php make

Re: [PHP] variables??

2003-03-25 Thread Dave O'Meara
It is considered more secure to declare the variable explicitly. $var = $_GET["var"]; > > I'm having a problem with form data being recognized by a php script. > > If I send information with a GET the variable data appears in $GET[var] > > but not $var. > -- PHP General Mailing List (http://

Re: [PHP] Default setting garbage

2003-03-25 Thread Kevin Stone
- Original Message - From: "Liam Gibbs" <[EMAIL PROTECTED]> To: "php list" <[EMAIL PROTECTED]> Sent: Tuesday, March 25, 2003 2:10 PM Subject: [PHP] Default setting garbage Why is it that when I send call this function: function GetNextDate($whichfriday, $month = "", $frequency = 1, $base

Re: [PHP] Default setting garbage

2003-03-25 Thread Liam Gibbs
<> No, no. Not insulting at all. That's often my problem. But not in this case. I even went to the 'trouble' of copying and pasting $frequency wherever I needed. Original problem: > Why is it that when I send call this function: > function GetNextDate($whichfriday, $month = "", $frequency = 1, $

RE: [PHP] Using include() or require() with PDF module

2003-03-25 Thread Daevid Vincent
Two things come to mind... First, make sure the file is indeed being included/required and you don't have your paths messed up. Second, make sure you have the PDF stuff compiled into PHP. Make a page with as the only thing in it, then load it in your web browser and find the words "PDF" in there

Re: [PHP] variables??

2003-03-25 Thread Kevin Stone
- Original Message - From: "Rick Gaine" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, March 25, 2003 1:25 PM Subject: [PHP] variables?? > > I'm having a problem with form data being recognized by a php script. > If I send information with a GET the variable data appears in $

[PHP] Default setting garbage

2003-03-25 Thread Liam Gibbs
Why is it that when I send call this function: function GetNextDate($whichfriday, $month = "", $frequency = 1, $basedate = "") with this line: GetNextDate("4", "2003-03", "5"); that $frequency ends up ""? Whether I set it myself when I call the function, or I leave it blank and let the function

Re: [PHP] Grabbing image information from an html string

2003-03-25 Thread Kevin Stone
You need to use preg_match_all() and a more greedy expression that is not case sensitive.. preg_match_all('/src="(\S*)"/i', $html, $matches); $image_array = $matches[1]; HTH, Kevin - Original Message - From: "Dan Rossi" <[EMAIL PROTECTED]> To: "Luis Lebron" <[EMAIL PROTECTED]>; "Php-Ge

RE: [PHP] Grabbing image information from an html string

2003-03-25 Thread Dan Rossi
if (preg_match('/(href|HREF)="?(\S+\.(jpg|png))">?/',$line, $matches)){ $filename[] = $matches[2]; } -Original Message- From: Luis Lebron [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 26, 2003 7:07 AM To: Php-General (E-mail) Subject: [PHP] Grabbing image information from an ht

[PHP] variables??

2003-03-25 Thread Rick Gaine
I'm having a problem with form data being recognized by a php script. If I send information with a GET the variable data appears in $GET[var] but not $var. I just upgraded to php4.2.2 and then 4.3.1 and I've been having this problem. I didn't have the problem with older versions. I suspect it i

[PHP] Re: Please point me in the right direction

2003-03-25 Thread rush
"Jerry" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > As I am very unfamiliar with the PHP environment, can someone point in the > right direction? If I use PHP for the front-end, what is the best tool to > create the CGI? I was considering using Python, but would Pearl be better?

Re: [PHP] Finding out which file is retrieved over HTTP

2003-03-25 Thread Ernest E Vogelsinger
At 20:48 25.03.2003, Jens Lehmann spoke out and said: [snip] >> To actually check on the HTTP status codes you need to run your own, either >> using cURL, or by doing your own stuff using fsockopen(). > >I tried using fsockopen(), but still experience a probl

[PHP] Grabbing image information from an html string

2003-03-25 Thread Luis Lebron
Let say I have an html string that looks like this: Title foo bar bar fooSome more text. I would like to pull the image filenames from the html and end up with something like this $images=array("image1.jpg", "image2.jpg") How can I do this? thanks, Luis R. Lebron Project Manager Sigmatech, In

Re: [PHP] warning when I compile PHP

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

RE: [PHP] Mac IE File download problem - any solutions?

2003-03-25 Thread Jennifer Goodie
This is not a MAC IE problem, it is the way browsers work. If the MIME type is mapped to an application, the browser will launch the application. IE does it inline, while Netscape tends to launch it separately. You can send false headers with a made up type and a missing file extension, but then

Re: [PHP] newbie:restricting users to change data in a textarea

2003-03-25 Thread Step Schwarz
Hi Mirco, Try adding either "readonly" or "disabled" to the textarea tag: > print " cols=10>".stripslashes($row['variable']).""; Hope this helps, -Step [...] > There is one field that I whant to stop them from changing. This field I also > use in my sql query when updating the table,ie. where v

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

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

Re: [PHP] counting ..

2003-03-25 Thread Sebastian
because my comment system is pretty much like forum style, sometimes a user referrers to another comment by it's number, etc... .. and because i want to ;) cheers, - Sebastian - Original Message - From: "Leif K-Brooks" <[EMAIL PROTECTED]> | Why do you think comment needs a number in th

[PHP] warning when I compile PHP

2003-03-25 Thread Richard Kurth
What does this mean I get this when I compile PHP. It is all through the out put when make is run. What can I do to make it not be there cc1: warning: changing search order for system directory "/usr/include" cc1: warning: as it has already been specified as a non-system directory -- Bes

Re: [PHP] openssl php 4.3.1

2003-03-25 Thread Kalin Mintchev
On Tue, 25 Mar 2003, The Doctor wrote: > On Mon, Mar 24, 2003 at 11:15:05PM -0500, Kalin Mintchev wrote: > > > > hi all, > > > > i have problems getting fopen() and fsockopen() to work over https.. > > > > here is the problem.. > > > > from the phpinfo: > > > > OpenSSL support enabled > > Open

Re: [PHP] Checking for existence of file

2003-03-25 Thread CPT John W. Holmes
> What I'd like to do is check the directory 'images' first to see if > 'mast_$img_pick.jpg' exists and if it doesn't, call a different image such > as 'mast_default.jpg'. I'm sure this isn't hard, I'm just not sure how to > start. Maybe you can start with file_exists() or is_file() and somehow wo

Re: [PHP] Checking for existence of file

2003-03-25 Thread Jason Wong
On Wednesday 26 March 2003 03:12, Verdon Vaillancourt wrote: > I've got a function (crude but works) that checks for a value in the url > and then I call an image based on that value. > > if (isset($_GET['menu'])) { > $img_pick = substr($_GET['menu'],0,1); > } else { $img_pick = "1"; } > > ech

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

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

[PHP] Checking for existence of file

2003-03-25 Thread Verdon Vaillancourt
HI :) I've got a function (crude but works) that checks for a value in the url and then I call an image based on that value. if (isset($_GET['menu'])) { $img_pick = substr($_GET['menu'],0,1); } else { $img_pick = "1"; } echo ""; What I'd like to do is check the directory 'images' first to s

Re: [PHP] Array query

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

[PHP] Array query

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

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

2003-03-25 Thread Robert Mena
Hi, I host some virtual servers in a Linux/apache/php 4 enviroment. I'd like to set up as secure as possible since the users have ftp access to upload files. So each virtual domain has a safe_mode/open_basedir settings in order to make it difficult to mess with each other's files. Unfortunatell

[PHP] again: IIS vs Apache

2003-03-25 Thread matiasz
Hi, I'm new here. I imagine that this question was made a lot of times in this list, but reading the archive i couldnt find a recently answer to this question: I want to convince my new lab partners (and director) to migrate our PHP site (over 1000 hits a day) to Apache/Linux. Could you giv

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

2003-03-25 Thread Boaz Yahav
Looks like this one : http://examples.weberdev.com/get_example.php3?count=1567 so if someone manages to get this done, i would appreciate it if he can add a comment. thanks berber -Original Message- From: Justin French [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 25, 2003 3:24 PM To:

RE: [PHP] problems with rename() - permission denied

2003-03-25 Thread Don Read
On 25-Mar-2003 Christian Rosentreter wrote: > > Hello, > > I've a small problem, which mades me crazy... :\ > > I'm trying to rename() a swapfile to real destination file (atomic > update). > It works on differnt environments very well. Sadly not on my ISP-server > I've added an "chmod($swapfil

Re: [PHP] Please point me in the right direction

2003-03-25 Thread John Hicks
PHP is extremely easy for an experienced programmer to pick up quickly (assuming you know the basics of tcp/ip and web architecture). But experienced programmers also know the importance of the KISS principle. Why rewrite a system when you can port it? Kylix allows you to use Delphi on Linux.

Re: [PHP] Persistent connections with mysql_pconnect()

2003-03-25 Thread CPT John W. Holmes
> no, not at all... but there is a time and a place, and i don't think you > should use pconnect just because you don't want to an include at the top of > every page. You still have to call pconnect() on every page if you use it. It doesn't leave it open for other requests, it leaves it open withi

Re: [PHP] Persistent connections with mysql_pconnect()

2003-03-25 Thread skate
no, not at all... but there is a time and a place, and i don't think you should use pconnect just because you don't want to an include at the top of every page. - Original Message - From: "John Hicks" <[EMAIL PROTECTED]> To: "php" <[EMAIL PROTECTED]> Sent: Tuesday, March 25, 2003 5:11 PM S

[PHP] Persistent connections with mysql_pconnect()

2003-03-25 Thread John Hicks
On Tuesday 25 March 2003 09:02 am, "skate" <[EMAIL PROTECTED]> wrote: > leaving the connection open creates security questions, > and also leaves resources open, what if a user closes his > browser window, how do you know to close the connection? So are you saying that persistent connections [ i.

[PHP] Please point me in the right direction

2003-03-25 Thread Jerry
Hi All, I have a CGI application written in Delphi web services and I want to port it to the Linux environment. I was going to use Kylix but I'm concerned that Borland isn't keeping up with the fast paced Linux development (ie they are still on Redhat 7.2 and Redhat is about to release version 9.0

[PHP] Problem with file_exists()

2003-03-25 Thread maillist
Hi, I've been reported a weird problem with one of the scripts that we have, which uses the file_exists() function. It returned true once, and then the query ran again, and it reported false, on the same file. This was true for a lot of files in the same directory, but only over a cerain period

Re: [PHP] counting ..

2003-03-25 Thread Jim Lucas
when it comes to the second page, you already know that page you are on 1,2,3,4... take that and multiply it by the defined number of results per-page, then start your counting. Jim - Original Message - From: "Sebastian" <[EMAIL PROTECTED]> To: "php list" <[EMAIL PROTECTED]> Sent: Monday,

[PHP] XSLT processing DocBook files -> FO

2003-03-25 Thread Colin Viebrock
I'm trying to automatically convert DocBook XML files into PDFs using PHP and the XSLT extension. First step is to convert them into FO, but I'm running into trouble with this script: 'USletter', 'page.orientation' => 'portrait', ); $html = xslt_process($xslt, $xml, $xsl, NULL, $args,

Re: [PHP] counting ..

2003-03-25 Thread Leif K-Brooks
Why do you think comment needs a number in the first place? Sebastian wrote: Hello all. rather dumb question. I have a pagination system, 25 results per page, which are user comments, I want to put a number on each comment so i am doing something like: $num=$num + 1; $number = $num; echo $numbe

Re: [PHP] PHP & grep

2003-03-25 Thread David T-G
Chris, et al -- ...and then Chris Blake said... % % Greetings learned PHP(eople) Hiya! % % I`m using the following to strip values out of a file, however, the file % I`m accessing contains multiple instance of the search criteria, and I % only wanna return the first instance % I`m just ge

Re: [PHP] Changing variables in a text file

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

[PHP] Changing variables in a text file

2003-03-25 Thread Luis Lebron
I have a text file with a series of project variables. For example $var1=""; $var2=""; $template="blue"; $anothervar="foo"; Let say I need to change $template="blue"; to $template="red";. How can I do that keeping the rest of the file intact? thanks, Luis

Re: [PHP] php regexp question

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

Re: [PHP] Disabling output control when using "ob_start"

2003-03-25 Thread Chris Hayes
At 15:41 25-3-2003, you wrote: I posted this problem a week ago, but no one answered so I try again: Is there a way to disable the call back function set by "ob_start"? I tried: ob_end_flush(); ob_end_clean(); ob_implicit_flush(true); Nothing seams to work. I can't detect the call back function an

Re: [PHP] session id

2003-03-25 Thread CPT John W. Holmes
> > can somebody tell me why I am getting this: > > Warning: session_start() [function.session-start]: Cannot send session > > cookie - headers already sent by (output started at > > c:\inetpub\wwwroot\search.php:8) in c:\inetpub\wwwroot\search.php on line 21 > > > > Warning: session_start() [funct

[PHP] Disabling output control when using "ob_start"

2003-03-25 Thread Michael Heuser
I posted this problem a week ago, but no one answered so I try again: Is there a way to disable the call back function set by "ob_start"? I tried: ob_end_flush(); ob_end_clean(); ob_implicit_flush(true); Nothing seams to work. I can't detect the call back function and I can't prevent it either. T

[PHP] Re: session id

2003-03-25 Thread Michael Heuser
The function session_start is sending a cookie. This means that you can't echo anything before. Its the same rules as with setcookie. "Iggy" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > can somebody tell me why I am getting this: > Warning: session_start() [function.session-start]

Re: [PHP] session id

2003-03-25 Thread Ryan Gibson
On 25/3/03 2:37 pm, "Iggy" <[EMAIL PROTECTED]> wrote: > can somebody tell me why I am getting this: > Warning: session_start() [function.session-start]: Cannot send session > cookie - headers already sent by (output started at > c:\inetpub\wwwroot\search.php:8) in c:\inetpub\wwwroot\search.php on

php-general Digest 25 Mar 2003 14:41:21 -0000 Issue 1959

2003-03-25 Thread php-general-digest-help
php-general Digest 25 Mar 2003 14:41:21 - Issue 1959 Topics (messages 140912 through 140962): Secure coockie is not available as variable 140912 by: Alexander Weber 140924 by: Ernest E Vogelsinger Charset problem with DBF database 140913 by: Alexander Weber ho to re

Re: [PHP] connecting to mysql db

2003-03-25 Thread Chris Hayes
At 14:49 25-3-2003, you wrote: hi, I am trying to play and learn php along with mysql and I have a question about connecting to a db. Is the following code necessary on every php page where I am retrieving some data from a db or is there any way to connect once (something like index.php) and have t

[PHP] session id

2003-03-25 Thread Iggy
can somebody tell me why I am getting this: Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at c:\inetpub\wwwroot\search.php:8) in c:\inetpub\wwwroot\search.php on line 21 Warning: session_start() [function.session-start]: Can

Re: [PHP] connecting to mysql db

2003-03-25 Thread skate
leaving the connection open creates security questions, and also leaves resources open, what if a user closes his browser window, how do you know to close the connection? if you really want to make it simple, you can edit your php.ini to have the username and password as default in there, but a

Re: [PHP] openssl php 4.3.1

2003-03-25 Thread The Doctor
On Mon, Mar 24, 2003 at 11:15:05PM -0500, Kalin Mintchev wrote: > > hi all, > > i have problems getting fopen() and fsockopen() to work over https.. > > here is the problem.. > > from the phpinfo: > > OpenSSL support enabled > OpenSSL Version OpenSSL 0.9.6h 5 Dec 2002 OpenSSL 0.9.

RE: [PHP] connecting to mysql db

2003-03-25 Thread Mirco Ellis
This is the only way I know and probably the safest. This way you know there is connectivity because it is loaded rigth at the beginning. Mirco Ellis I-Soft Solutions e-mail: [EMAIL PROTECTED] Tel: +27414847161 -Original Message- From: Igor Frankovic [mailto:[EMAIL PROTECTED] Sent: Tuesd

RE: [PHP] connecting to mysql db

2003-03-25 Thread Jon Haworth
Hi Iggy, > I mean the difference between having that code on > every page or calling it from an external page > doesn't tell me if it is realy necessary to do it > all the time. Yes, you do have to connect to the database in every script that needs to access it. Usually this is done at the st

RE: [PHP] connecting to mysql db

2003-03-25 Thread Mirco Ellis
No dude. Create a file called whatever.inc that includes the code that you are using to connect to the db. In every php script ,that needs this connection to the db, you simply put: Mirco Ellis I-Soft Solutions e-mail: [EMAIL PROTECTED] Tel: +27414847161 -Original Message- From: Iggy [

Re: [PHP] connecting to mysql db

2003-03-25 Thread Iggy
This really doesn't explain me much. I mean the difference between having that code on every page or calling it from an external page doesn't tell me if it is realy necessary to do it all the time. I guess I am looking for more generic explanation of the whole process rather than what you said. Ho

  1   2   >