RE: [PHP] /etc/php.init changes not honored
I do not see an entry stating Loaded Configuration File in the output this only available since php 5.2 (iirc) -- View this message in context: http://www.nabble.com/-etc-php.init-changes-not-honored-tp14746039p14759509.html Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] First stupid post of the year.
tedd-2 wrote: At 3:28 PM -0600 1/3/08, Richard Lynch wrote: On Wed, January 2, 2008 5:26 pm, tedd wrote: At 2:34 PM -0800 1/2/08, Jim Lucas wrote: This I think shows what tedd is looking for. so, from this I deduce that this should work. $submit = trim($submit, \xA0\x20); What do you guys/gals think? Nope, not a winner. But it produces some interesting results. http://www.l-i-e.com/a/ That's neat. Cheers, tedd FYI: output of http://www.l-i-e.com/a/ in SeaMonkey (Gecko, ),FF, default Char.encoding:Western ISO 8859-1 or UTF-8, IE: $_POST[a]: ' A ' 0: (160) 1: (32) 2: (160) 3: (32) 4: (160) 5: A (65) 6: (160) 7: (32) 8: (160) 9: (32) 10: (160) str_replace: ' A ' trim: 'A' Opera 9.5beta (iso 8859-1 or utf-8) $_POST[a]: ' A ' 0: (32) 1: (32) 2: (32) 3: (32) 4: (32) 5: A (65) 6: (32) 7: (32) 8: (32) 9: (32) 10: (32) str_replace: ' A ' trim: 'A' Safari 3.0.4 (UTF-8) $_POST[a]: ' A ' 0: � (194) 1: � (160) 2: (32) 3: � (194) 4: � (160) 5: (32) 6: � (194) 7: � (160) 8: A (65) 9: � (194) 10: � (160) 11: (32) 12: � (194) 13: � (160) 14: (32) 15: � (194) 16: � (160) str_replace: ' A ' trim: ' A�' Safari 3.0.4 (Westeuropäisch) $_POST[a]: 'Â Â Â AÂ Â Â ' 0: Â (194) 1: (160) 2: (32) 3: Â (194) 4: (160) 5: (32) 6: Â (194) 7: (160) 8: A (65) 9: Â (194) 10: (160) 11: (32) 12: Â (194) 13: (160) 14: (32) 15: Â (194) 16: (160) str_replace: 'Â Â Â AÂ Â Â ' trim: 'Â Â Â AÂ Â Â' (all on w2k) (my humble) conclusion: if('A'==$_POST['a'][5] or 'A'==$_POST['a'][8]) { //do stuff } or some such is what you need Jürgen -- View this message in context: http://www.nabble.com/First-stupid-post-of-the-year.-tp14583639p14617982.html Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] checkbox unchecked
nice! but to avoid confusion it should read (assuming that $checked is a boolean variable): input type=hidden name=foo value=0/ input type=checkbox name=foo value=1?php if($checked) echo ' checked'; ?/ IMHO Larry Garfield wrote: First of all, using y and n for boolean values (such as a checkbox) is very sloppy. n is boolean True. A boolean value should evaluate correctly in a boolean context. For that, you should use 1 and 0 for your values. What I usually do is this: input type=hidden name=foo value=0 / input type=checkbox name=foo value=1 ?php echo $checked; ? / Then when it gets submitted, foo will get the value of the form element that was submitted last that has a value. That is, if the checkbox is checked then foo will be 1, otherwise it will be 0. That gives you a nice, clean boolean value you can rely on being present (mostly g). On Sunday 02 December 2007, Ronald Wiplinger wrote: I have now tried to add many of the security hints on a web page and come to a problem. I am checking if the allowed fields match the sent fields. From the database I get the information if a checkbox is checked or not: ?php if($DB_a ==y) { $checked=checked; } else { $checked=; } ? input type=checkbox name=R_a value=y ?php echo $checked ? If the user takes out the checkmark the value will become and the field will not submitted which results in a missing field. $allowed = array(); $allowed[]='form'; $allowed[]='R_a'; $allowed[]='R_b'; $sent = $array_keys($_POST); if($allowed == $sent) { ... do some checking ... } else { echo Expected input fields do not match!; } break; How can I force a n for not checked in the input field? or how can I solve that? bye Ronald -- Larry GarfieldAIM: 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 -- View this message in context: http://www.nabble.com/checkbox-unchecked-tf4932527.html#a14119395 Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Newbie question - current date - time
my point was: date() doesn't work - it's Date() (at least in Firefox) tedd-2 wrote: At 2:13 PM -0500 11/15/07, Jeremy Mcentire wrote: On Nov 14, 2007, at 4:21 PM, Jürgen Wind wrote: better use Date() in js ... tedd-2 wrote: Current date/time for whom? For your server, use php's date(). For the user, use javascript's date(). It's so cool to be multilingual. :-) Cheers, tedd I don't know that that's better. It's not a question as to what's better? You have a choice, it's either: a) the user's time; b) or your server's time. How and why you use it is your business. Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- View this message in context: http://www.nabble.com/Newbie-question---current-date---time-tf4806896.html#a13796414 Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Newbie question - current date - time
tedd-2 wrote: I used small case because this is a php list and I didn't want to confuse anyone with trying to get Date() to work in php. no need to worry, in *php* functions are not case sensitive. cheers Jürgen -- View this message in context: http://www.nabble.com/Newbie-question---current-date---time-tf4806896.html#a13800560 Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Newbie question - current date - time
better use Date() in js ... tedd-2 wrote: Current date/time for whom? For your server, use php's date(). For the user, use javascript's date(). It's so cool to be multilingual. :-) Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- View this message in context: http://www.nabble.com/Newbie-question---current-date---time-tf4806896.html#a13756627 Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: RE: [PHP] round()
tedd wrote: At 7:30 PM -0700 10/11/07, Instruct ICC wrote: Now I see why BCMath was mentioned. Yes, but precision is not the issue. It doesn't make any difference if you are rounding. (a) 1.489123451985765 or (b) 148912345198576.5 You still have to make a decision as to if the above (a) rounds to: (a) 1.48912345198577 or (a) 1.48912345198576 or the above (b) rounds to: (b)148912345198577 or (b) 148912345198576 It's a question of rounding, not precision. Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php It's a question of what you expect from a rounding function. If you work with reals on a computer you always have a bit of fuzzynes due to the internal conversions from float to binary and resulting truncations. If you need reproducable results which fit your expectations and if speed doesn't matter just use your own routine depending on string comparison. YMMV -- View this message in context: http://www.nabble.com/round%28%29-tf4602528.html#a13177072 Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] RE: round()
I get correct results: 5.2.4 PHP_VERSION round(5.555,2):5.56 toFixed(5.555,2):5.56 admin-214 wrote: While we're entertaining algorithms, has anyone else noticed that php's round() isn't the most accurate algorithm to round? If you will refer to chafy's reply on 28-Feb-2007 06:13 http://us2.php.net/manual/en/function.round.php#73537 The function round numbers to a given precision. function toFixed($number, $round=2) { $tempd = $number*pow(10,$round); $tempd1 = round($tempd); $number = $tempd1/pow(10,$round); return $number; } echo toFixed(5.555,2); //return 5.56 If your rounding issue is passed 2 decimal places. I found this function covenant and problem solving. As for the accuracy of the algorithm I disagree. I will need to see an example where the round() is inaccurate. -- View this message in context: http://www.nabble.com/round%28%29-tf4602528.html#a13161858 Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] RE: round()
well, seems to be OS dependent: PHP_OS:Linux (Suse 9.x 32bit) | PHP_VERSION:5.0.3 $t=1.255; round($t,2):1.26 $t += .0001; round($t,2):1.26 PHP_OS:WINNT (2000) | PHP_VERSION:5.2.4 $t=1.255; round($t,2):1.25 $t += .0001; round($t,2):1.26 -- View this message in context: http://www.nabble.com/round%28%29-tf4602528.html#a13164737 Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] 500 Internal Server Error
somewhere I read that php on win doesn't like spaces in the path ... (IIRC) Francisco Frost wrote: No, it's not, but I found out by enabling the show errors in php.ini that for about 80 items it's saying PHP Startup: Unable to load dynamic library 'C:\Program Files\PHP\ext\ then the DLL's file name, then The specified module was not found but all the files are there. Per Jessen [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Francisco Frost wrote: I'm getting an error with my PHP, I'm running Apache 2.2.6 and every time I try to access a PHP page on the Apache server, it says HTTP 500 Internal Server Error, can anyone help? Check your apache error logs. My guess is that PHP is making apache segfault. /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- View this message in context: http://www.nabble.com/500-Internal-Server-Error-tf4542753.html#a12964906 Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] read post data as a buffer
You may be looking for this : http://martinjansen.com/2007/04/upload-progress/ David Blanco-3 wrote: Hi! I think that is not possible to read post data as a buffer with php like it´s in perl. If this is true, how do you deal with large file uploads to know the status of the operation at any time? Thanks Greetings from Spain -- David Blanco -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- View this message in context: http://www.nabble.com/read-post-data-as-a-buffer-tf4514831.html#a12879787 Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] newbie trying to find segfault reasons
just don't use php 5.1.6 Chris Curvey-2 wrote: Hey all, I'm kinda new at PHP (but not entirely new). I'm having a heck of a time with PHP causing my apache processes to segfault. I've found a few cases where it's something simple, like referring to an object property that does not exist, but it's painstaking work. I'm reduced to commenting out blocks of code, and then trying to comment and uncomment stuff until I can narrow it down to the line where I'm having the problem. Everybody can't be having this trouble. How can I configure PHP so that it will just tell me when I've made a typo, rather than segfaulting? My environment is Apache/2.0.55, Ubuntu Edgy, PHP/5.1.6 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- View this message in context: http://www.nabble.com/newbie-trying-to-find-segfault-reasons-tf4489224.html#a12803960 Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Bit-size of machine
Shekar Iyer wrote: In other words, How do I find if the system on which PHP is running is 32-bit or 64-bit programmatically? echo 'This is a ', is_int(2147483647 + 1) ? 64 : 32 , ' bit box'; HTH -- View this message in context: http://www.nabble.com/Bit-size-of-machine-tf3989360.html#a11329862 Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Problem with uploading file using FireFox
Richard Kurth-2 wrote: I know this is not a PHP problem it is a Browser problem but I need a workaround to make this work. So I can finishing my php script Using this to select the file and path form action=test7.php method=post input type=file name=uploadfile id=original size=60BR BR input type=submit name=submit value=UPLOAD /FORM My problem I Internet explore this will produce C:\directory\directory\uploaded.file But it FireFox,Netscape and Opery it will only give me uploaded.file How do I get the Path for this upload in these browsers you are missing the enctype=multipart/form-data part in your form tag. If you put echo 'pre'; print_R($_POST); print_R($_FILES); into your test7.php file, you will get someting like Array ( [uploadfile] = Array ( [name] = BEO.bak.htm [type] = text/html [tmp_name] = D:\tmp\php\php179.tmp ... using FireFox which you can use for http://de.php.net/manual/en/function.move-uploaded-file.php then. -- View this message in context: http://www.nabble.com/Problem-with-uploading-file-using-FireFox-tf3625091.html#a10122975 Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Cheap Ping
Jim Lucas-2 wrote: Richard Lynch wrote: On Fri, April 13, 2007 12:20 am, Jim Lucas wrote: Is there some way I can set a shorter limit? http://us.php.net/manual/en/function.stream-set-timeout.php Bzzzt. That's for an already-opened stream. :-) I figured that the op would figure that part out and possibly change his approach to use fsockopen instead of file_get_contents -- Enjoy, Jim Lucas Different eyes see different things. Different hearts beat on different strings. But there are times for you and me when all such things agree. - Rush the following from http://de.php.net/manual/en/function.socket-create.php#60438 (slightly modified) works well on my test laptop(w2k,php5.2.1): function ping($host) { $package = \x08\x00\x19\x2f\x00\x00\x00\x00\x70\x69\x6e\x67; $sock = socket_create(AF_INET, SOCK_RAW, 1); /* timeout 0.2 seconds */ socket_set_option($sock, SOL_SOCKET, SO_RCVTIMEO, array('sec' = 0, 'usec' = 20)); socket_connect($sock, $host, null); socket_send($sock, $package, strlen($package), 0); $TS = microtime(1); if(@socket_read($sock, 255)) { return microtime(1) - $TS; } else { return -1; } socket_close($sock); } -- View this message in context: http://www.nabble.com/Cheap-Ping-tf3569802.html#a9989132 Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Saving css state in javascript and passing to php via form submit
Richard Lynch wrote: On Fri, March 30, 2007 12:13 pm, Juergen Wind wrote: Tijnema ! wrote: You can use session within javascript too i believe. no, sessions are completely serverside, but you can use js to pass variables using the query string when sending a xmlHttpRequest. [pedantic] Actually, the cookie for a session, if it's using cookies and not trans_sid, lives on the client, and can (I think) be affected in JS. One can even store up to 4K of session data *in* the cookie, sufficiently encrypted with a 2-way encryption with the private key server-side, and achieve server-neutrality in a server farm, if one is so inclined. So it's POSSIBLE for one to architect a system wherein the session all lives on the client. If you're willing to expose your entire inner workings of your application (e.g., it's Open Source anyway, or there's just nothing worth hiding in the first place) you wouldn't NEED to encrypt the data. None of this would be useful in the context of this particular thread. [/pedantic] of course you are right, Richard, i was too lazy to elaborate the whole issue, i should have written $_SESSION ;) -- View this message in context: http://www.nabble.com/Saving-css-state-in-javascript-and-passing-to-php-via-form-submit-tf3492648.html#a9776277 Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PDO and buffered queries
Larry Garfield wrote: ...segfaults under PHP 5.1.6 ... php 5.1.5/6 was the source for many segfaults (f.e. using phpmyadmin) better don't use it any more. See also: http://bugs.php.net/bug.php?id=39036 -- View this message in context: http://www.nabble.com/PDO-and-buffered-queries-tf3484324.html#a9781631 Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] GET doesn't work as POST
Dotan Cohen wrote: On 24/02/07, Otto Wyss [EMAIL PROTECTED] wrote: With method=post just $kind works fine (register_global) yet I've also tried any combination of $_GET['kind'] and $_POST['kind']. With method=get it doesn't work. O. Wyss Try $_GET[kind] Dotan Cohen http://lyricslist.com/lyrics/artist_albums/299/krauss_alison.html http://what-is-what.com/what_is/kernel.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php why should $_GET[kind] work better than $_GET['kind'] ? -- View this message in context: http://www.nabble.com/GET-doesn%27t-work-as-POST-tf3283323.html#a9135932 Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Which version of phpmyadmin is stable for php 5.1.6 and FC6 System
edwardspl wrote: cajbecu wrote: [EMAIL PROTECTED] wrote: Dear All, Which version of phpmyadmin is suitable for php 5.1.6 ? Edward. the latest :) cajb. So, Which version no. ? next version will come in the next days(hours?) : pma 2.10.0 (not sure if it will work with php 5.1.6, there were serious issues with that php version) -- View this message in context: http://www.nabble.com/Which-version-of-phpmyadmin-is-stable-for-php-5.1.6-and-FC6-System-tf3273403.html#a9108655 Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] New Menu Bar - Can people test it for me?
Scott Gunn-2 wrote: http://www.thebigspider.co.uk/test/menu.html works/looks nice on FF3 (Minefield ;) Juergen -- View this message in context: http://www.nabble.com/New-Menu-Bar---Can-people-test-it-for-me--tf3266443.html#a9083270 Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] how can I find out if I have mcrypt and mhash installed?
Ross Hulford wrote: Thought it would be in the phpinfo() but cannot find it. R. ?php echo 'mcrypt is '; if(!function_exists('mcrypt_encrypt')) echo '*NOT* '; echo 'available'; ? J. -- View this message in context: http://www.nabble.com/how-can-I-find-out-if-I-have-mcrypt-and-mhash-installed--tf3266193.html#a9088770 Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] how can I find out if I have mcrypt and mhash installed?
Jürgen Wind wrote: Ross Hulford wrote: Thought it would be in the phpinfo() but cannot find it. R. ?php echo 'mcrypt is '; if(!function_exists('mcrypt_encrypt')) echo '*NOT* '; echo 'available'; ? J. ... but if you intend to activate it : remove the semicolon infront of extension=php_mcrypt.[dll | so] in your php.ini and restart your webserver -- View this message in context: http://www.nabble.com/how-can-I-find-out-if-I-have-mcrypt-and-mhash-installed--tf3266193.html#a9088894 Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Storing compiled code on the server
Andrei Verovski (aka MacGuru) wrote: On Wednesday 21 February 2007 16:52:40 Brian Dunning wrote: I have a few scripts that I want to protect from the prying eyes of even people with root access to my server. The best suggestion I've heard is to store only the compiled version on the server itself. I have no idea how to do this or how those scripts would be called. Can anyone point me to a good starting place? Just use PHP Accelerator (formely Turck MM Cache). Search for it on sourceforge.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php maybe you mean http://eaccelerator.net/ ? -- View this message in context: http://www.nabble.com/Storing-compiled-code-on-the-server-tf3267158.html#a9089013 Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How can I know if a browser is cookies enables?
How can I know if a web browser is cookies enables? Send them ONE cookie and see if you get it back on the next page. yep Actually, just use session_start() and see if it works or not is even easier. having sessions working is not dependent on cookies. -- View this message in context: http://www.nabble.com/How-can-I-know-if-a-browser-is-cookies-enables--tf3172563.html#a8806163 Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] _GET('name') truncates
Ramon-15 wrote: Hi all, I've written a php script, called test.php, consisting of the following statements: ?php error_reporting(E_ALL); $query = $_GET['sql']; echo $query; ? Using the script with 'small' values for the parameter sql works fine. Although, using the script with the sql query as specified below http://localhost/test.php?sql=SELECT orders_id, customers_id, customers_name, customers_company, customers_street_address, ---8--- last_modified = 18991230 ) and orders_status in (1,2,3) and%2Ãnà I do not understand why the value of the sql parameter is truncated. Any help is appreciated!! Thanks in advance! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php i assume you are running into the max size limit(1024?) for $_GET, use _POST instead, furthermore you should apply some security measures! -- View this message in context: http://www.nabble.com/_GET%28%27name%27%29--truncates-tf3176524.html#a8814114 Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Login script login
Stut wrote: I'm not totally clear what the question was in there. Personally I keep this simple... ?php $_POST['number'] = (isset($_POST['number']) ? trim($_POST['number']) : ''); $_POST['email'] = (isset($_POST['email']) ? trim($_POST['email']) : ''); if (empty($_POST['number']) or empty($_POST['email']) or empty($_POST['password'])) { die('All fields must be entered'); } // Find the customer/user/whatever you need from the given details if (not found) { die('Unable to locate customer/user/whatever'); } // Set up the session here, or however you're tracking the // current customer/user/whatever header('Location: /somewhere_else'); ? Hope that helps. -Stut be aware that you need a session_write_close(); before header('Location... or the session data might not be written to disk! just my 2 cent -- View this message in context: http://www.nabble.com/Login-script-login-tf3160341.html#a8766588 Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Anyone would like to test my open source application http://sourceforge.net/projects/dfo/ ?
Gert Cuykens wrote: Added db5c29 it includes a new server memory login module some small layout and code modifications. hmm, syntax error: dg.delete()\n dg.js (line 241) do you know the Firebug extension for Firefox? at least you should test your code before upload ;) -- View this message in context: http://www.nabble.com/Anyone-would-like-to-test-my-open-source-application-http%3A--sourceforge.net-projects-dfotf2971271.html#a8375061 Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: colon in coma [was: Re: [PHP] Anyone would like to test my open source application http://sourceforge.net/projects/dfo/ ?]
Roman Neuhauser wrote: # [EMAIL PROTECTED] / 2007-01-13 18:59:10 -0800: }, //-- offending colon # [EMAIL PROTECTED] / 2007-01-14 04:49:10 +0100: ah ok i am sorry, you can just remove the , (the offending colon) Guyes, what were you doing during your biology classes? ;) -- How many Vietnam vets does it take to screw in a light bulb? You don't know, man. You don't KNOW. Cause you weren't THERE. http://bash.org/?255991 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php well, ican't remember, too long ago ;[-- semi-colon, right?]) -- View this message in context: http://www.nabble.com/Anyone-would-like-to-test-my-open-source-application-http%3A--sourceforge.net-projects-dfotf2971271.html#a8375144 Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Anyone would like to test my open source application http://sourceforge.net/projects/dfo/ ?
Gert Cuykens wrote: On 1/15/07, Jürgen Wind [EMAIL PROTECTED] wrote: Gert Cuykens wrote: Added db5c29 it includes a new server memory login module some small layout and code modifications. hmm, syntax error: dg.delete()\n dg.js (line 241) do you know the Firebug extension for Firefox? at least you should test your code before upload ;) Ok i really want to know what is happening between me and transferring the code to you ? I never have syntax errors ??? I will sent you a screenshot of that part of the code from firefox with firebug of the same version i uploaded to sourceforge. well, i was on FF 1.5 when i tested, if your application is *only* for FF2 there should be a warning (IMO) on FF 2.0 i get : br / Notice: Undefined index: query in D:\HTdocs\701ajax\dgGrid\php\query.php on line 7, 262, 458 (due to my error_reporting settings) an if(isset($_POST['xxx']) $_POST['xxx']) instead of if($_POST['xxx']) fixed this minor quirk now going to test it ... :) -- View this message in context: http://www.nabble.com/Anyone-would-like-to-test-my-open-source-application-http%3A--sourceforge.net-projects-dfotf2971271.html#a8378236 Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Anyone would like to test my open source application http://sourceforge.net/projects/dfo/ ?
Gert Cuykens wrote: It's a web based sql console that you can use instead of phpmyadmin. nice idea, but i got lots of js errors (i.e. resulting from an orphaned colon in almost every .js file) i tried db5c28.tar.bz2 from sf.net -- View this message in context: http://www.nabble.com/Anyone-would-like-to-test-my-open-source-application-http%3A--sourceforge.net-projects-dfotf2971271.html#a8321262 Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Anyone would like to test my open source application http://sourceforge.net/projects/dfo/ ?
Gert Cuykens wrote: On 1/14/07, Jürgen Wind [EMAIL PROTECTED] wrote: Gert Cuykens wrote: It's a web based sql console that you can use instead of phpmyadmin. nice idea, but i got lots of js errors (i.e. resulting from an orphaned colon in almost every .js file) i tried db5c28.tar.bz2 from sf.net it doesnt work in ie because of xmlhttprequest (ajax) please try firefox 2 and it will work perfectly without any errors. Everything is w3c validated. IE uses activex instead of xmlhttprequest. First i would like to make db5 stable for firefox2 and then IE. I never use IE. The errors trigger the error console in FF2 and Opera as well. here are the last lines from edit.js for example: server.send('function',false,f,'sha1='+v) window.close() }, //-- offending colon } -- View this message in context: http://www.nabble.com/Anyone-would-like-to-test-my-open-source-application-http%3A--sourceforge.net-projects-dfotf2971271.html#a8327318 Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Javascript detection , working version
Ruben Rubio Rey wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 A good way to detect if javascript exists is (cross-browser, cross-platform): You try to load javascript_exists.htm. - javascript_exists.htm: noscript meta http-equiv=refresh content=0; URL=javascript_not_actived.htm /noscript html ... Javascript is actived!! /html - javascript_not_actived.htm: html ... Javascript is *NOT* actived!! /html -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.2.2 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFpzemIo1XmbAXRboRAirXAKCo8LlqI0gv/7+Kfs7L6EHJGRdN3QCgo530 1YwBznS0B8p3KSFVCVcyyfc= =DjZ8 -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- View this message in context: http://www.nabble.com/Javascript-detection-tf2905451.html#a8297155 Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Javascript detection , working version
Ruben Rubio Rey wrote: A good way to detect if javascript exists is (cross-browser, cross-platform): You try to load javascript_exists.htm. - javascript_exists.htm: noscript meta http-equiv=refresh content=0; URL=javascript_not_actived.htm /noscript html ... Javascript is actived!! /html - javascript_not_actived.htm: html ... Javascript is *NOT* actived!! /html obviously the most simple and logical solution ;) p.s.: sorry for the previous empty post(hit wrong botten) Juergen -- View this message in context: http://www.nabble.com/Javascript-detection-tf2905451.html#a8297234 Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Javascript detection , working version
tedd wrote: index.php, jstest110.php) , make it one. ok ---8--- It would be cool if I could send js value via a POST instead of GET-- can that be done? have a look http://149.222.235.16/jstest/70112/index.php ( POST version ) tedd PS: I read somewhere that using noscript is not recommended. any info? have fun, Jürgen -- View this message in context: http://www.nabble.com/Javascript-detection-tf2905451.html#a8292741 Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Javascript detection , working version
Curt Zirzow-2 wrote: On 1/1/07, Jürgen Wind [EMAIL PROTECTED] wrote: well, no cute css, but (hopefully) working - here is my quick dirty version : http://149.222.235.16/public/ I dont understand the point. Curt, sorry, i should have posted the original code (it's merely js/html/browser related, not php) http://149.222.235.16/public/index.html (20070102) : script !--// index.html 20070102 D=new Date() location.href='jstest.php?js=okt='+D.getTimezoneOffset() //--/script meta http-equiv='refresh' content='0;url=jstest.php?js=no' as i already said elsewhere in the thread: it was just a quickdirty hack, as tedds link didn't work. But Roman made a good point: Out of curiosity, can you guarantee the Javascript redirect will always occur before the meta redirect when Javascript is enabled? Otherwise you have a race condition. so here is what's new in http://149.222.235.16/public/index.php (20070110) : 8 noscript meta http-equiv='refresh' content='0;url=jstest110.php?js=no' ?php /*** or put here your complete page for browsers with js disabled ***/ ? /noscript -- View this message in context: http://www.nabble.com/Javascript-detection-tf2905451.html#a8256985 Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Javascript detection , working version
index.php, jstest110.php) , make it one. no, it was just a proof of concept It would be cool if I could send js value via a POST instead of GET-- can that be done? should be possible with some onload/xhtmlrequest tedd PS: I read somewhere that using noscript is not recommended. hmm, any links or buzzwords for google? -- View this message in context: http://www.nabble.com/Javascript-detection-tf2905451.html#a8267553 Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Javascript detection , working version
you additionaly can surround the meta redirect with noscript tags: script !--// index.html D=new Date() location.href='jstest.php?js=okt='+D.getTimezoneOffset() //--/script noscript meta http-equiv='refresh' content='0;url=jstest.php?js=no' /noscript tedd wrote: At 9:55 PM +0100 1/2/07, Satyam wrote: - Original Message - From: Robert Cummings [EMAIL PROTECTED] To: Jürgen Wind [EMAIL PROTECTED] Cc: php-general@lists.php.net Sent: Tuesday, January 02, 2007 8:57 PM Subject: Re: [PHP] Javascript detection , working version On Tue, 2007-01-02 at 11:32 -0800, Jürgen Wind wrote: Robert Cummings wrote: Out of curiosity, can you guarantee the Javascript redirect will always occur before the meta redirect when Javascript is enabled? Otherwise you have a race condition. Cheers, Rob. i have no idea, it is just a quickdirty hack, i'm no js expert ;) the js part is rather fast, maybe a little delay or window.write is neccessary after the redirect? No, you always want the javascript to run first. The question is whether a meta redirect could ever occur before the javascript redirect. If it can then occasionally you may get javascript not detected since the meta redirect would occur when in fact javascript is enabled. Cheers, Rob. -- What I usually do is to make the entry page the one that would be used without JavaScript and branch only if JavaScript is present. Satyam To all: What I am doing is not branching to any other page but rather if js is present then I use the js enhancement and if not, then it's not there to be used. In either case, the page works. It's only an enhancement. In either case, there's no race condition. tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- View this message in context: http://www.nabble.com/Javascript-detection-tf2905451.html#a8250856 Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Javascript detection , working version
tedd, plz no personal mail, i like better to discuss things in the forum and thus hear other meanings and experiences. Your solution was very simple and worked very well. tx, i always try to keep things logical and as simple as possible ;) this is just a quick example to show how to bring info gathered by js back to the php application (and possibly store it in a session for later use). Using the query string is just one way and can also be used in combination with loading some css.php or some such. Setting a cookie may be another option. Happy coding ;) -- View this message in context: http://www.nabble.com/Javascript-detection-tf2905451.html#a8127911 Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Javascript detection , working version
Robert Cummings wrote: Out of curiosity, can you guarantee the Javascript redirect will always occur before the meta redirect when Javascript is enabled? Otherwise you have a race condition. Cheers, Rob. i have no idea, it is just a quickdirty hack, i'm no js expert ;) the js part is rather fast, maybe a little delay or window.write is neccessary after the redirect? -- View this message in context: http://www.nabble.com/Javascript-detection-tf2905451.html#a8129234 Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Javascript detection , working version
Satyam wrote: What I usually do is to make the entry page the one that would be used without JavaScript and branch only if JavaScript is present. Satyam yes, that's the best solution, updated version: http://149.222.235.16/jstest/ -- View this message in context: http://www.nabble.com/Javascript-detection-tf2905451.html#a8132106 Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Javascript detection , working version
Robert Cummings wrote: Out of curiosity, can you guarantee the Javascript redirect will always occur before the meta redirect when Javascript is enabled? Otherwise you have a race condition. Cheers, Rob. yes, you where right (i noticed some problems with opera) updated version: http://149.222.235.16/jstest/ -- View this message in context: http://www.nabble.com/Javascript-detection-tf2905451.html#a8132150 Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Javascript detection , working version
that's why i prefer discussing here in the forum, we benefit from the experiences of each other :) updated version: http://149.222.235.16/jstest/ -- View this message in context: http://www.nabble.com/Javascript-detection-tf2905451.html#a8132203 Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Javascript detection
does not work on SeaMonkey and Opera (IE not tested). -- View this message in context: http://www.nabble.com/Javascript-detection-tf2905451.html#a8117266 Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Javascript detection , working version
well, no cute css, but (hopefully) working - here is my quick dirty version : http://149.222.235.16/public/ -- View this message in context: http://www.nabble.com/Javascript-detection-tf2905451.html#a8118787 Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Chocked
what if you prepend your path with ./ : include_once(./classes/first.class.php); include_once(./second.class.php); is the include path configured correctly? -- View this message in context: http://www.nabble.com/Chocked-tf2892714.html#a8082223 Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Script's length, echo, and execution speed
Casey Chu wrote: Yeah, try testing. Maybe something like this: ?php $form = form action=' ' method='post'textarea name='code'/textareabr /button type='submit'Execute/button/form; if ($_POST['code']) { echo div style='border: 1px'; $time_start = microtime_float(); eval($_POST['code']); $time_end = microtime_float(); echo br /Loading took: . $time_end - $time_start. '/div'; } echo div style='float: left'$form/div; // Note: This script is extremely dangerous and is not tested. ? under php5 use can use microtime(1) for timestamps -- View this message in context: http://www.nabble.com/Script%27s-length%2C-echo%2C-and-execution-speed-tf2875055.html#a8037132 Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] New windows build
edink wrote: Hello all, Since we will soon be switching to the new Microsoft compiler for making official PHP builds I have created a couple test builds to see how it goes. There were some initial problems and we do have to adjust things in the build to accommodate for changes of how the C++ redistributable is packaged. We are now at a point where we have a usable build. I encourage PHP users on Windows to download the test build from http://edin.dk/archives/24-Second-PHP-build-using-the-new-compiler.html and provide feedback on any issues thy might have experienced. Edin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php wrong pecl link on that site :( -- View this message in context: http://www.nabble.com/New-windows-build-tf2842986.html#a7938707 Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP 5.2.0 Session Handling Bug? Can someone test this please?
Colin Guthrie-6 wrote: Hi, I've noticed a bug with PHP 5.2.0 when dealing with sessions and posting quite large forms. I've attached a file that highlights the bug. Can people test this please and if it is confirmed i'll post upsteam. Just want to rule out my distro's packaging being at fault I am using the suochsim, soouishm, soushim ach the security patch thing, so that may be what is at fault here. Anyway, I don't think the data itself is to blame but I didn't fiddle too much with it as I didn't see the point. I've tested this on PHP 5.1.6 and it is not affected. Thanks. Col. as you mentioned using hardened php: maybe you have to adjust hphp.post.max_value_length = and/or some other settings -- View this message in context: http://www.nabble.com/PHP-5.2.0-Session-Handling-Bug--Can-someone-test-this-please--tf2644202.html#a7382877 Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Checking file existence
Ashley M. Kirchner wrote: I have files that are named in the following manner: file..jpg (where is an hhmm timestamp [hour and minutes]) What's the best way to take the current hhmm timestamp and run backwards finding the previous 5 files, and checking whether they actually exist? There's a possibility one or more might not exist and rather than returning a blank value, I want to continue further back till I find the next. So for example, say I have: file 1122.jpg file 1121.jpg file 1119.jpg file 1117.jpg file 1116.jpg file 1114.jpg Notice the gaps, 1120, 1118, and 1115 are missing. But I still want to return five, thus 1122, 1121, 1119, 1117, and 1116. I thought of taking the current timestamp and loop five times, subtracting from it every time, but that's assuming all five are there. If one's missing then I only have four images. -- W | It's not a bug - it's an undocumented feature. + Ashley M. Kirchner mailto:[EMAIL PROTECTED] . 303.442.6410 x130 IT Director / SysAdmin / Websmith . 800.441.3873 x130 Photo Craft Imaging . 3550 Arapahoe Ave. #6 http://www.pcraft.com . . .. Boulder, CO 80303, U.S.A. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- View this message in context: http://www.nabble.com/Checking-file-existence-tf2636778.html#a7359768 Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Checking file existence
sorry, clicked on send too fast ;) i'd extract the minues and seconds , generate an array of timestamps and sort that array desc -- View this message in context: http://www.nabble.com/Checking-file-existence-tf2636778.html#a7359891 Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] gethostbyname failing?
Henrik Hudson wrote: Hey List- running: apache 2.2, freebsd 6.2 and php 4.4.4 I've got a wierd issue. I've got a script that does this: $domain = www.google.com; $ip = gethostbyname($domain); echo $ip; $hostname = gethostbyaddr(72.14.205.99); echo $hostname; Using dig, ping, etc... to confirm name resolution is working works fine. Running that script from the CLI is fine (ie: php test.php). However, when running from the web it doesn't work. I tried it on a php 5.1.x box and it works fine there. Thoughts? Henrik ?php echo 'pre'; print_r( gethostbynamel('www.google.com') ); ? Array ( [0] = 209.85.135.103 [1] = 209.85.135.104 [2] = 209.85.135.147 [3] = 209.85.135.99 ) Jürgen -- View this message in context: http://www.nabble.com/gethostbyname-failing--tf2604272.html#a7267120 Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] gethostbyname failing?
maybe this is related: from http://de3.php.net/manual/en/function.gethostbyname.php (user comments) christian at SPAM at IS at DEAD at MEAT at karg dot org 01-Apr-2003 02:12 I had difficulty getting gethostbyname to work under OpenBSD 3.2 and Apache, until I discovered that the default Apache chroot caused the problem. To get PHP's gethostbyname to work, you need resolv.conf (and possibly hosts) in /var/www/etc (assuming default install dirs). -- View this message in context: http://www.nabble.com/gethostbyname-failing--tf2604272.html#a7268131 Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php.ini
PHP is not supposed to look for php.ini in PATH. (from http://bugs.php.net/bug.php?id=39432) zerof wrote: Alain Roger escreveu: Hi, everytime i install PHP, my php.ini must be installed in C:\windows\ folder. How can i do to force system to read php.ini file from C:\PHP\ folder only ? thanks. Alain You need to put the c:\php folder in the path of the system. Control Panel OPEN System Tab Advanced Environment Variables Select the variable Path Click Edit Add at the end, the term: ;C:\php; + Click OK, OK, . . . to conclude. ex-corde, zerof http://www.educar.pro.br/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- View this message in context: http://www.nabble.com/php.ini-tf2603259.html#a7268994 Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Permanent Links - Blog
Raphael Martins-2 wrote: Hi, How do I implement that http://myhost/blog/date/of/post/name-of-the-post; thing, instead of http://myhost/blog/view.php?id=id-of-the-post; ? I´ve seen this in many blogs, but it´s easy to implement? See it in action at wikipedia, blogger blogs, simplebits http://www.simplebits.com. Both simplebits and wikipedia is written in PHP, I guess. Help! Thank you -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php superb work: http://richardlynch.blogspot.com/ -- View this message in context: http://www.nabble.com/Permanent-Links---Blog-tf2597419.html#a7245708 Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] problems with SOAP-PHP5 and heritage
if you want sombody using nabble.com having a look into the attached .php files, you should zip them before upload(i got them without any linefeeds). -- View this message in context: http://www.nabble.com/problems-with-SOAP-PHP5-and-heritage-tf2588326.html#a7223514 Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] problems with SOAP-PHP5 and heritage
Jürgen Wind wrote: if you want sombody using nabble.com having a look into the attached .php files, you should zip them before upload(i got them without any linefeeds). but it may be a nabble.com bug, i filed a bugreport anyhow. -- View this message in context: http://www.nabble.com/problems-with-SOAP-PHP5-and-heritage-tf2588326.html#a7224125 Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] [newbie in session] Is is right behavior???
Mariusz Topczewski wrote: On some PC when i load the page, the is no content, and on other PC the page is loaded properly. On computer where the page is blank i have to press F5 (refresh), and the page appear ?. this problem can also be observed on some win boxes when running phpMyAdmin. seems to be related with some security settings in XP - just a guess -- View this message in context: http://www.nabble.com/-newbie-in-session--Is-is-right-behaviortf2573360.html#a7187719 Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] why so slow?
Frank Arensmeier wrote: My suggestion: stripp out the JS from Google. Test you page again. Should the page load as slowly as before, it might have to do with PHP. Then, give us more details about your script) /frank 1 nov 2006 kl. 10.53 skrev Robert Cummings: On Wed, 2006-11-01 at 01:26 -0800, Mel wrote: So do you mean that's it is ok and not slow? I'm saying we can't ascertain why it's so slow since we don't have enough information. Cheers, Rob. -- .. | InterJinn Application Framework - http://www.interjinn.com | :: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `' -- 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 many sites (including nabble.com, which i use to read and post here) load faster since i have 127.0.0.1 www.google-analytics.com in my hosts file to block that urchin.js spyware. -- View this message in context: http://www.nabble.com/why-so-slow--tf2550936.html#a7111082 Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Creating Tree Structure from associative array
Robert Cummings wrote: On Thu, 2006-10-19 at 23:58 -0500, Larry Garfield wrote: That depends on what your data structure is, exactly, and what sort of tree structure you want on the other side. Please be more specific. On Thursday 19 October 2006 09:08, Angelo Zanetti wrote: Hi all, I have an associative array, which contains parent and child relationships. I've searched the web for creating a tree structure from this and found a few good sites but doesnt help 100% perhaps someone can point me in the correct direction? I've started to code it got to a point where I cant go any further, the code is pseudo code and dont want to reinvent the wheel. any suggestions would be really appreciated. It's kinda simple... ?php // //6 5 // / \ / \ // 2 7 9 3 // / | \ // 1 4 8 // $list = array ( array ( 'id'= '1', 'pid' = '2', 'value' = 'Value Foo 1', ), array ( 'id'= '2', 'pid' = '6', 'value' = 'Value Foo 2', ), array ( 'id'= '3', 'pid' = '5', 'value' = 'Value Foo 3', ), array ( 'id'= '4', 'pid' = '2', 'value' = 'Value Foo 4', ), array ( 'id'= '5', 'pid' = '0', 'value' = 'Value Foo 5', ), array ( 'id'= '6', 'pid' = '0', 'value' = 'Value Foo 6', ), array ( 'id'= '7', 'pid' = '6', 'value' = 'Value Foo 7', ), array ( 'id'= '8', 'pid' = '2', 'value' = 'Value Foo 8', ), array ( 'id'= '9', 'pid' = '5', 'value' = 'Value Foo 9', ), ); // // Set up indexing of the above list (in case it wasn't indexed). // $lookup = array(); foreach( $list as $item ) { $item['children'] = array(); $lookup[$item['id']] = $item; } // // Now build tree. // $tree = array(); foreach( $lookup as $id = $foo ) { $item = $lookup[$id]; if( $item['pid'] == 0 ) { $tree[$id] = $item; } else if( isset( $lookup[$item['pid']] ) ) { $lookup[$item['pid']]['children'][$id] = $item; } else { $tree['_orphans_'][$id] = $item; } } // // WooohoOO! // print_r( $tree ); ? Cheers, Rob. -- .. | InterJinn Application Framework - http://www.interjinn.com | :: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php for web browser: // WooohoOO! // echo 'pre'; print_r( $tree ); -- View this message in context: http://www.nabble.com/Creating-Tree-Structure-from-associative-array-tf2473585.html#a6920126 Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] connectivity weirdness
?php echo file_get_contents('http://php.net/');? takes only 2 seconds here. w2k php5.14 FF1.5.0.7 -- View this message in context: http://www.nabble.com/connectivity-weirdness-tf2481786.html#a6920671 Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Recieve information on a html site using php?
Marc Roberts wrote: Thanks for the response, I think I have solved the problem using the code in the attached text document. Thanks for the help, Marc Roman Neuhauser wrote: # [EMAIL PROTECTED] / 2006-10-18 17:23:53 +0200: Is it possible to receive information on a html site, such as the language, date modified? If so how would I go about doing this? Your question is very vague, so I'm taking the liberty of interpretation. - ftp://ftp.rfc-editor.org/in-notes/rfc2616.txt - http://www.php.net/http (haven't used pecl_http myself, you might have to resort to http://www.php.net/sockets) function get_raw_header($host,$doc) { $httpheader = ''; $fp = fsockopen ($host, 80, $errno, $errstr, 30); if (!$fp) { echo $errstr.' ('.$errno.')'; }else{ fputs($fp, 'GET '.$doc.' HTTP/1.0'.\r\n.'Host: '.$host.\r\n\r\n); while(!feof($fp)) { $httpresult = fgets ($fp,1024); $httpheader = $httpheader.$httpresult; if (ereg(^\r\n,$httpresult)) break; } fclose ($fp); } return $httpheader; } function get_header_array($Url) { $Url = ereg_replace('http://','',$Url); $endHostPos = strpos($Url,'/'); if(!$endHostPos) $endHostPos = strlen($Url); $host = substr($Url,0,$endHostPos); $doc = substr($Url,$endHostPos,strlen($Url)-$endHostPos); if($doc == '') $doc = '/'; $raw = get_raw_header($host,$doc); $tmpArray = explode(\n,$raw); for ($i=0;$isizeof($tmpArray); $i++) { @list($Name, $value) = explode(':', $tmpArray[$i], 2); $array[trim($Name)]=trim($value); } return $array; } $remote_file = 'http://www.whatever.com/';//states which url to read the modified date from $array = get_header_array($remote_file);//gets the data on the page $remote_file $deUpdate = date('Ymj',strtotime($array['Last-modified'])); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php not every site sends 'Last-modified' , f.e. www.heise.de: --- HTTP/1.1 200 OK Date: Fri, 20 Oct 2006 18:27:03 GMT Server: Apache/1.3.34 Expires: Fri, 20 Oct 2006 18:42:03 GMT Vary: Accept-Encoding Connection: close Content-Type: text/html; charset=iso-8859-1 --- -- View this message in context: http://www.nabble.com/Recieve-information-on-a-html-site-using-php--tf2478503.html#a6922634 Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] session - cookie issues
Dave Goodchild wrote: Hi all, I am having issues with users not being able to post their details to my site. The system uses sessions, so when they hit the index page a test cookie is set thus: setcookie('djst', 'test'); and then I test whether that cookie is set on the next page. If not, I direct the users to an informational page. This works my end in FF and IE6 (sec settings tested at low, medium and medium high) but appox 1 in 20 users cannot get past the cookie warning, even if they set their security settings to low in IE. I am also setting PHPSESSID to something of my own, as I hear that IE does not like PHPSESSID (correct?). Any ideas? -- http://www.web-buddha.co.uk maybe this is of interest: http://www.salesforce.com/developer/tech-notes.jsp?tn=TN-18 - Creating Cookies with P3P -- View this message in context: http://www.nabble.com/session---cookie-issues-tf2478990.html#a6923903 Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] RE: Seperate HTML from PHP
brilliant! -- View this message in context: http://www.nabble.com/Seperate-HTML-from-PHP-tf2415209.html#a6753706 Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php/css and .htaccess
Christopher Weldon wrote: tedd wrote: Hi gang: I embedded php code inside css and changed my .htaccess to read -- FilesMatch \.(htm|html|css)$ SetHandler application/x-httpd-php /FilesMatch -- so that the css file would be processed and executed by php. The end result was that everything worked and did what I wanted. However, FireFox / Mozillia won't accept a css file if a .htaccess file reads as indicated above. Any ideas as to how to get FireFox to play nice? Thanks in advance for any replies. tedd That shouldn't be expected. The SetHandler only applies to the Apache handler side, as browsers should not be able to read those files (.htaccess). So, are you 100% positive that PHP is in fact processing the file? -- Christopher Weldon, ZCE President CEO Cerberus Interactive, Inc. [EMAIL PROTECTED] 979.739.5874 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php FF needs header('Content-Type: text/css; charset=ISO-8859-1'); in css files. -- View this message in context: http://www.nabble.com/php-css-and-.htaccess-tf2308435.html#a6418835 Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Frustrated trying to get help from your site
Jon Anderson wrote: Jay Blanchard wrote: So let me send a rant to other users, in fact a general list of users, because I cannot read. If I could I would know that I subscribed to a list where questions are asked to other users rather than me trying to send an e-mail to the president of PHP (a hat worn proudly). The entire sire is documentation and anywhere from one to five minutes of even the lightest reason would have spelled that out, not to mention that the second link across the top of the page says in very vague terms, 'documentation'. Is this a run on paragraph? I am asking because English is incredibly frustrating and difficult to use. Department of Technology indeed. As an aside, I think that the online and offline (downloadable) PHP documentation is probably the clearest, best organized and complete set of documentation for any programming language I've run into online. I honestly think that the PHP coders/documentors deserve a lot of gratitude for the immense effort that must have gone into documenting the immense list of built-in stuff that PHP has. jon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php FULL ACK! -- View this message in context: http://www.nabble.com/Frustrated-trying-to-get-help-from-your-site-tf2292725.html#a6394118 Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Access Violations
did you try mysql 5.0.24a? there where some problems with 5.0.24 (segfaults...) -- View this message in context: http://www.nabble.com/PHP-Access-Violations-tf023.html#a6227018 Sent from the PHP - General forum at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php