Re: [PHP] 4.3.3RC download mirror sites?

2003-08-14 Thread Jean-Christian IMbeault
n trying to connect to downloads.php.net" Jean-Christian Imbeault -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] preg_replace question

2003-08-16 Thread Jean-Christian IMbeault
as to, for example, www.mydomain.com. How can I achieve this with a regexp? I'm not very good at 'negative' regexp ... Thanks, Jean-Christian Imbeault -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] preg_replace question

2003-08-17 Thread Jean-Christian IMbeault
xt file. I want preg_replace to replace all occurrences in the text file of the regexp: "#http://www.mydomain.com. How can I get preg_replace to ignore instances of http://www.mydomain.com when it is doing it's global search and replace? Thanks, Jean-Christian Imbeault -- PHP Gener

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

2003-08-18 Thread Jean-Christian IMbeault
emove the downloaded file from the list displayed to the user. How can I accomplish this? All suggestions welcomed! Jean-Christian Imbeault -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

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

2003-08-19 Thread Jean-Christian IMbeault
reload itself so that it can remove the file that has just been downloaded from it's list. Is that possible? Thanks, Jean-Christian Imbeault -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

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

2003-08-19 Thread Jean-Christian IMbeault
page, the I generate the data file, cause a save-as dialog to open, and then reload the current page (file list) so that I can present the user with a list of buttons (data files he can generate) again (with the button he clicked no longer in the list). Do-able? Jean-Christian Imbeault -- P

[PHP] Re: Stopping Output

2003-08-21 Thread Jean-Christian IMbeault
Oliver wrote: > I'm in the process of making a forum in PHP, and am wondering if there is a > way to just stop sending stuff the the client(like if they're banned). What about exit or die? Jean-Christian Imbeault -- PHP General Mailing List (http://www.php.net/) To unsubscr

Re: [PHP] Re: error when using $this

2003-08-21 Thread Jean-Christian IMbeault
quot; either. PHP does not allow values to be assigned to variables outside of functions. So if you have any assignments in the var declaration section put those at the top of your constructor. Jean-Christian Imbeault -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] output_handler in php.ini: how to use custom function

2003-05-30 Thread Jean-Christian Imbeault
to it, before being sent out to the browser. Since I will be doing this on all my pages I don't want to hard-code a call to ob_start() on each and every page. I am hoping I can do this with a setting in the php.ini file. Any suggestions? thanks, Jean-Christian Imbeault -- PHP General Ma

[PHP] Re: [Newman] How to pass an image through PHP.

2003-06-07 Thread Jean-Christian Imbeault
Philip J. Newman wrote: I would like to know where i should be looking to pass an image through PHP Could you elaborate on what you mean by "pass an image through PHP"? I'm not quite sure what you mean. What exactly do you want to do? Jean-Christian Imbeault -- PHP General Mai

[PHP] Re: use print

2003-06-07 Thread Jean-Christian Imbeault
nt to do? Jean-Christian Imbeault -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Newman Isn't trying very hard

2003-06-08 Thread Jean-Christian Imbeault
Philip J. Newman wrote: Is there a way of changing only the 1st letter of a string to caps and the rest to lower? eg: foo bar to Foo Bar Newman, search the PHP documentation before posting will you? What you want is the function called ucwords() http://jp.php.net/manual/en/function.

Re: [PHP] Re: use print

2003-06-08 Thread Jean-Christian Imbeault
. Did I understand you question correctly? Jean-Christian Imbeault -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Linux question with mysql

2003-06-08 Thread Jean-Christian Imbeault
d to add a path like you would in windows (Enviroment Paths)? Furthermore this is a PHP list ... for MySQL support you would be much better off posting to a MySQL list no? ;) Unless of course there *was* something related to PHP in your question that I somehow missed? Jean-Christian Imbeault -- P

[PHP] PHP vs. jsp, advice please

2003-06-09 Thread Jean-Christian Imbeault
used PHP so they can't really compare the two. Can anyone give personal opinion of a comparison of the two? Are they two completely different beast hence totally for totally different purposes? Or are they two languages that are mostly used for the same things? Thanks, Jean-Christian Imbe

