Re: [PHP] how to make server response to emails

2003-01-09 Thread Jean-Christian Imbeault
See Kok Boon wrote: Sorry, I am abit dumb. Where is the archive that you refer to in your email? The PHP archives. Go to the PHP web site and follow the links to the mailing lists page. There you will find links to the archives. Jc -- PHP General Mailing List (http://www.php.net/) To

[PHP] PostgreSQL/PHP: transactions: how-to abstract out?

2003-01-09 Thread Jean-Christian Imbeault
Hi. I thought I had abstracted out the SQL querying part of my code out, just to find out today that it doesn't work when it comes to transactions. I had come up with this code: function sql_query($sql) { $conn = pg_connect(dbname=JC user=postgres); $res = pg_exec($conn, $sql); if

Re: [PHP] PostgreSQL/PHP: transactions: how-to abstract out?

2003-01-09 Thread Jean-Christian Imbeault
Jason Sheets wrote: Manual Excerpt: If a second call is made to pg_connect() with the same connection_string, no new connection will be established, but instead, the connection resource of the already opened connection will be returned. You can have multiple connections to the same database if

[PHP] Re: PostgreSQL/PHP: transactions: how-to abstract out?

2003-01-09 Thread Jean-Christian Imbeault
To all who replied to my initial question ... I actually did *not* have problems with transactions in the way I first implemented my abstraction layer. In the case of PHP If a second call is made to pg_connect() with the same connection_string, no new connection will be established, but

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

2003-01-08 Thread Jean-Christian Imbeault
I am trying to use a command line program in Linux using this form: $result = `/path/prog $arg`; But this doesn't work as the program is expecting and EOF that never comes. If I use the program on the command line when I am finished entering all the data I need to hit return and then CTRL-D to

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

2003-01-08 Thread Jean-Christian Imbeault
Marek Kilimajer wrote: $result = `echo | /path/prog $arg`; should work That didn' work ... don't know why. Isn't there a way to say echo EOF? There must be a way to specify the ascii or hex value for EOF in an echo statement no? Jc -- PHP General Mailing List (http://www.php.net/) To

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

2003-01-08 Thread Jean-Christian Imbeault
I also tried tried with popen with no success. $fp = popen('/usr/src/bsfmdk/CCCallServer 21', 'r'); fwrite($fp, $query); $result = fread($fp, 8096); echo result is BR; echo $result BR; I get back and empty result string ... Any more hints? Jc -- PHP General Mailing List (http://www.php.net/)

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

2003-01-08 Thread Jean-Christian Imbeault
Marek Kilimajer wrote: What prog is it anyway. It is a credit card processing program. It is interactive. You can it, type values in hit return, then ctrl-D and it spits out a status code. If I put all the values in a file I can get the prog to work by doing: #./prog filename It does not

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

2003-01-08 Thread Jean-Christian Imbeault
I'm at wits end ... I've tried everything from system(), shell_exec(), bacticks, popen() and still no go ... I even tried writing the data to file first and then doing a system(./prog 21 ./datafile) and that didn't work either. I know that it shoudl work b/c if from the command line I issue

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

2003-01-08 Thread Jean-Christian Imbeault
Ok, found the problem. The external program I was trying to run is only happy is it is called from the same directory as the one it resides in. I guess it needs to access files in it's directory and by calling from php somehow it gets confused as to where to files are. Thanks to everyone for

Re: [PHP] How to detect a PHP script time-out?

2003-01-08 Thread Jean-Christian Imbeault
Tamas Arpad wrote: That's not right now. The manual is outdated. See this bug report http://bugs.php.net/bug.php?id=15209. This behavior was changed from 4.06 to 4.1. In newer versions of php the registered functions will run before the connection is closed so ouptput can be done from there

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

2003-01-08 Thread Jean-Christian Imbeault
Matt Vos wrote: What is the ASCII value of an EOF? Find that and use ? echo chr($eof_ascii_value); ? For the benefit of those reading this in the future the value is 4, so use chr(4); Jc -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: How to strip extra characters off of a string

2003-01-08 Thread Jean-Christian Imbeault
[EMAIL PROTECTED] wrote: I need to be able to just extract the number that is right Under blocks in this example it is the number 57070. This was generated by the quota -g groupname command. Disk quotas for group site53 (gid 165): Filesystem blocks quota limit grace files quota

[PHP] Re: problem with location???

2003-01-08 Thread Jean-Christian Imbeault
Ysrael guzmán wrote: This is correct? script languaje=JavaScript location.href=page.php??=SID?cliente=$cli; /script You have one small mistake here: script language=JavaScript And a bigger mistake here: location.href=page.php??php echo SID . cliente=$cli; ? Jc -- PHP General Mailing

[PHP] Re: Databases vs. File Access

2003-01-08 Thread Jean-Christian Imbeault
Erich Kolb wrote: I am going to be dealing with a ton of data shortly and my goal is to make it accessible via the web. I am curious about the performance differences between using a database or leaving the data in the individual files they originated in. Can anyone offer any recommendations?

[PHP] How to detect a PHP script time-out?

2003-01-07 Thread Jean-Christian Imbeault
How can I detect if my PHP script is about to time-out? I would like to be able to detect a time-out and display a page with an appropriate error message i.e. the server is busy now, please try again later. Jc -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] How to detect a PHP script time-out?

2003-01-07 Thread Jean-Christian Imbeault
Timothy Hitchens ) wrote: Set up output buffering on your page then if the page times out the buffer should be sent to the browser and that is loaded with your message. Ok. Is there another solution? The reason I ask is that in order to use your solution I would need to redesign my pages

