[PHP] path_info in fastcgi setting
Greetings all. Making the transition to PHP 5.2.5 operating as FastCGI through Nginx. Seem to be having a bit o' weirdness with path_info. Under Apache and the PHP module: a) test.php path_info is blank b) test.php/ppp path_info=/ppp Under PHP FastCGI: c) test.php path_info is test.php d) test.php/ppp path_info=/ppp Not sure why it's not blank in 'c' and instead equals the filename. I need coffee. :-) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Deprecated configure options
Was just upgrading to 5.2.5 and used the same configure line as I used for 5.2.0. Got the following notice: "Notice: Following unknown configure options were used: --enable-pic --with-dom --with-png --with-xml --enable-track-vars --enable-trans-sid --enable-yp --enable-mbstr-enc-trans --enable-dio --enable-mcal --with-jpeg" Safe to assume those were deprecated? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] getting an array out of the POST array
Thanks, that worked. So I understand this better did this ($_POST[firstname][$key] = trim($_POST[firstname][$key]);) not work because the variable to the left of the '=' was no longer POSTed? Original Message Remove $_POST from $_POST[firstname][$key], $_POST[middlename][$key] and $_POST[lastname][$key]. It should simply be $firstname[$key], $middlename[$key], and $lastname[$key] Not sure what your array data looks like but instead of using while() use foreach(): foreach($_POST['firstname'] as $key => $value){ $firstname[$key] = trim($_POST[firstname][$key]); $middlename[$key] = trim($_POST[middlename][$key]); $lastname[$key] = trim($_POST[lastname][$key]); } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] getting an array out of the POST array
One day I need to take a vacation with a big pot of coffee and study arrays. They're my downfall. We're moving to a new server and finally have a recent version of PHP. We have a page on the site for captioning the photos with the names of the subjects. After the form is posted, the script would do a bunch of things on the names, then insert them: while (list ($key, $val) = each ($firstname)) { $firstname[$key] = trim($firstname[$key]); $middlename[$key] = trim($middlename[$key]); $lastname[$key] = trim($lastname[$key]); ...etc... Now that we have a newer version of PHP, we have the $_POST variables, so the $firstname $middlename $lastname arrays are tossed into the $_POST array. I figured that it would change the above to: while (list ($key, $val) = each ($_POST[firstname])){ $_POST[firstname][$key] = trim($_POST[firstname][$key]); $_POST[middlename][$key] = trim($_POST[middlename][$key]); $_POST[lastname][$key] = trim($_POST[lastname][$key]); When I inserted that into the database I, of course ended up with the name: "Array[0] Array[0] Array[0]" How the heck do I get the name arrays out of the $_POST arrays? Many thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] dealing with accents in your databases (or to entity or not to entity...)
This hasn't come up too much yet in one of the databases on my site, but as I get closer to starting a big project, I thought I'd get an idea of how the rest of you handle this. How do you handle accented words and other problematic symbols on your database-driven sites? If you need to store one, do you store it as the actual character and display it with htmlentities, or do you store it as the html entity? In other words, do most of you store "Law & Order" in your database or "Law & Order"? "Renée" or "Renée" What are the pros and cons of storing them in the database in either format? -- Ian Evans Digital Hit Entertainment http://www.digitalhit.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Converting accented characters or numeric equivalents to non-accented
>return strtr($string, "SOZsozY... Just curious why the search starts with unaccented "SOZsozY"? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Converting accented characters or numeric equivalents to non-accented
Ernest E. Vogelsinger suggested: >$chars_in = array('Á',''á','É','é'); // you get it >$chars_out = array('A','a','E','e'); // this too >preg_replace($chars_in, $chars_out, $string_to_parse); I initially got a 'no ending delimiter' error but after adding /'s to the $chars_in it was just what the doctor ordered. I'm actually a little surprised that there isn't a built-in function, say, strip_accent(). I'd assume a lot of people would need this at some time or another. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Converting accented characters or numeric equivalents to non-accented
Rene: Thanks for the response. I guess I wasn't too clear in my original post. I'm not looking to turn an accented letter into its numeric equivalent, I'm looking to strip the accent so that Renée Zellweger becomes Renee Zellweger. Any thoughts there? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Converting accented characters or numeric equivalents to non-accented
Does anyone have a quick PHP function for converting accented characters to their non-accented forms? It would really help a lot with Amazon searches, etc. For example something that can turn: Renée Zellweger into Renee Zellweger Along that same vein, turning Renée Zellweger into Renee Zellweger Thanks! -- Ian Evans Digital Hit Entertainment http://www.digitalhit.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] HTTP_IF_MODIFIED_SINCE
Are there any settings I need to change in order to get the HTTP_IF_MODIFIED_SINCE variable set when applicable? I saw some threads on google about session_cache_limiter() but even after following that, I still don't get access to the HTTP_IF_MODIFIED_SINCE variable when revisiting a page with the Last-Modified header. The page I'm testing this on _is_ sending the Last-Modified header, but the HTTP_IF_MODIFIED_SINCE variable is not available. Thanks. -- Ian Evans Digital Hit Entertainment http://www.digitalhit.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php