Re: [PHP] Issue with STRFTIME and Daylight Savings
Hi Rob: Thanks for the feedback. Just to throw one in from "left field", the script is written in AWK, not PHP (told you I was a novice!) Have confirmed that 'systime' refers to hardware clock, so I have a quick and dirty work-around by adding '3600' (seconds) to STRFTIME, but will look into a cleaner solution. Thanks & Regards, Malcolm. Malcolm Green Voice Consultant, Managed Network Services CSC Australia Pty Limited M: 0401-002-569 T: (02) 9034-3114 E: [EMAIL PROTECTED] "Vision without action is a dream; action without vision is a nightmare." - Chinese Proverb This is a PRIVATE message. If you are not the intended recipient, please delete without copying and kindly advise us by e-mail of the mistake in delivery. NOTE: Regardless of content, this e-mail shall not operate to bind CSC to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose. Robert Cummings <[EMAIL PROTECTED] .com> To Malcolm Green <[EMAIL PROTECTED]> 03/12/2007 04:53 cc PMphp-general@lists.php.net Subject Re: [PHP] Issue with STRFTIME and Daylight Savings On Mon, 2007-12-03 at 15:14 +1000, Malcolm Green wrote: > Hi Support: > > I've moved into a new role and inherited a system which uses the 'STRFTIME' > function to create a filename in the form 'strftime("%Y%m%d")'; the > filename is supposed to be "today's date". (Note I've left out the file > extension for clarity.) > > I've noticed that system creates the wrong filename when the process runs > between midnight and 12:59am, during Daylight Savings time. That is, it > creates a filename equal to "yesterday's date". When run at 1:00am or > later, everything OK. > > I've checked the Date/Time and 'Locale' settings in Windows, and everything > is ok. My initial thought was that STRFTIME was looking a the system clock > rather than Windows (?). > > Can you help? > > (PS ... please be gentle, I'm a novice at PHP!) Check your timezone settings in php.ini Cheers, Rob. -- ... SwarmBuy.com - http://www.swarmbuy.com Leveraging the buying power of the masses! ... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Issue with STRFTIME and Daylight Savings
Hi Support: I've moved into a new role and inherited a system which uses the 'STRFTIME' function to create a filename in the form 'strftime("%Y%m%d")'; the filename is supposed to be "today's date". (Note I've left out the file extension for clarity.) I've noticed that system creates the wrong filename when the process runs between midnight and 12:59am, during Daylight Savings time. That is, it creates a filename equal to "yesterday's date". When run at 1:00am or later, everything OK. I've checked the Date/Time and 'Locale' settings in Windows, and everything is ok. My initial thought was that STRFTIME was looking a the system clock rather than Windows (?). Can you help? (PS ... please be gentle, I'm a novice at PHP!) Thanks & Regards, Malcolm. Malcolm Green Voice Consultant, Managed Network Services CSC Australia Pty Limited M: 0401-002-569 T: (02) 9034-3114 E: [EMAIL PROTECTED] "Vision without action is a dream; action without vision is a nightmare." - Chinese Proverb This is a PRIVATE message. If you are not the intended recipient, please delete without copying and kindly advise us by e-mail of the mistake in delivery. NOTE: Regardless of content, this e-mail shall not operate to bind CSC to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP/PEAR
Hello there, As a new user of PHP I am finding it extremely useful, very fast, and rewarding. I was also delighted to find the already proven and maintained extensions in PEAR. I have recently downloaded one of these extensions (HTML_Table) which is proving to be a great time saver, but can you tell me, please, why every time I access one of the associated pages or scripts my computer tries to dial out. Yes, I am still on Dial-Up. Is this some vital function that is required by your extension, or is there some information you need which has not already been given? If it is neither of these, how do I stop it because I find it infuriating. Hoping you can help me, Malcolm Pickering. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] call func from button
Is there a way to call a php function from a button press to display the results further down on the same page? I want to avoid setting up an 'output-area' in a frame or having to put my function in a separate script. Thanks, Malcolm. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] POP access to gmail
Does anyone know of a PHP script to access gmail's POP services? Thanks, Malcolm. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] beginner volunteer
Hi, I've been reading up on php for a while now and would like to get involved in a small open source LAMP project. I don't have any real coding experience to speak of but could bring proofreading, bug-reporting, testing and documentation skills to the project. What I'd like to get out of working on it is: experience working with a variety of other individuals over the internet on a common application; real life knowledge of CVS and the development process; some experience writing simple code. If anyone knows of any opportunities like this or would like to discuss what I could add to one of their own projects please contact me. Regards, Malcolm. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: array search
Ah so -- array_search only works on values ? That probably accounts for my first day or so, thanks. I've got it now. On Sun, 23 Jan 2005 19:22:32 +0100, M. Sokolewicz <[EMAIL PROTECTED]> wrote: Malcolm wrote: Hello All, I've been trying for days now to make this work. I'm trying to search my array for a value and return the key. I get the visitor's IP and try this -- this is the latest, I've tried a few functions to echo the name associated with the viz_ip. $viz_ip= $_SERVER['REMOTE_ADDR']; $byte_ip= array( "204.126.202.56"=>"Mark", "63.230.76.166"=>"Bob", "63.220.76.165"=>"John", ); function _array_search ($viz_ip, $byte_ip) { foreach($byte_ip as $key => $val) { if ($viz_ip === $key) { return($val); } } return(False); } I'm no wiz but this shouldn't be this hard, maybe I'm thinking wrong. I've read the examples at php.net but I just can't get it. Some help or even a hint ? best regards, malcolm I might be the only one to notice here, but you don't want to find the KEY, you want to find the VALUE. Otherwise, you'll need to assemble your array differently. $viz_ip= $_SERVER['REMOTE_ADDR']; $byte_ip= array( "204.126.202.56"=>"Mark", "63.230.76.166"=>"Bob", "63.220.76.165"=>"John" ); That means: $byte_ip[$viz_ip] = some_name; That's because you have ips set as your *keys*, and not your values. To do what you wanted, simply either: a) reverse the array, making keys values and values keys: $byte_ip= array( "Mark"=>"204.126.202.56", "Bob"=>"63.230.76.166", "John"=>"63.220.76.165" ); or: b) change the function to match on key (for which you don't *need* a function). - Tul -- O -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] array search
Thank you Sirs, I was echoing the viz-ip so I know it was getting set but I couldn't get it. both work .. I got the clue from John, the last echo line did the trick. On Sun, 23 Jan 2005 17:26:58 +0100, Jochem Maas <[EMAIL PROTECTED]> wrote: Malcolm wrote: Hello All, I've been trying for days now to make this work. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] array search
Hello All, I've been trying for days now to make this work. I'm trying to search my array for a value and return the key. I get the visitor's IP and try this -- this is the latest, I've tried a few functions to echo the name associated with the viz_ip. $viz_ip= $_SERVER['REMOTE_ADDR']; $byte_ip= array( "204.126.202.56"=>"Mark", "63.230.76.166"=>"Bob", "63.220.76.165"=>"John", ); function _array_search ($viz_ip, $byte_ip) { foreach($byte_ip as $key => $val) { if ($viz_ip === $key) { return($val); } } return(False); } I'm no wiz but this shouldn't be this hard, maybe I'm thinking wrong. I've read the examples at php.net but I just can't get it. Some help or even a hint ? best regards, malcolm -- O -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] web IDE
Hi list, Sorry to repeat, but I thought I'd try give a clear idea of what I wanted to do with my last question entitled 'php ide scripts' to see if anyone else has done this and can direct me to or send me some 'beginners' files I can use. What I want to do is create a program I can run on my local web server that will allow me to write scripts faster. Unlike most computer programmers I do not have a very good memory and so if I want to write a table (or a form or something) in html I have to always look at my textbook and copy out the tags. The same for php. If I want to write a function, or a do-while structure I have to go back to the book and copy out the correct syntax. This is very frustrating for me and slows my learning process down. What I have in mind is this: Create a web page that allows me to create files with basic formating tags in them (i.e for html .: for shell #!/usr/bin/php: for php ). I will use a text field and button on my web-page to create a new version of whatever template I want, then open the file in a text area for editing. (Can I do this by simply turning the file into one long string and putting it in the text box? I think there's a javascript function for setting the contents of a textbox (and I've used VB's one) but can I do this with php?) On the same page (or through links to other pages) I will have buttons that will allow me to insert the 'skeleton' text of a variable declaration, or a function prototype, or a control structure into my already open template file in the text area, then using text boxes set the actual(static) values I want to use. When I'm finished, I should have the file in a text area on my web page with my completed script which I can then save and close. If I can get this basic system working, all that remains for me to do is write the string functions for appending/editing my template files as I learn more and more about the language (exploring function libraries and writing my own) and develop more complex applications. One problem I'm having at the moment is how to create a file from an html form. I have a php script that uses fopen() to create a new file. This works fine when I call it from bash but I don't know how to do it using a button on an html form. Any ideas? Thanks, Malcolm. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] php ide type scripts
Hi, Newbie learning php here. Does anyone (have|know where I can get) a set of html and php files to automate script and form writing? What I want is an html file with forms, drop down boxes, check boxes etc, that will allow me to quickly|automatically construct php and html code to run on my server. For instance, a template generator: to create a new file with the script directive for scripts I want to run from the shell and output plain text. to create a new file with html tags for server-scripts which will output html formatting to create scraps of code for function declarations, or control flow structures, using text boxes on an html form to name variables and set values, outputting the fully constructed scraps into another text area from which I can cut and paste into a main script. I don't want anything too complicated such as a fully blown graphical IDE that will take me a long time to learn. Cheers, Malcolm. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] baffled - please explain
Hi, I just came across a sniplet of code in a book I'm reading and I'm not sure what point the author is trying to make. The code is: function my_function ( ) { echo 'My function was called'; } My function was called What are those single opening and closing curly braces doing in separate tag blocks? What's the point? The author says "Withing a function, curly braces enclose the code that performs the task you require. Between these braces, you can have anything that is legal elsewheere in a PHP script" - PHP and MySQL Web Development, 3rd Edition: Welling & Thomson. If the point is to illustrate what this quote says, does that mean... { ?> My function was called http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Comparison between Postnuke and PHPnuke
On Wed, 17 Dec 2003 23:15:19 +0800, Yc Nyon <[EMAIL PROTECTED]> wrote: I am comparing between this two php-based CMS? My focus is really 1. the availability of modules/add-ons. Not too sure, but seems PHPnuke has more add-ons than Postnuke. 2. ease of maintaining a group of contributors/writers Nyon try this http://www.phpdbform.com/ hth -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Add Reply-To to this list(s)
On Tue, 14 May 2002 22:23:24 +0900, - Edwin - <[EMAIL PROTECTED]> wrote: Hi, On Tue, 25 Nov 2003 19:10:12 -0500 "John W. Holmes" <[EMAIL PROTECTED]> wrote: Adam i Agnieszka Gasiorowski FNORD wrote: > Thomas Svenson wrote: >>>If you would stop using M$ Outlook and switch to a >better mail client>>that supports mailing lists, your >problem would be solved.> >>I wouldn't mind that at all. What clients do you >recommend for WindwosXP? I>want a small client (note: I >have to use Outlook for business purposes, but>have the >lists on a separate account). > >Try the Opera's 7 M2 (build-in revolutionary > email and news client). Is this an advertisement or does it actually have the features everyone is looking for? I'm using the browser but not the email and news client so I'm not sure but I just came across this: (Pls. check under subheading "Mailing lists".) http://www.opera.com/support/tutorials/opera/m2/folders/?test=pop And, umm... PHP in Opera looks great. ;) :) - E - __ Do You Yahoo!? Yahoo! BB is Broadband by Yahoo! http://bb.yahoo.co.jp/ Opera 7.23 on windows and reading this as a newsgroup, the reply goes to the group, as I would expect. -- Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] explode () question
Thanks to everyone who replied. I have taken the short route and changed the source data. I should have thought of that first I suppose. Now I have a few existing records to edit but from now on I'll be automagic. On Mon, 10 Nov 2003 19:00:52 +0100, Wouter Van Vliet <[EMAIL PROTECTED]> wrote: (after more and more discussion, this will be my first "non-top" post) >$rint1= rtrim($rintydata); > echo $rint1; > $rint2= explode(":", $rint1); > > The data starts like this (from and email, there are many) ; > > Time: November 9th 2003, 10:37AM - PST IP Address: xx.xx.xxx.xxx > Browser Type: Opera/7.20 (Windows NT 5.1; U) [en] > Referer: > > The problem is that when I do this ; > > >while( $res=each($rint2) ) >{ > echo "$res[1]"; >}; > >the colon in Time messes things up. > > here is the result ; > >Time >November 8th 2003, 07 >15PM - PST IP Address >xx.xx.xx.xxx Browser Type >Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) Referer > >when what I really want is ; > >Time - November 8th 2003, 07:15PM - PST IP - Address xx.xx.xx.xxx >Browser Type - Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) >Referer - I'd try something like: 1 '; 3 preg_match('/^\s*([^:]*)\s*:\s*(.*)$/', $String, $Matches); 4 5 print_r($Matches); 6 7 ?> ==> OUTPUT: Array ( [0] => From: Wouter van Vliet <[EMAIL PROTECTED]> [1] => From [2] => Wouter van Vliet <[EMAIL PROTECTED]> ) From here you'd be able to manipulate the things you want in any format you'd want it to have. Or use preg_match_all() if you have all mail headers in one variable. -- Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] explode () question
Hello All, I'm having trouble with this; $rint1= rtrim($rintydata); echo $rint1; $rint2= explode(":", $rint1); The data starts like this (from and email, there are many) ; Time: November 9th 2003, 10:37AM - PST IP Address: xx.xx.xxx.xxx Browser Type: Opera/7.20 (Windows NT 5.1; U) [en] Referer: The problem is that when I do this ; while( $res=each($rint2) ) { echo "$res[1]"; }; the colon in Time messes things up. here is the result ; Time November 8th 2003, 07 15PM - PST IP Address xx.xx.xx.xxx Browser Type Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) Referer when what I really want is ; Time - November 8th 2003, 07:15PM - PST IP - Address xx.xx.xx.xxx Browser Type - Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) Referer - I can't figure out how to do an ereg that will replace just the colon in Time nor can I find a way to make explode ignore it. This may even be a completely wrong approach, any help would be appreciated. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] copy *.* troubles
On Mon, 17 Feb 2003 01:59:43 +0800, Jason Wong <[EMAIL PROTECTED]> wrote: On Sunday 16 February 2003 23:48, Malcolm wrote: I'm having trouble with copy. I have this script that I got from php.net but I can't figure out how to set the path. Right now it doesn't complain but no files are copied. I'm trying to use a dynamically set directory to do this, I have included ml_config to make the vars available. That's why the $listname in the to_path. I want all the files from /maillist to got to /$listname, I've tried all kinds of slashes, dots and anything else but I can't seem to copy any files. Are you using full paths? Does the directory 'maillist' reside in the root directory? If not, try using full paths. Thanks Jason, but I think I've done that. I'm on windows. I've tried c:\foxy\www\maillist\ c:\\foxy\\www\\maillist\\ .//mailist /maillist ../maillist anything I could think of and tried to go to c:\foxy\www\maillist\$listname (or newlist - the current valuse of $listname) c:\\foxy\\www\\maillist\\$listname (or newlist - the current valuse of $listname) .//mailist/$listname (or newlist - the current valuse of $listname) /maillist/$listname (or newlist - the current valuse of $listname) ../maillist/$listname (or newlist - the current valuse of $listname) none of these and probaly many others, I lost track, work. It echos files copied at the end but it lies. I doubt whether PHP is clever enough to lie. It's only doing what you told it to do. I'm thinking it's smarter than I am. -- Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] copy *.* troubles
Hello List, I'm having trouble with copy. I have this script that I got from php.net but I can't figure out how to set the path. Right now it doesn't complain but no files are copied. I'm trying to use a dynamically set directory to do this, I have included ml_config to make the vars available. That's why the $listname in the to_path. I want all the files from /maillist to got to /$listname, I've tried all kinds of slashes, dots and anything else but I can't seem to copy any files. It echos files copied at the end but it lies. Here's the script ; include "ml_config.php"; $from_path ="/aamaillist/maillist05"; $to_path = "/aamaillist/$listname"; function rec_copy ($from_path, $to_path) { if(!is_dir($to_path)) { mkdir($to_path, 0777); } if ($handle = opendir($from_path)) { while (false !== ($file = readdir($handle))) { if ($file != "." && $file != "..") { if (is_file($from_path."/".$file)) { copy($from_path."/".$file,$to_path."/".$file); } elseif ( is_dir($from_path."/".$file) ) { rec_copy($from_path."/".$file,$to_path."/".$file); } } } } } echo "files copied from $from_path"; echo " files copied to $to_path"; echo "$PHP_SELF"; ?> Anyone see obvious errors or offer another way ? malcolm -- -- Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Headers bust ?
Hello, I just got two emails explaining my error. Thanks to all. I wasn't thinking right and sort of had my cart before my horse. The fix is simple, put the header call before anything else. I was thinking I had to get the input first -- wrong. All I needed was to put this line first, at the very top of the script. if ($dog == 'mal') header ('Location: ../aamaillist/ml_menu.php'); thanks for all help malcolm On Sat, 15 Feb 2003 09:01:30 -0500, Malcolm <[EMAIL PROTECTED]> wrote: Hello, I've been fooling with this for a few days now. I'm getting a hearders already sent error. I know it means I've got output before the header but I can't figure how else to do this. The error messages; (output started at c:\foxy\www\project_db\switchtest.php:2) in c:\foxy\www\project_db\switchtest.php on line 11 The script; echo " This script uses a predefined list of names to switch"; echo" Input mal, jim or joe Your Name: "; switch ($dog) { case mal: header("location =../aamaillist/ml_menu.php"); break; case jim: echo ""; print " If you were jim you could have a private page here."; echo ""; break; case joe: echo ""; print "Hello Joe"; echo ""; break; default: print "You must be a stranger."; } ?> How can I redirect without output before the header ? -- Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Headers bust ?
Hello, I've been fooling with this for a few days now. I'm getting a hearders already sent error. I know it means I've got output before the header but I can't figure how else to do this. The error messages; (output started at c:\foxy\www\project_db\switchtest.php:2) in c:\foxy\www\project_db\switchtest.php on line 11 The script; echo " This script uses a predefined list of names to switch"; echo" Input mal, jim or joe Your Name: "; switch ($dog) { case mal: header("location =../aamaillist/ml_menu.php"); break; case jim: echo ""; print " If you were jim you could have a private page here."; echo ""; break; case joe: echo ""; print "Hello Joe"; echo ""; break; default: print "You must be a stranger."; } ?> How can I redirect without output before the header ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] CRLF in file
Thank you Jason, If you'll bear with me for one more question -- The /\ fix did what I wanted but now the word Array appears before the first var -- the text file looks like this - Array$hostname = hostname $SQL_USER = username $SQL_PWD = dbpass I know this is php telling me the data is an array but can I supress this somehow so all I'll print is the keys and vals? thanks malcolm On Mon, 27 Jan 2003 00:35:01 +0800, [EMAIL PROTECTED] (Jason Wong) wrote: > On Sunday 26 January 2003 22:13, Malcolm Brownell wrote: > > Hello, > > > > I'm having trouble with /r/n when I try to write to a file. > > It's "\r\n" that you want. > > -- > Jason Wong -> Gremlins Associates -> www.gremlins.biz > Open Source Software Systems Integrators > * Web Design & Hosting * Internet & Intranet Applications Development * > > /* > If wishes were horses, then beggars would be thieves. > */ > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] CRLF in file
awww geeze ! Thank you sir. Again I embarass myself and slink away On Mon, 27 Jan 2003 00:35:01 +0800, [EMAIL PROTECTED] (Jason Wong) wrote: > On Sunday 26 January 2003 22:13, Malcolm Brownell wrote: > > Hello, > > > > I'm having trouble with /r/n when I try to write to a file. > > It's "\r\n" that you want. > > -- > Jason Wong -> Gremlins Associates -> www.gremlins.biz > Open Source Software Systems Integrators > * Web Design & Hosting * Internet & Intranet Applications Development * > > /* > If wishes were horses, then beggars would be thieves. > */ > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] CRLF in file
Hello, I'm having trouble with /r/n when I try to write to a file. Here's my code ; The array I want to write - $ch =array( "$SQL_HOST"=> $SQL_HOST, "SQL_USER"=> $SQL_USER, "SQL_PWD"=>$SQL_PWD); and the code I'm using to write the file $fp = fopen ("newfig.txt", "w"); if (!($fp)) { print ("ERROR file not open!"); exit; } { fputs($fp,$ch); foreach($ch as $key => $val) { fputs($fp,"$$key = $val/r/n"); } fclose ($fp); }; Here's a sample of the file this produces - $host = host/r/n$SQL_USER = user/r/n$SQL_PWD = dbpass/r/n What I want is to have crlf after each var like this - $host = host $SQL_USER = user $SQL_PWD = dbpass I must be doing /r/n wrong. My host is Apache on Sun OS. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Version Upgrade on Apache/win
Hello all, I'm having trouble with upgrading my php 4.1.1 to 4.3. I have Apache 1.3.2 /php 4.1.1/Mysql 3.23.39 on winME. It has been running fine but I can't make php 4.3 work. I have installed 4.3 to a directory next to my current php. I put 4.3 in /php43 and have php 4.1.1 in /php in the same directory. When I switch the directory in httpd.conf to php43 and restart Apache it says it can't LoadModule php4_module /php43/sapi/php4apache.dll but if I switch back to /php it starts right up. All of the files in php exist in php43. The names are all the same anyway. The two installations of php appear almost identical but Apache doesn't like the new one. What am I missing ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: PHP Configuration - Can't Change Post_Max_Size
I've got 4.1.1 and it's upload_max_filesizemine is default 2 M maybe you have a different version. hth m On Thu, 5 Dec 2002 10:32:44 -0800, [EMAIL PROTECTED] (Roger Lewis) wrote: > This is further to my post yesterday on Max File Size. > > I was able to set upload_max_filesize to 790 and I can therefore upload > files up to that size. I would now like to increase that limit, but I am > limited by post_max_size which defaults to 8M. I can't seem to change the > value of post_max_size. > > The post_max_size directive is not in my php.ini; however, I tried inserting > it into php.ini and setting it to 1600 and to 16M. I inserted it just > before the directive, gpc_order = "GPC". The change is ignored by > phpinfo(), that is, phpinfo() still shows post_max_size = 8M. > > Furthermore, I tried resetting it using ini_set("post_max_size", "16M"), and > ini_set("post_max_size", "1600"), but neither of these had any effect. > > Any suggestion for how I might reset post_max_size. I'm using PHP 4.0.6. > > Thanks in advance. > > Roger > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Send PHP results in email
Thanks Jason, I saw this a while ago and it solved the problem perfectly. On Thu, 5 Dec 2002 06:11:40 +0800, [EMAIL PROTECTED] (Jason Wong) wrote: > On Thursday 05 December 2002 05:58, Malcolm Brownell wrote: > > Hi, > > > > I have some database fields I want to select and email. > > > > I have lines like -- > > > > $result = mysql_query("SELECT * FROM adopt_main order by idform desc limit > > 1"); while( $row = mysql_fetch_array ($result)) > > echo "".$row["first"].","; > > > > > > There are quite a few of these paragraphs in the page -- 15 fields. The > > page does just what I want. It echos the value, with commas and quotes, > > all ready to be inserted, but, I can'tseem to figure out how to mail it. I > > know I need to make all of this a variable to pass to my mail script, but > > how ? My mail script work fine if I define $body and send that but I can't > > seem to do that with this code. > > In your while loop, instead of (or as well as) using echo, assign your values > to $body > > -- > Jason Wong -> Gremlins Associates -> www.gremlins.biz > Open Source Software Systems Integrators > * Web Design & Hosting * Internet & Intranet Applications Development * > > /* > If something has not yet gone wrong then it would ultimately have been > beneficial for it to go wrong. > */ > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Send PHP results in email
Hi, I have some database fields I want to select and email. I have lines like -- $result = mysql_query("SELECT * FROM adopt_main order by idform desc limit 1"); while( $row = mysql_fetch_array ($result)) echo "".$row["first"].","; There are quite a few of these paragraphs in the page -- 15 fields. The page does just what I want. It echos the value, with commas and quotes, all ready to be inserted, but, I can'tseem to figure out how to mail it. I know I need to make all of this a variable to pass to my mail script, but how ? My mail script work fine if I define $body and send that but I can't seem to do that with this code. If I do $body = " $result = mysql_query("SELECT * FROM adopt_main order by idform desc limit 1"); while( $row = mysql_fetch_array ($result)) echo "".$row["first"].","; "; I get parse errors every time. I have tried parens, curlys, brackets -- I have been trying for a long time but end up with a parse error. I think it's because of not using proper quotes or brackets or something but my patience is gone. Cloud someone help ? malcolm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: & in Query String
Looks fine in Opera 6.03 hth http://www.vogelsinger.at/test.php?par1=value1&par2=value2&par3=value3 Opera Version 6.03 Build 1107 Platform Win32 System Windows 98 Java Sun Java Runtime Environment 1.4 Testing the query string This is the full query string ($_SERVER['QUERY_STRING']): par1=value1&par2=value2 &par3=value3 This is a printout of $_GET: Array ( [par1] => value1 [par2] => value2 [par3] => value3 ) I will use this string for the link below: /test.php?par1=value1&par2=value2 &par3=value3 On Wed, 27 Nov 2002 00:09:35 +0100, [EMAIL PROTECTED] (Ernest E Vogelsinger) wrote: > At 00:00 27.11.2002, Jonathan Rosenberg \(Tabby's Place\) said: > [snip] > >Ok ... I take back what I said about & not working in a query string. > >It works just fine. > [snip] > > Ahhh - and I just created a test page for all to check out... nevertheless, > here it is: > http://www.vogelsinger.at/test.php > > Simply provides a link using query parameters encoded with &, to check > with different browsers. Maybe someone will check this outwith his browser > anyway. > > > -- >>O Ernest E. Vogelsinger >(\)ICQ #13394035 > ^ http://www.vogelsinger.at/ > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] WinNT extensions
Hi all I am building a simple web based mail app. I tried to contact my mail server using imap_open() but all I got was this: Fatal error: Call to undefined function: imap_open() in d:\... on line 15 I got in touch with my provider who replied: IMAP support was not compiled into the Windows version of PHP. Unfortunately, compiling it by hand is very difficult. It requires having Microsoft Visual C++, along with a bunch of other tools. So...it looks like you'll need to use another method to view mail. Sorry for the bad news. I thought imap functionality was in a dll which can be loaded dynamically: dl("php_imap.dll"); imap_open("a","u","p"); Can anyone please enlighten me? Is it built in? They use PHP 4.1.1. Malcolm -- 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] phpautodoc
Trying to get phpautodoc to work: If you saw this line, how would you write it with example values in it for etc? [php] phpdoc.php [php interpreter options] [-- -o ] phpautodoc instructions say the following, but I don't understand: Scans the specified PHP source files (given directories are searched recursively - default: .) and writes HTML files to the specified output path (default: .). TIA Malcolm, UK -- 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] phpautodoc
I'm trying to get this GNU stuff from http://sourceforge.net/projects/phpautodoc to work. These are the instructions for use --- [php] phpdoc.php [php interpreter options] [-- -o ] Scans the specified PHP source files (given directories are searched recursively - default: .) and writes HTML files to the specified output path (default: .). -- Can any body give me an example of this syntax? I'm a completely baffled intermediate. TIA Malcolm, UK -- 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] Bug or My Error
Although I have a solution to my script, I would rest at ease if someone could confirm that I have erred and perhaps if I had read some particular part of the manual I'd never have had the problem. http://www.php.net/bugs.php?id=13055&edit=2 rgds Mal -- 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] What does this error mean?
I'm trying to from a file in a directory called 'logs'. I've never seen this error before. What does it mean? <<>> Warning: fopen("logs/993700800.log","w+") - Permission denied in /home/sites/site20/users/guide/web/counter.php on line 28 Warning: Supplied argument is not a valid File-Handle resource in /home/sites/site20/users/guide/web/counter.php on line 29 Warning: Supplied argument is not a valid File-Handle resource in /home/sites/site20/users/guide/web/counter.php on line 30 1 <<>> The last two errors are becuase the first fails to return a file handle. Here's the actual offending code. It's just a simple counter. <<>> $iCount"; function incCount($sFile) { // Open and read existing count $hCounter = fopen($sFile, "r"); $iCount = fgets($hCounter, 1024); fclose($hCounter); // Write over it with the new count $hCounter = fopen($sFile, "w"); fputs($hCounter, ++$iCount); fclose($hCounter); return $iCount; } function createCountLog($sFile) { $hCounter = fopen($sFile, "w+"); fputs($hCounter, 1); fclose($hCounter); } ?> <<>> Usually I've been able to fix every PHP error I've gotten in the past - they've been pretty straightforward - but I've been playing around with this error for a few days now to no avail. I'm new to this mailing list and have never used it before so I'm not sure which one/s to join or post this specific message to. I apologize if this is the wrong forum for this type of question. Thank you for your time. -- Jimi Malcolm Web Content Manager inburst Internet Media inburst.com jimi.malcolm@inburst -- 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 parameters to another .PHP via tag
Say you want to pass three variables: color = blue name = Bob day = Monday here's the link click here Pretty simple! -- 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-WIN] For My Information
Tom, Thanks. I believe myaccess2000_1_4 is one of the ones I've tried. I'll try again to make sure I didn't miss anything. I used dbtools to do the dBase conversion. Agree that the older versions of IIS were crap, but newer one (version 3 and 4) seems to be pretty good. Dan - Original Message - From: "Tom Mathews" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Friday, February 02, 2001 6:09 AM Subject: Re: [PHP-WIN] For My Information > 1) I think that people use Apache as old versions of IIS were crap. In addition, it is about the widest used server out there in the commercial world (Linux running Apache with PHP3 is I believe the most common config at the moment) so if you're developing something to put on such a site, it's more likely to work if you develop with something close to that setup (note probs with case sensititivity and so on on with Apache that won't necesarily be exposed on IIS) > > 2) Check out the MySQL (www.mysql.com) site and look to download myaccess2000_1_4.zip, this is an Access plug-in that someone has kindly written to convert data and structure from Access 2000 MDB to MySQL (I've not tried them, but I think it also allows dbase conversion and a few others). > > Tom > > Dan Malcolm wrote: > > > I see in the posts, that a lot of people are using Apache on NT instead of the built in IIS. Is there a reason? I have PHP up and running with dBase tables converted to MySQL and ODBC connected to Access 2000, on an NT 4 box with IIS 4 and it runs very well. Performance is great. My only problem is automating the conversion to update tables in MySQL. I would like like to convert the Access 2000 tables also but the converters either don't seem to work with Access 2k, or not much at all, or are not such that a timed batch file can be generated using them. I just looked at what I've written and it's a little jumbled. Mega-Sigh. Let me summarize. > > > > 1.. Why Apache on NT 4.0? > > 2.. Is there a good way to automatically convert Access 2000 to MySQL to keep MySQL data up to date? The data needs to be updated several times a week. No I can't just switch everything over and not have to convert again. > > 3.. A way to do #2 for dBase would be good too, but less critical because the data only gets updated every couple months. > > Thanks in advance. > > > > Dan Malcolm > > [EMAIL PROTECTED] > > [EMAIL PROTECTED] > > > -- > PHP Windows 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] For My Information
I see in the posts, that a lot of people are using Apache on NT instead of the built in IIS. Is there a reason? I have PHP up and running with dBase tables converted to MySQL and ODBC connected to Access 2000, on an NT 4 box with IIS 4 and it runs very well. Performance is great. My only problem is automating the conversion to update tables in MySQL. I would like like to convert the Access 2000 tables also but the converters either don't seem to work with Access 2k, or not much at all, or are not such that a timed batch file can be generated using them. I just looked at what I've written and it's a little jumbled. Mega-Sigh. Let me summarize. 1.. Why Apache on NT 4.0? 2.. Is there a good way to automatically convert Access 2000 to MySQL to keep MySQL data up to date? The data needs to be updated several times a week. No I can't just switch everything over and not have to convert again. 3.. A way to do #2 for dBase would be good too, but less critical because the data only gets updated every couple months. Thanks in advance. Dan Malcolm [EMAIL PROTECTED] [EMAIL PROTECTED]