Re: [PHP] How to detect a PHP script time-out?

2003-01-07 Thread Jean-Christian Imbeault
Greg Beaver wrote: http://www.php.net/manual/en/features.connection-handling.php Nice! So if I understand correctly I need to: 1- register a shutdown function 2- have this function check if it was called b/c of a conection_timeout() 3- And if so have the function print out my timeout error

Re: [PHP] How to detect a PHP script time-out?

2003-01-07 Thread Jean-Christian Imbeault
Timothy Hitchens ) wrote: Issue... as I said before the register shutdown won't work because: - output from the shutdown is not visible nor do you have access to some variables You are right. From the manual: http://www.php.net/manual/en/function.register-shutdown-function.php The

[PHP] Re: ~E_NOTICE, why not ?

2003-01-07 Thread Jean-Christian Imbeault
Pupeno wrote: $oer = error_reporting(E_ALL ~E_NOTICE); $tpl-display(index.html); error_reporting($oer); but it still reports notices, any idea ? Should be error_reporting (E_ALL ^ E_NOTICE); See: http://www.php.net/manual/en/function.error-reporting.php Jc -- PHP General Mailing List

Re: [PHP] How to detect a PHP script time-out?

2003-01-07 Thread Jean-Christian Imbeault
Timothy Hitchens ) wrote: There is one last option ... register an output buffer as I suggested before suggested but this time do the reverse and you don't have to rewrite your scripts: Ok I think I understand what you are proposing. I just have one question about your example code. Where

Re: [PHP] How to detect a PHP script time-out?

2003-01-07 Thread Jean-Christian Imbeault
Timothy Hitchens ) wrote: No you can't.. the issue with this is that you need to have error reporting turned on.. so you will need to have more error collecting or removing. [..] This isn't the best for a production env but this is the best I can see considering you don't want to rewrite!!

[PHP] Re: undefined constant?