[PHP] Re: fetch then put record?

2003-06-09 Thread Jean-Christian Imbeault
Steve B. wrote: Hello, In ASP you can set records fields then call a dbupdate function. There is no such function in PHP. It appears mysql only supports update with the UPDATE query? Huh ... MySQL is a database. It understands SQL. dbupdate() is an ASP function ... don't blame MySQL if it doesn't

[PHP] Re: working with sessions

2003-06-09 Thread Jean-Christian Imbeault
want to do this? Maybe we can offer a better way of achieving what you are *really* trying to do :) Jean-Christian Imbeault -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: working with sessions

2003-06-09 Thread Jean-Christian Imbeault
of course would be to use a database instead of a text file though :) Jean-Christian Imbeault Matt Palermo wrote: > I am doing this, because I am making a text file with a list of all > existing sessions. Then another page checks to see if all of these are > still active and exist, and

[PHP] Re: fetch then put record?

2003-06-09 Thread Jean-Christian Imbeault
asses in that are not part of your form data. Oh, and there will be a trailing "," you need to trim off ... Just a quick idea. -- Jean-Christian Imbeault -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PHP vs. jsp, advice please

2003-06-09 Thread Jean-Christian Imbeault
g out more and maybe even switching. I just hope that if I do decide that struts are worth the switch the learning curve isn't too steep. Or the installation curve also since I'm the lone sysadmin too ... Thanks, Jean-Christian Imbeault -- PHP General Mailing List (http://www.ph

[PHP] Re: Printing Issue

2003-06-09 Thread Jean-Christian Imbeault
of knowing what font the browser is using to display the data, hence you cannot know how many lines you can print. PHP cannot help you in this case. I might be wrong but I doubt it. Jean-Christian Imbeault -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://w

[PHP] Re: if ($xxxxx) { function not working?

2003-06-10 Thread Jean-Christian Imbeault
Please post the whole code. If I understand what you are attempting to say you are probable just missing braces in the right place or php start -end tags. Jean-Christian Imbeault -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: HTML and PHP

2003-06-10 Thread Jean-Christian Imbeault
And so on ... Jean-Christian Imbeault -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PHP vs. jsp, advice please

2003-06-10 Thread Jean-Christian Imbeault
offer an opinion on this? Is persistence with jsp that much easier compared to PHP? And if true persistence is possible is it all it's cracked up to be? I've often dreamed of being able to have true persistence but if I had it maybe I wouldn't find it all that useful once I'd

[PHP] How to find if a string is an integer?

2003-06-11 Thread Jean-Christian IMbeault
to come up with is: if (is_numeric($var) && is_int((int)$var)) But I ma hoping there is something simpler ... Any ideas? thansk, Jean-Christian Imbeault -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] How to find if a string is an integer?

2003-06-11 Thread Jean-Christian IMbeault
Felipe Desiderati wrote: try this: if (ereg("^[0-9]+$", $_POST["var_int")) echo "is int"; That's not the best regexp. It doesn' take into account negative integers and isn't there a [[:numeric:]] or something like regexp that would work better. I'm looking for the simplest method and the on

Re: [PHP] How to find if a string is an integer?

2003-06-11 Thread Jean-Christian IMbeault
Dvdmandt wrote: It's not that killing... :p preg_match("#^-?[0-9]+$#",$_POST["var_int"]); Not *that's* a mouthful ... I was also thinking about that === operator.. And this: if(((string)((int)$_POST["var_int"]))==$_POST["var_int"]) Cute. Might actually work too! Wonder if there would be any differ

[PHP] Re: client side cache

2003-06-23 Thread Jean-Christian IMbeault
Aljosa Mohorovic wrote: (B> i have problems with client side cache, how can i disable it? (B> i use this, but it still caches pages. (B (BWhat are your problems exactly and what is the client? (B (BRemember that the client might not be honouring your caching headers and (Bif that is the case

[PHP] mysql_connect(): '/tmp/mysql.sock' error

2003-06-26 Thread Jean-Christian IMbeault
up and running and I can connect fine using the command line client. Do I need some special configuration? Any advice appriciated! Jean-Christian Imbeault -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] mysql_connect(): '/tmp/mysql.sock' error

2003-06-26 Thread Jean-Christian IMbeault
Jason Wong wrote: (B> (B> Find out where your mysql.sock is and edit php.ini to match. (B (BGood idea. (B (BThe problem was that the installation instructions for MySQL for vague (Band confusing. I started trying to install from rpm and that didn't (Bwork. I then installed from the binary

[PHP] Making PHP faster?

2002-08-12 Thread Jean-Christian Imbeault
I'm using PHP to load data into a PostgresQL database. The script works fine but it is a bit slow. It's taking about 30 minutes to load about 15,000 items. This is mainly because of all the error checking and many redundant queries I am running. This program is a one-off thing. Are there any

[PHP] N6: PHP files can't "show source"

2002-08-12 Thread Jean-Christian Imbeault
I'm using Netscape 6.2 and whenever I load one of my .php files I can't get Netscape to "show source". I don't have that problem with IE. Can anyone tell me how to configure Netscape so that I can view the HTML output of my PHP files? Jc -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] Making PHP faster?

2002-08-12 Thread Jean-Christian Imbeault
Andrew Brampton wrote: > > I don't know any good ways of making PHP go faster, but may I suggest that > the time you use in coding and figuring out ways to make PHP faster would be > greater than the time you have saved by using such features... I am not looking to tweak my code. I am asking f

[PHP] Mail(): Does it block question?

2002-08-12 Thread Jean-Christian Imbeault
Is the mail() function blocking or non-blocking? Does anyone know how I can make it non-blocking? I don't want to have my script waiting on mail() to return ... Also I read that mail() should not be used for large volumes of mail. How large is "large"? Can mail() handle a couple of messages pe

Re: [PHP] Mail(): Does it block question?

2002-08-12 Thread Jean-Christian Imbeault
Rasmus Lerdorf wrote: > > So, depending on your sendmail configuration, and how you are invoking > sendmail (see your php.ini file) it will be non-blocking if you tell > sendmail to simply queue it. Ok. I'll look into what settings are important in php.ini > For high-volume mail delivery, y

Re: [PHP] Making PHP faster?

2002-08-12 Thread Jean-Christian Imbeault
Mirek Novak wrote: > > I thing, you have to find out WHAT is really slow part, I don't think > it is PHP what's slow, Thanks. Maybe I didn't write my question properly ... I am not interested in making my program more efficient I just want to set the proper PHP environment variable that w

[PHP] how to run php from the command line in Linux?

2002-08-12 Thread Jean-Christian Imbeault
How can I run a PHP program from the command line in linux? I want to dosomething like: #php prog.PHP Jc -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] how to run php from the command line in Linux?

2002-08-12 Thread Jean-Christian Imbeault
Jason Wong wrote: > > Manual -> "Using PHP from the command line" Thanks! Now for a really dumb question. How do I compile PHP so that I can get a binary executable instead of an Apache module? Jc -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net

Re: [PHP] how to run php from the command line in Linux?

2002-08-13 Thread Jean-Christian Imbeault
Jason Wong wrote: > > ./configure > make && make install Thanks! I also have PHP compiled as an apache module and need it. Will this overwrite anything needed by the PHP/apache module? Jc -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.ph

[PHP] client-side form validation

2002-08-13 Thread Jean-Christian Imbeault
When a user hits the submit button I'd like to do some client-side validation before sending the form data to the server. What is the proper way to do this in Javascript? I.e. should I use the form's Sumbit button's "onClick()" event to trigger the client-side Javascript validation function an

[PHP] Re: howto disable cron output

2002-08-13 Thread Jean-Christian Imbeault
Hey Roger, when you want to write a new email to this list don't reply to an existing posting and just change the subject line. It ruins it for people who follow messages using threading. You did that with my message and now both of our "message threads" will appear mixed up together. Just a

[PHP] crypt(): How to make it use blowfish?

2002-08-14 Thread Jean-Christian Imbeault
I'd like to use the crypt() function and have it use Blowfish encryption. However it seems that my system doesn't support blowfish encryption since I get: CRYPT_BLOWFISH = 0 My system is a linux RH7.2 box. How can I make blowfish encryption available to PHP's crypt? Jc -- PHP General Mail

[PHP] SSL/sessions & password question

2002-08-14 Thread Jean-Christian Imbeault
Sorry for the vagueness of the subject line but I wasn't sure what to put. Here's what I'd like to do: 1- user comes to my web site with normal (non-SSL) connection 2- user enter login name and password 3- data is submitted to a PHP script via SSL connection to same web server 4- PHP script chec

Re: [PHP] crypt(): How to make it use blowfish?

2002-08-14 Thread Jean-Christian Imbeault
Dan Hardiker wrote: > > Use mcrypt. See the manual. I don't want to use mcrypt :) It requires me install a separate library. Or do you mean that the only to get crypt() to use Blowfish is to install mcrypt? What does crypt() require, on a RH7.2 Linux machine, in order to use Blowfish? Jc

[PHP] Re: SSL/sessions & password question

2002-08-14 Thread Jean-Christian Imbeault
Wayne wrote: > > All you need is: > https://domain/filename method=post> Sounds too easy, there must be a catch ;) Thanks! Jc -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] SSL and sessions: is same session valid across SSL and non-SSL

2002-08-14 Thread Jean-Christian Imbeault
I start a session under an SSL connection (https), do some work, and then register some variables. I then do a header("location: http:/somepage.php"). the page is loated on the same server that was doing the SSL work. My question is are the session variable I registered under the SSL connecti

[PHP] Re: stupid question

2002-08-14 Thread Jean-Christian Imbeault
Liam, when you want to post a new message to the list don't just hit the reply button and change the subject. If you do that you message appears in the thread of the message you replied to. It really messes things up for people who follow message threads. And worse you might not get any answer

[PHP] crypt(): how to make it use blowfish?

2002-08-14 Thread Jean-Christian Imbeault
How can I make crypt() use blowfish encryption? Also it seems that my system (RH7.2 Linux) doesn't support Blowfish according to CRYPT_BLOWFISH: CRYPT_BLOWFISH = 0 How can I add blowfish support to my system if crypt() requires it? Jc PS I don't want to use mcrypt(). I just want to install w

Re: [PHP] MySQL vs Session?

2002-08-14 Thread Jean-Christian Imbeault
I'm interested in finding out the answer to this since it seems that I will need to implement my own session handler. I need to pass session information from SSL connections to non-SSL connections (albeit on the same server) and PHP doesn't seem to be able to do this ... Jc -- PHP General

Re: [PHP] MySQL vs Session?

2002-08-15 Thread Jean-Christian Imbeault
Rasmus Lerdorf wrote: > > Sure it can. I ran some test and it can't. If I run the same tests without using SSL there is no problem. But if I go from an SSL to a non-SSL connection the session variable stays registered but it loses it value somehow ... > If the machine name is different make su

[PHP] trans-sid not working

2002-08-15 Thread Jean-Christian Imbeault
I have compiled PHP with the following: './configure' '--with-pgsql' '--without-mysql' '--enable-track-vars' '--enable-mbstring' '--enable-mbstr-enc-trans' '--enable-mbregex' '--enable-trans-sid' '--with-apache=../apache_1.3.26/' Unfortunately it seems that the --enable-trans-sid option is not

Re: [PHP] trans-sid not working

2002-08-15 Thread Jean-Christian Imbeault
The problem what that I was using header("Location: http://mysite.com";) and it seems that PHP will not automatically insert the SID in this case. Now I need to find a quick and simple way to see if cookies are disabled or not. If they are I need to manually add the SID to the header() call .

[PHP] Crypt(), want to implement blowfish, how?

2002-08-15 Thread Jean-Christian Imbeault
How can I make crypt() use blowfish encryption? It seems that my system (RH7.2 Linux) doesn't support Blowfish according to CRYPT_BLOWFISH: CRYPT_BLOWFISH = 0 How can I add blowfish support to my system if crypt() requires it? Jc PS I don't want to use mcrypt(). I just want to install whatev

[PHP] session lost when back button hit?

2002-08-16 Thread Jean-Christian Imbeault
I have two pages, page one links to page two via a form button. The browser does not accept cookies. On page two I create a session variable with: $_SESSION["id"] = 1; But if I hit the back button to go back to page one $_SESSION["id"] is not set. If I hit the reload button on page one it is

[PHP] sessions: what to do when browser won't accept cookies?

2002-08-16 Thread Jean-Christian Imbeault
I'm finding myself in a strange situation. I am trying to build a a web site that will use sessions and work even if a user decides not to accept cookies. So far the site design is working fine by using the trans-sid functionality of PHP. But I have this on case where things break down. 1- us

Re: [PHP] session lost when back button hit?

2002-08-16 Thread Jean-Christian Imbeault
Daniel Masson wrote: > > make ser youre using session_start() before performing any action on > sessions, also make sure you´re registering properly the variables. Did you see my PS at the end of my question? > PS I have session.auto_start ON and enabled trans-sid I don't need seesion_start()

[PHP] Re: Protocol on handling empty checkbox values

2002-08-16 Thread Jean-Christian Imbeault
Dear David you haev just hijacked my thread. When you want to post a message please do not just hit the reply button and just change the Subject line. If you do that you message will appear in someone else's message thread. It really ruins it for people who use mail/news readers with threads

Re: [PHP] session lost when back button hit?

2002-08-16 Thread Jean-Christian Imbeault
Alok K. Dhir wrote: > > By any chance, is page one the "entrance" page to your application? Yes. > I.e. is there a session id in either the query string of the page URL or > was there one passed to it via a POST? Nope. Is the is the entrance so there is no nothing passed to it. Users just ente

[PHP] Re: sessions: what to do when browser won't accept cookies?

2002-08-16 Thread Jean-Christian Imbeault
Jerry wrote: > > I kind of hate it when sites do this, but you could have the first page > reload itself if it doesn't have an SID, and add an SID to itself. This > way, if they use the back button, the first "first page" they come to > has the SID. But if they it the back button again they w

[PHP] foreach fails on unitialized array?

2002-08-27 Thread Jean-Christian Imbeault
When I use foreach on a uninitialized array I get the following warning: Warning: Invalid argument supplied for foreach() in /www/htdocs/jc/cart/add_item.php on line 21 I would expect foreach to treat an unitialized variable as an empty array and hence do nothing. Is this the expected behavio

[PHP] Arrays within arrays question

2002-08-28 Thread Jean-Christian Imbeault
I have the following loop to insert data into an array: while ($data = pg_fetch_object($res)) { $aProds[] = array('id' => $data->prod_id, 'quantity' => $data->quantity); } But when I print this out using print_r I get the following: Array ( [0] => Array ( [0]

Re: [PHP] Arrays within arrays question

2002-08-28 Thread Jean-Christian Imbeault
Justin French wrote: > Okay, it may be the end of a long day here, but I can't tell the difference > between the two arrays you posted! One array contains only one element. That one element contains two elements, each and array with two elements. The other array contains two elements, each elem

Re: [PHP] Arrays within arrays question

2002-08-28 Thread Jean-Christian Imbeault
Jason Wong wrote: > > If $aProds can contain more than 1 item then what you're doing now is correct. Thanks. The problem was that I was doing this: $return[] = get_array_of_prods(); the [] was creating the extra array level ... The problem I now face is that foreach keeps crapping out if I p

[PHP] how to have a form keep values when user hits back button?

2002-08-29 Thread Jean-Christian Imbeault
I have php page that creates an html form. When the user hits the submit button another php script is called to parse the form and display some output. However I find that if I hit the back button the form values get reset. How can I make it so that if I hit the back button the values I entere

Re: [PHP] how to have a form keep values when user hits back button?

2002-08-29 Thread Jean-Christian Imbeault
Jason Wong wrote: > > Have a look at the archives, it has just been answered: Thanks. Strange that two people ask the same question at almost the same time. However I did search the archives and read the answer to the recently posted question and the answers are less than ideal. All answers

[PHP] Re: why does my querry work in the mysql client but not in php?

2002-08-29 Thread Jean-Christian Imbeault
Have you looked at what the value of what $result is? It might be informational. Jc -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: working with ssl

2002-08-29 Thread Jean-Christian Imbeault
Use mod_ssl if you are doing apache. Have a look at: http://www.modssl.org/source/exp/mod_ssl/pkg.mod_ssl/INSTALL Jc -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Function expects string but receiving array Warming??

2002-09-03 Thread Jean-Christian Imbeault
I get the following warning which makes no sense to me. Warning: header() expects parameter 1 to be string, array given in /www/htdocs/jc/administration/edit_products/show_products.php on line 96 It's true that I am passing at an array to the function, but what I don't understand is why the fu

Re: [PHP] Function expects string but receiving array Warming??

2002-09-03 Thread Jean-Christian Imbeault
Justin French wrote: > But the > really interesting bit is that you appear to be using it NOT for sending > HTTP headers, but for setting header information on a TABLE Oops!! I had defined my own function called header() without even stopping to think there was already a PHP header() functi

[PHP] BUG?: header("location: ") causes GET vars to be encoded in wrongcharset in IE5.5

2002-09-09 Thread Jean-Christian Imbeault
I have the following code which works fine in Netscape7 but doesn't in IE5.5 $maker_name = $_POST["maker_name"]; $loc = "show_products.php?maker_name=$maker_name&".SID; header("Location: $loc"); The problem is that the POST variables are coming in EUC-JP (japanese) correctly but for some re

[PHP] Changing the saturation of an image

2002-09-20 Thread Jean-Christian Imbeault
I've looked through the docs but can't find what I want. Is there a function that will let me load a jpg image, change the saturation level and save the changed image as a new jpg? Jc -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Static constants? Server persistent?

2002-09-29 Thread Jean-Christian Imbeault
This is a bit hard for me to explain but is there any way to have PHP store a persistent server-side constant. Something that will stay in RAM and is not dependent on client connection. For example I have this code in consts.inc file: define ("HOME_PAGE", "http://myip.com/index.html); But if

Re: [PHP] Static constants? Server persistent?

2002-09-29 Thread Jean-Christian Imbeault
Justin French wrote: > > There is a directive in php.ini which allows a file to be included on EVERY > page that php parses... one at the very start, and one at the very end of > the script > > I'm pretty sure this is server-wide, but maybe it could be site- or > directory-wide by setting the var

[PHP] auto_prepend: *Exactly* like include()?

2002-09-29 Thread Jean-Christian Imbeault
Does using the auto_prepend config option in the php.ini file act exactly like and include() call. An include call will read the file off disk ... will auto.prepend do the same thing or will PHP keep the file in memory for quick retrival? Jc -- PHP General Mailing List (http://www.php.net/)

Re: [PHP] Static constants? Server persistent?

2002-09-29 Thread Jean-Christian Imbeault
Justin French wrote: > > You're right... it's an include... THEN the vars will be in memory... > > This is the best you can do, AFAIK, without hacking the source of PHP :) Just asking, do you know the source well enough to say with *certainty* that the auto prepend file is not kept in memory?

Re: [PHP] Static constants? Server persistent?

2002-09-29 Thread Jean-Christian Imbeault
Justin French wrote: > > I'm merely guessing. Ok. Thanks for the guess. I'll post on the dev list and see if I can get a definitive answer. Jc -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: date question

2002-09-29 Thread Jean-Christian Imbeault
Jonas Geiregat wrote: > > I have a date ex 24/08/02 > and I need to see if that date is the same date as it is today (only one > month later) but 5day's in advanced => that would be 24/09/02 > so if(date == date now - 5) > {true} > else{false} > > how can I do this right ? L

Re: [PHP] Static constants? Server persistent?

2002-09-29 Thread Jean-Christian Imbeault
Mike Mannakee wrote: > > Just out of curiosity, what problem are you trying to solve? Including a > file is so easy and takes so little time I wonder how this could be a > problem. Good question, glad you asked. I have a header on all my pages. The header is HTML and contains images. So of

[PHP] Forms: How-to not display it if user hits back?

2002-09-29 Thread Jean-Christian Imbeault
I have the following scenario 1- user comes to page A, clicks a button to get to page B 2- Page B is a form the user fills and hits the submit button 3- form data is received and I use header() to send him back to page A So A -> B -> A The problem I have is with Netscape 7, possibly other brows

Re: [PHP] error suppresion

2002-09-29 Thread Jean-Christian Imbeault
Gary wrote: > > They are not really errors they are reporting that the form fields are > empty until the form is submitted. > Notice: Undefined index: That means your code is not doing any checking of the incoming data. You should always check that the data coming is what you expect it to be.

[PHP] How to specify to browser to cache contents?

2002-09-29 Thread Jean-Christian Imbeault
Is the a particular header() call or other setting I can use to tell the client browser to cache the contents of my php pages? (I am using Apache). It seems like my browser (N7) doesn't even cache the images on the pages even though those are static ... Jc -- PHP General Mailing List (http:

Re: [PHP] How to specify to browser to cache contents?

2002-09-29 Thread Jean-Christian Imbeault
Justin French wrote: > > If there's a noticeable difference between two browsers, and you're > currently NOT setting any headers for caching, the blame will probably lie > in the preference setting of the browser, not in your code. I thought exactly the same thing before posting. So I made sure c

[PHP] .php to .html?

2002-09-29 Thread Jean-Christian Imbeault
I am using PHP 4.2.3 and Apache 1.3.26 When a user comes to one of my php pages it comes out has http:..ip/page.php How can I make my pages come out as .html instead of .php? Thanks! Jc -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] N7: Media (Page Info Tab) contents not cached bug?

2002-09-29 Thread Jean-Christian Imbeault
When using the View|Page Info Menu item I get a nice tabbed window showing information for the page I just loaded. Clicking the Media tab shows what contents the page needed and importantly whether the contents are cached or not. If I load .php pages I am developing off a local server (http:/

Re: [PHP] .php to .html?

2002-09-29 Thread Jean-Christian Imbeault
Peter Houchin wrote: > > just save the files u create as .html make sure in your apache httpd.conf > where you reference for .php that u have html in here as well and all will > be sweet. > > eg in this line > > AddType application/x-httpd-php .php4 .php .htm .php3 .html Super! That helps *so*

[PHP] Re: auto_prepend: *Exactly* like include()?

2002-09-29 Thread Jean-Christian Imbeault
David Robley wrote: > > Whether a document is kept in memory cache or not is not something that > php has any control over, I think; your operating system is generally what > looks after that. Actually after asking the dev list I found that it *is* PHP "can" have some control over. That's on

Re: [PHP] How to specify to browser to cache contents?

2002-09-29 Thread Jean-Christian Imbeault
Chris Shiflett wrote: > > IE ignores the "no-store" directive of the Cache-Control header, and > this is the most common reason behind behavior such as you are > describing. Exactly as I was worrying ... > Get rid of "no-store" and just use "no-cache" instead to see if it > resolves the incon

Re: [PHP] N7: Media (Page Info Tab) contents not cached bug?

2002-09-29 Thread Jean-Christian Imbeault
Chris Shiflett wrote: > > To test this, try changing the image source (on your server) and request > the page again. If Netscape fetches the fresh resource, this might be > it. If you see the same image as before, then there is definitely a > problem somewhere. I did as you suggested and hit

Re: [PHP] How to specify to browser to cache contents?

2002-09-29 Thread Jean-Christian Imbeault
Chris Shiflett wrote: > > Luckily, it doesn't matter too much where it is set, because you should > be able to set your own with PHP (I think PHP may set it actually when > you use PHP's sessions). First, try something simple: > > header("Cache-Control: no-cache"); I'll try that! But what I w

Re: [PHP] Re: auto_prepend: *Exactly* like include()?

2002-09-29 Thread Jean-Christian Imbeault
Chris Shiflett wrote: > > Don't get too carried away here. It sounds like you are confusing two > entirely different things. Your earlier questions were related to > caching on the client, not on the server. Yes, PHP does have some > control over what the client caches through HTTP, but this i

Re: [PHP] N7: Media (Page Info Tab) contents not cached bug?

2002-09-30 Thread Jean-Christian Imbeault
_color_link = "006792"; google_color_url = "006792"; google_color_text = "00"; //--> [PHP] N7: Media (Page Info Tab) contents not cached bug? Jean-Christian Imbeault Re: [PHP] N7: Media (Page Info Tab) contents not cached bug? Chris Shiflett Re: [PHP]

[PHP] No ouput until program end, why?

2002-10-03 Thread Jean-Christian Imbeault
I am running a PHP program under Linux on the command line. The problem I have is that I get no output to the screen until the program finishes. I have lots of echo statements throughout the program to help me debug but none of them are printed until the program finishes, which is really a pai

[PHP] Re: No ouput until program end, why?

2002-10-04 Thread Jean-Christian Imbeault
statements I have in my for loop being printed out to the screen until the program terminates ??? I should get something printed out at every 100 lines ... but nothing gets printed until the end of the program ... At the end I get all the output I should. But not *before* the program ends ... Jc

[PHP] sessions and trans-sid problem/question

2002-11-21 Thread Jean-Christian Imbeault
I've made a site in PHP and on some pages a user needs to log in first before gaining access to the page. (i.e. there is a log in page). Once the user has logged in I keep that fact in a session variable so that he doesn't need to log in again. However I have found out that if: 1- the user log

Re: [PHP] sessions and trans-sid problem/question

2002-11-21 Thread Jean-Christian Imbeault
Justin French wrote: I know that for IE Mac users (not sure about NN7) it's not until you QUIT the application that the session is "terminated"... I *think* you'll find something similar in Windows... perhaps when ALL open browser windows are closed and/or the browser app is QUIT, the session wi

Re: [PHP] sessions and trans-sid problem/question

2002-11-22 Thread Jean-Christian Imbeault
Justin French wrote: PHP cannot possibly know when a user closes a window... PHP regularly "cleans out the garbage" of old abandoned sessions, but you cannot expect this instantly... True ... but the browser does. I think I would not have this problem using cookies since the cookie would expi

Re: [PHP] sessions and trans-sid problem/question

2002-11-22 Thread Jean-Christian Imbeault
Ernest E Vogelsinger wrote: Definetely yes. After reading Justin's post I realized that. What I usually do (I also have session cookies switched off) is to send the user a session cookie when he logs in. This way I can use cookieless sessions, but when it comes to sensitive areas I can be sur

Re: [PHP] sessions and trans-sid problem/question

2002-11-22 Thread Jean-Christian Imbeault
Ernest E Vogelsinger wrote: This is controlled by the session.gc_probability value in your INI file I know I can probably find this in the documentation somewhere but ... how do I set the expire time on a session? Increasing this value will make this process more often, setting it to 100 will

Re: [PHP] sessions and trans-sid problem/question

2002-11-22 Thread Jean-Christian Imbeault
Jason Wong wrote: If you set it 100, then _every_ request in which sessions are used, PHP has to go through all the session files (by default stored in /tmp) and check whether they have expired. If you have a busy server you could have thousands of session files. Checking thousands of files at

[PHP] Seperating presentation from logic

2002-06-24 Thread Jean-Christian Imbeault
I'm just about to start a large PHP project in which I get to work with professional designers/layout people. I want to separate all the programming logic from the presentation but I am not sure how to do this. Can anyone point me to resources (web tutorials/articles or books) that would help

<    1   2   3   >