Re: [PHP] Re: Static functions
At 22:52 09.02.2003, Chris Hayes said: [snip] At 22:49 9-2-2003, you wrote: yes, you can call a static method on a class by specifying the class name, then 2 colons and finally the function name: classname :: functionname([arg,.]) (of course properties can not be accessed by such methods) ah ok, cool [snip] With PHP you can also determine if your class method has been called via an object instance, or class static, by checking the $this reference: class foo { function test() { if (isset($this) is_object($this) get_class($this) == 'foo') echo 'I am a foo object'; else echo 'I have been called as a static method'; } } $foo = new foo(); foo::test(); $foo-test(); -- 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] little problem with ' and stuff
hi there, i'm having a small problem, wondering if anybody can help // a line in my script defining $url $url = $directory . '/main.php?id=' . $id; // a line later on in the frameset calling this $url echo 'frame name=main scrolling=no src='$url''; this gives me a paring error on the last line any suggestions?? thanks michiel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] text on image
On Monday 10 February 2003 15:18, Ilya Nemihin wrote: I try to place text on image, but have color problems. code: $im = imagecreatefromjpeg( 'test.jpg' ); $white = ImageColorAllocate ($im, 255, 255, 255); ImageTTFText ($im, 20, 0, 0, 20, $white, './fonts/times.ttf', 'text text text' ); ImageJpeg( $im, 'test_out.jpg' ); i.e. I want to have 'white' text, but text absolutely not rgb(255,255,255), image truecolor. I must use imagecreatetruecolor? but how...? archives text on image -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* OKAY!! Turn on the sound ONLY for TRYNEL CARPETING, FULLY-EQUIPPED R.V.'S and FLOATATION SYSTEMS!! */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Writing text files in Windows 2k
Hi All, I need to write some data to a text file but when I use $this-ao_file_handle = fopen($this-ao_file_name,ab); $str_txt.= \n; fwrite($this-ao_file_handle,$str_txt); It does not display the new line. I saw somwhere that for DOS files you need to use ASCII LF and CR. Which I did. It still does not display the new line. Thanks in advance Joe Njeru -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] little problem with ' and stuff
At 09:27 10-2-2003, you wrote: hi there, i'm having a small problem, wondering if anybody can help // a line in my script defining $url $url = $directory . '/main.php?id=' . $id; // a line later on in the frameset calling this $url echo 'frame name=main scrolling=no src='$url''; this gives me a paring error on the last line please get yourself a strong pot of coffee and spend some time reading the manual, in this case http://www.php.net/manual/en/language.types.string.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Writing text files in Windows 2k
I need to write some data to a text file but when I use $this-ao_file_handle = fopen($this-ao_file_name,ab); $str_txt.= \n; fwrite($this-ao_file_handle,$str_txt); It does not display the new line. I saw somwhere that for DOS files you need to use ASCII LF and CR. Which I did. It still does not display the new line. LF CR = \r\n What did you view the file with? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] little problem with ' and stuff
At 09:46 10.02.2003, Chris Hayes said: [snip] At 09:27 10-2-2003, you wrote: hi there, i'm having a small problem, wondering if anybody can help // a line in my script defining $url $url = $directory . '/main.php?id=' . $id; // a line later on in the frameset calling this $url echo 'frame name=main scrolling=no src='$url''; this gives me a paring error on the last line please get yourself a strong pot of coffee and spend some time reading the manual, in this case http://www.php.net/manual/en/language.types.string.php [snip] To shorten up the process, you're missing the string concatenizer: echo 'frame name=main scrolling=no src=' . $url . ''; or echo 'frame name=main scrolling=no src=', $url, ''; This doesn't mean you shouldn't read the manual, though *twinkle* -- 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
Re: [PHP] little problem with ' and stuff
Hi, On Mon, 10 Feb 2003 09:27:38 +0100 Michiel van Heusden [EMAIL PROTECTED] wrote: hi there, i'm having a small problem, wondering if anybody can help // a line in my script defining $url $url = $directory . '/main.php?id=' . $id; // a line later on in the frameset calling this $url echo 'frame name=main scrolling=no src='$url''; I believe the correct format is: echo 'frame name=main scrolling=no src='.$url.''; Note the dots! HTH, Florin. this gives me a paring error on the last line any suggestions?? thanks michiel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Florin Dumitrescu Webmaster Departamentul Internet Astral Telecom SA, Sucursala Brasov -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Writing text files in Windows 2k
Thanks for the tip I want to export a report to excell and a legacy system that allow csv file import for incorporation into the financial system. Joe Njeru Nairobi, Kenya. Where else can you flyfish for trout on the Equator! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] pg_connect $B$,;H$($J$$(B
$B$3$s$K$A$O!#(B (B $BNS(B $B7C72(B [EMAIL PROTECTED] wrote: (B (B $B;O$a$^$7$F!#(Blin $B$H?=$7$^$9!#(B (B (B php$B$N(Bpg_connect$B$G(BpostgreSQL $B$K@\B3$r;n$_$^$7$?$,!"4X?t$,(B (B $B8+$D$+$j$^$;$s$H%(%i!<$,=P$F$7$^$$$^$7$?!#F1MM$J8=>]$,Ax(B (B $B6x$7$?J}$,$$$?$h$&$G$9$,!"4N?4$J2r7hJ}K!$O8+$D$+$j$^$;$s(B (B $B$G$7$?!#$I$J$?$+$,2r7hJ}K!$r$4B8CN$G$7$?$i!"CN7C$r$*B_$7(B (B $B$/$@$5$$!#(B (B $B$^$:!"F|K\8l$N(BML$B!J(Bhttp://ns1.php.gr.jp/mailman/listinfo/php-users$B!K(B $B$b$"$j$^$9$N$G!"F|K\8l$G=q$/>l9g$O$=$A$i$N$GJ9$$$?$[$&$,$H;W(B $B$$$^$9!#(B (B $BEj9F$9$kA0$K!"A0$N%a!<%k$r8!:w$7$F$+$iEj9F$7$?$[$&$,$G$9!#$"(B $B$H!"Ej9F$9$k$H$-$K!"4D6-$d%$%s%9%H!<%kJ}K!$J$I$r=q$$$F$/$@$5$$%M!#(B (B $B$G!"
[PHP] PHP error page not redirecting
I'm having a dispute with an ISP (surprise) about the non-functioning of a PHP error script. Currently, the error script is at http://www.touristguides.org.uk/error.php - a direct click on that link will redirect you, using: header(Location: http://www.touristguides.org.uk/index.php;); And sure enough, you end up at /index.php However, when I ask for /nosuchpage I get a blank window, and the following source is output: htmlbody/body/html And that's all. I've stripped down all the complicated stuff from the error page, and I can't understand why it will redirect fine if it's called directly, but not if it is functioning as an error page (the .htaccess has the necessary ErrorDocument directives in it). The ISP say I believe the problem may lie in the fact a 404 status has already been sent so it nullifies the 302 redirect status. I suggest searching php.net for more details - which, naturally, I have done, without enlightenment. But the script works nicely on another server, suggesting that it might be something to do with the Apache configuration. I'm rapidly getting out of my depth now, and would appreciate some guidance on where to turn next. Thanks, Nick -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Static functions (java/php)
use the error_reporting function: http://www.php.net/manual/en/function.error-reporting.php Joshua Moore-Oliva [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... How would I go about setting the error reporting level? Josh. On February 9, 2003 06:38 pm, David Eisenhart wrote: yeh, I'd agree with this; on your second issue of variable definitions I do find that being able set the error reporting level to show non critical errors (such as undefined variables) to be a reasonable, although non ideal, compromise; php's still a great language to work with most respects though ... David Eisenhart Joshua Moore-Oliva [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... The only thing I do wish is that there was a way to force php into a typecast mode... and possibly a setting to reqiure a definition for a variable. Josh. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: jumping between php and html or using echo for printinghtml-tags.
Then why not use single quotes, its faster than double quotes, and you could also use comma instead of full stop (echo can take multiple parameters, which is faster than building up a new string) function admin_menu() { echo 'B Meny /BBR'; echo 'A HREF=' , $_SERVER['PHP_SELF'] , '?action=' , MANAGE_MEMBERS ,'Medlemmar/ABR'; Askengren wrote: I do not know why so many developers use the -character (double quote) instead of ' (single quote) in php/html-scripts. Much easier is: function admin_menu() { echo B Meny /BBR; echo A HREF=' . $_SERVER['PHP_SELF'] . ?action= . MANAGE_MEMBERS .'Medlemmar/ABR; . You do then not have to worry about all backslashes. And single quote is w3c html-standard just as double quote. And it?s faster - you do not have to switch between html and php so often. /Håkan Anders Thoresson [EMAIL PROTECTED] skrev i meddelandet [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Which is more efficient: function admin_menu() { echo B Meny /BBR; echo A HREF=\ . $_SERVER['PHP_SELF'] . ?action= . MANAGE_MEMBERS . \Medlemmar/ABR; echo A HREF=\ . $_SERVER['PHP_SELF'] . ?action= . MANAGE_ALBUMS . \Album/ABR; echo A HREF=\ . $_SERVER['PHP_SELF'] . ?action= . INITIAL_PAGE . \Huvudmeny/ABR; echo A HREF=\ . $_SERVER['PHP_SELF'] . ?action= . LOG_OUT . \Logga ut/ABR; } or function admin_menu() { ? B Meny /BBR A HREF=?=$_SERVER['PHP_SELF']??action=?php echo(MANAGE_MEMBERS) ;?Medlemmar/ABR A HREF=?=$_SERVER['PHP_SELF']??action=?php echo(MANAGE_ALBUMS) ;?Album/ABR A HREF=?=$_SERVER['PHP_SELF']??action=?php echo(INITIAL_PAGE) ;?Huvudmeny/ABR A HREF=?=$_SERVER['PHP_SELF']??action=?php echo(LOG_OUT);?Logga ut/ABR ?php } Any reasons other than speed to choose either? -- anders thoresson -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] SESSION variable and register_globals
Hello guys, I have a few questions regarding the subject and was hoping you could help me out. 1.If register_globals is on, then doing an unset($_SESSION[blah]), to unset a session variable will not work as the variable will be unset in that particular instance but will be restored in next instance of that session. Hence session_unregister(blah) also must be used to properly unset the session with global_register on. Is this true ? 2.Furthermore, can the session be registered via the direct assignment of $_SESSION[aaa] = $someValue if register globals is on? Thank you for your time. Mohan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Trouble with resizing image!!
At first glance I noticed you use time() all over your script and expect it to be always the same. But the function returns current time, so it changes! Use $n_image1 = time().$_FILES['image1']['name']; and remove all time() functions Geckodeep wrote: I am having trouble in resizing the image. What I am trying to do is letting people upload images of any dimension, and with the aid of my script after having uploaded, it renames the file, from this new file I'll get the size and resize it to predefined format 360x240 or 240x360 and this is the normal presentation image (image1_big). From this image I am getting a thumb nail format of 104x70 or 70x104 ( image1_thumb ). When I run the script the whole page is filled with characters, I know the first part of the script upload is working as I can see the file on the server. The script resizing apparently is not functioning. I ve checked the Php config at my service provider with the aid of Phpinfo() and I can see the GD version 2.0 or higher enabled, so that question is cleared. I am pretty sure the error is from my sloppy code. I'd appreciate if some one could look into my code and see where the bug is. ?php // image_pro.php $uploaddir='../images/repor_images/'; // Uploaded images directory on the server $n_image1 = $_FILES['image1']['name'];// New file before renaming it. if // Image1 (move_uploaded_file($_FILES['image1']['tmp_name'], $uploaddir.$n_image1)) { rename($uploaddir .$n_image1, $uploaddir.time().$n_image1); // Renames the file in the server. $size = GetImageSize($uploaddir.time().$n_image1); $width = $size[0]; $height = $size[1]; if ($heigth$width){ $newwidth = '360'; $newheight = '240'; header (Content-type: image/jpeg); $src = imagecreatefromjpeg($uploaddir.time().$n_image1); $image1_big = imagecreate($newwidth,$newheight); imagecopyresized($image1_big,$src,0,0,0,0,$newwidth,$newheight,$width,$heigh t); imagejpeg($image1_big); // New normal sized image imagedestroy($src);// deletes the initial image $size_big = GetImageSize($uploaddir.$image1_big); $width_big = $size[0]; $height_big = $size[1]; $newwidth_thumb = '104'; $newheight_thumb = '70'; $src_thumb = imagecreatefromjpeg($uploaddir.$image1_big); $image1_thumb = imagecreate($newwidth_thumb,$newheight_thumb); imagecopyresized($image1_thumb,$src_thumb,0,0,0,0,$newwidth_thumb,$newheight _thumb,$width_big,$heigh t_big); imagejpeg(tn_.$image1_thumb); // New thumbnail } elseif ($heigth$width){ $newwidth = '360'; $newheight = '240'; header (Content-type: image/jpeg); $src = imagecreatefromjpeg($uploaddir.time().$n_image1); $image1_big = imagecreate($newwidth,$newheight); imagecopyresized($image1_big,$src,0,0,0,0,$newwidth,$newheight,$width,$heigh t); imagejpeg($image1_big); // New normal sized image imagedestroy($src);// deletes the initial image $size_big = GetImageSize($uploaddir.$image1_big); $width_big = $size[0]; $height_big = $size[1]; $newwidth_thumb = '70'; $newheight_thumb = '104'; $src_thumb = imagecreatefromjpeg($uploaddir.$image1_big); $image1_thumb = imagecreate($newwidth_thumb,$newheight_thumb); imagecopyresized($image1_thumb,$src_thumb,0,0,0,0,$newwidth_thumb,$newheight _thumb,$width_big,$heigh t_big); imagejpeg(tn_.$image1_thumb); // New thumbnail } print $image1_big. File transfered. br\n; print $image1_thumb. File transfered. br\n; $image1_big_url = time().$image1_big;// Sets the name of the file to be Copied into the database. $image1_thumb_url = time().tn_.$image1_thumb;// Sets the name of the file to be Copied into the database. } else { print File failed to transfer!\n; $image1_url = ; exit(); } ? Thanks in advance for the time and humble helping hand. GD -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] SESSION variable and register_globals
1. Yes. 2. No. Mohanaraj wrote: Hello guys, I have a few questions regarding the subject and was hoping you could help me out. 1.If register_globals is on, then doing an unset($_SESSION[blah]), to unset a session variable will not work as the variable will be unset in that particular instance but will be restored in next instance of that session. Hence session_unregister(blah) also must be used to properly unset the session with global_register on. Is this true ? 2.Furthermore, can the session be registered via the direct assignment of $_SESSION[aaa] = $someValue if register globals is on? Thank you for your time. Mohan -- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP error page not redirecting
Nick Holden wrote: I'm having a dispute with an ISP (surprise) about the non-functioning of a PHP error script. Currently, the error script is at http://www.touristguides.org.uk/error.php - a direct click on that link will redirect you, using: header(Location: http://www.touristguides.org.uk/index.php;); And sure enough, you end up at /index.php However, when I ask for /nosuchpage I get a blank window, and the following source is output: htmlbody/body/html And that's all. I've stripped down all the complicated stuff from the error page, and I can't understand why it will redirect fine if it's called directly, but not if it is functioning as an error page (the .htaccess has the necessary ErrorDocument directives in it). The ISP say I believe the problem may lie in the fact a 404 status has already been sent so it nullifies the 302 redirect status. I suggest searching php.net for more details - which, naturally, I have done, without enlightenment. But the script works nicely on another server, suggesting that it might be something to do with the Apache configuration. I'm rapidly getting out of my depth now, and would appreciate some guidance on where to turn next. Thanks, Nick I'm not an expert at this either, but you could test whether the nosuchpage 404 is getting to your error.php by replacing the redirection with some ordinary html that will display a message to you. At least that way you will know whether its the location header that is the problem or not. HTH Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: [PHP-GTK] Word Documents
Is it possible to embed a Word document with-in a PHP-GTK app (Windows)? I'm thinking of the way Internet Explorer does it. Then to have a button to Save the document to the harddrive, or a Print button which would somehow cause the Word Doc to be printed. Any thoughts? some tuppences: - from within Visual Basic for (microsoft) Applications (VBA), this is done with 'OLE Automation'. You can read a bit about it if you have Word, press alt_f11 (or: extra/macro/visual basic editor), go to the help and fo a search on 'OLE'. I'm quite sure the internet explorer uses this to embed word etc. The fact that other browsers do not embed office documents may indicate that it is hard to do this from outside a VBA-enabled prog (but it may also indicate that they do not want to facilitate MS Office). - i once made a VBA macro for Excel and it only worked on my pc, on another pc i had to make it again with new links to the libraries because the paths to the libraries were different. So keep an eye on portability. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Trouble with resizing image!!
thanks Marek, it never crossed my mind about time, i was using it to have a unque name to the uploaded file. I'll try the script without the time and see. Thanks Marek Kilimajer [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... At first glance I noticed you use time() all over your script and expect it to be always the same. But the function returns current time, so it changes! Use $n_image1 = time().$_FILES['image1']['name']; and remove all time() functions Geckodeep wrote: I am having trouble in resizing the image. What I am trying to do is letting people upload images of any dimension, and with the aid of my script after having uploaded, it renames the file, from this new file I'll get the size and resize it to predefined format 360x240 or 240x360 and this is the normal presentation image (image1_big). From this image I am getting a thumb nail format of 104x70 or 70x104 ( image1_thumb ). When I run the script the whole page is filled with characters, I know the first part of the script upload is working as I can see the file on the server. The script resizing apparently is not functioning. I ve checked the Php config at my service provider with the aid of Phpinfo() and I can see the GD version 2.0 or higher enabled, so that question is cleared. I am pretty sure the error is from my sloppy code. I'd appreciate if some one could look into my code and see where the bug is. ?php // image_pro.php $uploaddir='../images/repor_images/'; // Uploaded images directory on the server $n_image1 = $_FILES['image1']['name'];// New file before renaming it. if // Image1 (move_uploaded_file($_FILES['image1']['tmp_name'], $uploaddir.$n_image1)) { rename($uploaddir .$n_image1, $uploaddir.time().$n_image1); // Renames the file in the server. $size = GetImageSize($uploaddir.time().$n_image1); $width = $size[0]; $height = $size[1]; if ($heigth$width){ $newwidth = '360'; $newheight = '240'; header (Content-type: image/jpeg); $src = imagecreatefromjpeg($uploaddir.time().$n_image1); $image1_big = imagecreate($newwidth,$newheight); imagecopyresized($image1_big,$src,0,0,0,0,$newwidth,$newheight,$width,$heig h t); imagejpeg($image1_big); // New normal sized image imagedestroy($src);// deletes the initial image $size_big = GetImageSize($uploaddir.$image1_big); $width_big = $size[0]; $height_big = $size[1]; $newwidth_thumb = '104'; $newheight_thumb = '70'; $src_thumb = imagecreatefromjpeg($uploaddir.$image1_big); $image1_thumb = imagecreate($newwidth_thumb,$newheight_thumb); imagecopyresized($image1_thumb,$src_thumb,0,0,0,0,$newwidth_thumb,$newheigh t _thumb,$width_big,$heigh t_big); imagejpeg(tn_.$image1_thumb); // New thumbnail } elseif ($heigth$width){ $newwidth = '360'; $newheight = '240'; header (Content-type: image/jpeg); $src = imagecreatefromjpeg($uploaddir.time().$n_image1); $image1_big = imagecreate($newwidth,$newheight); imagecopyresized($image1_big,$src,0,0,0,0,$newwidth,$newheight,$width,$heig h t); imagejpeg($image1_big); // New normal sized image imagedestroy($src);// deletes the initial image $size_big = GetImageSize($uploaddir.$image1_big); $width_big = $size[0]; $height_big = $size[1]; $newwidth_thumb = '70'; $newheight_thumb = '104'; $src_thumb = imagecreatefromjpeg($uploaddir.$image1_big); $image1_thumb = imagecreate($newwidth_thumb,$newheight_thumb); imagecopyresized($image1_thumb,$src_thumb,0,0,0,0,$newwidth_thumb,$newheigh t _thumb,$width_big,$heigh t_big); imagejpeg(tn_.$image1_thumb); // New thumbnail } print $image1_big. File transfered. br\n; print $image1_thumb. File transfered. br\n; $image1_big_url = time().$image1_big;// Sets the name of the file to be Copied into the database. $image1_thumb_url = time().tn_.$image1_thumb;// Sets the name of the file to be Copied into the database. } else { print File failed to transfer!\n; $image1_url = ; exit(); } ? Thanks in advance for the time and humble helping hand. GD -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: SESSION variable and register_globals
Hi all, 1.If register_globals is on, then doing an unset($_SESSION[blah]), to unset a session variable will not work as the variable will be unset in that particular instance but will be restored in next instance of that session. Hence session_unregister(blah) also must be used to properly unset the session with global_register on. Is this true ? Wasn't it in this list, where I heard, better not to use session_unregister() any more?? What do you think about using: $_SESSION[blah] = ; to delete a value? Regards, Bastian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP error page not redirecting
At 10:59 10-2-2003, you wrote: I'm having a dispute with an ISP (surprise) about the non-functioning of a PHP error script. Currently, the error script is at http://www.touristguides.org.uk/error.php - a direct click on that link will redirect you, using: header(Location: http://www.touristguides.org.uk/index.php;); And sure enough, you end up at /index.php However, when I ask for /nosuchpage I get a blank window, and the following source is output: And that's all. - check the url of 'nosuchpage' (i assume that that is a directory?), try to include the filename: /nosuchpage/index.html - check whether you rely on POST or GET data in '/nosuchpage' - if this fails, try a .htaccess file with a line ErrorDocument 404 /nosuchpage/error.php this will save your POST and GET variables (must be a RELATIVE link) But the script works nicely on another server, suggesting that it might be something to do with the Apache configuration. is it approached via exactly the same detour? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] a while loop that does't end with the script
Hi, I'm a newcomer here to the list, so do please apologize in the case my question has already been discussed before. I just moved from php 4.0.6 to php 4.2.2 for security reasons (4.0.6 got a big buffer overflow hole...). The working environment now is Redhat 8.1, mysql 3.23.54a, kernel 2.4.18-19. My problem is in a php page including a neverending loop, like this: mysql_connect() while (1) { flush() ... do things... ... query the database ... ... echo other things... flush() } In the previous version of PHP when I exit the page, the script ended as well (this stopping querying the database). Now when I exit from the page, I see from the mysqladmin processlist that the mysql_query thread is still running. It doesn't end and it keeps running 'til I restart httpd. This is time and memory consuming. Why the script doesn't end as usual? Am I missing something in the configuration files? Thank you for any help. Bye Francesco Leonetti -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] about writing extension
Hello, I am going to write a PHP extension on top of some libraries that I have developed over the past few years. The libraries are bunch of .so file and some of them are C++. If I am going to compile my extension against 4.3 code base, will it be ok to run this with other 4.x PHP install base? Also, would it be possible to expose my C++ class in my shared library to PHP? TIA. Joe -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Why does this happen?
-Original Message- From: Ernest E Vogelsinger [mailto:[EMAIL PROTECTED]] Sent: 09 February 2003 14:39 [OP snipped] I don't know much about CF, but in plain HTML as you show here you have 3 different form input (select) fields sharing the same name. Thus the browser will transmit only one of the three input (select) fields upon submit (it is undefined which field will be sent, but most browsers will transmit the last value). No, that's not true. The browser will transmit them all -- it's up to whatever's receiving the POST to decide what to do with the duplicates. ColdFusion obviously glues them together, whereas PHP ignores all except the last. form name=form1 method=post action= Year select name=date[Y] onSelect=return check_submit() option selected value=20022002/option /select Month select name=date[M] option selected value=1212/option /select Day select name=date[D] option selected value=2525/option /select input type=submit name=textfield /form In your receiving script you would have an associative array named date in the $_REQUEST structure: $date_received = $_REQUEST['date']; $year = $date_received['Y']; $month = $date_received['M']; $day = $date_received['D']; That's one way to do it. Personally, I'd just name the fields date_year, date_month and date_day -- using an array here seems like unnecessary complexity. I'd save arrays for when I really need them -- like if I have a multi-row form where each row has year/month/day fields. Cheers! Mike - Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning Information Services, JG125, James Graham Building, Leeds Metropolitan University, Beckett Park, LEEDS, LS6 3QS, United Kingdom Email: [EMAIL PROTECTED] Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Is mail() broken in 4.3.0 when it comes to BCC?
This line works as expected: mail([EMAIL PROTECTED], My Subject, Line 1\nLine 2, From: [EMAIL PROTECTED]); whereas if I change it to this: mail([EMAIL PROTECTED], My Subject, Line 1\nLine 2, Bcc: [EMAIL PROTECTED]); the mail never gets sent! I'm running 4.3.0 on Windows XP. Any thoughts? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Why does this happen?
-Original Message- From: CF High [mailto:[EMAIL PROTECTED]] Sent: 09 February 2003 20:52 Here's the deal: Let's say I have a form that requests the season schedule of a baseball team, and the team in question has twenty scheduled games all on different days. Each form row will have three select elements for the date; i.e. date(x) for the year, date(x+1) for the month, and date(x+2) for the day, or however I'll need to make each date select element unique. Then, in the insert page, I'll need to loop through each date element by groups of three and create an array for each date set. If I'm reading this right, you need to do something like this on your form page: form ?php for ($i=1; $i=20; $i++): ? select name=date_year[?php echo $i ?] ... /select select name=date_month[?php echo $i ?] ... /select ... ?php endfor; ? /form and then your receiving page will have arrays called $_POST['date_year'], $_POST['date_month'], etc (or the equivalent globals if you've chosen the insecure register_globals On route). Cheers! Mike - Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning Information Services, JG125, James Graham Building, Leeds Metropolitan University, Beckett Park, LEEDS, LS6 3QS, United Kingdom Email: [EMAIL PROTECTED] Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP and Serach Engines...
-Original Message- From: Chris Hayes [mailto:[EMAIL PROTECTED]] Sent: 09 February 2003 21:12 To: [EMAIL PROTECTED] Subject: Re: [PHP] PHP and Serach Engines... At 22:00 9-2-2003, you wrote: Hello, How do search engines react to PHP pages? If every page of a site has a .php extension will search engines not react well to that? If it does, is there a possible way to handle tracking sessions with php, without being punished by the search engines? it's not that they ignore .php pages, more that they do not see a difference between domain.org/index.php?page=1 domain.org/index.php?page=123 domain.org/index.php?page=129909 domain.org/index.php?module=boardID=445 so only the 1st page will be indexed. A common workaround involves the use of Apaches' mod_rewrite, or an error_document trick so the links are: domain.org/page/1 and domain.org/page/129909 Just for the record, it's not necessary to use mod_rewrite or the error_document trick to get links like this to work with PHP. I have this working on two Apache servers -- one Windows, one Solaris -- pretty much out of the box. You may get better results using one of those methods, but it's not necessary. Cheers! Mike - Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning Information Services, JG125, James Graham Building, Leeds Metropolitan University, Beckett Park, LEEDS, LS6 3QS, United Kingdom Email: [EMAIL PROTECTED] Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Is mail() broken in 4.3.0 when it comes to BCC?
Try this: mail([EMAIL PROTECTED], My Subject, Line 1\nLine 2, From: [EMAIL PROTECTED]\nBCC: [EMAIL PROTECTED]); - Original Message - From: Mark Virtue [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, February 10, 2003 2:18 PM Subject: [PHP] Is mail() broken in 4.3.0 when it comes to BCC? This line works as expected: mail([EMAIL PROTECTED], My Subject, Line 1\nLine 2, From: [EMAIL PROTECTED]); whereas if I change it to this: mail([EMAIL PROTECTED], My Subject, Line 1\nLine 2, Bcc: [EMAIL PROTECTED]); the mail never gets sent! I'm running 4.3.0 on Windows XP. Any thoughts? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Vulvan Logic SRM - does anyone use it?
Hi, I'm thinking about using SRM application server for storing cached data. But I have to convince my customers that it's stable enough and is ready to use in production environment. Is it considered stable enough to use in such applications? As I see it hasn't been maintained for at least half year. Or does anyone know of products/libraries with similar functionality for php? Thanks, Arpi -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Global Vars = Off Windows/Linux Differeces???
Hi, I've made a website and because of presentationproblems I changed the oldstyle vars to the new globalvars mode (Hope its the right name for it, dont know if $_SESSION['user'] is a global or it is not???). Now the Website works perfect on my WAMP System with Apache 1.3.27 and PHP 4.3.0, but on my Linux Server the Login Functionality of the Website lets the User log in (Sessionmanagement is used at this point), but as i click on a link, the area where the username of the registered user should be shown, it shows just a number and doesnt let me log out. Instead it just shows a 0. Normaly it should be possible to do a login again from this point. On Windows everything works just fine. The Linux Machine is an Debain Woody / Apache 1.3.27 / php 4.2.3 Please help me, because my customers will jump on my neck if I dont, find out, where the problem is located. Hope you'll help me! Thanks very much Sascha
Re: [PHP] Is mail() broken in 4.3.0 when it comes to BCC?
Your suggestion didn't work (but thanks anyway), but I tried removing the space from after the Bcc: (before the address) and it started working! So this line works: mail([EMAIL PROTECTED], My Subject, Line 1\nLine 2, Bcc:[EMAIL PROTECTED]); but this one doesn't mail([EMAIL PROTECTED], My Subject, Line 1\nLine 2, Bcc: [EMAIL PROTECTED]); It used to be fine before 4.3.0. Francesco Leonetti [EMAIL PROTECTED] wrote in message 008101c2d108$f75ff600$0100a8c0@fleo">news:008101c2d108$f75ff600$0100a8c0@fleo... Try this: mail([EMAIL PROTECTED], My Subject, Line 1\nLine 2, From: [EMAIL PROTECTED]\nBCC: [EMAIL PROTECTED]); - Original Message - From: Mark Virtue [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, February 10, 2003 2:18 PM Subject: [PHP] Is mail() broken in 4.3.0 when it comes to BCC? This line works as expected: mail([EMAIL PROTECTED], My Subject, Line 1\nLine 2, From: [EMAIL PROTECTED]); whereas if I change it to this: mail([EMAIL PROTECTED], My Subject, Line 1\nLine 2, Bcc: [EMAIL PROTECTED]); the mail never gets sent! I'm running 4.3.0 on Windows XP. Any thoughts? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] WYSIWIG CMS Part1
I know how XML works and how a wellformed document may look like, but I must say, I really dont know why I should use XML as long I store everything in a Database. I've read about all good CMS Systems use XML as a musthave, but I don't understand why. Would be nice, if you would explain me which data I should store in XML and why. Maybe its usefull together with big Customer Management Systems, or do you have other Ideas? Please discuss a little about it with me, I would find it very interesting :)) CYA Sascha - Original Message - From: Aaron [EMAIL PROTECTED] To: Sascha Braun [EMAIL PROTECTED] Sent: Sunday, February 09, 2003 11:43 PM Subject: Re: [PHP] WYSIWIG CMS Part1 look into using XML if you havent already. Sascha Braun wrote: Ok, overspoken. I'm going to write my basic CMS Concept here, and let us see what happens then. My Multilanguage Frontend Engine has even finished, but still needs a nice Admin Frontend to do the translation of the Frontend. Ok, lets start. Later I will tell some about the things which I could not really understand yet, maybe somebody is able to help. Tasks of the CMS (I called it freecon, dont know if there is something similar): 1. Template Engine 2. Design Management 3. Article Management 4. Content Management 5. User Management 6. Customer Management 7. Message Management 1. The Template Engine should help developers to easy build Websites based on the CMS. The only Thing the Developer has to do, is to develop an static HTML Webpage Design and replace all the Visitor viewable and Admin viewable textparts with special CMS Based Tags. As there is possibility to write parts of the CMS as Modules, it would be very nice if fx. the customer login could consist of a small code sniped and a border (Table and Images fx.) so the developer can easely change the design of the page, probably with the Design Management. 2. The Design Management is part of the Administration Kit for the CMS. With this tool you should be able to change the Design of the Templates and if you used the CMS Based Tags you should be able to upload new parts of the homepage design and change the hole page look, with a few mouseclicks. So there has be an Design Table in the Database or an configuration file, where all the Imageparts are stored and together build the page look and feel. The CSS Stylesheet should the be changeable to a lot of forms, seen in phpbb or other nice templated website tools. 3. The Article Management should be part of the Admin Interface where you can deside, of which parts an article should be consist. Fx. an Article could possibly consist of an Headline, Introduction, Shortdescription, Description, 1 Image, 2 Images and much more. So it would be nice, if the Admin could give some orders on which parts a text may consist of and which design you should be able to chose from. When you want to write a new Newstext and the Admin decided that newstexts should consist of an headline and a short description toghether with the maximum of 1 Picture, you will chose when you want to create the text in which language you want to create it and you will enter an custom frontend for the article, where only the form fields are visible you may use to write the article, when you wanted you create the article in more than one language, you will able to choose if you want to see all forms. (I mean for the different translations on one page or you will be able to enter the translate mode, where you will see fx, headline in english and an empty headline form below for Italian language, But Later Ill explain more about the article mana- gement). I choosed to do it in this way, because it will reduce the space needed by the database enormously, because there is an table which only holds the head- lines, in all languages, and another one only holds the introductions, in all langua- ges, and so on. 4. The Content Management, I started to explain in 3. a little about how it should work. Now I will get a little deeper into it. When your Chief decides that you should write an article, he starts entering a new title or headline for the task and sets the priority and chooses in which language the article should be translated in. After he did this, he chooses between his em- ployes who should write this article, if he doesnt direktly choose one, he can choose the knowledge which the employe needs to have (At this point fits the usermanagement I'll explain later). After he has did all this, one or a couple of of employes will receive an email, that there is a new task to do. When the Chief only choosed one special employe only one will get the message on the other hand of he choosed somebody who knows a lot about PHP and there are ten people in the company who know a lot of php all these ten people will receive the message unless one of the does not speak or is able to write text in one of the needed languages. When
RE: [PHP] Object In a class
How you can you use an object that is already an instance? -Original Message- From: John Wells [mailto:[EMAIL PROTECTED]] Sent: Sunday, February 09, 2003 4:21 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Object In a class Justin Mazzi said: Can anyone tell me how to use an object within an object. Example class blah { var $test; var $test2; function test() { $this-do(); } } then you want to use that class in a new one. class blah2 { var $test; var $test2; function do() { $blah = new blah(); } } Well, you could use the blah object you created exclusively in function do(), or you could create it as a attribute of your class and use it in your instantiated objects, as: class blah2 { var $test; var $test2; var $myBlah; function blah2() { $this-myBlah = new blah(); } function do() { $this-myBlah-test(); } } $myobj = new blah2(); $myobj-do(); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Global Vars = Off Windows/Linux Differeces???
Pretty hard to tell anything without any details about what you're doing... Sascha Braun wrote: Hi, I've made a website and because of presentationproblems I changed the oldstyle vars to the new globalvars mode (Hope its the right name for it, dont know if $_SESSION['user'] is a global or it is not???). Now the Website works perfect on my WAMP System with Apache 1.3.27 and PHP 4.3.0, but on my Linux Server the Login Functionality of the Website lets the User log in (Sessionmanagement is used at this point), but as i click on a link, the area where the username of the registered user should be shown, it shows just a number and doesnt let me log out. Instead it just shows a 0. Normaly it should be possible to do a login again from this point. On Windows everything works just fine. The Linux Machine is an Debain Woody / Apache 1.3.27 / php 4.2.3 Please help me, because my customers will jump on my neck if I dont, find out, where the problem is located. Hope you'll help me! Thanks very much Sascha -- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] little problem with ' and stuff
Michael -- ...and then Michiel van Heusden said... % % hi there, Hi! % % i'm having a small problem, wondering if anybody can help ... % echo 'frame name=main scrolling=no src='$url''; You've already seen the suggestions to . together your parts, so I needn't suggest that. I wonder why on earth you're bothering, though! If you use ' then you will, indeed, need to . the $variables into the string, but if you use then you can just include them with the rest of your output. Your incorrect echo 'frame name=main scrolling=no src='$url''; instead of having to become echo 'frame name=main scrolling=no src=' . $url . ''; is simply echo frame name='main' scrolling='no' src='$url'; and away you go... I, too, have wondered why pretty much everyone on this list writes their html as tag field=data rather than using perfectly valid single quotes and making their lives easier... In perl you can use *any* char as your quoting character and so you even have it both ways! HTH HAND :-D -- David T-G * There is too much animal courage in (play) [EMAIL PROTECTED] * society and not sufficient moral courage. (work) [EMAIL PROTECTED] -- Mary Baker Eddy, Science and Health http://justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg! msg96399/pgp0.pgp Description: PGP signature
Re: [PHP] Is mail() broken in 4.3.0 when it comes to BCC?
From the PHP manual, hope this will help. /* To send HTML mail, you can set the Content-type header. */ $headers = MIME-Version: 1.0\r\n; $headers .= Content-type: text/html; charset=iso-8859-1\r\n; /* additional headers */ $headers .= From: Birthday Reminder [EMAIL PROTECTED]\r\n; $headers .= Cc: [EMAIL PROTECTED]\r\n; $headers .= Bcc: [EMAIL PROTECTED]\r\n; /* and now mail it */ mail($to, $subject, $message, $headers); - Original Message - From: Mark Virtue [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, February 10, 2003 1:46 PM Subject: Re: [PHP] Is mail() broken in 4.3.0 when it comes to BCC? Your suggestion didn't work (but thanks anyway), but I tried removing the space from after the Bcc: (before the address) and it started working! So this line works: mail([EMAIL PROTECTED], My Subject, Line 1\nLine 2, Bcc:[EMAIL PROTECTED]); but this one doesn't mail([EMAIL PROTECTED], My Subject, Line 1\nLine 2, Bcc: [EMAIL PROTECTED]); It used to be fine before 4.3.0. Francesco Leonetti [EMAIL PROTECTED] wrote in message 008101c2d108$f75ff600$0100a8c0@fleo">news:008101c2d108$f75ff600$0100a8c0@fleo... Try this: mail([EMAIL PROTECTED], My Subject, Line 1\nLine 2, From: [EMAIL PROTECTED]\nBCC: [EMAIL PROTECTED]); - Original Message - From: Mark Virtue [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, February 10, 2003 2:18 PM Subject: [PHP] Is mail() broken in 4.3.0 when it comes to BCC? This line works as expected: mail([EMAIL PROTECTED], My Subject, Line 1\nLine 2, From: [EMAIL PROTECTED]); whereas if I change it to this: mail([EMAIL PROTECTED], My Subject, Line 1\nLine 2, Bcc: [EMAIL PROTECTED]); the mail never gets sent! I'm running 4.3.0 on Windows XP. Any thoughts? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] multiple file upload, yet again
Jason -- ...and then Jason Wong said... % % On Monday 10 February 2003 08:36, David T-G wrote: % % Hmmm... I haven't yet been able to download it, but I was pointed to a % live page (tech.indymedia.org/publish.php3) only to find that it has % multiple boxes for multiple files, which I can already do. Nothing that ... % % You probably already know this -- HTML does not allow for the type of multiple Ah. No, actually I didn't know it, though I suspected it. Thanks for the clarification. % uploads that you seek. Any solutions out there will be based on % 'non-standard' technology -- javascript, java or some activex control. Yeah. So I suppose that must be how Javier did it, too. Again, if I could get on to hotmail I could see how they do it and copy it :-) Thanks a *bunch* HAND :-D -- David T-G * There is too much animal courage in (play) [EMAIL PROTECTED] * society and not sufficient moral courage. (work) [EMAIL PROTECTED] -- Mary Baker Eddy, Science and Health http://justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg! msg96401/pgp0.pgp Description: PGP signature
Re: [PHP] Writing text files in Windows 2k
Precisely where did you get the b in your second parameter to fopen? I didn't see it on the fopen manual page at: http://www.php.net/fopen If you just want to write to the file and not read it, try changing the second parameter to just w. On Mon, 2003-02-10 at 03:34, Joe Njeru wrote: Hi All, I need to write some data to a text file but when I use $this-ao_file_handle = fopen($this-ao_file_name,ab); $str_txt.= \n; fwrite($this-ao_file_handle,$str_txt); It does not display the new line. I saw somwhere that for DOS files you need to use ASCII LF and CR. Which I did. It still does not display the new line. Thanks in advance Joe Njeru -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Adam Voigt ([EMAIL PROTECTED]) The Cryptocomm Group My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc signature.asc Description: This is a digitally signed message part
[PHP] PHP Script Encryption!!!!
hiii!! 1. can anyone help me out with php script encryption.. are there any freeware which i can use to encrypt my php scripts. 2. have anybody has any ready made code which take's a directory path and uses linux shell command to execute them??? actually i want to use a shell command which takes a file name as input.. i want to use the shell command for the whole directory.. thats it get back to me as soon as possible -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] setcookie() in various browsers..
Following up from Friday.. no replies over the weekend.. can anyone help? Thanks, Chad -Original Message- From: Chad Day [mailto:[EMAIL PROTECTED]] Sent: Friday, February 07, 2003 3:02 PM To: php general Subject: [PHP] setcookie() in various browsers.. This is with PHP 4.2 and register_globals off. I am setting cookies and starting a session in the following fashion: setcookie(EMAILADDR, $row[EMAIL], time()+2592000, '/', .$dn); where $dn = mydomain.com I want the cookies accessible sitewide .. at www.mydomain.com, mydomain.com, forums.mydomain.com, etc. in IE 6.0, and NS 7.0, it seems this is being accomplished correctly. In NS 4.8, the cookies are never even getting set. Can anyone tell me as to why? I've been prodding around cookie docs and trying to find something that works in all browsers, and a lot of people seem to have the same question.. Thanks! Chad -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Writing text files in Windows 2k
Doh, doh, doh! Just saw b was allowed for binary on the fopen page. Never mind. On Mon, 2003-02-10 at 09:13, Adam Voigt wrote: Precisely where did you get the b in your second parameter to fopen? I didn't see it on the fopen manual page at: http://www.php.net/fopen If you just want to write to the file and not read it, try changing the second parameter to just w. On Mon, 2003-02-10 at 03:34, Joe Njeru wrote: Hi All, I need to write some data to a text file but when I use $this-ao_file_handle = fopen($this-ao_file_name,ab); $str_txt.= \n; fwrite($this-ao_file_handle,$str_txt); It does not display the new line. I saw somwhere that for DOS files you need to use ASCII LF and CR. Which I did. It still does not display the new line. Thanks in advance Joe Njeru -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Adam Voigt ([EMAIL PROTECTED]) The Cryptocomm Group My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc -- Adam Voigt ([EMAIL PROTECTED]) The Cryptocomm Group My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc signature.asc Description: This is a digitally signed message part
RE: [PHP] Writing text files in Windows 2k
-Original Message- From: Adam Voigt [mailto:[EMAIL PROTECTED]] Sent: 10 February 2003 14:13 Precisely where did you get the b in your second parameter to fopen? I didn't see it on the fopen manual page at: http://www.php.net/fopen http://www.php.net/fopen Er -- quoting from that very page: Note: The mode may contain the letter 'b'. This is useful only on systems which differentiate between binary and text files (i.e. Windows. It's useless on Unix). If not needed, this will be ignored. You are encouraged to include the 'b' flag in order to make your scripts more portable Cheers! Mike - Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning Information Services, JG125, James Graham Building, Leeds Metropolitan University, Beckett Park, LEEDS, LS6 3QS, United Kingdom Email: [EMAIL PROTECTED] Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Writing text files in Windows 2k
Hi All The following is the text file generated. I'm runing on Windows 2k spack 3, When I open it in Excell it gives me the data but not seperated into lines. Do you have any suggestions. Joe Njeru, Nairobi, Kenya. begin 666 veh_fuel_iss_hist_rpt.csv M,C P,BTQ,2TP,CM!,C R,3DV.U!%5%)/3 M(%-54$52.S(Y.S$U-S[.#Q M-CD[34%.1U5253M'14]21T4-C(P,#(M,3$M,#([03(P,C$Y-CM015123TP@ M+2!355!%4CLR.3LQ-3W.S@W,38Y.TU!3D=54E4[1T5/4D=%,C P,BTQ,2TQ M,3M!,C R.#W.U!%5%)/3 M(%-54$52.S,Q.S$W-C0[.#T-3 [3U5-03M M3T]+15(-C(P,#(M,3$M,#([03(P,C$Y-CM015123TP@+2!355!%4CLR.3LQ M-3W.S@W,38Y.TU!3D=54E4[1T5/4D=%,C P,BTQ,2TQ,3M!,C R.#W.U!% M5%)/3 M(%-54$52.S,Q.S$W-C0[.#T-3 [3U5-03M3T]+15(R,# R+3$Q M+3$W.T$R,#,S-#D[4$544D],(T@4U5015([,S,[,3@T-SLX-SY.3M/54U! M.T)/3TM%4@T*,C P,BTQ,2TP,CM!,C R,3DV.U!%5%)/3 M(%-54$52.S(Y M.S$U-S[.#Q-CD[34%.1U5253M'14]21T4R,# R+3$Q+3$Q.T$R,#(X-S[ M4$544D],(T@4U5015([,S$[,3V-#LX-S0U,#M/54U!.T)/3TM%4C(P,#(M M,3$M,3[03(P,S,T.3M015123TP@+2!355!%4CLS,SLQ.#[EMAIL PROTECTED]]5 M34$[0D]/2T52,C P,BTQ,2TQ.3M!,C S-34Q.U!%5%)/3 M(%-54$52.S,Q M.S$W,C8[.#@Q,#4[3U5-03M3T]+15(-C(P,#(M,3$M,#([03(P,C$Y-CM0 M15123TP@+2!355!%4CLR.3LQ-3W.S@W,38Y.TU!3D=54E4[1T5/4D=%,C P M,BTQ,2TQ,3M!,C R.#W.U!%5%)/3 M(%-54$52.S,Q.S$W-C0[.#T-3 [ M3U5-03M3T]+15(R,# R+3$Q+3$W.T$R,#,S-#D[4$544D],(T@4U5015([ M,S,[,3@T-SLX-SY.3M/54U!.T)/3TM%4C(P,#(M,3$M,3D[03(P,S4U,3M0 M15123TP@+2!355!%4CLS,3LQ-S(V.S@X,3 U.T]534$[0D]/2T52,C P,BTQ M,BTP-SM!,C U,#$T.U!%5%)/3 M(%-54$52.S,S.S$X-SD[.#@V.#$[34%. M1U5253M'14]21T4-C(P,#(M,3$M,#([03(P,C$Y-CM015123TP@+2!355!% M4CLR.3LQ-3W.S@W,38Y.TU!3D=54E4[1T5/4D=%,C P,BTQ,2TQ,3M!,C R M.#W.U!%5%)/3 M(%-54$52.S,Q.S$W-C0[.#T-3 [3U5-03M3T]+15(R M,# R+3$Q+3$W.T$R,#,S-#D[4$544D],(T@4U5015([,S,[,3@T-SLX-SY M.3M/54U!.T)/3TM%4C(P,#(M,3$M,3D[03(P,S4U,3M015123TP@+2!355!% M4CLS,3LQ-S(V.S@X,3 U.T]534$[0D]/2T52,C P,BTQ,BTP-SM!,C U,#$T M.U!%5%)/3 M(%-54$52.S,S.S$X-SD[.#@V.#$[34%.1U5253M'14]21T4R M,# R+3$R+3$V.T$R,#4V.3 [4$544D],(T@4U5015([,S([,3W,SLX.#DV M-CM/54U!.T)/3TM%4@T*,C P,BTQ,2TP,CM!,C R,3DV.U!%5%)/3 M(%-5 M4$52.S(Y.S$U-S[.#Q-CD[34%.1U5253M'14]21T4R,# R+3$Q+3$Q.T$R M,#(X-S[4$544D],(T@4U5015([,S$[,3V-#LX-S0U,#M/54U!.T)/3TM% M4C(P,#(M,3$M,3[03(P,S,T.3M015123TP@+2!355!%4CLS,SLQ.#0W.S@W M-SDY.T]534$[0D]/2T52,C P,BTQ,2TQ.3M!,C S-34Q.U!%5%)/3 M(%-5 M4$52.S,Q.S$W,C8[.#@Q,#4[3U5-03M3T]+15(R,# R+3$R+3 W.T$R,#4P M,30[4$544D],(T@4U5015([,S,[,[EMAIL PROTECTED]#8X,3M-04Y'55)5.T=%3U)' M13(P,#(M,3(M,38[03(P-38Y,#M015123TP@+2!355!%4CLS,CLQ-SS.S@X M.38V.T]534$[0D]/2T52,C P,BTQ,BTR-SM!,C V-#X.U!%5%)/3 M(%-5 M4$52.S,T.S$Y-S,[.#DV,#8[34%.1U5253M'14]21T4-C(P,#(M,3$M,#([ M03(P,C$Y-CM015123TP@+2!355!%4CLR.3LQ-3W.S@W,38Y.TU!3D=54E4[ M1T5/4D=%,C P,BTQ,2TQ,3M!,C R.#W.U!%5%)/3 M(%-54$52.S,Q.S$W M-C0[.#T-3 [3U5-03M3T]+15(R,# R+3$Q+3$W.T$R,#,S-#D[4$544D], M(T@4U5015([,S,[,3@T-SLX-SY.3M/54U!.T)/3TM%4C(P,#(M,3$M,3D[ M03(P,S4U,3M015123TP@+2!355!%4CLS,3LQ-S(V.S@X,3 U.T]534$[0D]/ M2T52,C P,BTQ,BTP-SM!,C U,#$T.U!%5%)/3 M(%-54$52.S,S.S$X-SD[ M.#@V.#$[34%.1U5253M'14]21T4R,# R+3$R+3$V.T$R,#4V.3 [4$544D], M(T@4U5015([,S([,3W,SLX.#DV-CM/54U!.T)/3TM%4C(P,#(M,3(M,C[ M03(P-C0W.#M015123TP@+2!355!%4CLS-#LQ.3S.S@Y-C V.TU!3D=54E4[ M1T5/4D=%,C P,BTQ,BTS,#M!,C V-34S.U!%5%)/3 M(%-54$52.S,P.S$W M-3D[.#DY,C,[3U5-03M3T]+15(-C(P,#(M,3$M,#([03(P,C$Y-CM01512 M3TP@+2!355!%4CLR.3LQ-3W.S@W,38Y.TU!3D=54E4[1T5/4D=%,C P,BTQ M,2TQ,3M!,C R.#W.U!%5%)/3 M(%-54$52.S,Q.S$W-C0[.#T-3 [3U5- M03M3T]+15(R,# R+3$Q+3$W.T$R,#,S-#D[4$544D],(T@4U5015([,S,[ M,3@T-SLX-SY.3M/54U!.T)/3TM%4C(P,#(M,3$M,3D[03(P,S4U,3M01512 M3TP@+2!355!%4CLS,3LQ-S(V.S@X,3 U.T]534$[0D]/2T52,C P,BTQ,BTP M-SM!,C U,#$T.U!%5%)/3 M(%-54$52.S,S.S$X-SD[.#@V.#$[34%.1U52 M53M'14]21T4R,# R+3$R+3$V.T$R,#4V.3 [4$544D],(T@4U5015([,S([ M,3W,SLX.#DV-CM/54U!.T)/3TM%4C(P,#(M,3(M,C[03(P-C0W.#M01512 M3TP@+2!355!%4CLS-#LQ.3S.S@Y-C V.TU!3D=54E4[1T5/4D=%,C P,BTQ M,BTS,#M!,C V-34S.U!%5%)/3 M(%-54$52.S,P.S$W-3D[.#DY,C,[3U5- M03M3T]+15(R,# S+3 Q+3 U.T$R,#8X,C@[4$544D],(T@4U5015([,C4[ M,30V-3LY,#$X,#M-04Y'55)5.T=%3U)'10T*,C P,BTQ,2TP,CM!,C R,3DV M.U!%5%)/3 M(%-54$52.S(Y.S$U-S[.#Q-CD[34%.1U5253M'14]21T4R M,# R+3$Q+3$Q.T$R,#(X-S[4$544D],(T@4U5015([,S$[,3V-#LX-S0U M,#M/54U!.T)/3TM%4C(P,#(M,3$M,3[03(P,S,T.3M015123TP@+2!355!% M4CLS,SLQ.#[EMAIL PROTECTED]]534$[0D]/2T52,C P,BTQ,2TQ.3M!,C S-34Q M.U!%5%)/3 M(%-54$52.S,Q.S$W,C8[.#@Q,#4[3U5-03M3T]+15(R,# R M+3$R+3 W.T$R,#4P,30[4$544D],(T@4U5015([,S,[,[EMAIL PROTECTED]#8X,3M- M04Y'55)5.T=%3U)'13(P,#(M,3(M,38[03(P-38Y,#M015123TP@+2!355!% M4CLS,CLQ-S[EMAIL PROTECTED]]534$[0D]/2T52,C P,BTQ,BTR-SM!,C V-#X M.U!%5%)/3 M(%-54$52.S,T.S$Y-S,[.#DV,#8[34%.1U5253M'14]21T4R M,# R+3$R+3,P.T$R,#8U-3,[4$544D],(T@4U5015([,S [,3U.3LX.3DR M,SM/54U!.T)/3TM%4C(P,#,M,#$M,#4[03(P-C@R.#M015123TP@+2!355!% M4CLR-3LQ-#8U.SDP,[EMAIL PROTECTED]!3D=54E4[1T5/4D=%,C P,RTP,2TQ,CM!,C W M-# X.U!%5%)/3 M(%-54$52.S,R.S$Y-C,[.3 T.#([34%.1U5253M'14]2 M1T4-C(P,#(M,3$M,#([03(P,C$Y-CM015123TP@+2!355!%4CLR.3LQ-3W M.S@W,38Y.TU!3D=54E4[1T5/4D=%,C P,BTQ,2TQ,3M!,C R.#W.U!%5%)/ M3 M(%-54$52.S,Q.S$W-C0[.#T-3 [3U5-03M3T]+15(R,# R+3$Q+3$W
[PHP] Re: iCal parser and importing iCal to database
PHP Icalendar could be seen as a program which imports iCalendar formatted info into a database. http://phpicalendar.sf.net kellan On Thu, 30 Jan 2003 19:40:15 +, Reuben D. Budiardja wrote: Hi, I think this has been asked here before and I've looked around the archive but didn't find anything. So I ask again. Does anyone know if there's a utility/script/program in php that will allow one to parse and/or import iCAL calendar format to database, such as mySQL or PostGreSQL? Thanks for any info. RDB -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] WYSIWIG CMS Part1
I have a same question in my mind about XML. I have another question in my mind too. If we are using smarty template engine in our development then what is need of XML and XSLT for presentation layer? I think XML and XSLT work is automatically done in smarty template engine. Am i right? Please correct me if i am wrong. Let me know which one is good to use smarty engine or XML,XSLT for seperating interface and php code? thanks Hardik --- Sascha Braun [EMAIL PROTECTED] wrote: I know how XML works and how a wellformed document may look like, but I must say, I really dont know why I should use XML as long I store everything in a Database. I've read about all good CMS Systems use XML as a musthave, but I don't understand why. Would be nice, if you would explain me which data I should store in XML and why. Maybe its usefull together with big Customer Management Systems, or do you have other Ideas? Please discuss a little about it with me, I would find it very interesting :)) CYA Sascha - Original Message - From: Aaron [EMAIL PROTECTED] To: Sascha Braun [EMAIL PROTECTED] Sent: Sunday, February 09, 2003 11:43 PM Subject: Re: [PHP] WYSIWIG CMS Part1 look into using XML if you havent already. Sascha Braun wrote: Ok, overspoken. I'm going to write my basic CMS Concept here, and let us see what happens then. My Multilanguage Frontend Engine has even finished, but still needs a nice Admin Frontend to do the translation of the Frontend. Ok, lets start. Later I will tell some about the things which I could not really understand yet, maybe somebody is able to help. Tasks of the CMS (I called it freecon, dont know if there is something similar): 1. Template Engine 2. Design Management 3. Article Management 4. Content Management 5. User Management 6. Customer Management 7. Message Management 1. The Template Engine should help developers to easy build Websites based on the CMS. The only Thing the Developer has to do, is to develop an static HTML Webpage Design and replace all the Visitor viewable and Admin viewable textparts with special CMS Based Tags. As there is possibility to write parts of the CMS as Modules, it would be very nice if fx. the customer login could consist of a small code sniped and a border (Table and Images fx.) so the developer can easely change the design of the page, probably with the Design Management. 2. The Design Management is part of the Administration Kit for the CMS. With this tool you should be able to change the Design of the Templates and if you used the CMS Based Tags you should be able to upload new parts of the homepage design and change the hole page look, with a few mouseclicks. So there has be an Design Table in the Database or an configuration file, where all the Imageparts are stored and together build the page look and feel. The CSS Stylesheet should the be changeable to a lot of forms, seen in phpbb or other nice templated website tools. 3. The Article Management should be part of the Admin Interface where you can deside, of which parts an article should be consist. Fx. an Article could possibly consist of an Headline, Introduction, Shortdescription, Description, 1 Image, 2 Images and much more. So it would be nice, if the Admin could give some orders on which parts a text may consist of and which design you should be able to chose from. When you want to write a new Newstext and the Admin decided that newstexts should consist of an headline and a short description toghether with the maximum of 1 Picture, you will chose when you want to create the text in which language you want to create it and you will enter an custom frontend for the article, where only the form fields are visible you may use to write the article, when you wanted you create the article in more than one language, you will able to choose if you want to see all forms. (I mean for the different translations on one page or you will be able to enter the translate mode, where you will see fx, headline in english and an empty headline form below for Italian language, But Later Ill explain more about the article mana- gement). I choosed to do it in this way, because it will reduce the space needed by the database enormously, because there is an table which only holds the head- lines, in all languages, and another one only holds the introductions, in all langua- ges, and so on. 4. The Content Management, I started to explain in 3. a little about how it should work. Now I will get a little deeper into it. When your Chief decides that you should write an article, he starts entering a new title or headline for the task and sets the priority and chooses in which language the article should be translated in. After he did this, he chooses between his em- ployes
Re: [PHP] Writing text files in Windows 2k
Joe Njeru wrote: Hi All The following is the text file generated. I'm runing on Windows 2k spack 3, When I open it in Excell it gives me the data but not seperated into lines. Do you have any suggestions. It does for me in Excle 97 SP2, but I suspect there should be more lines than there are (I get 13 lines). Some lines look as though they should be split up. Assuming each line should begin with a date, then they are not on separate lines because there is no end-of-line there. HTH Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Writing text files in Windows 2k
Yes, I'm aware of that, if you would have read my reply 10 seconds after I sent the first one, I corrected myself. On Mon, 2003-02-10 at 09:25, Ford, Mike [LSS] wrote: -Original Message- From: Adam Voigt [mailto:[EMAIL PROTECTED]] Sent: 10 February 2003 14:13 Precisely where did you get the b in your second parameter to fopen? I didn't see it on the fopen manual page at: http://www.php.net/fopen http://www.php.net/fopen Er -- quoting from that very page: Note: The mode may contain the letter 'b'. This is useful only on systems which differentiate between binary and text files (i.e. Windows. It's useless on Unix). If not needed, this will be ignored. You are encouraged to include the 'b' flag in order to make your scripts more portable Cheers! Mike - Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning Information Services, JG125, James Graham Building, Leeds Metropolitan University, Beckett Park, LEEDS, LS6 3QS, United Kingdom Email: [EMAIL PROTECTED] Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 -- Adam Voigt ([EMAIL PROTECTED]) The Cryptocomm Group My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc signature.asc Description: This is a digitally signed message part
Re: [PHP] PHP Script Encryption!!!!
Hello Pankaj, With PHP you use libmcrypt and the PHP mcrypt functions to do encryption. Basically you need to install libmcrypt (you do not need mcrypt, just libmcrypt) and then add --with-mcrypt=/path/to/install (this is usually /usr/local) to your PHP configuration line. You can check to see if mcrypt support is already compiled into your PHP by doing a phpinfo(): and looking for --with-mcrypt on the configure line and an mcrypt section. I've written a PHP Class the simplifies using mcrypt functions, its called crypt class and is available on Freshmeat.net at: http://freshmeat.net/projects/cryptclass/?topic_id=90 You do not need that script to do encryption with PHP but I've found for me it makes many things easier. Take a look at the PHP manual at http://www.php.net/mcrypt as well, it has examples of using mcrypt and a lot of good user contributed notes. Jason On Mon, 2003-02-10 at 07:20, Pankaj Naug wrote: hiii!! 1. can anyone help me out with php script encryption.. are there any freeware which i can use to encrypt my php scripts. 2. have anybody has any ready made code which take's a directory path and uses linux shell command to execute them??? actually i want to use a shell command which takes a file name as input.. i want to use the shell command for the whole directory.. thats it get back to me as soon as possible -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Vulvan Logic SRM - does anyone use it?
On 10 Feb 2003, Tamas Arpad wrote: I'm thinking about using SRM application server for storing cached data. But I have to convince my customers that it's stable enough and is ready to use in production environment. Is it considered stable enough to use in such applications? As I see it hasn't been maintained for at least half year. I won't consider it production stable _yet_, we're still working on it though, and it is definitely maintained. But without a lot of feedback we don't know about the things that go wrong. regards, Derick -- - Derick Rethans http://derickrethans.nl/ PHP Magazine - PHP Magazine for Professionals http://php-mag.net/ - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Why does this happen?
H... So in the receiving page I'll need to string together date_year[i], date_month[i] and date_day[i] in order to get the full date for each scheduled game. Which is what CF apparently glues together for the developer on the fly. I'll try out both this method and the array method suggested by OP (I need practice working with arrays in PHP anyway). Thanks for the informative reply, --Noah - Original Message - From: Ford, Mike [LSS] [EMAIL PROTECTED] To: 'CF High' [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Monday, February 10, 2003 5:28 AM Subject: RE: [PHP] Why does this happen? -Original Message- From: CF High [mailto:[EMAIL PROTECTED]] Sent: 09 February 2003 20:52 Here's the deal: Let's say I have a form that requests the season schedule of a baseball team, and the team in question has twenty scheduled games all on different days. Each form row will have three select elements for the date; i.e. date(x) for the year, date(x+1) for the month, and date(x+2) for the day, or however I'll need to make each date select element unique. Then, in the insert page, I'll need to loop through each date element by groups of three and create an array for each date set. If I'm reading this right, you need to do something like this on your form page: form ?php for ($i=1; $i=20; $i++): ? select name=date_year[?php echo $i ?] ... /select select name=date_month[?php echo $i ?] ... /select ... ?php endfor; ? /form and then your receiving page will have arrays called $_POST['date_year'], $_POST['date_month'], etc (or the equivalent globals if you've chosen the insecure register_globals On route). Cheers! Mike - Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning Information Services, JG125, James Graham Building, Leeds Metropolitan University, Beckett Park, LEEDS, LS6 3QS, United Kingdom Email: [EMAIL PROTECTED] Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Script Encryption!!!!
Just incase you meant encrypt your php scripts and not encrypt with your php scripts, check out: http://www.ioncube.com/ Not free, but very cheap (they have a online encoder that charges by the amount of code, a simple app is less then $5.00). On Mon, 2003-02-10 at 10:04, Jason Sheets wrote: Hello Pankaj, With PHP you use libmcrypt and the PHP mcrypt functions to do encryption. Basically you need to install libmcrypt (you do not need mcrypt, just libmcrypt) and then add --with-mcrypt=/path/to/install (this is usually /usr/local) to your PHP configuration line. You can check to see if mcrypt support is already compiled into your PHP by doing a phpinfo(): and looking for --with-mcrypt on the configure line and an mcrypt section. I've written a PHP Class the simplifies using mcrypt functions, its called crypt class and is available on Freshmeat.net at: http://freshmeat.net/projects/cryptclass/?topic_id=90 You do not need that script to do encryption with PHP but I've found for me it makes many things easier. Take a look at the PHP manual at http://www.php.net/mcrypt as well, it has examples of using mcrypt and a lot of good user contributed notes. Jason On Mon, 2003-02-10 at 07:20, Pankaj Naug wrote: hiii!! 1. can anyone help me out with php script encryption.. are there any freeware which i can use to encrypt my php scripts. 2. have anybody has any ready made code which take's a directory path and uses linux shell command to execute them??? actually i want to use a shell command which takes a file name as input.. i want to use the shell command for the whole directory.. thats it get back to me as soon as possible -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Adam Voigt ([EMAIL PROTECTED]) The Cryptocomm Group My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc signature.asc Description: This is a digitally signed message part
Re: [PHP] WYSIWIG CMS Part1
Mh, I don't really know, but I think smarty is even better, because XSL Stylesheets have to be translatet by an extra Server Engine, so everything can be translatet into HTML, so far as I know. So it is not possible to just work with an standard Apache unless you install an extra XML Module or special Apache Version on the Server. Smarty can be used without installing some extra things, I think. But really don't know either, because I never used smarty before, just read a little about it ;)). XML should maybe be used to store Configurationfiles and Database Content into static files for exchanging the Content with other Applikations like Quark Xpress or Indesign or maybe to share it with with Cellphones (Which there is no need to, because PHP is able to write XHTML). I don't know if there is an XML/XSL Browser Around or how the Data could be shown, if I would know I would start to write all my Websites in XML, if this is possible. Maybe someone knows a litte more and want to tell some about. Have a nice day! Sascha - Original Message - From: Hardik Doshi [EMAIL PROTECTED] To: Sascha Braun [EMAIL PROTECTED]; PHP General list [EMAIL PROTECTED]; Aaron [EMAIL PROTECTED] Sent: Monday, February 10, 2003 3:55 PM Subject: Re: [PHP] WYSIWIG CMS Part1 I have a same question in my mind about XML. I have another question in my mind too. If we are using smarty template engine in our development then what is need of XML and XSLT for presentation layer? I think XML and XSLT work is automatically done in smarty template engine. Am i right? Please correct me if i am wrong. Let me know which one is good to use smarty engine or XML,XSLT for seperating interface and php code? thanks Hardik --- Sascha Braun [EMAIL PROTECTED] wrote: I know how XML works and how a wellformed document may look like, but I must say, I really dont know why I should use XML as long I store everything in a Database. I've read about all good CMS Systems use XML as a musthave, but I don't understand why. Would be nice, if you would explain me which data I should store in XML and why. Maybe its usefull together with big Customer Management Systems, or do you have other Ideas? Please discuss a little about it with me, I would find it very interesting :)) CYA Sascha - Original Message - From: Aaron [EMAIL PROTECTED] To: Sascha Braun [EMAIL PROTECTED] Sent: Sunday, February 09, 2003 11:43 PM Subject: Re: [PHP] WYSIWIG CMS Part1 look into using XML if you havent already. Sascha Braun wrote: Ok, overspoken. I'm going to write my basic CMS Concept here, and let us see what happens then. My Multilanguage Frontend Engine has even finished, but still needs a nice Admin Frontend to do the translation of the Frontend. Ok, lets start. Later I will tell some about the things which I could not really understand yet, maybe somebody is able to help. Tasks of the CMS (I called it freecon, dont know if there is something similar): 1. Template Engine 2. Design Management 3. Article Management 4. Content Management 5. User Management 6. Customer Management 7. Message Management 1. The Template Engine should help developers to easy build Websites based on the CMS. The only Thing the Developer has to do, is to develop an static HTML Webpage Design and replace all the Visitor viewable and Admin viewable textparts with special CMS Based Tags. As there is possibility to write parts of the CMS as Modules, it would be very nice if fx. the customer login could consist of a small code sniped and a border (Table and Images fx.) so the developer can easely change the design of the page, probably with the Design Management. 2. The Design Management is part of the Administration Kit for the CMS. With this tool you should be able to change the Design of the Templates and if you used the CMS Based Tags you should be able to upload new parts of the homepage design and change the hole page look, with a few mouseclicks. So there has be an Design Table in the Database or an configuration file, where all the Imageparts are stored and together build the page look and feel. The CSS Stylesheet should the be changeable to a lot of forms, seen in phpbb or other nice templated website tools. 3. The Article Management should be part of the Admin Interface where you can deside, of which parts an article should be consist. Fx. an Article could possibly consist of an Headline, Introduction, Shortdescription, Description, 1 Image, 2 Images and much more. So it would be nice, if the Admin could give some orders on which parts a text may consist of and which design you should be able to chose from. When you want to write a new Newstext and the Admin decided that newstexts
[PHP] Code
Hi, This is the code that creates the file function writeln_to_file($str_txt) /* Definition: This function writes/appends $str_txt to the file Parameters: $str_txt; String; The String to be written to file ReturnType: NONE; */ { if (!file_exists($this-ao_file_name)) // if the file exists { $this-create_file(); $this-writeln_to_file($str_txt); } else { $str_txt .= \r\n; $this-ao_file_handle = fopen($this-ao_file_name,ab); fwrite($this-ao_file_handle,$str_txt); } } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Php 4.3
Hello, I am having issues after I upgraded from 4.0.5 to 4.3 Alot of my link pages were based in www.something.com/phptest.php?foo=9323 Now that I have upgraded, I get foo errors. It says that it no longer gets the foo value... how can I fix this? THanks -T
Re: [PHP] Shopping Cart
Shopping Carts are pretty easy to write. Just make a new table in your mysql DB and then write a session_id together with the sku and name, color, size, quantity and maybe customer_id into the the new shoppingcart table. When you want to show the shopping carts content just do an select from the carts table. As I save the prices into an extra table I do a SELECT * FROM basket, price, item WHERE basket.sku = item.sku AND item.price = price.key Later i use a price.q1 field and multiply it with the quantity of the item to get the full price. Hope this helps you a little. Sascha - Original Message - From: Chris Cook [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, February 09, 2003 10:35 PM Subject: [PHP] Shopping Cart Hello everybody, I am interested in designing a site with a shopping cart. I have several years of programming experience in php and perl, but I have never made a shopping cart. I was looking into some of the already made shopping carts and was wondering what peoples' experiences have been with already made shopping carts. Ultimately, I am wondering whether I should code it from scratch or not. Thanks in advance for any help, Chris _ STOP MORE SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Php 4.3
Check the archives about global variables in the php.ini file Hello, I am having issues after I upgraded from 4.0.5 to 4.3 Alot of my link pages were based in www.something.com/phptest.php?foo=9323 Now that I have upgraded, I get foo errors. It says that it no longer gets the foo value... how can I fix this? THanks -T -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Session Time
Got a quick and easy question that I'm not sure about. What I need to do is calculate how long someone has been in a chatroom, then update a members table to add some money to their account. Something like this: For every hour they're in the chatroom: 5 cents Thanks, Stephen Craton http://www.melchior.us -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] $_SESSION['user']['nickname'] = Herbert
Hi is something wrong with the above show argument? Under Windows everything works fine under linux it just shows me an 0 or 1, maybe for true or false, dont know. Please help me, what did i do wrong??? Sascha -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Php 4.3
edit the php.ini file changing register_globals = On then restart httpd. When register_globals is set to Off you cannot access post or get variables in the usual way but you need to address the $_GET, $_POST array (or the general $_REQUEST). More details on the manual... - Original Message - From: Todd Barr [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, February 10, 2003 7:39 PM Subject: [PHP] Php 4.3 Hello, I am having issues after I upgraded from 4.0.5 to 4.3 Alot of my link pages were based in www.something.com/phptest.php?foo=9323 Now that I have upgraded, I get foo errors. It says that it no longer gets the foo value... how can I fix this? THanks -T -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Why use XML?
Hi, well Im out of a job so I am sitting around learning XML. It seems like a great tool, but I am trying to figure out why I would actually use it? All it does is seperate content and data, albeit on the client, but that is what I have been doing with Smarty and MySQL for awhile now. Why would I choose to parse XML documents with PHP and do transformations on the server, it sounds terribly inefficient and complicated, as opposed to just pulling data out of a database. I also realize that I can generate XML dynamically (ie include PHP code in an actual XML template) by editing my Apache config, but that is not always an option and what would be the point? It would just add another layer of content/data seperation that would have to processed on the other end. Thanks Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] $_POST index issues
I have run into a problem with some of my code surrounding $_POST. Below are excepts: Sending PHP script (login.php) FORM METHOD=POST ACTION=/verify_login.php BIUsername/B/I INPUT NAME=username_given SIZE=20 BIPassword/B/I INPUT NAME=password_given TYPE=password SIZE=20 INPUT TYPE=submit VALUE=Login /FORM Receiving script (verify_login.php) foreach ($_POST as $key = $value ) { echo !-- $key == $value --\n; } $db_connection = odbc_connect( $GLOBALS[db_dsn], $GLOBALS[db_username], $GLOBALS[db_password] ); echo !-- username_given == $_POST['username_given'] --\n; $query = select username, active, password, clec_id from users where USERNAME=\$_POST['username_given']\; I get the following errors: PHP Notice: Undefined index: 'username_given' in /var/www/e911.e-c-group.com/verify_login.php on line 19 PHP Notice: Undefined index: 'username_given' in /var/www/e911.e-c-group.com/verify_login.php on line 21 However, the for loop above produces the following output. !-- username_given == jpuckett -- !-- password_given == password -- Any ideas what I am doing wrong? James G Puckett ECG, Inc. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] any windows php developers out here?
http://php.e-novative.de/ephp.php Just look at this link, you will find a windows installer there, it installs Apache, PHP, MySQL and phpMyAdmin just from scratch, without you to know what you do ;))) Sascha - Original Message - From: Victor [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, February 09, 2003 12:13 AM Subject: [PHP] any windows php developers out here? Hello, I am wondering if any of you got a reliable php and MySQL installation (MySQL is easy) I am mostly wondering if there is a point in tying to use windows as a development platform for PHP. I have a nice and working red hat 8.0 installation, but I did an upgrade from 7.3 and now apache doesn't work cuz it wants me to switch form apache 1.X to 2.X and all I want is to erase the old apache and use the new one or erase the new one and use the old one, whichever works. But anyway... I also do design and I have people submit me illustrator and Photoshop files and word docs, so for now I might have to stick to windows for work. BUT what do u suggest? I it futile to try to get php to work in windows? With IIS preferably so that I can play with ASP and Cold Fusion once in a while. Please help if you are using windows with php and send me some instructions if you feel like it, much appreciated. - Vic __ Post your free ad now! http://personals.yahoo.ca -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] WYSIWIG CMS Part1
I think XML and XSLT are the alternative of Smarty template engine. But i dont know how i can sepeatate my code using XML and XSL style sheets? If anyone can give me more information then it would be nice. I know how to write XSL style sheet along with XML document. But i really dont know what contents should be in XML. If XML contains data (and it is true) then what is the need of MySQL? At last i can say i don't know application of XML and XSL for seperating PHP and HTML code. Please Clear my doubts. Hardik --- Sascha Braun [EMAIL PROTECTED] wrote: Mh, I don't really know, but I think smarty is even better, because XSL Stylesheets have to be translatet by an extra Server Engine, so everything can be translatet into HTML, so far as I know. So it is not possible to just work with an standard Apache unless you install an extra XML Module or special Apache Version on the Server. Smarty can be used without installing some extra things, I think. But really don't know either, because I never used smarty before, just read a little about it ;)). XML should maybe be used to store Configurationfiles and Database Content into static files for exchanging the Content with other Applikations like Quark Xpress or Indesign or maybe to share it with with Cellphones (Which there is no need to, because PHP is able to write XHTML). I don't know if there is an XML/XSL Browser Around or how the Data could be shown, if I would know I would start to write all my Websites in XML, if this is possible. Maybe someone knows a litte more and want to tell some about. Have a nice day! Sascha - Original Message - From: Hardik Doshi [EMAIL PROTECTED] To: Sascha Braun [EMAIL PROTECTED]; PHP General list [EMAIL PROTECTED]; Aaron [EMAIL PROTECTED] Sent: Monday, February 10, 2003 3:55 PM Subject: Re: [PHP] WYSIWIG CMS Part1 I have a same question in my mind about XML. I have another question in my mind too. If we are using smarty template engine in our development then what is need of XML and XSLT for presentation layer? I think XML and XSLT work is automatically done in smarty template engine. Am i right? Please correct me if i am wrong. Let me know which one is good to use smarty engine or XML,XSLT for seperating interface and php code? thanks Hardik --- Sascha Braun [EMAIL PROTECTED] wrote: I know how XML works and how a wellformed document may look like, but I must say, I really dont know why I should use XML as long I store everything in a Database. I've read about all good CMS Systems use XML as a musthave, but I don't understand why. Would be nice, if you would explain me which data I should store in XML and why. Maybe its usefull together with big Customer Management Systems, or do you have other Ideas? Please discuss a little about it with me, I would find it very interesting :)) CYA Sascha - Original Message - From: Aaron [EMAIL PROTECTED] To: Sascha Braun [EMAIL PROTECTED] Sent: Sunday, February 09, 2003 11:43 PM Subject: Re: [PHP] WYSIWIG CMS Part1 look into using XML if you havent already. Sascha Braun wrote: Ok, overspoken. I'm going to write my basic CMS Concept here, and let us see what happens then. My Multilanguage Frontend Engine has even finished, but still needs a nice Admin Frontend to do the translation of the Frontend. Ok, lets start. Later I will tell some about the things which I could not really understand yet, maybe somebody is able to help. Tasks of the CMS (I called it freecon, dont know if there is something similar): 1. Template Engine 2. Design Management 3. Article Management 4. Content Management 5. User Management 6. Customer Management 7. Message Management 1. The Template Engine should help developers to easy build Websites based on the CMS. The only Thing the Developer has to do, is to develop an static HTML Webpage Design and replace all the Visitor viewable and Admin viewable textparts with special CMS Based Tags. As there is possibility to write parts of the CMS as Modules, it would be very nice if fx. the customer login could consist of a small code sniped and a border (Table and Images fx.) so the developer can easely change the design of the page, probably with the Design Management. 2. The Design Management is part of the Administration Kit for the CMS. With this tool you should be able to change the Design of the Templates and if you used the CMS Based Tags you should be able to upload new parts of the homepage design and change the hole page look, with a few mouseclicks. So there has be an Design Table in the Database or an
Re: [PHP] $_POST index issues
At 16:47 10.02.2003, James G Puckett spoke out and said: [snip] echo !-- username_given == $_POST['username_given'] --\n; $query = select username, active, password, clec_id from users where USERNAME=\$_POST['username_given']\; [snip] I'm not sure if this is the source of your problems, but when referencing an array from within a string you should put it in curly quotes: echo !-- username_given == {$_POST['username_given']} --\n; $query = select username, active, password, clec_id from users where USERNAME=\{$_POST['username_given']}\; -- 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
RE: [PHP] $_POST index issues
This indeed was the problem. Case closed. Thanks for the help. James G Puckett ECG, Inc. -Original Message- From: Ernest E Vogelsinger [mailto:[EMAIL PROTECTED]] Sent: Monday, February 10, 2003 10:55 AM To: James G Puckett Cc: [EMAIL PROTECTED] Subject: Re: [PHP] $_POST index issues At 16:47 10.02.2003, James G Puckett spoke out and said: [snip] echo !-- username_given == $_POST['username_given'] --\n; $query = select username, active, password, clec_id from users where USERNAME=\$_POST['username_given']\; [snip] I'm not sure if this is the source of your problems, but when referencing an array from within a string you should put it in curly quotes: echo !-- username_given == {$_POST['username_given']} --\n; $query = select username, active, password, clec_id from users where USERNAME=\{$_POST['username_given']}\; -- 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] Delimited file values behaving strangely...
Hi folks, A strange one - unless I am having a brainstorm... I am reading in tab delimited files created in Excel on Windows and uploaded to Linux. Cell A1 contains a numeric id - I extract this into a variable, $id, by exploding on \n and \t. But for some files, the values of $id do not behave as expected. Say the value should be 23. If I echo, it prints as 23. But comparisons fail to match: if( $id == 23 ) ... It also fails if I try to find the value as a key in an array: if( isset( $my_array[$id] ) ) ... On the other hand, values from some of the files work as expected. One clue: if I try and cast the values that are failing to int, the cast produces the value 0 (zero). On the other hand, the values that are working as expected cast from, say, the string 22 to the int 22 as expected. Never seen anything like this before - can anyone give me a pointer?? -- Geoff Caplan Advantae Ltd -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Delimited file values behaving strangely...
I'm guessing it containt a trailing space, which wouldn't display in HTML. Try trim()ing it. Geoff Caplan wrote: Hi folks, A strange one - unless I am having a brainstorm... I am reading in tab delimited files created in Excel on Windows and uploaded to Linux. Cell A1 contains a numeric id - I extract this into a variable, $id, by exploding on \n and \t. But for some files, the values of $id do not behave as expected. Say the value should be 23. If I echo, it prints as 23. But comparisons fail to match: if( $id == 23 ) ... It also fails if I try to find the value as a key in an array: if( isset( $my_array[$id] ) ) ... On the other hand, values from some of the files work as expected. One clue: if I try and cast the values that are failing to int, the cast produces the value 0 (zero). On the other hand, the values that are working as expected cast from, say, the string 22 to the int 22 as expected. Never seen anything like this before - can anyone give me a pointer?? -- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Delimited file values behaving strangely...
From: Geoff Caplan [EMAIL PROTECTED] Hi folks, A strange one - unless I am having a brainstorm... I am reading in tab delimited files created in Excel on Windows and uploaded to Linux. Cell A1 contains a numeric id - I extract this into a variable, $id, by exploding on \n and \t. But for some files, the values of $id do not behave as expected. Say the value should be 23. If I echo, it prints as 23. But comparisons fail to match: if( $id == 23 ) ... Try using trim() on the value to get rid of blank spaces, returns, and other weirdness. -- Lowell Allen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Why use XML?
Christian Calloway [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi, well Im out of a job so I am sitting around learning XML. It seems like a great tool, but I am trying to figure out why I would actually use it? All it does is seperate content and data, albeit on the client, but that is what I have been doing with Smarty and MySQL for awhile now. Why would I choose to parse XML documents with PHP and do transformations on the server, it sounds terribly inefficient and complicated, as opposed to just pulling data out of a database. I also realize that I can generate XML dynamically (ie include PHP code in an actual XML template) by editing my Apache config, but that is not always an option and what would be the point? It would just add another layer of content/data seperation that would have to processed on the other end. Thanks Chris Have a look at the following link: http://www.w3schools.com/xml/default.asp The section on How XML Can be used may provide the answers you need. Regards Lee -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Delimited file values behaving strangely...
When this happens to me I always just echo the variable value like so to see if something is there that shouldn't be: echo ; echo $id; echo ; obviously all this does is print the variable with a bunch of c's before and after. That way I can see if there are any extra things included with the value that shouldn't be there. Then use the trim() commands as someone else mentioned. Roger Geoff Caplan wrote: Hi folks, A strange one - unless I am having a brainstorm... I am reading in tab delimited files created in Excel on Windows and uploaded to Linux. Cell A1 contains a numeric id - I extract this into a variable, $id, by exploding on \n and \t. But for some files, the values of $id do not behave as expected. Say the value should be 23. If I echo, it prints as 23. But comparisons fail to match: if( $id == 23 ) ... It also fails if I try to find the value as a key in an array: if( isset( $my_array[$id] ) ) ... On the other hand, values from some of the files work as expected. One clue: if I try and cast the values that are failing to int, the cast produces the value 0 (zero). On the other hand, the values that are working as expected cast from, say, the string 22 to the int 22 as expected. Never seen anything like this before - can anyone give me a pointer?? -- Geoff Caplan Advantae Ltd -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re[2]: [PHP] Delimited file values behaving strangely... SOLVED
Hi, Of course, I solve it just after I decide to post... For some reason, my customer's spreadsheet data has unusual non-printing characters in some of the fields that weren't showing up in the page source. All I needed to do is strip them out with a regex. Anyway, thanks for the suggestions Geoff Caplan Advantae Ltd -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Vulvan Logic SRM - does anyone use it?
On Monday 10 February 2003 16:03, Derick Rethans wrote: On 10 Feb 2003, Tamas Arpad wrote: I'm thinking about using SRM application server for storing cached data. But I have to convince my customers that it's stable enough and is ready to use in production environment. Is it considered stable enough to use in such applications? As I see it hasn't been maintained for at least half year. I won't consider it production stable _yet_, we're still working on it though, and it is definitely maintained. But without a lot of feedback we don't know about the things that go wrong. Thanks for your answer Derick. Then I'm starting to use it as an alternative of storing serialised objects in files, and will test it carefully. I'll let you know if I found something. regards, Arpi -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] I get a File Download dialogue box
I am trying to configure run PHP4 on Apache on Windows XP. When I type http://localhost/ all I get is a File Download dialogue box, instead of the normal Apache server page. Does anyone know whats is going on here? Please tell me if you need any more information. -Nelson -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] I get a File Download dialogue box
You need to tell Apache that the .php extension is a web page. Take a look at the README or the INSTALL text files, there is the solution. I think it has to be something along the AddType lines. -- Un gran saludo/Big regards... Arturo Barajas, IT/Systems PPG MX (SJDR) (427) 271-9918, x448 -Original Message- From: news [mailto:[EMAIL PROTECTED]] Sent: Lunes, 10 de Febrero de 2003 10:50 a.m. To: [EMAIL PROTECTED] Subject: [PHP] I get a File Download dialogue box I am trying to configure run PHP4 on Apache on Windows XP. When I type http://localhost/ all I get is a File Download dialogue box, instead of the normal Apache server page. Does anyone know whats is going on here? Please tell me if you need any more information. -Nelson -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] I get a File Download dialogue box from http://localhost
I am trying to configure run PHP4 on Apache on Windows XP. When I type http://localhost/ all I get is a File Download dialogue box, instead of the normal Apache server page. Does anyone know whats is going on here? Please tell me if you need any more information. -Nelson
[PHP] Graphics for PHP Help!
PHP programmer needed to assist with development of an ultra-simple XML driven portfolio site. Extensive planning phase already completed. Primary goal is total separation of content from interface. Accomplished digital artist (and student) prefers to offer in exchange services in 3D 2D animation, illustration and/or design. Previous work examples can currently be viewed online at www.discoloured.org. So, if you need any sort of digital eyecandy and are willing to help with some simple scripting, please email [EMAIL PROTECTED] today! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] php and postie
hi everyone: i was wondering if its posible to use the program postie, so u can send mails with the fuction mail(). is there anyone that can help me with this. thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] a while loop that does't end with the script
try putting exit; at the end of your script will kill it dead in its tracks - Original Message - From: Francesco Leonetti [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, February 10, 2003 6:34 AM Subject: [PHP] a while loop that does't end with the script Hi, I'm a newcomer here to the list, so do please apologize in the case my question has already been discussed before. I just moved from php 4.0.6 to php 4.2.2 for security reasons (4.0.6 got a big buffer overflow hole...). The working environment now is Redhat 8.1, mysql 3.23.54a, kernel 2.4.18-19. My problem is in a php page including a neverending loop, like this: mysql_connect() while (1) { flush() ... do things... ... query the database ... ... echo other things... flush() } In the previous version of PHP when I exit the page, the script ended as well (this stopping querying the database). Now when I exit from the page, I see from the mysqladmin processlist that the mysql_query thread is still running. It doesn't end and it keeps running 'til I restart httpd. This is time and memory consuming. Why the script doesn't end as usual? Am I missing something in the configuration files? Thank you for any help. Bye Francesco Leonetti -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.443 / Virus Database: 248 - Release Date: 1/10/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] sockets: resource(20) of type (Unknown)
Hi - I have an problem and I'm not sure how to proceed troubleshooting. I have a socket connection that I'm making to a local stunnel daemon. The connection works and is valid until it seemingly dies and the resource type becomes unknown. at timestamp: 1044900028.6608 my object has this resource: resource(20) of type (stream) at timestamp: 1044900028.6808 it becomes: resource(20) of type (Unknown) I don't think this is a timeout issue, and I can perform all of my functionality via a telnet session without any problems as well. This code used to work great, I have made recent upgrades and changed environments. However the code consistently dies in the exact place, a place where other fsocket reads and writes are successfully been made. Any suggestions would be appreciated. Regards, Jason k Larson -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] numerics
IS there a way to only allow the user to type in numerics to a text field? I do not want to allow them to even type in anything unless it is a number. Basically, I don't want to allow them to enter hi and then I do checks and give them a warning that it isn't a number, I want to force it from the start. Thanks, Eddie -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] numerics
On Tuesday 11 February 2003 02:27, Edward Peloke wrote: IS there a way to only allow the user to type in numerics to a text field? I do not want to allow them to even type in anything unless it is a number. Basically, I don't want to allow them to enter hi and then I do checks and give them a warning that it isn't a number, I want to force it from the start. You can use javascript to enforce it at the input stage. But ultimately there's nothing that can stop people from submitting whatever they want. If you value the integrity of your data you NEED server-side verification -- there's no substitute for it. -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* I'm sorry a pentium won't do, you need an SGI to connect with us. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] numerics
Check out: is_numeric() http://www.php.net/manual/en/function.is-numeric.php -Kevin - Original Message - From: Edward Peloke [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, February 10, 2003 11:27 AM Subject: [PHP] numerics IS there a way to only allow the user to type in numerics to a text field? I do not want to allow them to even type in anything unless it is a number. Basically, I don't want to allow them to enter hi and then I do checks and give them a warning that it isn't a number, I want to force it from the start. Thanks, Eddie -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] numerics
Edward Peloke [EMAIL PROTECTED] wrote: IS there a way to only allow the user to type in numerics to a text field? I do not want to allow them to even type in anything unless it is a number. Basically, I don't want to allow them to enter hi and then I do checks and give them a warning that it isn't a number, I want to force it from the start. PHP is server-side so it can't be accomplished via PHP, but it can via JavaScript. Google for something like 'javascript validate numeric'. Here's JS script that limits entry to alphanumeric characters. I've seen better JS code to do the same so if it's not suitable keep looking. http://javascript.internet.com/forms/val-char.html -- Steve Werby President, Befriend Internet Services LLC http://www.befriend.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] numerics
I'm sorry I misunderstood. As previously stated PHP is server-side only, you need a client-side solution. Search for Javascript validate numeric. - Kevin - Original Message - From: Kevin Stone [EMAIL PROTECTED] To: Edward Peloke [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Monday, February 10, 2003 11:38 AM Subject: Re: [PHP] numerics Check out: is_numeric() http://www.php.net/manual/en/function.is-numeric.php -Kevin - Original Message - From: Edward Peloke [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, February 10, 2003 11:27 AM Subject: [PHP] numerics IS there a way to only allow the user to type in numerics to a text field? I do not want to allow them to even type in anything unless it is a number. Basically, I don't want to allow them to enter hi and then I do checks and give them a warning that it isn't a number, I want to force it from the start. Thanks, Eddie -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Fw: help plz server
- Original Message - From: Maxim Maletsky [EMAIL PROTECTED] To: Nate [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Monday, February 10, 2003 5:42 AM Subject: Re: help plz server please forward this email to `[EMAIL PROTECTED]' -- Maxim Maletsky [EMAIL PROTECTED] Nate [EMAIL PROTECTED] wrote... : ok i have a problem my computer/server got messed up a week ago i just got my server back up and i installed php well my requires and includes don't work my path is this: include_path = ..;c:\inetpub\wwwroot i dunno what's up with it it should work but it keeps coming up with this: Warning: main(/includes/functions.inc) [function.main]: failed to create stream: No such file or directory in c:\inetpub\wwwroot\stats\include.php on line 1 Fatal error: main() [function.main]: Failed opening required '/includes/functions.inc' (include_path='..;c:\inetpub\wwwroot\') in c:\inetpub\wwwroot\stats\include.php on line 1 the page resides in c:\inetpub\wwwroot\stats\ this is the code for the page: ? require('/includes/functions.inc'); ? HTML HEAD meta name=Description content=BFD's Stat Page ?PHP require (/includes/Sec.inc); if (isset($_REQUEST['inc'])) require ($_REQUEST['inc']); else require (index.php); require (/includes/parts/bottom.inc); ? can ya help me at all? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Integrating PHP with Perl
Hi all, I have a system that uses Perl scripts to process the HTML forms. It uses HTTP Basic Authentication to authenticate the users. The problem is that there is no session tracking and no logout button. I heard that PHP makes this login/logout and session tracking very simple, so I was wondering if I could somehow incorporate some PHP code with the existing Perl code? Is this possible? I suppose I could use PHP to check for the validity of the session id before passing it to the Perl scripts. Thanks for your time and help! Monica - Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now
Re: [PHP] Integrating PHP with Perl
On Tuesday 11 February 2003 03:11, Monica Lau wrote: I have a system that uses Perl scripts to process the HTML forms. It uses HTTP Basic Authentication to authenticate the users. The problem is that there is no session tracking and no logout button. I heard that PHP makes this login/logout and session tracking very simple, so I was wondering if I could somehow incorporate some PHP code with the existing Perl code? Is this possible? I suppose I could use PHP to check for the validity of the session id before passing it to the Perl scripts. http://freshmeat.net/projects/php-session/ This is supposed to allow access to PHP sessions from within Perl. -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* Indomitable in retreat; invincible in advance; insufferable in victory. -- Winston Churchill, on General Montgomery */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Why use XML?
It seems like a great tool, but I am trying to figure out why I would actually use it? All it does is seperate content and data, albeit on the client Not necessarily only on the client, but on the server side as well. It would just add another layer of content/data seperation that would have to processed on the other end. And that is the heart of the matter. That additional layer as you have so correctly put it allows you to take the data structure you have defined in your XML document and port it into any other system. Let's say that you define a data structure in XML that is being parsed in PHP... maybe at some point you need it to work in a PERL application as well. By conventional means if you needed to update your data specifications you'd need to update it and integrate that into both your PHP and PERL applications. This means you are duplicating the work effort for each platform you support. If you have an XML spec defined for your data structure (and content) then all you need to do is update the XML document and it *should* work seamlessly in both applications. I say should work seamlessly, as you *may* need to write additional API's in your platforms to support the changes you've made in your XML spec. That really depends on what changes you make to you XML spec. As you have already touched on, there is an additional overhead, as one would have to write an API layer that will parse the XML for each platform application that they support. The nice thing is that there is a building base of XML specifications for a number of data structures, as well as a growing base of existing API's that will parse those specs... so if you are lucky you may not need to build the XML structure and API's to run your spec. ck -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Class within a class
I have made a Mysql database class. I wanted to know how I could use that class in another class without using extend. For example: include 'db.php'; $db = new db(); ...some php code... class blah { var $test = 1; function blah() { .. $db-query(some query); //mysql class being used here } } I don't want to create an instance of db class in the blah class because I use db in other parts of the script so an instance already exists. Any way I can do this? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Class within a class
Use $GLOBALS['db'] (or whatever the variable name of the global variable is). Justin Mazzi wrote: I have made a Mysql database class. I wanted to know how I could use that class in another class without using extend. For example: include 'db.php'; $db = new db(); ...some php code... class blah { var $test = 1; function blah() { .. $db-query(some query); //mysql class being used here } } I don't want to create an instance of db class in the blah class because I use db in other parts of the script so an instance already exists. Any way I can do this? -- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Class within a class
If the DB object is already a global, like you seem to be saying, then you're already using globals... Justin Mazzi wrote: Is there anyway to do this without using globals? -Original Message- From: Leif K-Brooks [mailto:[EMAIL PROTECTED]] Sent: Monday, February 10, 2003 2:46 PM To: Justin Mazzi Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Class within a class Use $GLOBALS['db'] (or whatever the variable name of the global variable is). Justin Mazzi wrote: I have made a Mysql database class. I wanted to know how I could use that class in another class without using extend. For example: include 'db.php'; $db = new db(); ...some php code... class blah { var $test = 1; function blah() { .. $db-query(some query); //mysql class being used here } } I don't want to create an instance of db class in the blah class because I use db in other parts of the script so an instance already exists. Any way I can do this? -- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law.
RE: [PHP] any windows php developers out here?
It's step 2 and 3 on this list that need to get added to the PHP manual. Step 3 can be skipped if you're not running NTFS. ---John Holmes... -Original Message- From: Victor [mailto:[EMAIL PROTECTED]] Sent: Sunday, February 09, 2003 4:20 PM To: 'Victor'; [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [PHP] any windows php developers out here? So I guess I al looking to finding out what I need to configure IIS to to get the ISAPI module to work, etc. 1. Unzip the php .zip file to C:\php\ 2. Copy c:\php\sapi\php4isapi.dll to c:\php\php4isapi.dll 3. Ensure the user IIS runs as, generally IUSR_computer_name, has read permissions to C:\php\ and all subdirectories. 4. Follow directions as in the manual 5. Shut down IIS (net stop iisadmin) 6. Open up IIS control panel 7. Add ISAPI filter pointing to c:\php\php4isapi.dll 8. Add application mapping pointing to c:\php\php4isapi.dll 9. Start up IIS (net start w3svc) That's it... ---John W. Holmes... You are the best! Thanks, BTW who is in charge of the PHP installation documentation, I would like to slap them in the face with these instructions. I know that IIS setup is not their domain but they are responsible for helping users use PHP and facilitating that is made by clear documentation, this documentation here is not perfect, but it's much more in depth and clearer to the one who doesn't want to go to get a MSCSE degree so that they know how to get PHP running on IIS... - Vic __ Post your free ad now! http://personals.yahoo.ca -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Session Time
What you could do, is get the current time stamp using time() or date() and create a sesion variable with this value, when they login (and the session is created. Then when they logout, and the sesion is destoyed get the current time stamp again and minus it from the start time. Note: This requires the user to login and logout, if they just close the browser then they will never get to your logour script, thus you can't calculate their money owed. Stephen Craton [EMAIL PROTECTED] wrote in message 004e01c2d11a$0e3a4590$0200a8c0@melchior">news:004e01c2d11a$0e3a4590$0200a8c0@melchior... Got a quick and easy question that I'm not sure about. What I need to do is calculate how long someone has been in a chatroom, then update a members table to add some money to their account. Something like this: For every hour they're in the chatroom: 5 cents Thanks, Stephen Craton http://www.melchior.us -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Testing if any of the items are false
How can I do this to determine if one of the items is false if none are then I what it to print the first echo of there is one that is false then print the second echo $test1= YES; $test2= YES; $test3= YES; $test4= YES; $ftest1= YES; $ftest2= NO; $ftest3= YES; $ftest4= YES; if ($test1==$ftest1)or($test2==$ftest2)or($test3==$ftest3) or($test4==$ftest4){ echo all of the items are true; }else{ echo one of the items is false; } -- Best regards, rdkurth mailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Testing if any of the items are false
--- [EMAIL PROTECTED] wrote: How can I do this to determine if one of the items is false if none are then I what it to print the first echo of there is one that is false then print the second echo Sorry, that makes no sense to me. $test1= YES; $test2= YES; $test3= YES; $test4= YES; $ftest1= YES; $ftest2= NO; $ftest3= YES; $ftest4= YES; if ($test1==$ftest1)or($test2==$ftest2)or($test3==$ftest3) or($test4==$ftest4){ echo all of the items are true; }else{ echo one of the items is false; } That code makes less sense. Are you wanting to see if each of your $test variables match their corresponding $ftest variable? Your current statement is true when any of the $test variables match their corresponding $ftest variable. Try using and instead of or if you want to require them all to be true. Just read it aloud, and it should make sense. if ($flavor == 'vanilla' || $flavor == 'chocolate') { eat('ice_cream'); } In this example, you would eat the ice cream if it was vanilla *or* chocolate. Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] MySQL for storing PHP code
Hi, Would it be possible to store PHP code in a MySQL table, then via a web page, connect to the DB, recover the code that corresponds to a certain id number, then include that code for execution? For example (quick, dirty, and untested!): $sql = SELECT phpcode FROM phpstorage WHERE codeid = 1; $result = mysql_query($sql); $_php_code = mysql_result($result, 0,phpcode); echo $_php_code; Will the echo (or print() ) just output code that can be read by the reader of the page, or will it generate output that will be executed? If the echo/print does not work, is there another way to do this? Cheers, Daniel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Fw: [PHP] MySQL for storing PHP code
Check out eval(); http://www.php.net/manual/en/function.eval.php - Kevin - Original Message - From: Daniel Page [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, February 10, 2003 2:21 PM Subject: [PHP] MySQL for storing PHP code Hi, Would it be possible to store PHP code in a MySQL table, then via a web page, connect to the DB, recover the code that corresponds to a certain id number, then include that code for execution? For example (quick, dirty, and untested!): $sql = SELECT phpcode FROM phpstorage WHERE codeid = 1; $result = mysql_query($sql); $_php_code = mysql_result($result, 0,phpcode); echo $_php_code; Will the echo (or print() ) just output code that can be read by the reader of the page, or will it generate output that will be executed? If the echo/print does not work, is there another way to do this? Cheers, Daniel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] MySQL for storing PHP code
--- Daniel Page [EMAIL PROTECTED] wrote: Would it be possible to store PHP code in a MySQL table, then via a web page, connect to the DB, recover the code that corresponds to a certain id number, then include that code for execution? Yes, and since your example demonstrates that you know how to query MySQL, this is all you need: http://www.php.net/manual/en/function.eval.php Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: MySQL for storing PHP code
Thanks for the comments everyone! eval() has just made my day :) Cheers, Daniel Daniel Page [EMAIL PROTECTED] a écrit dans le message de news: [EMAIL PROTECTED] Hi, Would it be possible to store PHP code in a MySQL table, then via a web page, connect to the DB, recover the code that corresponds to a certain id number, then include that code for execution? For example (quick, dirty, and untested!): $sql = SELECT phpcode FROM phpstorage WHERE codeid = 1; $result = mysql_query($sql); $_php_code = mysql_result($result, 0,phpcode); echo $_php_code; Will the echo (or print() ) just output code that can be read by the reader of the page, or will it generate output that will be executed? If the echo/print does not work, is there another way to do this? Cheers, Daniel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] WYSIWIG CMS Part1
This one time, at band camp, Hardik Doshi [EMAIL PROTECTED] wrote: I know how to write XSL style sheet along with XML document. But i really dont know what contents should be in XML. If XML contains data (and it is true) then what is the need of MySQL? At last i can say i don't know application of XML and XSL for seperating PHP and HTML code. I am putting together a cms as we speak I use PHP for my logic, and MySQL for dynamic content storage I extract info from the db using PEAR sql2xml class to put all the info in a XML string and then use xslt/sablotron to call the xsl template and render the page Kind regards Kevin -- __ (_ \ _) ) | / / _ ) / _ | / ___) / _ ) | | ( (/ / ( ( | |( (___ ( (/ / |_| \) \_||_| \) \) Kevin Waterson Port Macquarie, Australia -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php