2003-01-06 Thread Jean-Christian Imbeault
Markus JäNtti wrote: ? if($_GET[test] == test) { echo A; } else { echo B; } ? You forgot the double quotes ... Should be: if($_GET[test] ... Jc -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: populate a list menu

2003-01-06 Thread Jean-Christian Imbeault
Bruce Levick wrote: I am looking to populate a list menu with the current date and then the 30days after that current date. Is there a small snippet of code that achieves this?? Hvae a look at date(), mktime() in the manual. Here something that should help you get started, it is untested.

Re: [PHP] populate a list menu

2003-01-06 Thread Jean-Christian Imbeault
Bruce Levick wrote: That's sweet. Can you just satisfy my curiosity and explain the 86400?? I am thinking this might be minutes?? It the number of seconds in a day. But that solution doesn't take into account Daylight Savings Time. The one I posted does, I think ... Jc -- PHP General

[PHP] Securing areas of a web site with PHP

2003-01-01 Thread Jean-Christian Imbeault
On my web site there are some areas that I want to make accessible only after a user has logged in (for example when placing an order, etc ...) I have been able to achieve this however I have the following problem: 1- user logs in 2- user goes to restricted area 3- user views pages, orders an

[PHP] Re: Securing areas of a web site with PHP

2003-01-01 Thread Jean-Christian Imbeault
Tularis wrote: I adives to make sure the browser doesn't cache it *at all*. This can be done using (one, or more) of the following headers: // HTTP 1.1 compliant: header(Cache-Control: no-store, no-cache, must-revalidate); header(Cache-Control: post-check=0, pre-check=0, false); // HTTP 1.0

Re: [PHP] Re: Securing areas of a web site with PHP

2003-01-01 Thread Jean-Christian Imbeault
Justin French wrote: I know it sounds simple, but try to analyse what other big sites are doing in this situation: That's exactly what I did, but I don't understand *how* they do it hence my question. I surfed some of the big sites and saw that they do not break when a user hits the back

Re: [PHP] Re: Securing areas of a web site with PHP

2003-01-01 Thread Jean-Christian Imbeault
Jason Wong wrote: The cache-control directives are only supposed to be followed if the page was to be _explicitly_ reloaded or refreshed. The BACK button (as specified in the standards rfc something or another) is NOT supposed to reload or refresh a page -- it is supposed to redisplay

[PHP] Cybercash/Verisign and PHP possible?

2002-12-12 Thread Jean-Christian Imbeault
My company wants to set up online credit card functionality and we are thinking of going with a company called Veritrans (I believe they are the japanese branch or cybercash for Verisign in Japan). However they do not support PHP. They only offer kits for Perl and Java. Unfortunately for me

[PHP] Re: Count lines from php files

2002-12-12 Thread Jean-Christian Imbeault
Antti wrote: How can I count how many code lines I have written? I have many php files in one directory. I'm using linux.Do you know any non-php way to count the lines. from a directory one level above where all your files lie do this: (assuming all you files are in a directory called php)

[PHP] Re: Cybercash/Verisign and PHP possible?

2002-12-12 Thread Jean-Christian Imbeault
Matty Rozen wrote: by using the 'curl' module, you can use any calls needed to any type of scripts. you can use curl to talk with the cgi. Ok, I'll look into CURL. If I understand their system, it is meant to be called from a form so CURL might be applicable. let me know if you need more

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

2002-11-24 Thread Jean-Christian Imbeault
Michael Sims wrote: I 'm not where I can test this right now, but if a session is older than session.gc_maxlifetime, isn't it invalid anyway? I.E. if I bookmark a page on your site and then come back 3 hours later passing an old SID, shouldn't that session have expired on the server by that

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

2002-11-24 Thread Jean-Christian Imbeault
Michael Sims wrote: Then I suppose it's just an added feature of the session handler I am using. Maybe the OP should give it a shot, as I use it and I definitely don't have a problem with expired sessions I'll think about writing my own session handler as it can be quite useful. However I

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

2002-11-24 Thread Jean-Christian Imbeault
Cookra wrote: Any help would be ideal Some code would be nice. Youdidn't post any code so we have no idea what your problem might be ... do you get an error message, or no results, or the wrong results? We don't even what what SQL query you are using ... Jc -- PHP General Mailing

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

2002-11-24 Thread Jean-Christian Imbeault
Ernest E Vogelsinger wrote: No, that's a misunderstanding. Session var's are never passed to and from the client, only the session _name_ is passed, either via a cookie (PHPSESSIONID) or via trans-sid href encoding. Thanks for clearing that up! I hadn't realized that only the session name was

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

2002-11-24 Thread Jean-Christian Imbeault
Justin French wrote: What sort of stuff are you storing in the session that your are worried about with too many writes? Oh, this site is just your regular, run-of-the-mill, amazon.com copy. For each open session I store up to 20 variables. It's not a lot, but each access to a script means a

[PHP] Re: Huffman encoding

2002-11-24 Thread Jean-Christian Imbeault
Hatem Ben wrote: I'm looking to implement the huffman encoding in PHP, but i would like to ask if it isn't already done ? (why reinventing the wheel) You have highjacked someone else's thread. Not very nice of you Please repost and start your own message thread ... highjacked threads

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

2002-11-23 Thread Jean-Christian Imbeault
Ernest E Vogelsinger wrote: if ($_COOKIE[$_SESSION['cookie_name']] == $_SESSION['cookie_token']) { Ok, please forgive my ignorance, but in PHP isn't $_COOKIES the same as $_SESSION?. I thought it was if the user had cookies turned off (and even if the user had cookies turned on come to

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

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

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

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

[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

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

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

2002-10-04 Thread Jean-Christian Imbeault
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 Jean-Christian

[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

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

2002-09-30 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 the

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

2002-09-30 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 want is

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

2002-09-30 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 is

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

2002-09-30 Thread Jean-Christian Imbeault
quot;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] N7: Media (Page Info Tab) contents not cached bug? Jean-Christian Imbeault Re: [PHP] N7: Me

[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 I

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 variable

[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

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? If

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 ? Look at

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

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

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

[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

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* much!

[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 one of

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 inconsistency.

[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] 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 reason

[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

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()

[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

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] 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

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

[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

[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-

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() and

[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 enter the

[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 would

Re: [PHP] MySQL vs Session?

2002-08-15 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

[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

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

[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

[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

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: form action=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

[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

[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

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

2002-08-13 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-13 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:

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.php

[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 and

<    1   2   3   >