Re: [PHP] php in free()
I'm not sure which way you create the connection, but I suppose that you use FSockOpen.. This is a buggy function, as far as I know.. Zend promised to take care of it in the 4.0.4 release of PHP, but since that nothing has changed, apparently. I had the same problem some week ago. In the end I had to use PERL script via PHP function exec(). And here's the bug: After calling a socket, PHP interpreter simply keeps all data in memory, doesn;t close connection, keeps trying to read, and finaly stucks.. which can lead to an extreme overload on your server (tried it on Apache and IIS). -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] php in free()
This is because the reading from socket is blocked_read by default. So there is fuinction socket_set_blocking() and also socket_set_timeout(). I had the same problem so as workaround set_time_limit(0) but the script works for 40 !! seconds. My aim was to get some header so I didn't read from the socket until feof($fp) but stopped somewhere before the end of data and close()-ing socket after that. After this intervention the time which the scripts uses is 4!!! seconds. Regards, Andrey Hristov IcyGEN Corporation http://www.icygen.com BALANCED SOLUTIONS - Original Message - From: Jan Maska [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, December 18, 2001 11:07 AM Subject: Re: [PHP] php in free() I'm not sure which way you create the connection, but I suppose that you use FSockOpen.. This is a buggy function, as far as I know.. Zend promised to take care of it in the 4.0.4 release of PHP, but since that nothing has changed, apparently. I had the same problem some week ago. In the end I had to use PERL script via PHP function exec(). And here's the bug: After calling a socket, PHP interpreter simply keeps all data in memory, doesn;t close connection, keeps trying to read, and finaly stucks.. which can lead to an extreme overload on your server (tried it on Apache and IIS). -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: $PHPSESSID on PHP 4.1.0
First ?php var_dump($PHPSESSID); var_dump(phpversion()); ? NULL string(5) 4.0.4 So I think that the problem is that you haven't started any session. Before session starting PHPSESSID is NULL. That is my opinion. PHPSESSID by default is get as GET parameter. Do you have any GET parameter when starting on a console? Regards, Andrey Hristov IcyGEN Corporation http://www.icygen.com BALANCED SOLUTIONS -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Parse error: parse error in/test/put_file.php on line 14???
Hi, What do i wrong? I get this err: Parse error: parse error in /test/put_file.php on line 14 put_file.php begin- ?php if ($submit) { include('include.php'); $pos = strrpos($file, \); if ($pos === FALSE) { $pos = strrpos($file, /); if ($pos === FALSE) { $pos = 0; } } $name = substr($file, $pos + 1); $applicationn = substr($file, strrpos($file, .)); $fd = fopen($file, r) or die(can't open the file); $file_bin = fread($fd, filesize($file)); fclose($fd); $file_bin = mysql_escape_string($file_bin); $sql = INSERT INTO files (id, name, description, file, application) VALUES ('', '$name', '$description', '$file_bin', '$application'); $result = mysql_query ($sql) or die('fout'); } ? put_file.php end- include.php begin- ?php $conn = mysql_connect(localhost,user,password); mysql_select_db(test, $conn); ? include.php end- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Parse error: parse error in/test/put_file.php on line 14???
The problem is here $pos = strrpos($file, \); must be $pos = strrpos($file, \\); Regards, Andrey Hristov IcyGEN Corporation http://www.icygen.com BALANCED SOLUTIONS - Original Message - From: Alex Elderson [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, December 18, 2001 11:26 AM Subject: [PHP] Parse error: parse error in/test/put_file.php on line 14??? Hi, What do i wrong? I get this err: Parse error: parse error in /test/put_file.php on line 14 put_file.php begin- ?php if ($submit) { include('include.php'); $pos = strrpos($file, \); if ($pos === FALSE) { $pos = strrpos($file, /); if ($pos === FALSE) { $pos = 0; } } $name = substr($file, $pos + 1); $applicationn = substr($file, strrpos($file, .)); $fd = fopen($file, r) or die(can't open the file); $file_bin = fread($fd, filesize($file)); fclose($fd); $file_bin = mysql_escape_string($file_bin); $sql = INSERT INTO files (id, name, description, file, application) VALUES ('', '$name', '$description', '$file_bin', '$application'); $result = mysql_query ($sql) or die('fout'); } ? put_file.php end- include.php begin- ?php $conn = mysql_connect(localhost,user,password); mysql_select_db(test, $conn); ? include.php end- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Parsing syntax to add a HTML line break
I have a form to be used for data submission and to be added to MySQL. How do I parse the syntax so that it automatically inserts a HTML line break whenever a carriage return is present?? Thanks. Another PHP newbie, Steph
php-general Digest 18 Dec 2001 10:26:41 -0000 Issue 1059
php-general Digest 18 Dec 2001 10:26:41 - Issue 1059 Topics (messages 78009 through 78050): Re: mySQL INSERT question 78009 by: Philip Hallstrom 78018 by: Mike Krisher Re: electronic postcard recommendation? 78010 by: Philip Hallstrom 78012 by: steph.philedom2k.com Newsgroups 78011 by: Eddie Shipman 78014 by: Jack Dempsey 78016 by: Fred TN3270 socket 78013 by: brendan 78017 by: Fred Displaying html 78015 by: Steve Osborne 78021 by: Fred Re: How deep can I go with embedded if s. 78019 by: Charles Williams Re: PHP 4.10: any way to override register_globals = OFF 78020 by: Charles Williams 78023 by: Jack Dempsey 78024 by: Michael Jurgens 78031 by: David php dir listing 78022 by: Jeremiah Jester 78026 by: Bas van Rooijen Re: telnet or ssh in PHP (Curl?) 78025 by: Sterling Hughes Cookie Name=Value Pairs 78027 by: Zach Curtis 78030 by: Bas van Rooijen Re: Returning html code-PROB SOLVED 78028 by: Steve Osborne 78029 by: Kevin Stone array in sessions 78032 by: Gregor Jaksa 78033 by: Nick Winfield 78034 by: Phillip Oertel php in free() 78035 by: Rick 78043 by: Niklas Lampén 78045 by: Jan Maska 78046 by: Andrey Hristov Re: $PHPSESSID on PHP 4.1.0 78036 by: Tom Rogers 78044 by: Morten Winkler Jørgensen 78047 by: Andrey Hristov Re: php dir listing a couple of solutions 78037 by: php Error handling 78038 by: Yoel Benitez Fonseca Serious Problems (Apache/PHP/Sessions) 78039 by: lee htaccess problems 78040 by: Jeremiah Jester 78041 by: Jack Dempsey Ftp PORT problem 78042 by: Conrad Strydom Parse error: parse error in/test/put_file.php on line 14??? 78048 by: Alex Elderson 78049 by: Andrey Hristov Parsing syntax to add a HTML line break 78050 by: steph.philedom2k.com Administrivia: To subscribe to the digest, e-mail: [EMAIL PROTECTED] To unsubscribe from the digest, e-mail: [EMAIL PROTECTED] To post to the list, e-mail: [EMAIL PROTECTED] -- ---BeginMessage--- Maybe I'm reading your question wrong, but what you are asking isn't possible and more importantly doesn't make sense. I think you're thinking of a database table as you'd think about say an excel worksheet (in that it's ordered). tables aren't ordered in that way. Think about a table as um... a pond. And each fish in that pond is a row (or tuple or record). The fish can swim anywhere they want in that pond so there is no beginning or end. However, if you've tattoed each fish with the number indicating it's insertion into the pond (ie the first fish into the pond got 1, the second gets 2, etc.) then when you select your fish you can order it by those numbers. Heh... how's that for a wacky analogy. Depending on the physical order of rows in a database table is going to get you into trouble down the road. good luck! On Mon, 17 Dec 2001, Mike Krisher wrote: I suppose this is more of a SQL question, but how do I insert a row into a table right before the very last row in the table. I am sure there is a way to insert a row other than just at the beginning or end of a table but I can't find the syntax on the mySQL site. Anyone know? » Michael Krisher [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] ---End Message--- ---BeginMessage--- I figured out my question was a little illogical, I figured out how to get what I needed with an insert and update statement. Thanks for those that responded. » Michael Krisher [EMAIL PROTECTED] ---End Message--- ---BeginMessage--- Check www.zend.com and php.resourceindex.com and you'll probably find something... On Mon, 17 Dec 2001, Brian Tully wrote: hi there :) i've been asked to implement an electronic postcard app for a client's website, and was wondering if anyone can recommend an existing implementation, be it open source or commercial -- preferably PHP!. I found a couple of CGI scripts that do a minimal job, but i'm not to keen on doing the CGI thing ever since moving over to PHP for some time now. I'd like to avoid the Internal Server Errors if at all possible ;). anyways, any experience and/or recommendations would be much appreciated. regards, brian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] ---End Message--- ---BeginMessage--- hotscripts.com should have something. Steph
RE: [PHP] electronic postcard recommendation?
After trying many different postcard scripts in search for one that even comes close to my requirements, I eventually came across Sendcard (http://www.sendcard.f2s.com/) earlier this year. Easy install, easily customisable... highly rec'd. Chris }:) -Original Message- From: Brian Tully [SMTP:[EMAIL PROTECTED]] Sent: Monday, December 17, 2001 9:58 PM To: PHP Subject: [PHP] electronic postcard recommendation? hi there :) i've been asked to implement an electronic postcard app for a client's website, and was wondering if anyone can recommend an existing implementation, be it open source or commercial -- preferably PHP!. I found a couple of CGI scripts that do a minimal job, but i'm not to keen on doing the CGI thing ever since moving over to PHP for some time now. I'd like to avoid the Internal Server Errors if at all possible ;). anyways, any experience and/or recommendations would be much appreciated. regards, brian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Parsing syntax to add a HTML line break
[EMAIL PROTECTED] wrote: I have a form to be used for data submission and to be added to MySQL. How do I parse the syntax so that it automatically inserts a HTML line break whenever a carriage return is present?? Thanks. Another PHP newbie, Steph One possibility is to use 'nl2br()': http://www.php.net/manual/en/function.nl2br.php -- Pavel a.k.a. Papi -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Parsing syntax to add a HTML line break
wrote in 000f01c187af$60d6c900$d536cca6@vaio:">news:000f01c187af$60d6c900$d536cca6@vaio: I have a form to be used for data submission and to be added to MySQL. How do I parse the syntax so that it automatically inserts a HTML line break whenever a carriage return is present?? nl2br URL:http://www.php.net/manual/en/function.nl2br.php -- Arve URL:http://www.bersvendsen.com/ Newsere mot X-No-Archive URL:http://www.ibiblio.org/Dave/Dr-Fun/df9601/df960124.jpg -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Error handling
What warnings are you receiving? Many can be avoided by doing various checks: e.g. if (!isset($some_variable)) ...some error code else ...all is well others which may be useful: function_exists() file_exists() HTH Neil Yoel Benitez Fonseca wrote: Hi! There is in PHP some way to handle errors like in other languages, I mean, something like this: . . . try to do ... if error then do ... . . . I'm tired of reciving warnings :-( -- Yoel Benitez Fonseca -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] *** This message was virus checked with: SAVI 3.52 last updated 17th December 2001 *** -- Email: [EMAIL PROTECTED] [EMAIL PROTECTED]
[PHP] PHP + Smarty question.
Using Smarty templates (it is my guess this question is valid for other template engines aswell), is there a way to pass an array to the template, then stuff it in a hidden form field and retrieve it in another PHP source file as an array? is_array() does not seem to detect the object is an array, and thus my code creates it anew. Basically what I am trying to do is add new stuff to the array, after it has been passed to the template and back into the script. Thanks, (please CC me in replies because I no longer subscribe to php-general due to too much traffic..) -- Alexander Deruwe ([EMAIL PROTECTED]) AQS-CarControl -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: $PHPSESSID on PHP 4.1.0
Hi again, Here are a few updates (error_reporting(E_ALL)): $_SESSION['PHPSESSID']; // Undefined index PHPSESSID error ?=SID? // Doesn't work. Not even a undefined variable. // echo $SID doesn't either But: echo session_id(); // works! Thanks Andrey for the remainder, but session were already started (checked with print_r($_SESSION)), Tim for the creative insight ($_SESSION['PHPSESSID']) and Tom, who found the solution. So, that's it. Looks like there's no more $PHPSESSID That makes porting a little bit more annoying :-) -- Julio Nobrega. Um dia eu chego lá: http://sourceforge.net/projects/toca -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Persistent connection to Oracle with OCI
Hi again to everybody, first sorry for my poor english. im trying to use persistents connections to an Oracle Database through PHP, for manageing transactions, and have some problems. My Schema: * Web Server: Apache 1.3.20 on a Linux RedHat 7.0 * PHP: 4.0.6 compiled with oracle module functions (OCI*) * Data Base: Oracle 8.0.5 on a Windows NT Server I need to manage transactions to database. For it i made a test pages like this: * 1 index page that generate some frames and open a persistent connection to Oracle * 1 frame that made an insert to one table of the database, and reopen the persistent connection * 1 frame that made an insert to another table of the same database, and reopen the persistent connection * 1 frame with 2 buttons, one for execute a Commit and another for execture a Rollback When i was using the ORA_* functions, some times works well, but other times not work correctly... Now using the OCI* functions dont work. What im doing wrong? Can somebody help me? Avanced thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Can php make a authentication to Apache?
Hi, Is there a way to make a login script that make a php session and also make a apache session? I am using ldap Authentication for php en apache but the users must give a username and password for php and for apache! I can do it so: login to apache with a popup login window and look if the $auth_user is set, but i want no popup window. I want i web-page for username and password! Can anybody help me? Alex Elderson -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Can php make a authentication to Apache?
perhaps this link helps you http://www.phpsecurepages.f2s.com/ -Original Message- From: Alex Elderson [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 18, 2001 2:23 PM To: [EMAIL PROTECTED] Subject: [PHP] Can php make a authentication to Apache? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Passing through Array's to another script
I want to pass through an array with content to another script. The array is correctly filled with data. To do this I use the following code: FORM METHOD='post' ACTION='script.php?xtabel = ? print($xtabel); ?' The content of the array is not recognised in the script.php. What is the best way to do this? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] addslash/stripslashes
Hey there, I was once told I need to use addslashes and stripslashes on data I get from the web and insert into the database. I'd like to know why?!?! See I know that with other languages you could use special chars to hack/crack the database, but even without add/strip slashes I can't seem to manage I have a text field I inserted into the database and I entered stuff like this: ~!@#$%^*()_+~!@#$%^*()_+|\\||\[]{};:'.,/? since quotes n stuff aren't nicely closed now I'd expect an error if this was crack/hackable however it just inserts fine without any problems whatsoever. I'm using PHP 4.0.6 and MySQL 4.23.43 (I think haven't checked...) Also when I go to the page where the data is retrieved from the database and put in HTML I see EXACTLY what I entered. So it doesn't appear to me I'd need these add/strip slashes functions. Any comments would be greatly appreciated. Also I'm looking for a small feature of HTML. I know this isn't the right list so if you guys don't reply no hard feelings. At this moment I use meta to refresh (go back to the form) after entering the data, you'll see a page that it's succeeded (or failed for that matter) and than after 3 secs you'll go back to the main empty form. However, I'd like to know a way other than meta, since when an error occurs it can happen the HTML header is already printed out and thus I can't use the meta tag anymore. I was thinking about javascript or something but other ways are welcome since javascript can be disabled in the browser. Please bear with me, this is the first thing I actually write. I only wrote some small things for playing a little, nothing serious and this script will be in a commercial environment with database access n stuff. Pretty kewl but it has to be as secure and smooth as I can get it :-) Kind regards, Ferry van Steen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Fwd: Re: [PHP] Passing through Array's to another script
-- Forwarded Message -- Subject: Re: [PHP] Passing through Array's to another script Date: Tue, 18 Dec 2001 22:01:53 +0100 From: TD - Sales International Holland B.V. [EMAIL PROTECTED] To: gkin [EMAIL PROTECTED] On Tuesday 18 December 2001 14:43, you wrote: Ok I'm a newbie but there some things I think I can point out. why does your ACTION have a GET method URL??? the ?xtabel should be filled in by the form not by you. Second you can't access arrays like print($xtabel) that will only print the constant Array not the values in there, you're gonna need a loop for that. I think the best solution for you would be to create sessions and register the array within the session. And like I said, making a POST form with a GET URL attached to it makes no sense to me at all. What you could try, but I'm guessing here is the following. print(FORM METHOD=POST ACTION=\script.php\\n); $val = current($xtabel); print(INPUT TYPE=HIDDEN NAME=xtabel[] VALUE=\$val\\n); /* You need the [] at xtabel cuz else the older value will be overwritten, this will make it clear to PHP that it's an array/hash*/ while ($val = next($xtabel) { print(INPUT TYPE=HIDDEN NAME=xtabel[] VALUE=\$val\\n); } print(INPUT TYPE=SUBMIT NAME=SUBMIT\n); print(/FORM); I HAVE NOT!!! tested this but I think it might work. Since I didn't check it might have some typos, you'll have to try I'm low on time and like I said I'm new to this also, so no guarentees :-). Kind regards I want to pass through an array with content to another script. The array is correctly filled with data. To do this I use the following code: FORM METHOD='post' ACTION='script.php?xtabel = ? print($xtabel); ?' The content of the array is not recognised in the script.php. What is the best way to do this? --- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: Re: [PHP] Passing through Array's to another script
Maybe you should take a look at serialize and unserialize? http://nl.php.net/manual/nl/function.serialize.php http://nl.php.net/manual/nl/function.unserialize.php With serialize you translate a variable to a string. With unserialize you translate it back to the original variable Jerry Verhoef -Original Message- From: TD - Sales International Holland B.V. [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 18, 2001 10:03 PM To: [EMAIL PROTECTED] Subject: Fwd: Re: [PHP] Passing through Array's to another script -- Forwarded Message -- Subject: Re: [PHP] Passing through Array's to another script Date: Tue, 18 Dec 2001 22:01:53 +0100 From: TD - Sales International Holland B.V. [EMAIL PROTECTED] To: gkin [EMAIL PROTECTED] On Tuesday 18 December 2001 14:43, you wrote: Ok I'm a newbie but there some things I think I can point out. why does your ACTION have a GET method URL??? the ?xtabel should be filled in by the form not by you. Second you can't access arrays like print($xtabel) that will only print the constant Array not the values in there, you're gonna need a loop for that. I think the best solution for you would be to create sessions and register the array within the session. And like I said, making a POST form with a GET URL attached to it makes no sense to me at all. What you could try, but I'm guessing here is the following. print(FORM METHOD=POST ACTION=\script.php\\n); $val = current($xtabel); print(INPUT TYPE=HIDDEN NAME=xtabel[] VALUE=\$val\\n); /* You need the [] at xtabel cuz else the older value will be overwritten, this will make it clear to PHP that it's an array/hash*/ while ($val = next($xtabel) { print(INPUT TYPE=HIDDEN NAME=xtabel[] VALUE=\$val\\n); } print(INPUT TYPE=SUBMIT NAME=SUBMIT\n); print(/FORM); I HAVE NOT!!! tested this but I think it might work. Since I didn't check it might have some typos, you'll have to try I'm low on time and like I said I'm new to this also, so no guarentees :-). Kind regards I want to pass through an array with content to another script. The array is correctly filled with data. To do this I use the following code: FORM METHOD='post' ACTION='script.php?xtabel = ? print($xtabel); ?' The content of the array is not recognised in the script.php. What is the best way to do this? --- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] The information contained in this email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any form of disclosure, production, distribution or any action taken or refrained from in reliance on it, is prohibited and may be unlawful. Please notify the sender immediately. The content of the email is not legally binding unless confirmed by letter bearing two authorized signatures. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: Re: [PHP] Passing through Array's to another script
Well, there's a small difference between form's GET/POST and passing variables using the ? on urls. I don't know the techinal details of it, but it's possible. I guess, on this particular case, the form method is POST. When the next page is loaded (the action target), you put some GET parameters too. It's not about the form, but the page that is being loaded. Maybe it can receive GET and POST at the same time?... I guess that's the case. -- Julio Nobrega. Um dia eu chego lá: http://sourceforge.net/projects/toca -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Passing through Array's to another script
If you need to POST a form, but include some variables, you can use hidden fields. form action=script.php method=post input type=hidden name=a value=foo input type=hidden name=b value=bar input name=c /form Assuming someone now enters baz into the input called c, your POST data is equivalent to doing a href=script.php?a=foob=barc=bazClick here!/a However, you can't do this: form action=script.php?a=foob=bar method=post input name=c /form Because a b won't get submitted. Cheers Jon -Original Message- From: Julio Nobrega Trabalhando [mailto:[EMAIL PROTECTED]] Sent: 18 December 2001 14:32 To: [EMAIL PROTECTED] Subject: Re: Re: [PHP] Passing through Array's to another script Well, there's a small difference between form's GET/POST and passing variables using the ? on urls. I don't know the techinal details of it, but it's possible. I guess, on this particular case, the form method is POST. When the next page is loaded (the action target), you put some GET parameters too. It's not about the form, but the page that is being loaded. Maybe it can receive GET and POST at the same time?... I guess that's the case. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Passing through Array's to another script
However, you can't do this: form action=script.php?a=foob=bar method=post input name=c /form Because a b won't get submitted. Well, like I said, I don't understand very well, but things after the ? are available on the action page, even if the method is POST. Here's a tested example (PHP 4.1.0, Win2k AS, Apache 1.13.20) aaa.php: form method=post action=bbb.php?var=value input type=submit /form bbb.php ?php echo $HTTP_GET_VARS['var'].'br'; echo $_GET['var'].'br'; echo $REQUEST_METHOD; ? Shows: value value POST So, the method is still POST, but things after ? are also available. What should not work is this: aaa.php: form method=post action=bbb.php input name=var input type=submit /form bbb.php: echo $_GET['var']; But for this one I didn't test... -- Julio Nobrega. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] HTML Email
Okay I know I must be overlooking somethign super obvious but I am trying to send a simple HTML email. It works in Netscape mail, Pegasus etc however in Outlook and Outlook express it actually places the Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: 7bit in the body of the email all displays all the HTML instead of showing the email as a web page. I ahev inserted the code below. I know it is something stupid, so please help. if ($htmlEmail) { $headers = MIME-Version: 1.0\r\n; $headers .= Content-Type: text/html; charset=iso-8859-1\r\n; $headers .= Content-Transfer-Encoding: 7bit . \r\n; $body = $html_body; } $headers .= From: $from\r\n\; ($cc != )?($headers .= Cc: $cc\r\n):(); ($bcc != )?($headers .= Bcc: $bcc\r\n):(); mail($email, $subject, $body, $headers); Anyone see what I am doing wrong? Thanks in advance! Gerard -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] HTML Email
The very first thing you need to do when thinking about a way to send HTML e-mail is to take plenty of aspirin and lie down until the urge passes and you feel sane again. HTML e-mail bad. Plain text good. At 06:51 AM 12/18/2001, Gerard Onorato wrote: Okay I know I must be overlooking somethign super obvious but I am trying to send a simple HTML email. It works in Netscape mail, Pegasus etc however in Outlook and Outlook express it actually places the Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: 7bit Sliante, Richard S. Crawford http://www.mossroot.com AIM: Buffalo2K ICQ: 11646404 Y!: rscrawford MSN: [EMAIL PROTECTED] It is only with the heart that we see rightly; what is essential is invisible to the eye. --Antoine de Saint Exupéry Push the button, Max! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] HTML Email
Okay I know I must be overlooking somethign super obvious but I am trying to send a simple HTML email. It works in Netscape mail, Pegasus etc however in Outlook and Outlook express it actually places the Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: 7bit in the body of the email all displays all the HTML instead of showing the email as a web page. I ahev inserted the code below. I know it is something stupid, so please help. Try the mime mail class at the url below and see if it helps. http://www.phpguru.org -- Richard Heyes If you have any trouble sounding condescending, find a Unix user to show you how it's done. - Scott Adams -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Re: $PHPSESSID on PHP 4.1.0
$PHPSESSID is only available if the session is started before current executed script. Regards, Andrey - Original Message - From: Julio Nobrega Trabalhando [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, December 18, 2001 1:45 PM Subject: [PHP] Re: $PHPSESSID on PHP 4.1.0 Hi again, Here are a few updates (error_reporting(E_ALL)): $_SESSION['PHPSESSID']; // Undefined index PHPSESSID error ?=SID? // Doesn't work. Not even a undefined variable. // echo $SID doesn't either But: echo session_id(); // works! Thanks Andrey for the remainder, but session were already started (checked with print_r($_SESSION)), Tim for the creative insight ($_SESSION['PHPSESSID']) and Tom, who found the solution. So, that's it. Looks like there's no more $PHPSESSID That makes porting a little bit more annoying :-) -- Julio Nobrega. Um dia eu chego lá: http://sourceforge.net/projects/toca -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] HTML Email
It looks fine to me. The only difference is that I use Content-Transfer-Encoding: quoted-printable, which shouldn't make much of a difference here. A very small misplacement of a newline character or even a space can cause things not to work correctly. Your best course of debugging is to send a successful (look for a send this page as email link) HTML email to your outlook account. Open the message in a new window and inspect the headers carefully. Then you try to mimic that. In the end I skip using php's mail() function and use a socket connection and speak directly with the SMTP host. It all seems so easy in the beginning, but as soon as you start testing your html email in different email programs you realize that they all behave slight differently. The differences between Eudora, Outlook, Hotmail, AOL, Yahoo, Pine, etc are enough to drive you nuts. For more info read this: http://www.arsdigita.com/asj/mime/ jim Okay I know I must be overlooking somethign super obvious but I am trying to send a simple HTML email. It works in Netscape mail, Pegasus etc however in Outlook and Outlook express it actually places the Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: 7bit in the body of the email all displays all the HTML instead of showing the email as a web page. I ahev inserted the code below. I know it is something stupid, so please help. if ($htmlEmail) { $headers = MIME-Version: 1.0\r\n; $headers .= Content-Type: text/html; charset=iso-8859-1\r\n; $headers .= Content-Transfer-Encoding: 7bit . \r\n; $body = $html_body; } $headers .= From: $from\r\n\; ($cc != )?($headers .= Cc: $cc\r\n):(); ($bcc != )?($headers .= Bcc: $bcc\r\n):(); mail($email, $subject, $body, $headers); Anyone see what I am doing wrong? Thanks in advance! Gerard -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- Jim Musil - Multimedia Programmer Nettmedia - 212-629-0004 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Re: $PHPSESSID on PHP 4.1.0
Yes, I know. But the problem is PHP 4.1.0, or maybe something on the new php.ini that comes with. My scripts were echo'ing $PHPSESSID fine before it. -- Julio Nobrega. Um dia eu chego la: http://sourceforge.net/projects/toca Andrey Hristov [EMAIL PROTECTED] wrote in message 032e01c187db$148bfa30$0b01a8c0@ANDreY">news:032e01c187db$148bfa30$0b01a8c0@ANDreY... $PHPSESSID is only available if the session is started before current executed script. Regards, Andrey -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] HTML Email
Eureka! That seems to have fixed the problem. Now to test on the Mac clients. G On Tue, 18 Dec 2001 23:11:31 +0100, TD - Sales International Holland B.V. wrote: On Tuesday 18 December 2001 15:51, you wrote: Ok, just a guess here I'm not that familiar with writting my own headers What I THINK that might help is using only \n for a newline and not the \r. \r is windoze stuff while the first mta's (mail transfer agents) where unix systems. Perhaps that's your problem... then again, it's just a guess :-) If this is true, your probably only need that for the headers and not for the content of the email, since if you'd write an email in outlook express and press enter in it it should be a CRLF (\r\n) regards Okay I know I must be overlooking somethign super obvious but I am trying to send a simple HTML email. It works in Netscape mail, Pegasus etc however in Outlook and Outlook express it actually places the Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: 7bit in the body of the email all displays all the HTML instead of showing the email as a web page. I ahev inserted the code below. I know it is something stupid, so please help. if ($htmlEmail) { $headers = MIME-Version: 1.0\r\n; $headers .= Content-Type: text/html; charset=iso-8859-1\r\n; $headers .= Content-Transfer-Encoding: 7bit . \r\n; $body = $html_body; } $headers .= From: $from\r\n\; ($cc != )?($headers .= Cc: $cc\r\n):(); ($bcc != )?($headers .= Bcc: $bcc\r\n):(); mail($email, $subject, $body, $headers); Anyone see what I am doing wrong? Thanks in advance! Gerard -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] addslash/stripslashes
On 18-Dec-2001 TD - Sales International Holland B.V. wrote: Hey there, I was once told I need to use addslashes and stripslashes on data I get from the web and insert into the database. I'd like to know why?!?! See I know that with other languages you could use special chars to hack/crack the database, but even without add/strip slashes I can't seem to manage I have a text field I inserted into the database and I entered stuff like this: ~!@#$%^*()_+~!@#$%^*()_+|\\||\[]{};:'.,/? since quotes n stuff aren't nicely closed now I'd expect an error if this was crack/hackable however it just inserts fine without any problems whatsoever. I'm using PHP 4.0.6 and MySQL 4.23.43 (I think haven't checked...) Also when I go to the page where the data is retrieved from the database and put in HTML I see EXACTLY what I entered. So it doesn't appear to me I'd need these add/strip slashes functions. Any comments would be greatly appreciated. Check your 'magic_quotes_gpc', it might explain it. Regards, -- Don Read [EMAIL PROTECTED] -- It is necessary for me to learn from others' mistakes. I will not live long enough to make them all by myself. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] PHP module for modem???
Hi! Is there any module or software that I can use and compile it with PHP for working with hte modem??? For example, I have cURL but it is a seperate software and can be compile with PHP for certain things like FTP, Internet socket, etc. So, is there ever one for the modem? Thanks, Scott -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Re: $PHPSESSID on PHP 4.1.0
register_globals is recommended to be off in the new release. But if you put binaries from a package and didn't changed the ini - register_globals is probably on. Regards, Andrey - Original Message - From: Julio Nobrega Trabalhando [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, December 18, 2001 5:53 PM Subject: Re: [PHP] Re: $PHPSESSID on PHP 4.1.0 Yes, I know. But the problem is PHP 4.1.0, or maybe something on the new php.ini that comes with. My scripts were echo'ing $PHPSESSID fine before it. -- Julio Nobrega. Um dia eu chego la: http://sourceforge.net/projects/toca Andrey Hristov [EMAIL PROTECTED] wrote in message 032e01c187db$148bfa30$0b01a8c0@ANDreY">news:032e01c187db$148bfa30$0b01a8c0@ANDreY... $PHPSESSID is only available if the session is started before current executed script. Regards, Andrey -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] GetImageSize Problem
Hello, I'm PHPer from Korea. I have a problem with GetImageSize function. I wanted to know some information about BMP image. So, I tried to use GetImageSize on PHP 4.0.5 , Linux. But, it didn't work. GetImageSize function returned nothing. Then, I tried it on PHP 4.0.6, Windows2000. Ooops.. I worked.. -.-; I looked the php.net manual, but there's no mention about my problem. Does anyone know how to solve this problem.. ? Do you know @MESSAGE? Powered by 3R Soft, Inc. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Re: $PHPSESSID on PHP 4.1.0
Yes! That's it. I was accessing vars using new methods, but I forgot $PHPSESSID was supposed to have globals on. So simple, yet I have flooded the list with messages. Thanks Andrey, I think it's better next time look at all possible options ;-) -- Julio Nobrega. Um dia eu chego la: http://sourceforge.net/projects/toca Ajudei? Salvei? Que tal um presentinho? http://www.submarino.com.br/wishlistclient.asp?wlid=664176742884 Andrey Hristov [EMAIL PROTECTED] wrote in message 039e01c187e0$a9a54810$0b01a8c0@ANDreY">news:039e01c187e0$a9a54810$0b01a8c0@ANDreY... register_globals is recommended to be off in the new release. But if you put binaries from a package and didn't changed the ini - register_globals is probably on. Regards, Andrey -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] PHP module for modem???
There aren't any modem modules that I am aware of but if you are using UNIX you can just open the modem device and talk to it directly. What is your application that would need to use a modem? ? /* Something like this */ $fp = fopen(/dev/modem, rw); fwrite($fp, ATA); echo fgets($fp, 128) fclose($fp); ? -Original Message- From: Scott Fletcher [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 18, 2001 8:11 AM To: [EMAIL PROTECTED] Subject: [PHP] PHP module for modem??? Hi! Is there any module or software that I can use and compile it with PHP for working with hte modem??? For example, I have cURL but it is a seperate software and can be compile with PHP for certain things like FTP, Internet socket, etc. So, is there ever one for the modem? Thanks, Scott -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Arrays/Hashes
Hey there, sortta simple question... Is it just me or can't you access hashes within strings? This works... print(Some text $myarray[0]BR\n); This doesn't print(Some text $myhash['mykey']BR\n); i'm asking in relation to databases (not that that matters). If i fetch a row from the database I can use the $array[0], [1], etc in the print statements if i use mysql_fetch_array (oh sorry, u people call it associative arrays instead of hashes, my mistake) i can't access $array['fieldname'] from within a print statement but I CAN do $DBID = $resultarray['idfieldname']; and then use $DBID. regards -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHP module for modem???
This would require that your httpd user (nobody? depends on your setup) has read/write access to said device (which is normally not the case). In such a case you would need to filter it through sudo or some such. chuck - Original Message - From: Nathan Cassano [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, December 18, 2001 5:47 PM Subject: RE: [PHP] PHP module for modem??? There aren't any modem modules that I am aware of but if you are using UNIX you can just open the modem device and talk to it directly. What is your application that would need to use a modem? ? /* Something like this */ $fp = fopen(/dev/modem, rw); fwrite($fp, ATA); echo fgets($fp, 128) fclose($fp); ? -Original Message- From: Scott Fletcher [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 18, 2001 8:11 AM To: [EMAIL PROTECTED] Subject: [PHP] PHP module for modem??? Hi! Is there any module or software that I can use and compile it with PHP for working with hte modem??? For example, I have cURL but it is a seperate software and can be compile with PHP for certain things like FTP, Internet socket, etc. So, is there ever one for the modem? Thanks, Scott -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Arrays/Hashes
I've noticed this, too. There are at least two things you can do to make them work... print(Some text {$myhash['mykey']}BR\n) or print(Some text .$myhash['mykey'].BR\n) jim Hey there, sortta simple question... Is it just me or can't you access hashes within strings? This works... print(Some text $myarray[0]BR\n); This doesn't print(Some text $myhash['mykey']BR\n); i'm asking in relation to databases (not that that matters). If i fetch a row from the database I can use the $array[0], [1], etc in the print statements if i use mysql_fetch_array (oh sorry, u people call it associative arrays instead of hashes, my mistake) i can't access $array['fieldname'] from within a print statement but I CAN do $DBID = $resultarray['idfieldname']; and then use $DBID. regards -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- Jim Musil - Multimedia Programmer Nettmedia - 212-629-0004 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] 'Select All'
Hi Martin, Excellent, thanks for your help :) Regards -- Shane On Monday 17 Dec 2001 10:15 pm, Martin Towell wrote: you _can_ reference it by name - try this: script function my_select(type) { frm = document.forms.test; ele = frm[mycheckbox[]]; len = ele.length; for (i = 0; i len; i++) ele[i].checked = type; } /script form name=test input type=button value=All onClick=my_select(true); input type=button value=None onClick=my_select(false); input type=checkbox name=mycheckbox[] input type=checkbox name=mycheckbox[] input type=checkbox name=mycheckbox[] input type=checkbox name=mycheckbox[] /form Martin -Original Message- From: Shane Wright [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 18, 2001 4:55 AM To: [EMAIL PROTECTED] Subject: [PHP] 'Select All' Hi I'm having somewhat of a problem :( I have my banks of checkboxes, all named 'mycheckbox[]' with the values as different IDs. The user happily checks a few of them and my scripts happily process the resulting arrays. But... how do I get Javascript to do a 'select all' on them?? I cant access them by name because of the square brackets, and I cant access them by going through all form elements in case there are other checkboxes that dont want to be included. Is there a tidy way around this, does any of the above make sense? Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Announcement: Smarty template engine 1.5.2 available
http://www.phpinsider.com/php/code/Smarty/ Version 1.5.2 - - added Smarty object as fifth argument for template resource functions (Monte) - fixed a bug with incorrectly combined cache and compile id in clear_cache(). (Andrei) - fixed bug in smarty_make_timestamp introduced in PHP 4.1.0. (Monte) - fixed bug with cached insert debug timing. (Monte) - added 'script' attribute to {insert..} which specifies the script that the insert function can be found in. (Andrei) - added default template function handler. (Monte) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHP module for modem???
What application would I need to use this. In this case, no appication. Just writting the PHP code on the webpage that would work with the modem and stuffs like that. Scott Nathan Cassano [EMAIL PROTECTED] wrote in message 778f01c187e3$b84b8ed0$2925ae3f@amos">news:778f01c187e3$b84b8ed0$2925ae3f@amos... There aren't any modem modules that I am aware of but if you are using UNIX you can just open the modem device and talk to it directly. What is your application that would need to use a modem? ? /* Something like this */ $fp = fopen(/dev/modem, rw); fwrite($fp, ATA); echo fgets($fp, 128) fclose($fp); ? -Original Message- From: Scott Fletcher [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 18, 2001 8:11 AM To: [EMAIL PROTECTED] Subject: [PHP] PHP module for modem??? Hi! Is there any module or software that I can use and compile it with PHP for working with hte modem??? For example, I have cURL but it is a seperate software and can be compile with PHP for certain things like FTP, Internet socket, etc. So, is there ever one for the modem? Thanks, Scott -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] php mail problems
Hello, Using a Solaris box with php 4.0.6 I am having a problem sending mail using mail(). Sendmail is installed and works. Php.ini points to sendmail. What do the -t and -i options do? Are they required? Any ideas what could be wrong? Here is my code: if( mail( myemailaddresshere, Test, test, From: myemailaddresshere ) == FALSE ) { print( 'Error sending email 1.' ); } Thanks, Mike -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Problem with fopen / url
sounds like php is having a problem resolving the dns. could be 1 of a 100 things ... try putting the IP of the machine in vs the domain name. -- Chris Lee [EMAIL PROTECTED] Martin Leclair [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi, I have a problem doing a fopen(http:///index.php,r;) on a particular server it's extreamly slow (about 2 minutes to get the content of a webpage on a server that pings at 1ms) on another server it's getting the content in less than 5 seconds (same script). Same URL, servers are side to side on the same network, almost same hardware, uptime is fine. The server that causes problem is with 4.0.6. Would someone have some hints on what could cause it to work on one server and take more than 2 minutes on the other? Martin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Remote image
how those remote servers destinguish where the images are coming from is from the Referr header. play around with getting the data manually using fopen()/fwrite()/fread() and your done. not so easy eh, well it works. -- Chris Lee [EMAIL PROTECTED] Martin Kampherbeek [EMAIL PROTECTED] wrote in message 001201c18290$60da3820$328078d9@cc16349a">news:001201c18290$60da3820$328078d9@cc16349a... Hi, I have a problem with a remote image. I hope someone can help me. People can post their link of their webpage at my site. I check if the file excists, fopen(). After that I scan the page for links. And the links for images. Then I would like to see the sizes of all those images. The problem is that there are servers that don't allow to brow straight to the images, it can only from the page self. So I look for something in php that surfs the the page en from that page to the links. I hope someone can help me. Cheers, Martin. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: online editor
online editor? you got 1mb free? no? buy a floppy. install ultraedit, it's the best editor around imho. -- Chris Lee [EMAIL PROTECTED] R. Lindeman [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... can someone help get a online editor thanx R. Lindeman -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Passing through Array's to another script
foreach( $array_name as $pos = $val ) echo input type=hidden name='array_name[$pos]' value='$val' ; or use sessions. -- Chris Lee [EMAIL PROTECTED] Gkin [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I want to pass through an array with content to another script. The array is correctly filled with data. To do this I use the following code: FORM METHOD='post' ACTION='script.php?xtabel = ? print($xtabel); ?' The content of the array is not recognised in the script.php. What is the best way to do this? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: sessions
take a look at my session.egn file. http://www.mediawaveonline.com/examples/ -- Chris Lee [EMAIL PROTECTED] Anthony [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I need some help with sessions. I read the sections in the manual and searched for tutorials, but I still can't get a straight forward example of how sessions work. I need to pass variables to a page that will load in a new browser window. I used session_register, but when I look in the $HTTP_SESSION_VARS, it doesn't exist. I tried using start_session and still no luck. Once I get the session vars registered, how do I access them. I am able to pass the session id as a var, I'm going it like page.php?sid=$sid_var. Is there a better way, do I need to do this at all? I'm confused as hell and can't find a working example anywhere. Help! - Anthony -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Cookie Retrieval
I know this isnt answering your question, but skip cookies and goto sessions, easier to work with. now the answer to your question, you need to set the domain and path on your setcookie() setcookie('name', 'value', $exp, '/', $SERVER_NAME); -- Chris Lee [EMAIL PROTECTED] Steve Osborne [EMAIL PROTECTED] wrote in message 001701c1829d$90a519a0$[EMAIL PROTECTED]">news:001701c1829d$90a519a0$[EMAIL PROTECTED]... Can someone tell me if there is a bit of code I need to put on pages so I can retrieve a cookie. The cookie was set with the following code: //(D) Set Cookie $encoded_login = encode_string($login); if ( $remember == yes ){ // set login to expire in 1000 days $time = (time() + ( 24 * 3600 * 365 )); SetCookie ( poccd_session, $encoded_login, $time); }else{ SetCookie ( poccd_session, $encoded_login ); } I am trying to retrieve it with the following code (for testing purposes only, right now): if($poccd_session) { header(location: index.php); }else{ print(The cookie plan didn't work.); } Any suggestions would be appreciated. Steve Osborne Database Programmer Chinook Multimedia Inc. [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: php sessions limit
its irrelevant. now there is a file system dependancy. in linux is inodes, not enough and you'll have some problems, win2k I dont know. -- Chris Lee [EMAIL PROTECTED] Aaustin [EMAIL PROTECTED] wrote in message 002101c18293$671c5d00$0300a8c0@tomato">news:002101c18293$671c5d00$0300a8c0@tomato... Hi This may sound strange. but ... Is there a limit to the number of sessions one can/should have using the same identity details at one time. ie if beta testing a website with the same password details etc. or is it irrelevant. Thanks Andrew -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Single character input on command line
take them from the arguments list $argv[] I know its not what you asked, its just what I answered. -- Chris Lee [EMAIL PROTECTED] August Zajonc [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Interested in getting a single character at a time on the command line using php. ie, I'd like to type 2 and be able to trap that keystroke right away and act on it. Before spending a lot of time tracking down possibilites (readline input_buffer, reading the stdin pipe) thought I'd ask if anyone's done this already and has an elegant way I'm missing. Thanks, - August -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: http referer problems
break it down. if ( $ef != 'nm' ) echo a : $efbr; else echo b : $ef br; if ( $HTTP_REFERER != 'http://www.globalhealth.org/news/article.php3?id=1526' ) echo c : $HTTP_REFERERbr; else echo d : $HTTP_REFERERbr; now you can see where the bug is. -- Chris Lee [EMAIL PROTECTED] [EMAIL PROTECTED] wrote in message BB6D932A42D6D211B4AC0090274EBB1DA0F1E8@GLOBAL1">news:BB6D932A42D6D211B4AC0090274EBB1DA0F1E8@GLOBAL1... For some reason, the following if statement isn't working. Maybe I haven't had enough coffee to drink or maybe I've had too much - what am I missing? if ($efa != nm || $HTTP_REFERER != http://www.globalhealth.org/news/article.php3?id=1526;){do this);} Thank you, Shawna -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Logout problem
Header(WWW-Authenticate: Basic realm='$SERVER_NAME' ); Header(HTTP/1.0 401 Unauthorized); is the proper http auth hearders, change the realm and you'll have to re-authenticate. -- Chris Lee [EMAIL PROTECTED] J.F.Kishor [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... hello all, I have designed a web page using php, as a security measure I have kept it password protected. I have used Apache authentication, using htpasswd file. Now I want to keep a logout in this web page, I tried to send a header request http/1.0 401 Unauthorized to force it to reauthenticate when the logout link is clicked in the form, but this dose not work. I tried using session_destroy() even that does not work. To get the authenticated users name I have used GetEnv(REMOTE_USER) in all the form and with that username I'am handling mysql and other requests. I don't know where exactly the REMOTE_USER gets stored. So please help me out in this problem. I want to remove the window's authentication cache. Please give me some ideas and suggestion to remove the user name and make the page fresh for the other user to log in. If possible please send me a sample script. kishor Nilgiri Networks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Header redirecting with POST
2k is alot of data to be sending using GET or POST, just leave it on the server in a session variable. redirect server 2000 bytes - client GET client 2000 bytes - server or via sessions redirect server 50 bytes - client GET client 50 bytes - server -- Chris Lee [EMAIL PROTECTED] Jim Lucas [EMAIL PROTECTED] wrote in message 001b01c18363$cd008990$[EMAIL PROTECTED]">news:001b01c18363$cd008990$[EMAIL PROTECTED]... is it possible to use header() to redirect and have it act as a post I know about this method header(Location: http://www.yahoo.com/?variable=value;); but this is the GET method I don't want to have to know every single (variable|value) combination that will be sent to a page Sadly though, GET has a size limit on the amount of data you can send throught the URL, 2kb. I want to be able to send larger amounts with a header() redirect. Any ideas on how to send the data in a POST with header(); woud be appreciated. Thanks Jim Lucas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: need some help
I'll try and answer your questions as will the rest off the forum Im sure, just post away. -- Chris Lee [EMAIL PROTECTED] Melva Garcia [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I am looking for a mentor to help me along with using php and mysql i am a designer for over 9 years now..and will in return help you with anything pertaining to layout and design i have alot of dumb questions pertianing to php and mysql dba can someone help me i would appreciate any help I can get thanks Mel __ Do You Yahoo!? Check out Yahoo! Shopping and Yahoo! Auctions for all of your unique holiday gifts! Buy at http://shopping.yahoo.com or bid at http://auctions.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: max # of characters for links to work in emails?
a good guess would be every email client does it differnetly. unfort Id have to say try it yourself. Id imagine its long enough that you shouldnt have to worry about it, but I could be wrong. -- Chris Lee [EMAIL PROTECTED] Tom Churm [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... hi, i'm working on an eCard project and somehow need to find out what the reasonable limit is on characters for urls in email bodies (normal text, not mime). i know that some mail clients will cut off urls that are too long or else throw a line break in the middle of them--thus rendering them 'unclickable'. and this is exactly what i wanna avoid. anyone have any advice to offer in this area? muchos gracias, tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Using @file
haha, I bet it cant resolve, and I doubt it works on other machines :) www.myserver,com www.myserver.com see the diff? ditch the comma and put a period in insted :) trust me it happens to the best of us. -- Chris Lee [EMAIL PROTECTED] Jeff Lewis [EMAIL PROTECTED] wrote in message 013901c181b8$a4acd400$76a1a8c0@LEWISJCIT">news:013901c181b8$a4acd400$76a1a8c0@LEWISJCIT... I am using this line in part of my code but am getting an error that looks like below: Code: $serverDetails = @file(http://www.myserver,com/versions.php?l=$scripturlv=$version;); Error: 2: php_network_getaddresses: gethostbyname failed (c:\inetpub\wwwroot\yabbse\Sources\Admin.php ln 43) What would be causing this error? It works on some machines but not others? Jeff -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Rational Rose plugin for generating php code ?
configure --help ie. nope, nothing there. -- Chris Lee [EMAIL PROTECTED] Arne Brune Olsen [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi Does anyone know if there is a module for rational rose for generating php code from UML diagrams ? Arne -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: What is the best way to reorder table columns...temp tables?
man that is nasty, but imho because of the constant in and out of php echo a href='$PHP_SELF?reports.php?userid=$useriddate_start=$date_startdate_end=$ date_endorder_by=trans_per_req%20descgroupby=$groupbytype=otherdaterange =$daterange'link /a ; I came across this same problem, I hate the long urls, their ugly, so I wrote a simple session class to carry my prefs across a page. carry_class.egn http://www.mediawaveonline.com/examples/ $carry-add('position'); $carry-add('order_by'); $carry-add('order_by_dir'); $carry-add('search'); $carry-add('search_keyword'); $carry-add('search_category'); echo a href='$PHP_SELF?order_by=people_namecarry_keep='order by name/a a href='$PHP_SELF?order_by=people_emailcarry_keep='order by email address/a a href='$PHP_SELF?order_by_dir=1carry_keep='up/a a href='$PHP_SELF?order_by_dir=0carry_keep='down/a a href='$PHP_SELF?position=$prevcarry_keep='back/a a href='$PHP_SELF?position=0carry_keep='home/a a href='$PHP_SELF?position=$nextcarry_keep='next/a ; -- Chris Lee [EMAIL PROTECTED] J. Roberts [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I'm trying to update a report generator I have, using php and mysql. The setup is essentially listing employees and production data. What I did when I created it was for the column headers, made them links to requery the database..sample link follows (inside an anchor tag): reports.php?userid=?php echo $userid; ?date_start=?php echo $date_start; ?date_end=?php echo $date_end; ?orderby=trans_per_req%20descgroupby=?php echo $groupby; ?type=otherdaterange=?php echo $daterange; ? As you can see that is very ugly, and inefficient. I was thinking that one way to get around passing so many parameters was after the initial query, have that inserted into a temporary table. Then all that would need to be passed with the query string would be an ORDER BY clause, at which time I would do a SELECT * FROM TEMP_TABLE ORDER BY $orderby. One thing im not sure about, is if temporary tables are unique to each user. That is to say if two people were running reports at the same time with different parameters, would that work? If so, how long before the connection dies? If it is at the end of script execution, that wouldn't be much help. Does anyone have any better ideas as well? I thought about using a multi-dimensional array, but was told that that would be a bad idea to keep a large array alive in memory. Thanks, -Jamison (hope this makes some sense) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: PHP and plugin detection
it has to be done via javascript. javascript = clientside php = serverside if the plugins are on the clientside then javascript is needed. and no, sorry, I dont know how. -- Chris Lee [EMAIL PROTECTED] Daniel Reichenbach [EMAIL PROTECTED] wrote in message 01c1816b$ae010230$796010ac@danielmob">news:01c1816b$ae010230$796010ac@danielmob... Hy, is there any way to detect the plugins a user has installed in his browser with PHP? I want to write a page where users get a plugin depending on their installation. If none of the required plugins is available an error page should be viewed. If it's not possible using PHP, can it be done with JavaScript? Greetings, Daniel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] preg_grep() and limit parameter
Does anyone see a need for a limit parameter to preg_grep() that would limit the number of array entries returned? -Andrei * My wishlist: http://www.amazon.com/exec/obidos/wishlist/2Q2DIPY7BZLSH/ * -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Still need help with miscount
need more info buddy. does this query work at the mysql command prompt? show us an example, show us 10 records and accual query being exec and what the returned result is and what you think it should be. -- Chris Lee [EMAIL PROTECTED] Fîk ì?çìsâî [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi, i still need help with this query: $t = 7; $shot_counts = SELECT COUNT(*) FROM statistik WHERE shooter='$shooter_login' AND (shot_one = '$t' OR shot_two = '$t' OR shot_three = '$t' OR shot_four = '$t' OR shot_five = '$t'); It doesn´t return the correct count. I have tried to tweak the syntax around, excluding one or more columns to count etc. But it still gives the wrong count. What´s wrong? - Daniel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Text file busy
try php.ca or any of the other mirrors when php.net is down. I bet you got that file your running open in an editor eh? close the file in the editor then run the file, no problems. -- Chris Lee [EMAIL PROTECTED] Boaz Yahav [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... HI I'm trying to run a php file in CGI mode and I get : Text file busy I'm running many other files like that for years and this is the 1st time I see such a message. php.net seems to be down for me, any idea? berber -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: including outside pages
include() will not handel ssl. include() on a remote site obv. will not transer access to the variables to the remote site. your best bet is to encode your session, session_encode(), and either store it in a common mysql table that both servers have access to (best method) or to pass it in the url to the ssl site, if this is done then you have to treat your session data as if it were cookie data, dont trust it. -- Chris Lee [EMAIL PROTECTED] Jordan [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... hello all, Two questions 1) Is it possible to pass a session to another server? I'm creating a secure order form for a shopping cart but the ssl service of my provider is on a different server. Is there anyway to carry a users session over to this box? 2) If it is not possible to carry a session...is there anyway I could include this page on the ssl server into my main server from my host? If I could do an include I could continue the session and use it's stored variables. Thank you for the help. -Jordan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Header error while creating an Image
you dont have output buffering on, check php.ini or add it manually to an .htaccess. -- Chris Lee [EMAIL PROTECTED] J.F.Kishor [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... hello, I'am trying to create an image using php image functions it gives a warning and outputs a image with GIF87a format, why does this happen, could some help me out in this problem. This is the script -- ? Header(Content-type: image/gif); $string=implode($argv, ); $im = imagecreatefromgif(images/Next.gif); $orange = ImageColorAllocate($im, 220, 210, 60); $px = (imagesx($im)-7.5*strlen($string))/2; ImageString($im,3,$px,9,$string,$orange); ImageGif($im); imagecolortransparent($im); ImageDestroy($im); ? Warning alerted is -- Warning: Cannot add header information - headers already sent by (output started at /home/kuruvi1/kishor/public_html/GD/creatingIMG.php:2) in /home/kuruvi1/kishor/public_html/GD/creatingIMG.php on line 4 -- Junk output is --- -- --- GIF87a9CU_11EraalUYIAAf11__O99 @ ` @\*6Z@6#%,9I# AA CIACA E#YU ( @ a#,EX(R X#Y*(B H#I3 EC A [] -- --- Thanks for sparing time for this mail with regards -JFK -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: MySQL Native Function in PHP Query Not Working?
that command doesnt even work from the mysql command prompt for me, Ive never used LAST_INSERT_ID(), but it dont work for me. try it on your mysql command prompt. -- Chris Lee [EMAIL PROTECTED] Ise [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hello, Can someone explain to me why the below SQL query when executed with the PHP mysql functions does not work? (it returns nothing) SELECT * FROM table WHERE aid=LAST_INSERT_ID() If I replace the MySQL function LAST_INSERT_ID() with a integer, it works fine so its not the query. Further, I was returned results on the above query when I ran it directly from a MySQL client. Does PHP not support certain MySQL native functions? Thanks, Michael Caplan Institute for Social Ecology http://www.social-ecology.org/ 1118 Maple Hill Road Plainfield, VT, 05667 USA Tel.: 1 (514) 421-3515 General Tel. / Fax.: 1 (802) 454-8493 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: PHP module for modem???
configure --help in other words, no. but there is nothing from stopping you from writing a module :) im sure there are others out there that would like such a feature, ie for fax's -- Chris Lee [EMAIL PROTECTED] Scott Fletcher [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi! Is there any module or software that I can use and compile it with PHP for working with hte modem??? For example, I have cURL but it is a seperate software and can be compile with PHP for certain things like FTP, Internet socket, etc. So, is there ever one for the modem? Thanks, Scott -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] preg_grep() and limit parameter
only thing i could think up would be if a user is dealing with huge amounts of text and only needs to have the first ten returned, returning/continuing past that would be wastefulnot confident on how often this would really happen and what the actual difference would be... Jack -Original Message- From: Andrei Zmievski [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 18, 2001 12:40 PM To: [EMAIL PROTECTED] Subject: [PHP] preg_grep() and limit parameter Does anyone see a need for a limit parameter to preg_grep() that would limit the number of array entries returned? -Andrei * My wishlist: http://www.amazon.com/exec/obidos/wishlist/2Q2DIPY7BZLSH/ * -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Smarty: Modifiers and $smarty
I found this message on php-general list, and I'm cross-posting the reply to Smarty list. I see a couple of issues with passing Smarty object to modifiers. 1. You want to use _current_file and _current_lineno member variables, but they are only defined in Smarty_Compiler class, and what actually runs the modifiers is Smarty class. Check Smarty::_run_mod_handler(). 2. The only reasonable way to make Smarty object available to modifiers is to pass it as a last parameter. However, you run into problems when your modifier has default parameters. For example: function x_mod($arg1, $arg2 = 5, $smarty) { ... } If you call modifier as {$foo|x}, $arg2 would actually point to the Smarty object, and you will get a notice complaining about $smarty parameter not being passed. So, it would not be possible to use default parameters for modifiers which is a big step back IMO. Can you provide alternative ideas? Hi, is there a way to access the calling smarty object from withing a modifier callback function? Regular smarty callback functions get passed a list of parameters of the function call as a first argument and a reference to the calling smarty object as a second argument. function my_smary_func($params, $smarty) { ... if (my_smarty_check_params($params, $allowed)) { return true; } $smarty-assign(); ... } That way you can not only modify the smarty object but access properties of the object. Two of them help me to generate error messages: $smarty-_current_line_no and $smarty-_current_file (btw. one should make them public). function my_smarty_check_params($params, $allowed, $smarty) { if (...) { return sprintf(Error on %s %d, $smarty-_current_file, ...); } ... } Can I do something similar with modifiers, which seem to have this format. Is there a way to access the calling smarty object? function my_smarty_modifier($value, $option = '', ...) { ??? $smarty-... ??? } -Andrei When we eliminate the impossible, whatever remains, however improbable, must be true. -- Sherlock Holmes -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] php htpasswd
I'm sure question has been asked. How can I edit a htpasswd (apache) file using a php script? Does anyone have a piece of code? I would like to see the crypted passwords, but will live without. Thanks, J -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] php htpasswd
not sure i follow...you open it with php do whatever you need and close it...its just a text file... -Original Message- From: jtjohnston [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 18, 2001 1:00 PM To: [EMAIL PROTECTED] Subject: [PHP] php htpasswd I'm sure question has been asked. How can I edit a htpasswd (apache) file using a php script? Does anyone have a piece of code? I would like to see the crypted passwords, but will live without. Thanks, J -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] sql password
Im attempting to install mysql. The service started and everything seems to be going ok except for that I can't set the root password for the mysql server. Whenever i type: I get the following error: -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] php htpasswd
Jack, not sure i follow...you open it with php do whatever you need and close it...its just a text file... It's not just a text file delimited by a colon. You can indeed just type: user:password but it should be: user:crypt(password) When I perled, I knew how to database a text file delimited by : Now that I'm saved :) I'm learning MySQL, but I don't want to MySQL my htpasswd.users file. I don't even know if I can? Can I anyone? How would I? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] sql password
Im attempting to install mysql. The service started and everything seems to be going ok except for that I can't set the root password for the mysql server. To reset password i type: /usr/bin/mysqladmin -u root -p mypassword Then I get the following error: /usr/bin/mysqladmin: connect to server at 'localhost' failed error: 'Access denied for user: 'root@localhost' (Using password: YES)' Can anyone help? Thanks, JJ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] php htpasswd
? include_once('cookie.egn'); include_once('database.egn'); function bad_passwd() { echo You have entered an invalid password.br\n; exit(); } if ( isset($PHP_AUTH_USER) AND isset($PHP_AUTH_PW) AND $peop_r = fetch_db_value('people_manager', WHERE username = '$PHP_AUTH_USER' AND password = '$PHP_AUTH_PW' ) ) $SessionID = $peop_r['peopleID']; else { Header(WWW-Authenticate: Basic realm='$SERVER_NAME' ); Header(HTTP/1.0 401 Unauthorized); bad_passwd(); } ? http://www.mediawaveonline.com/examples/ -- Chris Lee [EMAIL PROTECTED] Jtjohnston [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Jack, not sure i follow...you open it with php do whatever you need and close it...its just a text file... It's not just a text file delimited by a colon. You can indeed just type: user:password but it should be: user:crypt(password) When I perled, I knew how to database a text file delimited by : Now that I'm saved :) I'm learning MySQL, but I don't want to MySQL my htpasswd.users file. I don't even know if I can? Can I anyone? How would I? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Email-based PHP-Script
Hello List, I'm currently trying to setup a script which is processing incomming emails. So I setup PHP as CGI and did configurate the email like robot |/path/to/the/script.php The little testscript I tried looks like that: ? $fp = fopen(php://stdin,r); while (!feof($fp)) { $BUFFER = fgets($fp); $INPUT .= $BUFFER; } mail ([EMAIL PROTECTED], Test, $INPUT, From: [EMAIL PROTECTED]); fclose($fp); ? The error which I get is /path/to/the/script.php: cannot open ?: no such file 554 5.3.0 unknown mailer error 2 Does anybody have some PHP code which would work to readout incomming emails or knows that's wrong with my little script? Thanks a lot. Juergen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Email-based PHP-Script
Hi http://www.linuks.net/robot.phps best regards attila strauss Hello List, I'm currently trying to setup a script which is processing incomming emails. So I setup PHP as CGI and did configurate the email like robot |/path/to/the/script.php The little testscript I tried looks like that: ? $fp = fopen(php://stdin,r); while (!feof($fp)) { $BUFFER = fgets($fp); $INPUT .= $BUFFER; } mail ([EMAIL PROTECTED], Test, $INPUT, From: [EMAIL PROTECTED]); fclose($fp); ? The error which I get is /path/to/the/script.php: cannot open ?: no such file 554 5.3.0 unknown mailer error 2 Does anybody have some PHP code which would work to readout incomming emails or knows that's wrong with my little script? Thanks a lot. Juergen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Error while calling a function
hi all, I have got a problem, when I execute the following script it gives a Fatal error, could any one tell me why is it ?, If this is a silly problem please execuse me but, plz do reply me. The script is - html body ? if(!$Phone) { ? form action=?echo $PHP_SELF? method=post br Telephone Number : input type=text name=Phone value= br input type=submit script language=php } else { function is_allnumbers ($text) { if( (gettype($text)) == integer) { print the value is an integer; return true; } $Bad = $this-strip_numbers($text); if(empty($Bad)) { print the value is empty; return true; } return false; } function clear_error () { $this-ERROR = this is an error; } function is_phone ($Phone =) { if($this-CLEAR) { $this-clear_error(); } if(empty($Phone)) { $this-ERROR = is_phone: No Phone number submitted; return false; } $Num = $Phone; $Num = $this-strip_space($Num); $Num = eregi_replace((\(|\)|\-|\+),,$Num); if(!$this-is_allnumbers($Num)) { $this-ERROR = is_phone: bad data in phone number; return false; } if ( (strlen($Num)) 7) { print the number is less then 7; $this-ERROR = is_phone: number is too short [$Num][$Phone]; return false; } if( (strlen($Num)) 13) { print the number is then 13; $this-ERROR = is_phone: number is too long [$Num][$Phone]; return false; } return true; } } $result = is_phone($Phone); if($result == true) { echo success; } else { echo failure; } /script /body /html The error is Fatal error: Call to undefined function: is_phone() in /home/kuruvi1/kishor/public_html/IMS/ADMIN/test/is_phone.php on line 87 Thanks for your tolerance, - JFK kishor -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] how to get postscript to work with php/gd?
Does anybody know? I know gd I edit the makefile and can support older version of freetype however, for certain reasons I can't install freetype 2, and I was considering postscript fonts Does anybody know from experience how to get gd/php working with them? the goal is just better font support with gd/php instead of the default text that is displayed Thanks. I have had trouble finding for sure which course of action to take for linux (raq 3) so I hope this isn't too off topic joel
[PHP] while...if statements???
Does anyone know why this isn't working?? What I am trying to do is display photos from a database based on each month. This part works fine when I set it to the current month of December (today) as that is when I uploaded the photos. However, when I manually set the date to a month that has no photos in it, I want it to echo the No Animals string belowThis is only working half-way...meaning that it will display a blank page with nothing on it instead of actually echoing the No Animals string Can anyone please help?? Is there really a way to have a while...if statement CODE= ? $connection = mysql_connect($hostname, $user, $pass) or die (Unable to connect!); $query = SELECT petname, petDesc, petpicture FROM petinfo WHERE petmonth = 'Apr'; $result = mysql_db_query($database, $query, $connection) or die (Error in query: $query. . mysql_error()); while (list($pet_name, $pet_Desc, $pet_picture) = mysql_fetch_row($result)) { if ($pet_picture == ) { echo No Animals have been posted for $date at this moment. Please check back soon.; exit; } else { echo FONT FACE=\Arial, Helvetica\BPet of the month/B/FONTBR BR IMG SRC=\http://moss.bayou.com:/oppj/admin/animalcontrol/photos/$pet_picture\; HEIGHT=150BR BR FONT FACE=\Arial, Helvetica\ SIZE=\-1\$pet_DescBR BR To adopt $pet_name please visit the Ouachita Parish Animal Shelter.BR The adoption fee is \$50.00 which includes Spade, Neutering and 7-N-1 Shot.BR BR Sorry, we can not hold $pet_name for you (First come first serve basis)./FONT BRBR; } } ? /CODE= Thanks, Confus3d -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: [PHP-DB] while...if statements???
I would do a mysql_num_row(); on your results to see if it returning anything at all. Jim - Original Message - From: Jay Fitzgerald [EMAIL PROTECTED] To: [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, December 18, 2001 12:08 PM Subject: [PHP-DB] while...if statements??? Does anyone know why this isn't working?? What I am trying to do is display photos from a database based on each month. This part works fine when I set it to the current month of December (today) as that is when I uploaded the photos. However, when I manually set the date to a month that has no photos in it, I want it to echo the No Animals string belowThis is only working half-way...meaning that it will display a blank page with nothing on it instead of actually echoing the No Animals string Can anyone please help?? Is there really a way to have a while...if statement CODE= ? $connection = mysql_connect($hostname, $user, $pass) or die (Unable to connect!); $query = SELECT petname, petDesc, petpicture FROM petinfo WHERE petmonth = 'Apr'; $result = mysql_db_query($database, $query, $connection) or die (Error in query: $query. . mysql_error()); while (list($pet_name, $pet_Desc, $pet_picture) = mysql_fetch_row($result)) { if ($pet_picture == ) { echo No Animals have been posted for $date at this moment. Please check back soon.; exit; } else { echo FONT FACE=\Arial, Helvetica\BPet of the month/B/FONTBR BR IMG SRC=\http://moss.bayou.com:/oppj/admin/animalcontrol/photos/$pet_pictur e\ HEIGHT=150BR BR FONT FACE=\Arial, Helvetica\ SIZE=\-1\$pet_DescBR BR To adopt $pet_name please visit the Ouachita Parish Animal Shelter.BR The adoption fee is \$50.00 which includes Spade, Neutering and 7-N-1 Shot.BR BR Sorry, we can not hold $pet_name for you (First come first serve basis)./FONT BRBR; } } ? /CODE= Thanks, Confus3d -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Error while calling a function
I don't know all the details about how PHP compiles a program, but having your function definitions in an if-else statement that may not be executed looks suspicious to me. You've got if(!$Phone) { do something } else { function is_phone() { ...blah, blah...} } is_phone($Phone); If you don't hit the else block, your is_phone function is probably not defined. -Steve On Tuesday, December 18, 2001, at 07:26 AM, J.F.Kishor wrote: hi all, I have got a problem, when I execute the following script it gives a Fatal error, could any one tell me why is it ?, If this is a silly problem please execuse me but, plz do reply me. The script is - html body ? if(!$Phone) { ? form action=?echo $PHP_SELF? method=post br Telephone Number : input type=text name=Phone value= br input type=submit script language=php } else { function is_allnumbers ($text) { if( (gettype($text)) == integer) { print the value is an integer; return true; } $Bad = $this-strip_numbers($text); if(empty($Bad)) { print the value is empty; return true; } return false; } function clear_error () { $this-ERROR = this is an error; } function is_phone ($Phone =) { if($this-CLEAR) { $this-clear_error(); } if(empty($Phone)) { $this-ERROR = is_phone: No Phone number submitted; return false; } $Num = $Phone; $Num = $this-strip_space($Num); $Num = eregi_replace((\(|\)|\-|\+),,$Num); if(!$this-is_allnumbers($Num)) { $this-ERROR = is_phone: bad data in phone number; return false; } if ( (strlen($Num)) 7) { print the number is less then 7; $this-ERROR = is_phone: number is too short [$Num][$Phone]; return false; } if( (strlen($Num)) 13) { print the number is then 13; $this-ERROR = is_phone: number is too long [$Num][$Phone]; return false; } return true; } } $result = is_phone($Phone); if($result == true) { echo success; } else { echo failure; } /script /body /html The error is Fatal error: Call to undefined function: is_phone() in /home/kuruvi1/kishor/public_html/IMS/ADMIN/test/is_phone.php on line 87 Thanks for your tolerance, - JFK kishor -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Error while calling a function
Try putting a closing ? php tag just before the final HTML. Jim - Original Message - From: J.F.Kishor [EMAIL PROTECTED] To: PHP Mailing List [EMAIL PROTECTED] Sent: Tuesday, December 18, 2001 5:26 AM Subject: [PHP] Error while calling a function hi all, I have got a problem, when I execute the following script it gives a Fatal error, could any one tell me why is it ?, If this is a silly problem please execuse me but, plz do reply me. The script is - html body ? if(!$Phone) { ? form action=?echo $PHP_SELF? method=post br Telephone Number : input type=text name=Phone value= br input type=submit script language=php } else { function is_allnumbers ($text) { if( (gettype($text)) == integer) { print the value is an integer; return true; } $Bad = $this-strip_numbers($text); if(empty($Bad)) { print the value is empty; return true; } return false; } function clear_error () { $this-ERROR = this is an error; } function is_phone ($Phone =) { if($this-CLEAR) { $this-clear_error(); } if(empty($Phone)) { $this-ERROR = is_phone: No Phone number submitted; return false; } $Num = $Phone; $Num = $this-strip_space($Num); $Num = eregi_replace((\(|\)|\-|\+),,$Num); if(!$this-is_allnumbers($Num)) { $this-ERROR = is_phone: bad data in phone number; return false; } if ( (strlen($Num)) 7) { print the number is less then 7; $this-ERROR = is_phone: number is too short [$Num][$Phone]; return false; } if( (strlen($Num)) 13) { print the number is then 13; $this-ERROR = is_phone: number is too long [$Num][$Phone]; return false; } return true; } } $result = is_phone($Phone); if($result == true) { echo success; } else { echo failure; } /script /body /html The error is Fatal error: Call to undefined function: is_phone() in /home/kuruvi1/kishor/public_html/IMS/ADMIN/test/is_phone.php on line 87 Thanks for your tolerance, - JFK kishor -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Working with designers...
Hi There, I'm looking for some community feedback on being a coder working with designers. Techniques that work that allow my php-inept page/graphic designer comrade make changes to the layout of the page without destroying my code, or requiring me to make any changes whatsoever. Or what is the best process? Code the dynamicity (heh -- sad thing is you know what i mean by it) of the site, then integrate a designers HTML into your code, *or* the other way around.. have the designer create the site using all static html files, then go in and remove sample data to be replaced with dynamic data (pulled from a DB, for example). I'm about to enter a very large project working with about 3 or 4 designers and 2 other coders and any suggestions on making this relationship work is greatly appreciated. Mike -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: sql password
yeah if you just installed, root doesn't have a password.. so you need to not specify -p (this tells the server to try and authenticate with an empty password, as opposed to attempting to authenticate with no password.. there is a difference): mysqladmin -u root password mypassword Mike Jeremiah Jester wrote: Im attempting to install mysql. The service started and everything seems to be going ok except for that I can't set the root password for the mysql server. To reset password i type: /usr/bin/mysqladmin -u root -p mypassword Then I get the following error: /usr/bin/mysqladmin: connect to server at 'localhost' failed error: 'Access denied for user: 'root@localhost' (Using password: YES)' Can anyone help? Thanks, JJ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Working with designers...
I try to seperate the php code from the html as much as possible. So, if a page is dynamic, have php figure out the dynamic parts first, put them into variables such as $html, or $pull_down_menu, or whatever. Then all that needs to replaced in the html is that section. HTML coders aren't dumb, so they can be trusted with a simple ?= $html ? placement. Additionally, I try to seperate php logic from php presentation as much as possible. This means creating as many variables as possible that affect how things look and then including a conf.php file that the coders can also change pretty easily with good documentation. Moving even further in this direction, my logic code calls many presentation functions which I find HTML coders can also decipher rather well. You can put these in another include file so your designers don't ever have to touch any of your precious logic. Then ... if you have time ... you can make an admin screen to change, edit, and preview the finished product. Jim Hi There, I'm looking for some community feedback on being a coder working with designers. Techniques that work that allow my php-inept page/graphic designer comrade make changes to the layout of the page without destroying my code, or requiring me to make any changes whatsoever. Or what is the best process? Code the dynamicity (heh -- sad thing is you know what i mean by it) of the site, then integrate a designers HTML into your code, *or* the other way around.. have the designer create the site using all static html files, then go in and remove sample data to be replaced with dynamic data (pulled from a DB, for example). I'm about to enter a very large project working with about 3 or 4 designers and 2 other coders and any suggestions on making this relationship work is greatly appreciated. Mike -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- Jim Musil - Multimedia Programmer Nettmedia - 212-629-0004 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Working with designers...
They sound like good ideas, with one quisp.. the sites are currently being designed in *shudder* Dreamweaver. They absolutely refuse to chop files up into header/footer includes, and they want to be able to do all their colour customisation through their beloved .css files. Mike Jimtronic wrote: I try to seperate the php code from the html as much as possible. So, if a page is dynamic, have php figure out the dynamic parts first, put them into variables such as $html, or $pull_down_menu, or whatever. Then all that needs to replaced in the html is that section. HTML coders aren't dumb, so they can be trusted with a simple ?= $html ? placement. Additionally, I try to seperate php logic from php presentation as much as possible. This means creating as many variables as possible that affect how things look and then including a conf.php file that the coders can also change pretty easily with good documentation. Moving even further in this direction, my logic code calls many presentation functions which I find HTML coders can also decipher rather well. You can put these in another include file so your designers don't ever have to touch any of your precious logic. Then ... if you have time ... you can make an admin screen to change, edit, and preview the finished product. Jim Hi There, I'm looking for some community feedback on being a coder working with designers. Techniques that work that allow my php-inept page/graphic designer comrade make changes to the layout of the page without destroying my code, or requiring me to make any changes whatsoever. Or what is the best process? Code the dynamicity (heh -- sad thing is you know what i mean by it) of the site, then integrate a designers HTML into your code, *or* the other way around.. have the designer create the site using all static html files, then go in and remove sample data to be replaced with dynamic data (pulled from a DB, for example). I'm about to enter a very large project working with about 3 or 4 designers and 2 other coders and any suggestions on making this relationship work is greatly appreciated. Mike -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: while...if statements???
because the while() statement works like this - do something while x is true. if x is not true dont do anything. - do something while conent is in the db. if there is no conent in the db dont do anything. your if() statement is never run if there is no content. $return = mysql_fetch_row($result); if ( isset($return['pet_name']) ) do { echo $return['pet_name'] .br; } while( $return = mysql_fetch_row($result) ); else echo No Pets br; its ugly but it works. I dont like ugly, so I wrote my own db wrappers. http://www.mediawaveonline.com/examples/ foreach( $db-select_array('', 'petinfo', '') as $pos = $val ) echo $val['pet_name'] .br; if ( !isset($val['pet_name']) ) echo No Pets br; I like that more. but whatever. -- Chris Lee [EMAIL PROTECTED] Jay Fitzgerald [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Does anyone know why this isn't working?? What I am trying to do is display photos from a database based on each month. This part works fine when I set it to the current month of December (today) as that is when I uploaded the photos. However, when I manually set the date to a month that has no photos in it, I want it to echo the No Animals string belowThis is only working half-way...meaning that it will display a blank page with nothing on it instead of actually echoing the No Animals string Can anyone please help?? Is there really a way to have a while...if statement CODE= ? $connection = mysql_connect($hostname, $user, $pass) or die (Unable to connect!); $query = SELECT petname, petDesc, petpicture FROM petinfo WHERE petmonth = 'Apr'; $result = mysql_db_query($database, $query, $connection) or die (Error in query: $query. . mysql_error()); while (list($pet_name, $pet_Desc, $pet_picture) = mysql_fetch_row($result)) { if ($pet_picture == ) { echo No Animals have been posted for $date at this moment. Please check back soon.; exit; } else { echo FONT FACE=\Arial, Helvetica\BPet of the month/B/FONTBR BR IMG SRC=\http://moss.bayou.com:/oppj/admin/animalcontrol/photos/$pet_pictur e\ HEIGHT=150BR BR FONT FACE=\Arial, Helvetica\ SIZE=\-1\$pet_DescBR BR To adopt $pet_name please visit the Ouachita Parish Animal Shelter.BR The adoption fee is \$50.00 which includes Spade, Neutering and 7-N-1 Shot.BR BR Sorry, we can not hold $pet_name for you (First come first serve basis)./FONT BRBR; } } ? /CODE= Thanks, Confus3d -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Error while calling a function
Steve is right on the money. Your function definitions are inside a conditional if statement which means that they may or may not be parsed. Your call to the function, on the other hand, is not within that same conditional if statement. That means your functions is getting called unconditionally, but the function has not yet been defined because the condition failed (!Phone) and the code was skipped. Rule of thumb: Don't put your function definitions inside of conditionals. Fred Steve Cayford [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I don't know all the details about how PHP compiles a program, but having your function definitions in an if-else statement that may not be executed looks suspicious to me. You've got if(!$Phone) { do something } else { function is_phone() { ...blah, blah...} } is_phone($Phone); If you don't hit the else block, your is_phone function is probably not defined. -Steve On Tuesday, December 18, 2001, at 07:26 AM, J.F.Kishor wrote: hi all, I have got a problem, when I execute the following script it gives a Fatal error, could any one tell me why is it ?, If this is a silly problem please execuse me but, plz do reply me. The script is - html body ? if(!$Phone) { ? form action=?echo $PHP_SELF? method=post br Telephone Number : input type=text name=Phone value= br input type=submit script language=php } else { function is_allnumbers ($text) { if( (gettype($text)) == integer) { print the value is an integer; return true; } $Bad = $this-strip_numbers($text); if(empty($Bad)) { print the value is empty; return true; } return false; } function clear_error () { $this-ERROR = this is an error; } function is_phone ($Phone =) { if($this-CLEAR) { $this-clear_error(); } if(empty($Phone)) { $this-ERROR = is_phone: No Phone number submitted; return false; } $Num = $Phone; $Num = $this-strip_space($Num); $Num = eregi_replace((\(|\)|\-|\+),,$Num); if(!$this-is_allnumbers($Num)) { $this-ERROR = is_phone: bad data in phone number; return false; } if ( (strlen($Num)) 7) { print the number is less then 7; $this-ERROR = is_phone: number is too short [$Num][$Phone]; return false; } if( (strlen($Num)) 13) { print the number is then 13; $this-ERROR = is_phone: number is too long [$Num][$Phone]; return false; } return true; } } $result = is_phone($Phone); if($result == true) { echo success; } else { echo failure; } /script /body /html The error is Fatal error: Call to undefined function: is_phone() in /home/kuruvi1/kishor/public_html/IMS/ADMIN/test/is_phone.php on line 87 Thanks for your tolerance, - JFK kishor -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] 4.10
Hi, I'm trying to build php 4.10 with Ming support. (the ming I get from cvs that is supposed to work with 4.10) I build ming and follow the instructions in the Readme file. then I move into php and go: ./configure --with-apache=../apache_1.3.22 --with-gd --with-ming=../ming I get the following error: configure: error: Please reinstall libming.so - I cannot find libming.so libming.so is in ../ming so I open configure in emacs and -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Working with designers...
Yikes! You mean they don't use a text editor to for html? Seriously, you do have two choices here and I certainly prefer the one suggested below. You may have to talk to the project manager about the designer's refusal to allow thier precious dreamweaver source files to be chopped up. On the other hand, their insistance on using CSS is ideal. If the project manager does not want the html chopped up then it is not the end of the world. I recently completed a project where the designer insisted on using dreamweaver and leaving the html as single files. I wrote the functions for everything I needed and placed them in include files. I then replaced his sample data with ?= ? statements and all is well. I'd give you the URL to see how seemlessly it works, but it is a porn site and i'd rather not link it on the list. The moral is that you can certainly be successful in approaching the project this way. Personally, I do not like wading through all that html to figure out where to put my precious php code, but then again they were paying the bills that month. Fred Mike Eheler [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... They sound like good ideas, with one quisp.. the sites are currently being designed in *shudder* Dreamweaver. They absolutely refuse to chop files up into header/footer includes, and they want to be able to do all their colour customisation through their beloved .css files. Mike Jimtronic wrote: I try to seperate the php code from the html as much as possible. So, if a page is dynamic, have php figure out the dynamic parts first, put them into variables such as $html, or $pull_down_menu, or whatever. Then all that needs to replaced in the html is that section. HTML coders aren't dumb, so they can be trusted with a simple ?= $html ? placement. Additionally, I try to seperate php logic from php presentation as much as possible. This means creating as many variables as possible that affect how things look and then including a conf.php file that the coders can also change pretty easily with good documentation. Moving even further in this direction, my logic code calls many presentation functions which I find HTML coders can also decipher rather well. You can put these in another include file so your designers don't ever have to touch any of your precious logic. Then ... if you have time ... you can make an admin screen to change, edit, and preview the finished product. Jim Hi There, I'm looking for some community feedback on being a coder working with designers. Techniques that work that allow my php-inept page/graphic designer comrade make changes to the layout of the page without destroying my code, or requiring me to make any changes whatsoever. Or what is the best process? Code the dynamicity (heh -- sad thing is you know what i mean by it) of the site, then integrate a designers HTML into your code, *or* the other way around.. have the designer create the site using all static html files, then go in and remove sample data to be replaced with dynamic data (pulled from a DB, for example). I'm about to enter a very large project working with about 3 or 4 designers and 2 other coders and any suggestions on making this relationship work is greatly appreciated. Mike -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] OPEN_BASEDIR from user point of view (instead server admin)
Hello, I posted a question some days ago, but no answers received. I notice many people discussing OPEN_BASEDIR apache restriction here, but all discussion are from server admin point of view. Let me ask question in another way: Is it possible to tell HTTP FORM command the complete path/name into local server for file being uploaded?. Note upload made by input type=file .. command. The reason for this question is posted into my original question (below) Thanks Miguel = previous msg posted at 10/12/01 = Now a question about uploading files (.gif .jpg) using form method=post to be stored into Mysql blob fields. I hope somebody here having sites on www.blueboxinternet.com hosting company, because I have big trouble there I can't solve, and support says I first shoud read faq because they have lot of customers with no problems. I make industrial and commercial catalogs, so my customers should be able to send (upload) pictures of products and goodies directly from their HD to site, these pictures stored in Mysql tables and shown when customer pages are called by someone. The only way I know to perform this is html Form actionmyscript.php method=POST Enctype=MULTIPART/FORM-DATA Enter filename input type=file name=myfile Input type=submit name=upload value=send /form ?PHP if($upload) { $fp=Fopen ($myfile,r); /* here lot of commands to store file into mysql tables */ ... } ? /html This script will store picture-file into some tmp directory on bluebox servers and will return tmp file name into $myfile var when script called again by 'form action' command. Then I can treat file and store in DB. This script worked fine on bluebox servers until NOVEMBER 1st , when they made some important changes on their servers. When this change happened, my script began to receive this error: Warning: open_basedir restriction in effect. File is in wrong directory in /home/httpd/vhosts/meucatalogo.com/web_users/gratis/rest_prox.php on line 25 Bluebox support says I am recording my files on tmp directory with owner 'someowner' and trying to read file with 'anotherowner' owner. I argue I have no control about owners and file modes into their servers (specially into their tmp directories), and that PHP performs this task in a transparent way for me. Thats to say, I have no tools to bypass this problem. Then they answer I shoud read faq. Case some of you have site using this (otherwise excellent web hosting) company, I would greatly appreciate what solution for upload files thru HTML forms there exists. = -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] 4.10
sorry, jumped the gun on that last one... Hi, I'm trying to build php 4.10 with Ming support. (the ming I get from cvs that is supposed to work with 4.10) I build ming and follow the instructions in the Readme file. then I move into php and go: ./configure --with-apache=../apache_1.3.22 --with-gd --with-ming=../ming I get the following error: configure: error: Please reinstall libming.so - I cannot find libming.so libming.so is in ../ming so I open configure in emacs and see that it's looking for libming.so in ../ming/lib ok, I copy it over there. then I try again and get this error: Configuring libtool checking build system type... i686-pc-linux-gnu checking for ld used by GCC... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for BSD-compatible nm... /usr/bin/nm -B updating cache ./config.cache ./ltconfig: ./ltconfig: No such file or directory configure: error: libtool configure failed now, I had just installed libtool 1.42 because buildconf complained about not having it. It got put into /usr/local/bin/ and buildconf couldn't find it there so I put a link to it in /usr/bin that made buildconf work but gave me this error for configure. any ideas what I should try next? thanks, - Mark -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Working with designers...
well, you don't have to wade through all that html, just put an include() in there to a file that has all the php in it. then dreamweaver should leave it alone. really if they don't want to chop the files up into header/footer that shouldn't bother you, it makes their job harder since they have to make changes to hundreds of files instead of one, but the dynamic stuff will still all be in one file that gets include'd a hundred times. - Mark On Tue, 18 Dec 2001 14:39:14 -0800, Fred wrote: Yikes! You mean they don't use a text editor to for html? Seriously, you do have two choices here and I certainly prefer the one suggested below. You may have to talk to the project manager about the designer's refusal to allow thier precious dreamweaver source files to be chopped up. On the other hand, their insistance on using CSS is ideal. If the project manager does not want the html chopped up then it is not the end of the world. I recently completed a project where the designer insisted on using dreamweaver and leaving the html as single files. I wrote the functions for everything I needed and placed them in include files. I then replaced his sample data with ?= ? statements and all is well. I'd give you the URL to see how seemlessly it works, but it is a porn site and i'd rather not link it on the list. The moral is that you can certainly be successful in approaching the project this way. Personally, I do not like wading through all that html to figure out where to put my precious php code, but then again they were paying the bills that month. Fred Mike Eheler [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... They sound like good ideas, with one quisp.. the sites are currently being designed in *shudder* Dreamweaver. They absolutely refuse to chop files up into header/footer includes, and they want to be able to do all their colour customisation through their beloved .css files. Mike Jimtronic wrote: I try to seperate the php code from the html as much as possible. So, if a page is dynamic, have php figure out the dynamic parts first, put them into variables such as $html, or $pull_down_menu, or whatever. Then all that needs to replaced in the html is that section. HTML coders aren't dumb, so they can be trusted with a simple ?= $html ? placement. Additionally, I try to seperate php logic from php presentation as much as possible. This means creating as many variables as possible that affect how things look and then including a conf.php file that the coders can also change pretty easily with good documentation. Moving even further in this direction, my logic code calls many presentation functions which I find HTML coders can also decipher rather well. You can put these in another include file so your designers don't ever have to touch any of your precious logic. Then ... if you have time ... you can make an admin screen to change, edit, and preview the finished product. Jim Hi There, I'm looking for some community feedback on being a coder working with designers. Techniques that work that allow my php-inept page/graphic designer comrade make changes to the layout of the page without destroying my code, or requiring me to make any changes whatsoever. Or what is the best process? Code the dynamicity (heh -- sad thing is you know what i mean by it) of the site, then integrate a designers HTML into your code, *or* the other way around.. have the designer create the site using all static html files, then go in and remove sample data to be replaced with dynamic data (pulled from a DB, for example). I'm about to enter a very large project working with about 3 or 4 designers and 2 other coders and any suggestions on making this relationship work is greatly appreciated. Mike -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] PHP4 on Windows98 with PWS4
Hello, folks! I installed PHP4 on Windows 98 with PWS4. When I try to run a very simple script, I got a just one line error message One of the library files needed to run this application cannot be found. The script is very simple: ? phpinfo(); ?, so I don't think the error has anything to do with it. Anyone has idea what's wrong with it? Please help me out if you know this issue. Thanks in advance! Alex Shi -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Working with designers...
As a designer and a coder, I have always found that it is easiest to have the layout of the page done before adding the dynamic content. If the layout is done correctly, it should not be necessary to put in sample data that has to be removed after. After joining the workforce, as a database programmer, I now strictly code the backend stuff, and as before, the layouts are done and I simply add the dynamic content. Whatever arrangement you end up with, just make sure the ground rules are in place before you start. It may help to have them written down (I know, coders hate to document), as it will protect you in the future if problems do arise. Good luck, Steve Osborne Database Programmer Chinook Multimedia Inc. [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: postgres session handling
You have bug in your session handler script. In code exchange at zend.com, you can find mine. Search HTTP section. BTW, I'll add pgsql session handler module. Anyone could use PosrgreSQL for session storage w/o writing script from 4.2.0. It's written in C and more efficient ;) James Gregory wrote: I have need to get php to use postgres to store session information. I've changed the directive in php.ini and written a set of functions that should do the job and I've made the call to set the session handler. The following simple test case works: ? require_once ('database.php'); require_once ('sess_handler.php'); //session_start (); session_register ('asdf'); $asdf = 123; print $asdf; ? the idea being that the line where $asdf is assigned is commented out in the second execution of it and the value is still there upon reloading. That works fine. But, when I try to use it with the code for which it was originally intended I get this error: *Fatal error*: Failed to initialize session module in */usr/local/apache/vhosts/600xl/httpdocs/fe_login.php* on line *44* Keep in mind that this is all code which worked perfectly with the bulit in session handler before. Any ideas? Thanks, James. -- Yasuo Ohgaki -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: postgres session handling
For reference, I attached README for pgsql session save handler. It's NOT in 4.2.0-dev, yet. James Gregory wrote: I have need to get php to use postgres to store session information. I've changed the directive in php.ini and written a set of functions that should do the job and I've made the call to set the session handler. The following simple test case works: ? require_once ('database.php'); require_once ('sess_handler.php'); //session_start (); session_register ('asdf'); $asdf = 123; print $asdf; ? the idea being that the line where $asdf is assigned is commented out in the second execution of it and the value is still there upon reloading. That works fine. But, when I try to use it with the code for which it was originally intended I get this error: *Fatal error*: Failed to initialize session module in */usr/local/apache/vhosts/600xl/httpdocs/fe_login.php* on line *44* Keep in mind that this is all code which worked perfectly with the bulit in session handler before. Any ideas? Thanks, James. -- Yasuo Ohgaki README.MOD_PGSQL mod_pgsql is a session save handler module. It provides session strage with PostgreSQL database. This module is written by [EMAIL PROTECTED] Please report problems to http://bugs.php.net/ or [EMAIL PROTECTED] Session Table Definition CREATE TABLE php_sessoin ( sess_idchar(32) PRIMARY KEY CHECK strlen(sess_id) = 32, sess_name char(32) NOT NULL, sess_created integer, -- UNIX time sess_modified integer, -- UNIX time sess_data text,-- Max 1GB for 7.1, about 8KB for 7.0 or lower. sess_reserved1 integer, sess_reserved2 integer, sess_reserved3 integer, sess_reserved4 integer ); User may *append* additional fields, sess_reserved* fields are place holder for additional feture. Since mod_pgsql accesses field using field index, user must use this field order. How to use To compile PHP with mod_pgsql, you need --with-session-pgsql[=DIR] when you configure PHP. [=DIR] is installation path for PostgreSQL. You don't have to compile PHP with PostgreSQL module, but your system must have libpq and headers installed. Following php.ini directives has special meanings for mod_pgsql session.save_handler : pgsql for mod_pgsql session. session.save_path: Valid PostgreSQL database connection string. How it works It uses libpq which is written in C. It also uses aync query for garbage collection. Therefore, user will not experience deley even if barbage collection is performed. This module is much more efficient than user handlers written in PHP. How to customize Since mod_pgsql uses PostgreSQL database. User can add more fields to session database and create session access functions as user want. Keep in mind that user is not supposed to order of standard fields. User fields are must be defined after mod_pgsql fields. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Crashing in Win2K with IIS and latest PHP installed when loading an open page...
Help!!! If I'm editing a php file have it open (or have recently done so) in notepad sometimes when i do reload or open the file in IE6 my computer pauses for a second, then shuts itself off with a resounding click of the hard disks and promptly restarts. I don't think it's a disk problem - it ONLY happens when I'm loading a php file via http://localhost I'm confused... help!! Thanks Martin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] JavaScript php question - mainly JS though so slightly OT but hep needed!!! :o)
How could I write the function windowPopup(XX) where XX is a variable that can change from link to link, for a popup info window to load a php file with the variable XX in the url? So the link would look like: a href=javascript:windowPopup(XX);Link Text/a and I want that link to open the page info.php?patch=XX in a new popup window Do I do it something like this, or is there a faster/better way?? Cheers Merry X-Mas! Martin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]