[PHP] ECHO $variable
In one of my scripts I have input type=text name=message_title size=40 maxlength=80 value=?echo $saved_message_title;? where $saved_message_title is 1 Peter 5:7 Cast all your cares on Him for He cares about you --- note the When this is displayed on the screen $saved_message_title reads 1 Peter 5:7 I am assuming the closes the value= How may I echo this to the screen and have the full text be displayed, not just 1 Peter 5:7 ? Ron
Re: [PHP] ECHO $variable
you should try this... $saved_message_title = '1 Peter 5:7 Cast all your cares on Him for He cares about you'; - Original Message - From: Ron Piggott (PHP) [EMAIL PROTECTED] To: PHP General php-general@lists.php.net Sent: Saturday, October 07, 2006 11:39 PM Subject: [PHP] ECHO $variable In one of my scripts I have input type=text name=message_title size=40 maxlength=80 value=?echo $saved_message_title;? where $saved_message_title is 1 Peter 5:7 Cast all your cares on Him for He cares about you --- note the When this is displayed on the screen $saved_message_title reads 1 Peter 5:7 I am assuming the closes the value= How may I echo this to the screen and have the full text be displayed, not just 1 Peter 5:7 ? Ron -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Unicode Problem
On Fri, 6 Oct 2006 10:44:55 -0500 (CDT), Richard Lynch wrote: I don't think MS Word quotes are Unicode, really... I think they're just made-up character sets that Microsoft felt like using to be incompatible with everybody else... Though the %u is almost-for-sure and ATTEMPT to apply Unicode conversion, that doesn't mean that the original content was really Unicode to start with. So after you undo the Unicode conversion, you've still potentially got data on your hands from a proprietary non-standards-based made-up software application. Apologies in advance if MS Word actually *is* using a standard Unicode charset... But I sure doubt it. I think you're missing the point. MS Word DOES use proprietary encodings, but when text is copied from MS Word and pasted into the browser, it involves a conversion process. E.g., the bullet (0x95 in cp1250) will be converted to whatever encoding the web page is in (0x2022 in a Unicode encoding). Whether the conversion is performed by the browser, some OS glue or some other trickery, witchery or devilry, is at the moment beyond my scant knowledge. How to solve the original posters problem is also beyond me, as I haven't used AJAX. I tend to prefer the ol' form submission for my bits and bobs. That way I can use UTF-8 all way around, and everything just magically works. It even works fine for JavaScript-challenged browsers, would you believe. --nfe -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] ECHO $variable
On Mon, 9 Oct 2006 00:23:00 -0700, benifactor [EMAIL PROTECTED] wrote: you should try this... $saved_message_title = '1 Peter 5:7 Cast all your cares on Him for He cares about you'; - Original Message - From: Ron Piggott (PHP) [EMAIL PROTECTED] To: PHP General php-general@lists.php.net Sent: Saturday, October 07, 2006 11:39 PM Subject: [PHP] ECHO $variable In one of my scripts I have input type=text name=message_title size=40 maxlength=80 value=?echo $saved_message_title;? where $saved_message_title is 1 Peter 5:7 Cast all your cares on Him for He cares about you --- note the When this is displayed on the screen $saved_message_title reads 1 Peter 5:7 I am assuming the closes the value= How may I echo this to the screen and have the full text be displayed, not just 1 Peter 5:7 ? Ron -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php His problem is in HTML, not PHP. Uses htmlspecialchars() or htmlentities() to convert special characters to HTML entities. The double quote will becomes quot; so that it can be display correctly. -- Sorry for my poor English. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] looking for a php newsletter application ready to use
Hello everybody I'm looking for a newsletter soft. written in php4 to add to a website done in php4 found a lot of them on the net, can anyone advise me a good easy one ? that can administer and send newsletter from the web , if possible in french Thanks a lot hicham -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] FTP
Le samedi 07 octobre 2006 à 20:50 -0300, Raphael Martins a écrit : Hi, When I send files via FTP, the file size is limited to the php.ini max upload value? Thank you! No, unless you handle the FTP server with a PHP script. php.ini only limits the size of files handled by PHP (generally via HTTP), so it should not affect FTP (unless your FTP server is in PHP). Yannick -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Separate PHP Code From HTML || Pros Cons?
Le samedi 07 octobre 2006 à 17:24 -0400, sit1way a écrit : Hey all. Hi Noah, I've built a simple, yet effective PHP based CMS, one that I use in all sites I develop. [...] I've often heard the mantra, separate code from HTML, but it seems ridiculous at times to include tiny HTML snippets that can easily be echoed out, or stored in a variable. That mantra generally helps not getting your code and your graphics messed up. It is only a good suggestion, so you do whatever you want with it. It's like object oriented programming... it's a good suggestion and it proves very useful most of the time, but it's for you to judge if it is useful in your case, and most of the time you cannot judge perfectly without trying it. Smarty goes to the extreme in separating code from HTML, but looking at their templating system, I wonder what's the point? Is it the end of the world if you've got a few choice if, then, else statements in your HTML templates? Smarty goes to the extreme because it is *just* a templating engine. You can still use PHP code in Smarty templates by using specific tags, but for trying it I think it makes sense to prepare everything *outside* the display script. The display script can then be given to work on to a web designer without him messing everything up. It also helps not getting into one display script that will handle 5 different types of display depending on the conditions. One display script should really display one kind of data in a specific format. If you want to change the format, it makes sense to change the display script. I'm thinking of creating a bunch of include files based on request type in my CMS Admin Center; e.g. include classes/admin/news/add.php, where add, update, or delete is the request type. This cleans up my PHP processing pages quite a bit (don't have all the if add, do X, elseif update, do Y, etc. logic to comb through). You can also use the same code base (by playing with Apache VirtualHost's) and only change the config file and templates location, rather than the opposite. Up to you again. Yannick -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] FTP
I will be sending files over my php script... One client asked me for a project where he allow clients to send some large files (like 50mb)...I thought that FTP (via PHP) will allow that. Today he just give the FTP server user and password to his clients, but he is worried about the security (of course!). Is there a better way? I was thinking in split the files in several .RAR volumes... (actually, the client will send his .RAR files instead of a 50mb file), and use remote scripting to upload each file separatly. Any Ideas? Thank you! 2006/10/8, Yannick Warnier [EMAIL PROTECTED]: Le samedi 07 octobre 2006 à 20:50 -0300, Raphael Martins a écrit : Hi, When I send files via FTP, the file size is limited to the php.ini max upload value? Thank you! No, unless you handle the FTP server with a PHP script. php.ini only limits the size of files handled by PHP (generally via HTTP), so it should not affect FTP (unless your FTP server is in PHP). Yannick -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] FTP
Le dimanche 08 octobre 2006 à 08:05 -0300, Raphael Martins a écrit : I will be sending files over my php script... One client asked me for a project where he allow clients to send some large files (like 50mb)...I thought that FTP (via PHP) will allow that. Today he just give the FTP server user and password to his clients, but he is worried about the security (of course!). Is there a better way? I was thinking in split the files in several .RAR volumes... (actually, the client will send his .RAR files instead of a 50mb file), and use remote scripting to upload each file separatly. Any Ideas? There is a PECL SSH library which allows file transfers over SSH (using PHP). I have received some reports that it's not completely stable though, but I don't know more about it. You might want to contact Sara Golemon (the packager) on the PECL-dev mailing list if you manage to get into stability problems... See http://pecl.php.net/package/ssh2 for more details. Yannick -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] ECHO $variable
the way i posted worked fine with out either... he doesn't need to use these to format the way his output is displayed, he only needs to use the proper php syntax if i am correct. - Original Message - From: Penthexquadium [EMAIL PROTECTED] To: php-general@lists.php.net Sent: Sunday, October 08, 2006 1:41 AM Subject: Re: [PHP] ECHO $variable On Mon, 9 Oct 2006 00:23:00 -0700, benifactor [EMAIL PROTECTED] wrote: you should try this... $saved_message_title = '1 Peter 5:7 Cast all your cares on Him for He cares about you'; - Original Message - From: Ron Piggott (PHP) [EMAIL PROTECTED] To: PHP General php-general@lists.php.net Sent: Saturday, October 07, 2006 11:39 PM Subject: [PHP] ECHO $variable In one of my scripts I have input type=text name=message_title size=40 maxlength=80 value=?echo $saved_message_title;? where $saved_message_title is 1 Peter 5:7 Cast all your cares on Him for He cares about you --- note the When this is displayed on the screen $saved_message_title reads 1 Peter 5:7 I am assuming the closes the value= How may I echo this to the screen and have the full text be displayed, not just 1 Peter 5:7 ? Ron -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php His problem is in HTML, not PHP. Uses htmlspecialchars() or htmlentities() to convert special characters to HTML entities. The double quote will becomes quot; so that it can be display correctly. -- Sorry for my poor English. -- 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] Uploading files / processing with a PHP script
When I upload a file into an application I am writing with the HTML form command INPUT NAME=userfile TYPE=file and then give the PHP command move_uploaded_file( $userfile , $destination_file_name); the owner of the file is 'www'. Is there any way I am able to automatically change the owner of the file to my FTP login identity (for example 'rpiggott') Ron
Re: [PHP] ECHO $variable
Ron Piggott wrote: When this is displayed on the screen $saved_message_title reads 1 Peter 5:7 I am assuming the closes the value= How may I echo this to the screen and have the full text be displayed, not just 1 Peter 5:7 ? http://php.net/htmlentities You should really be using this for all output. Hope that helps. Chris -- Chris Shiflett http://shiflett.org/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] ECHO $variable
On 10/9/06, benifactor [EMAIL PROTECTED] wrote: the way i posted worked fine with out either... he doesn't need to use these to format the way his output is displayed, he only needs to use the proper php syntax if i am correct. But what if the string is edited to contain single quotes as well? Then your solution breaks anyway... Like Chris said, you should be using htmlentities for output... John W - Original Message - From: Penthexquadium [EMAIL PROTECTED] To: php-general@lists.php.net Sent: Sunday, October 08, 2006 1:41 AM Subject: Re: [PHP] ECHO $variable On Mon, 9 Oct 2006 00:23:00 -0700, benifactor [EMAIL PROTECTED] wrote: you should try this... $saved_message_title = '1 Peter 5:7 Cast all your cares on Him for He cares about you'; - Original Message - From: Ron Piggott (PHP) [EMAIL PROTECTED] To: PHP General php-general@lists.php.net Sent: Saturday, October 07, 2006 11:39 PM Subject: [PHP] ECHO $variable In one of my scripts I have input type=text name=message_title size=40 maxlength=80 value=?echo $saved_message_title;? where $saved_message_title is 1 Peter 5:7 Cast all your cares on Him for He cares about you --- note the When this is displayed on the screen $saved_message_title reads 1 Peter 5:7 I am assuming the closes the value= How may I echo this to the screen and have the full text be displayed, not just 1 Peter 5:7 ? Ron -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php His problem is in HTML, not PHP. Uses htmlspecialchars() or htmlentities() to convert special characters to HTML entities. The double quote will becomes quot; so that it can be display correctly. -- Sorry for my poor English. -- 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] Unsealing openssl_seal's data without PHP
Dear php users, Is there any way to decrypt data encrypted using openssl_seal _without_ using openssl_open, and instead using the openssl command- line tools? Here's how the data is encrypted (using openssl_seal). The function 'store_for_later()' just base64_encodes the data and writes to an archive location. $keycert contains the x509 certificate. ### $key = openssl_pkey_get_public($keycert); openssl_seal($plaintext, $sealed, $envelope, array($key)); store_for_later($sealed, $envelope[0]); ### Retrieving the stored data using php, by base64_decoding it and openssl_open'ing it works fine. However, this sequence of commands fails using the OpenSSL command-line tools: ### bt$ openssl base64 -A -d -in envelope | \ openssl rsautl -inkey key.pem -decrypt data_key bt$ openssl rc4 -A -d -in sealed -kfile data_key bad magic number bt$ ### What's 'bad magic number' mean? I tried using the -nosalt option to openssl, and get garbage from openssl, but no 'bad magic number' error message. I suspect it has something to do with the way php creates the initial rc4 key, as I get the same plaintext key if I decrypt the envelope from within php or from openssl command-line. Regards, William -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] $_SERVER['HTTP_REFERER']
Hi guys, I am trying to track where the people entered a unique page from (developing an affiliate system). I have been using the $_SERVER['HTTP_REFERER'] to track this and record it on a affiliate entrance of the web site. However, that is not tracking all clicks. Only some of them have. I assume some of the links are not from a traditional a/a link. Is there any other way to do this? Best regards, Peter Lauri www.lauri.se http://www.lauri.se/ - personal web site www.dwsasia.com http://www.dwsasia.com/ - company web site
Re: [PHP] FTP
Raphael Martins wrote: I will be sending files over my php script... One client asked me for a project where he allow clients to send some large files (like 50mb)...I thought that FTP (via PHP) will allow that. Today he just give the FTP server user and password to his clients, but he is worried about the security (of course!). Is there a better way? I was thinking in split the files in several .RAR volumes... (actually, the client will send his .RAR files instead of a 50mb file), and use remote scripting to upload each file separatly. Eww, nasty. Any Ideas? Set the upload_max_filesize value for the directory where the upload script lives. That would be the cleanest way to allow this to happen. However, HTTP was not designed for uploading files of that size so you are better off using an FTP server - this would almost certainly not involve PHP at all. If security is a concern you could generate a temporary FTP user from a PHP script that will get removed after, say, 24 hours. How you would do this will vary depending on the FTP server you are using. -Stut -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Uploading files / processing with a PHP script
Ron Piggott (PHP) wrote: When I upload a file into an application I am writing with the HTML form command INPUT NAME=userfile TYPE=file and then give the PHP command move_uploaded_file( $userfile , $destination_file_name); the owner of the file is 'www'. Is there any way I am able to automatically change the owner of the file to my FTP login identity (for example 'rpiggott') As far as I am aware only the root user can change the owner of files. You could set up a very specific sudo command to allow the www user to chown files to rpiggott but that's beyond the scope of this mailing list (plus I'd have to look it up and you can do that just as well as I can). Of course that would need you to have root on the server in the first place. -Stut -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] $_SERVER['HTTP_REFERER']
HTTP_REFERER is not a reliable way of capturing a remote address. Sometimes the client does not set it at all. On 08/10/06, Peter Lauri [EMAIL PROTECTED] wrote: Hi guys, I am trying to track where the people entered a unique page from (developing an affiliate system). I have been using the $_SERVER['HTTP_REFERER'] to track this and record it on a affiliate entrance of the web site. However, that is not tracking all clicks. Only some of them have. I assume some of the links are not from a traditional a/a link. Is there any other way to do this? Best regards, Peter Lauri www.lauri.se http://www.lauri.se/ - personal web site www.dwsasia.com http://www.dwsasia.com/ - company web site -- http://www.web-buddha.co.uk
Re: [PHP] $_SERVER['HTTP_REFERER']
Peter Lauri wrote: I am trying to track where the people entered a unique page from (developing an affiliate system). I have been using the $_SERVER['HTTP_REFERER'] to track this and record it on a affiliate entrance of the web site. However, that is not tracking all clicks. Only some of them have. I assume some of the links are not from a traditional a/a link. Is there any other way to do this? Check the archives - this has come up a couple of times just recently. The usual way is to create URLs for referers in the following style... http://domain.com/r/joesblog Then you get /r/ requests routed to a referral tracker (several options for that), map joesblog to a referrer, log the hit and redirect. -Stut -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Uploading files / processing with a PHP script
On Sunday 08 October 2006 13:25, Stut wrote: the owner of the file is 'www'. Is there any way I am able to automatically change the owner of the file to my FTP login identity (for example 'rpiggott') As far as I am aware only the root user can change the owner of files. You could set up a very specific sudo command to allow the www user to chown files to rpiggott but that's beyond the scope of this mailing list (plus I'd have to look it up and you can do that just as well as I can). Of course that would need you to have root on the server in the first place. -Stut The owner of a file can change ownership of the file, too, I believe, essentially willing it to someone else. Of course, that means your web scripts can't access the file, either. A better solution is to set the file's group permissions to 7, then chown the file to apache:mygroup, then put both apache and your ftp user into the mygroup group. -- Larry Garfield AIM: LOLG42 [EMAIL PROTECTED] ICQ: 6817012 If nature has made any one thing less susceptible than all others of exclusive property, it is the action of the thinking power called an idea, which an individual may exclusively possess as long as he keeps it to himself; but the moment it is divulged, it forces itself into the possession of every one, and the receiver cannot dispossess himself of it. -- Thomas Jefferson -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Uploading files / processing with a PHP script
On 10/8/06, Ron Piggott (PHP) [EMAIL PROTECTED] wrote: the owner of the file is 'www'. Is there any way I am able to automatically change the owner of the file to my FTP login identity (for example 'rpiggott') Just curious, why do you want to do this? What are you *really* hoping to accomplish? John W Ron -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Apply the hyper link ( javascript functon ) with php
Dear All, How to apply the following function with php ? a href=javascript:popup('index.htm') Test /a Edward. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Apply the hyper link ( javascript functon ) with php
echo 'a href=javascript:popup(\'index.htm\') Test /a'; On 10/9/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Dear All, How to apply the following function with php ? a href=javascript:popup('index.htm') Test /a Edward. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- GMail Rocks!!!