Re: [PHP] Socket functions
Philippe Reynolds wrote: Greetings, When I do an ifconfig in unix, I see the the IP address for the my ethernet. It follows something called inet. Would anyone know who to manipulate the socket functions to be able to extract the inet IP address fromt the eth0 section?? ?php exec('ifconfig eth0 | grep inet',$output); preg_match(|[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}|,$output[0],$matches); echo $matches[0]; ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Problem With Inner Loop
Hi, The following code is attempting to display a list of work types for all the users in my database. However it only loops through the inner loop once and I can't work out why, can anyone help here please? Thanks for your help table ?php include('application.php'); $staff_qid = mysql_query('SELECT U.User_ID, CONCAT_WS( , U.user_Firstname, U.User_Lastname) AS User_Name FROM Users U, Allocations A, Projects P WHERE U.User_ID = A.User_ID AND A.Project_ID = P.Project_ID AND P.Project_ID = 38 AND (U.User_Type = Staff OR U.User_Type = Manager OR U.User_Type = Administrator) ORDER By User_Name'); $work_type_qid = mysql_query('SELECT Work_Type_ID, Work_Type FROM Work_Types WHERE Project_ID = 38 ORDER BY Day_Type'); ? table ?php while( $staff_r = mysql_fetch_object( $staff_qid ) ) { ? tr ?php while( $work_type_r = mysql_fetch_object( $work_type_qid ) ) { ? td?php echo $work_type_r-Work_Type; ?/td ?php } ? /tr ?php } ? /table Hi Shaun, Looking at your code, it doesn't appear that there's an actual relationship between your two queries? Ie the select statement for the 'inner' query doesn't reference any value returned by the select statement from the 'outer' query. This means that for every record returned by the outer query, the same record or records will be returned by the inner query, which doesn't seem to match the intention of the summary you gave at the top of your email. This could be an error of interpretation on my part. It may well be that every record returned by the inner query is relevant to each and every record returned by the outer query. It's hard to tell from the details you've included. Having said which, I'm personally more used to situations where the following occurs (warning, pseudo-code alert!): $outerrs = select_query; while ($outerdata = get_result_from_outerrs){ $innerrs = select_query_using_value_in_where_clause_from_$outerdata; while ($innerdata = get_result_from_innerrs){ display_information_from_outerdata_and_or_innerdata; } } In the above situation, the inner query is called for each record in the outer query, indicating a relationship between the two resultsets. As another thought, have you run the inner select statement against your db (ie using PHPMyAdmin / MySQL Query Browser / etc) to confirm that under normal circumstances that query actually returns more than one record? Regards, Murray --- Lost in thought... http://www.planetthoughtful.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] How can I format text in textarea?
Hi When I enter text as more than on paragrahs in a textarea field,The text is displayed in one solid block of text even though I have entered it in paragraphs. How I can to insert line breaks in the text. (The values of textarea is stored in database and then displayed.) Bushra Hi Bushra, When displaying the data stored in your db from a textarea field, use the nl2br() function. This converts newlines in the data into br / html tags. You're currently not seeing the paragraph breaks because the HTML specification doesn't display newline / carriage returns when a page is rendered in a browser -- you have to specifically indicate where paragraph breaks should take place using HTML tags. Eg: echo nl2br($data_from_db_entered_via_textarea); See: http://au2.php.net/nl2br Regards, Murray --- http://www.planetthoughtful.org Building a thoughtful planet... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] divide-column?
Hi there! How do I do a sort in PHP where a column in a db must be two other columns divided...`? snip Hi Gustav, You should be able to use the divide operation in your query's ORDER BY clause. Eg SELECT * FROM mytable ORDER BY (field1 / field2) Regards, Murray --- Lost in thought... http://www.planetthoughtful.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] divide-column?
Murray @ PlanetThoughtful wrote: Hi there! How do I do a sort in PHP where a column in a db must be two other columns divided...`? snip Hi Gustav, You should be able to use the divide operation in your query's ORDER BY clause. Eg SELECT * FROM mytable ORDER BY (field1 / field2) You might need to do: SELECT *, (field1 / field2) AS divField FROM mytable ORDER BY divField as I'm not sure if you can use expressions like that in the ORDER BY clause. Maybe... -- Jasper Bryant-Greene Freelance web developer http://jasper.bryant-greene.name/ If you find my advice useful, please consider donating to a poor student! You can choose whatever amount you think my advice was worth to you. http://tinyurl.com/7oa5s -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] divide-column?
Murray @ PlanetThoughtful wrote: Hi there! How do I do a sort in PHP where a column in a db must be two other columns divided...`? snip Hi Gustav, You should be able to use the divide operation in your query's ORDER BY clause. Eg SELECT * FROM mytable ORDER BY (field1 / field2) You might need to do: SELECT *, (field1 / field2) AS divField FROM mytable ORDER BY divField as I'm not sure if you can use expressions like that in the ORDER BY clause. Maybe... Hi Jasper, The statement I included worked in testing when run against my local installation of MySQL. Still, good to point out different options, in the event that something goes awry. Regards, Murray --- Lost in thought... http://www.planetthoughtful.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Questions regarding distribution of PHP modules as binaries
Hello, all - I've got one more question for you all, which I don't quite understand. What if, say, I'd like to develope an application which requires the use of, well for simplicity, some SSL functionality. I would distribute my PHP application, but then would provide compiled modules for each specific PHP version which I expect my application to run on, for use by the client to include them as a module in php.ini, to provide that functionality. As it currently stands in the licensing behind PHP, am I legally allowed to do this? I understand that this is an unorthadox approach to software distribution, but it's just an idea that I had. If someone who knows PHP's licesnsing deep down wouldn't mind taking a minute here telling me what I can and can't do in this respect, I would greatly appreciate it. Thanks! -dant -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] upload file - clients path to file?
Hi all. I havent found an answer after looking at the manual. I'm trying to find out if it possible to find the path of the file on the clients pc once a form has been submitted with the file upload form. I know its possible to get the file name but I need the whole path. is this possible? thanks in advance. -- Angelo Zanetti This message was sent using IMP, the Internet Messaging Program. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] ZCE Reccommendations
Hey yall, I'm taking my ZCE exam soon and would like general advice on what to study up on. I've been using php since 97 so I'm pretty confident with day-today stuff, but I'm pretty new to OOP and and looking for any study pointers I can get. Thanks, Keith -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] upload file - clients path to file?
[EMAIL PROTECTED] wrote: I havent found an answer after looking at the manual. I'm trying to find out if it possible to find the path of the file on the clients pc once a form has been submitted with the file upload form. I know its possible to get the file name but I need the whole path. is this possible? Not with pure PHP. Maybe with some JavaScript, but most browsers heavily limit any interaction with input type=file controls from JavaScript. So probably not at all. -- Jasper Bryant-Greene Freelance web developer http://jasper.bryant-greene.name/ If you find my advice useful, please consider donating to a poor student! You can choose whatever amount you think my advice was worth to you. http://tinyurl.com/7oa5s -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: upload file - clients path to file?
Hi all. I havent found an answer after looking at the manual. I'm trying to find out if it possible to find the path of the file on the clients pc once a form has been submitted with the file upload form. No, this would be a security risk. If all your users are on an intranet, you may be able to implement some kind of client-side scripting to discover the location, then post it as part of the form. Even this will probably involve amending local security settings on each machine. I know its possible to get the file name but I need the whole path. What do you need it for? Perhaps there is another way to solve this problem? is this possible? thanks in advance. -- Angelo Zanetti This message was sent using IMP, the Internet Messaging Program. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: upload file - clients path to file?
Thanks for the replies. Well basically i need it for an add products page and if the users doesnt fill in all the fields correctly I display some error message as well as populate the textfields and dropdown lists with the values they previously entered, so if they entered/selected the file I want to display it again so they don't have to upload the file again. I know that I could do it without the user knowing (backed) but then they might think they have to select the file again because the upload field will be blank. Quoting Mark Rees [EMAIL PROTECTED]: Hi all. I havent found an answer after looking at the manual. I'm trying to find out if it possible to find the path of the file on the clients pc once a form has been submitted with the file upload form. No, this would be a security risk. If all your users are on an intranet, you may be able to implement some kind of client-side scripting to discover the location, then post it as part of the form. Even this will probably involve amending local security settings on each machine. I know its possible to get the file name but I need the whole path. What do you need it for? Perhaps there is another way to solve this problem? is this possible? thanks in advance. -- Angelo Zanetti This message was sent using IMP, the Internet Messaging Program. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php This message was sent using IMP, the Internet Messaging Program. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] logout and session management
Hi This is regarding session management in php.I made the session closed when the stipulated time is over and redirect it to login page.But when the back button of the browser is clicked it takes to the previous page from where the session is closed,which is not really worthfull.How can i avoid this problem. regards vj -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: upload file - clients path to file?
[EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Thanks for the replies. Well basically i need it for an add products page and if the users doesnt fill in all the fields correctly I display some error message as well as populate the textfields and dropdown lists with the values they previously entered, so if they entered/selected the file I want to display it again so they don't have to upload the file again. I know that I could do it without the user knowing (backed) but then they might think they have to select the file again because the upload field will be blank. If that's the problem, you might find it easier to solve by going for two separate forms - one to enter all the details, and the second just to upload the file. Quoting Mark Rees [EMAIL PROTECTED]: Hi all. I havent found an answer after looking at the manual. I'm trying to find out if it possible to find the path of the file on the clients pc once a form has been submitted with the file upload form. No, this would be a security risk. If all your users are on an intranet, you may be able to implement some kind of client-side scripting to discover the location, then post it as part of the form. Even this will probably involve amending local security settings on each machine. I know its possible to get the file name but I need the whole path. What do you need it for? Perhaps there is another way to solve this problem? is this possible? thanks in advance. -- Angelo Zanetti This message was sent using IMP, the Internet Messaging Program. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php This message was sent using IMP, the Internet Messaging Program. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: upload file - clients path to file?
IMHO this is just a design issue, why not just hide the upload field, display a message that they need not re-upload, and just add a hidden field with the name of the uploaded file and once they've corrected their fields, they re-post, and viola, you've got your file still. [EMAIL PROTECTED] wrote: Thanks for the replies. Well basically i need it for an add products page and if the users doesnt fill in all the fields correctly I display some error message as well as populate the textfields and dropdown lists with the values they previously entered, so if they entered/selected the file I want to display it again so they don't have to upload the file again. I know that I could do it without the user knowing (backed) but then they might think they have to select the file again because the upload field will be blank. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: upload file - clients path to file?
[EMAIL PROTECTED] wrote: Well basically i need it for an add products page and if the users doesnt fill in all the fields correctly I display some error message as well as populate the textfields and dropdown lists with the values they previously entered, so if they entered/selected the file I want to display it again so they don't have to upload the file again. I know that I could do it without the user knowing (backed) but then they might think they have to select the file again because the upload field will be blank. Please don't top-post. You can *NEVER* set an initial value for a file upload field. This would be a HUGE security risk. Imagine (on a Linux system): input type=file name=myfile value=/etc/passwd You need to alter your design so that this is unnecessary, for example as suggested by someone else -- don't display the upload box and display a message saying it is already uploaded, maybe with a link to re-upload. Jasper -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Browsing Into Levels
Hi, I been wondering the best way to make the level browsing, I mean, those links up in page which tell you the position you are, and make you able to return sections back, keeping some kind of logic of where you are. I been used the url vars to do this but I arrive some point where there are coincidences and it loose sense, it jumps to other section, where indeed have to, but not where it logically should. any suggestions? thank :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Cookies.
Hi, I am trying to install a web application that tests if cookies are enabled the following way: $this-usesCookies = (isset($_COOKIE[session_name()]) @strlen($_COOKIE[session_name()]) == 32); As it gives as a result, that cookies are NOT ENABLED, I can't go on with the SETUP phase. The responsible of the FALSE result, in the sentence above, is the LENGTH of the string $_COOKIE[session_name()]. Its actual value is 26 instead of 32, as expected. ¿Could anyone tell me if that LENGTH should be 32? ¿Is this value mandatory to admit that cookies are enabled? Thanks! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Cookies.
Nancy Ferracutti Kincaide wrote: I am trying to install a web application that tests if cookies are enabled the following way: $this-usesCookies = (isset($_COOKIE[session_name()]) @strlen($_COOKIE[session_name()]) == 32); As it gives as a result, that cookies are NOT ENABLED, I can't go on with the SETUP phase. The responsible of the FALSE result, in the sentence above, is the LENGTH of the string $_COOKIE[session_name()]. Its actual value is 26 instead of 32, as expected. ¿Could anyone tell me if that LENGTH should be 32? ¿Is this value mandatory to admit that cookies are enabled? That would depend on what the session hash function was set to. Normally it should be 32 or 40 depending on whether MD5 or SHA1 was selected. Just the fact that $_COOKIE[session_name()] is set would indicate that cookies are enabled, but the application may be performing some sort of sanity check, which is obviously failing... Put a die($_COOKIE[session_name()]); just before that line, and tell us what it shows. -- Jasper Bryant-Greene Freelance web developer http://jasper.bryant-greene.name/ If you find my advice useful, please consider donating to a poor student! You can choose whatever amount you think my advice was worth to you. http://tinyurl.com/7oa5s -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Cookies.
Dear Jasper, I think the session hash function is set to 32, and MD5 is selected, as the following lines of code show: -- function Session($sessionName=SESSID) { $this-sendNoCacheHeader(); // Session-Namen setzen, Session initialisieren session_name(isset($sessionName) ? $sessionName : session_name()); @session_start(); // Prüen ob die Session-ID die Standardlänge // von 32 Zeichen hat, // ansonsten Session-ID neu setzen if (strlen(session_id()) != 32) { mt_srand ((double)microtime()*100); session_id(md5(uniqid(mt_rand(; } -- The sentence die($_COOKIE[session_name()]), when executed, shows this value: 211b78tfl8umggkdh1ak7jrbf3 (a string of 26 characters long). Thank you very much, again! Nancy. - Original Message - From: Jasper Bryant-Greene [EMAIL PROTECTED] To: php php-general@lists.php.net Sent: Tuesday, August 30, 2005 8:48 AM Subject: Re: [PHP] Cookies. Nancy Ferracutti Kincaide wrote: I am trying to install a web application that tests if cookies are enabled the following way: $this-usesCookies = (isset($_COOKIE[session_name()]) @strlen($_COOKIE[session_name()]) == 32); As it gives as a result, that cookies are NOT ENABLED, I can't go on with the SETUP phase. The responsible of the FALSE result, in the sentence above, is the LENGTH of the string $_COOKIE[session_name()]. Its actual value is 26 instead of 32, as expected. ¿Could anyone tell me if that LENGTH should be 32? ¿Is this value mandatory to admit that cookies are enabled? That would depend on what the session hash function was set to. Normally it should be 32 or 40 depending on whether MD5 or SHA1 was selected. Just the fact that $_COOKIE[session_name()] is set would indicate that cookies are enabled, but the application may be performing some sort of sanity check, which is obviously failing... Put a die($_COOKIE[session_name()]); just before that line, and tell us what it shows. -- Jasper Bryant-Greene Freelance web developer http://jasper.bryant-greene.name/ If you find my advice useful, please consider donating to a poor student! You can choose whatever amount you think my advice was worth to you. http://tinyurl.com/7oa5s -- 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] time and timestamp
Hi, I have a row in myslq database called time and is just a simple timestamp column When I echo it out echo $row['time']; echo $row['content']; I get the following 2005-08-30 13:50.05 this is the text content Now I am not worried about the time but I would like to know how to (i) sort the returned rows in order (latest first) (ii) be able to extract the individual parts of the date and display them in UK format 30.08.2005 this is the text from 30th of August 27.08.2005 this is the text from 27th of August 27.08.2005 this is the text from 23rd of August thanks, R. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] time and timestamp
[snip] Now I am not worried about the time but I would like to know how to (i) sort the returned rows in order (latest first) (ii) be able to extract the individual parts of the date and display them in UK format 30.08.2005 this is the text from 30th of August 27.08.2005 this is the text from 27th of August 27.08.2005 this is the text from 23rd of August [/snip] http://www.php.net/date -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Socket functions
WOW...so much simpler..thank you very much!! Cheers Phil BLOCKQUOTE style='PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #A0C6E5 2px solid; MARGIN-RIGHT: 0px'font style='FONT-SIZE:11px;FONT-FAMILY:tahoma,sans-serif'hr color=#A0C6E5 size=1 From: iBurhan Khalid lt;[EMAIL PROTECTED]gt;/ibrTo: iPhilippe Reynolds lt;[EMAIL PROTECTED]gt;/ibrCC: iphp-general@lists.php.net/ibrSubject: iRe: [PHP] Socket functions/ibrDate: iTue, 30 Aug 2005 09:49:22 +0300/ibrgt;Philippe Reynolds wrote:brgt;gt;Greetings,brgt;gt;brgt;gt;When I do an ifconfig in unix, I see the the IP address for the my brgt;gt;ethernet. It follows something called inet.brgt;gt;brgt;gt;Would anyone know who to manipulate the socket functions to be able brgt;gt;to extract the inet IP address fromt the eth0 section??brgt;brgt;lt;?phpbrgt;brgt; exec('ifconfig eth0 | grep inet',$output);brgt;preg_match(quot;|[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}|quot;,$output[0],$matches);brgt; echo $matches[0];brgt;brgt;?gt;br/font/BLOCKQUOTE -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] ZCE Reccommendations
I'm taking my ZCE exam soon and would like general advice on what to study up on. I've been using php since 97 so I'm pretty confident with day-today stuff, but I'm pretty new to OOP and and looking for any study pointers I can get. Remember that the ZCE still uses PHP 4. Classes and objects changed between versions 4 and 5. If you've done some development in 5 and gotten used to it, study carefully the differences between the two. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] time and timestamp
Jay Blanchard wrote: [snip] Now I am not worried about the time but I would like to know how to (i) sort the returned rows in order (latest first) add ORDER BY `yourdatefield` DESC to your SQL (ii) be able to extract the individual parts of the date and display them in UK format Have no idea what is 'UK format'. But you can use the DATE_FORMAT MySQL function to do the same DATE_FORMAT(`yourdatefield`, '%m.%d.%Y') as `date_formatted` [...] Also, http://php.net/date -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Browsing Into Levels
They are called breadcrumbs: http://www.google.com/search?q=php+breadcrumbs Jordan On Aug 30, 2005, at 4:57 AM, areguera wrote: Hi, I been wondering the best way to make the level browsing, I mean, those links up in page which tell you the position you are, and make you able to return sections back, keeping some kind of logic of where you are. I been used the url vars to do this but I arrive some point where there are coincidences and it loose sense, it jumps to other section, where indeed have to, but not where it logically should. any suggestions? thank :) -- 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] apache 1.3.33 + PHP chunked Transfer-Encoding forbidden error
Здравствуйте, php-general. Hi all. I have some problem with my Apache server. When some user try open php script using mobile fone some chat program I get this errors on my log file: [Mon Aug 29 18:37:39 2005] [error] [client 127.0.0.1] chunked Transfer-Encoding forbidden: /chat/index.php [Mon Aug 29 18:40:46 2005] [error] [client 127.0.0.1] chunked Transfer-Encoding forbidden: /chat/index.php [Mon Aug 29 19:04:55 2005] [error] [client 127.0.0.1] chunked Transfer-Encoding forbidden: /chat/index.php [Mon Aug 29 19:16:01 2005] [error] [client 127.0.0.1] chunked Transfer-Encoding forbidden: /chat/index.php [Mon Aug 29 21:08:17 2005] [error] [client 127.0.0.1] chunked Transfer-Encoding forbidden: /chat/index.php [Mon Aug 29 21:18:56 2005] [error] [client 127.0.0.1] chunked Transfer-Encoding forbidden: /chat/index.php How i can solve this problem? -- С уважением, Root mailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] security while building online store
Hi, I was checking on several php/mysql based on line store, free and commercial, but didn't find any that fits the best for us. Looks like, it would be the best to develop one. To make a online store that works fine - it shouldn't be such a big problem. To make a SECURE ad SAFE online store - that's the tough one form me. Before I even start building the store, can somebody point usual traps and problems, and security problems that usually happen, some advices, any advices? Thanks for any help! -afan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] User redirection, passing HTTP AUTH credentials
Dan Trainor wrote: Hello once more, all - I was wondering if it's at all possible to redirect a user to a remote site, while passing HTTP AUTH credentials somehow. I've been tinkering around with making a secure login gateway, and the first server that they log in to would negotiate the login sequence, but the system would have to preserve HTTP USER and HTTP PASSWD to be passed to the remote site, as to be backwards compatible with existing HTTP AUTH-based systems. I'd rather not use http://user:[EMAIL PROTECTED], however. There's got to be a different way. I understand that the user's browser is the actual element in which the username and password are stored for HTTP auth. Is there a way to inject or update this information without any interaction from the visitor him/herself? Thanks again! -dant A few weeks ago, I was asked the same question, due to new M$ security feature: http://support.microsoft.com/kb/834489 The authenticated site is third party and cannot change their login process or type, so that's why HTTP authentication cannot be turned into something else. The idea is that someone can make user:[EMAIL PROTECTED] look like this: [EMAIL PROTECTED] which would make poor unsuspecting people think they were going to microsoft.com. The real problem is described here: http://www.microsoft.com/technet/security/bulletin/MS04-004.mspx and http://support.microsoft.com/?id=833786 If you hover your mouse over the link before this security update was applied, you should only see www.microsoft.com, not the entire link url because of the %01 character. So, obviously, the whole thing has to be disabled! Okay, so then I looked into an AJAX-type thing, wondering if the browser would cache authentication if I passed it in a Javascript call. I gave it a shot, but kept getting script syntax errors. Apparently the same security update that disabled authentication in the url disabled it in the XMLHTTP open method: http://www.codingforums.com/archive/index.php/t-45348.html The workarounds MS described in 834489 (two of which are tell them to enter the user name and password and don't do it at all. shoot me.) are all MS specific, and it'd be nice to find a method that would work on all (most) browsers. This is where I ended my research, but hopefully it will keep some other poor soul from having to wade through the MS knowledge base battling vague references to vulnerabilites and security holes. Good luck, and please let me know what your solution is. kgt -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: upload file - clients path to file?
Angelo Zanetti Z Logic www.zlogic.co.za [c] +27 72 441 3355 [t] +27 21 469 1052 Jasper Bryant-Greene wrote: [EMAIL PROTECTED] wrote: Well basically i need it for an add products page and if the users doesnt fill in all the fields correctly I display some error message as well as populate the textfields and dropdown lists with the values they previously entered, so if they entered/selected the file I want to display it again so they don't have to upload the file again. I know that I could do it without the user knowing (backed) but then they might think they have to select the file again because the upload field will be blank. Please don't top-post. You can *NEVER* set an initial value for a file upload field. This would be a HUGE security risk. Imagine (on a Linux system): input type=file name=myfile value=/etc/passwd You need to alter your design so that this is unnecessary, for example as suggested by someone else -- don't display the upload box and display a message saying it is already uploaded, maybe with a link to re-upload. YEAh thanks I thought it wasn't possible, I'll look at different options in terms of design and user interaction. thanks guys! ciao -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] SPL Countable count() not being called
I have not been able to get count() to be called when I pass my Countable class to the count function. I am using PHP 5.1 Release Candidate 1. I am not sure if it is a bug, so I am posting here to see if anyone can help. -- class Collection implements Countable { public function count() { return 200; } } $c = new Collection(); echo(count($c)); This code prints 1 out with no errors, when it should print out 200. Any ideas? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] SPL Countable count() not being called
[snip] class Collection implements Countable { public function count() { return 200; } } $c = new Collection(); echo(count($c)); [/snip] Shouldn't this be echo Collection-count($c); or something like that? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] SPL Countable count() not being called
Justin Francis wrote: I have not been able to get count() to be called when I pass my Countable class to the count function. I am using PHP 5.1 Release Candidate 1. I am not sure if it is a bug, so I am posting here to see if anyone can help. -- class Collection implements Countable { public function count() { return 200; } } $c = new Collection(); echo(count($c)); This code prints 1 out with no errors, when it should print out 200. Should it not be $c-count() ? -Stut -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] SPL Countable count() not being called
Stut wrote: Justin Francis wrote: I have not been able to get count() to be called when I pass my Countable class to the count function. I am using PHP 5.1 Release Candidate 1. I am not sure if it is a bug, so I am posting here to see if anyone can help. -- class Collection implements Countable { public function count() { return 200; } } $c = new Collection(); echo(count($c)); This code prints 1 out with no errors, when it should print out 200. Should it not be $c-count() ? -Stut No. By implementing the Countable interface, and implementing the count() method, the global count($c) function is supposed to call $c-count(). This is so the object can be treated like a countable array in the same manner. - Justin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Browsing Into Levels
Good answer, I think thats what they were looking for but just in case: Most of the breadcrumb classes out there (at least the ones that showed up in an initial google search) use either the existing directory/file structure or a hard-coded array of your site structure to create the breadcrumbs. What about on non-structured sites like Wikis? For example, on DokuWiki, it keeps track of your last 4-5 clicks in a breadcrumb trail on the top of the page. Amazon.com http://Amazon.com's recently viewed pages is another good example (though probably patented ;)) What are these kind of breadcrumbs called and which classes would you recommend using to implement them? Thx, - Greg On 8/30/05, Jordan Miller [EMAIL PROTECTED] wrote: They are called breadcrumbs: http://www.google.com/search?q=php+breadcrumbs Jordan On Aug 30, 2005, at 4:57 AM, areguera wrote: Hi, I been wondering the best way to make the level browsing, I mean, those links up in page which tell you the position you are, and make you able to return sections back, keeping some kind of logic of where you are. I been used the url vars to do this but I arrive some point where there are coincidences and it loose sense, it jumps to other section, where indeed have to, but not where it logically should. any suggestions? thank :) -- 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] SPL Countable count() not being called
Justin Francis wrote: Stut wrote: Should it not be $c-count() ? -Stut No. By implementing the Countable interface, and implementing the count() method, the global count($c) function is supposed to call $c-count(). This is so the object can be treated like a countable array in the same manner. Aha, gotcha. Thanks. -Stut -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] SPL Countable count() not being called
[snip] No. By implementing the Countable interface, and implementing the count() method, the global count($c) function is supposed to call $c-count(). This is so the object can be treated like a countable array in the same manner. [/snip] I was asleep earlierif $c is not an array 1 will be returned. $c is one number (200), not an array. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Bug??
for($i=1;$i13;$i++) { echo $i . :: ; echo date('F', mktime(0, 0, 0, $i)) . :: ; echo mktime(0, 0, 0, $i) . \n; } 1 :: January :: 1107061200 2 :: March :: 1109739600 3 :: March :: 1112158800 4 :: April :: 1114833600 5 :: May :: 1117425600 6 :: June :: 1120104000 7 :: July :: 1122696000 8 :: August :: 1125374400 9 :: September :: 1128052800 10 :: October :: 1130644800 11 :: November :: 1133326800 12 :: December :: 1135918800 ** Note March where February should be :). I've been able to duplicate this on a few different versions and systems: PHP Version 5.0.5-dev System FreeBSD gfx 4.4-RELEASE FreeBSD 4.4-RELEASE #0: Wed Aug i386 PHP Version = 4.3.5 System = SunOS tkdev 5.8 Generic_108528-17 sun4u PHP Version = 4.3.3 System = Linux home 2.4.22-37mdk #1 Wed Aug 11 21:52:56 MDT 2004 i686 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: [SPAM] - RE: [PHP] SPL Countable count() not being called - Bayesian Filter detected spam
Jay Blanchard wrote: [snip] No. By implementing the Countable interface, and implementing the count() method, the global count($c) function is supposed to call $c-count(). This is so the object can be treated like a countable array in the same manner. [/snip] I was asleep earlierif $c is not an array 1 will be returned. $c is one number (200), not an array. This would be true if the class does not implement the Countable interface. It does, however, and so 1 should not be returned, but instead, whatever number is returned from the count() method of the Collection class. See the SPL documentation at www.php.net/spl for more on how this is supposed to work. - Justin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Browsing Into Levels
you may not need anything fancy like a class for regular breadcrumbs or these BreadcrumbsExtreme™ that you describe. i usually do simple breadcrumbs with a simple function. for the extreme version, just store an array of recently viewed pages in a session variable, and parse this array when displaying each page. Jordan On Aug 30, 2005, at 11:01 AM, Greg Schnippel wrote: Good answer, I think thats what they were looking for but just in case: Most of the breadcrumb classes out there (at least the ones that showed up in an initial google search) use either the existing directory/file structure or a hard-coded array of your site structure to create the breadcrumbs. What about on non-structured sites like Wikis? For example, on DokuWiki, it keeps track of your last 4-5 clicks in a breadcrumb trail on the top of the page. Amazon.com http://Amazon.com's recently viewed pages is another good example (though probably patented ;)) What are these kind of breadcrumbs called and which classes would you recommend using to implement them? Thx, - Greg On 8/30/05, Jordan Miller [EMAIL PROTECTED] wrote: They are called breadcrumbs: http://www.google.com/search?q=php+breadcrumbs Jordan On Aug 30, 2005, at 4:57 AM, areguera wrote: Hi, I been wondering the best way to make the level browsing, I mean, those links up in page which tell you the position you are, and make you able to return sections back, keeping some kind of logic of where you are. I been used the url vars to do this but I arrive some point where there are coincidences and it loose sense, it jumps to other section, where indeed have to, but not where it logically should. any suggestions? thank :) -- 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] Bug??
for($i=1;$i13;$i++) { echo $i . :: ; echo date('F', mktime(0, 0, 0, $i)) . :: ; echo mktime(0, 0, 0, $i) . \n; } 1 :: January :: 1107061200 2 :: March :: 1109739600 3 :: March :: 1112158800 Today is the 30th (in some parts of the world, anyway). mktime fills in the current time is no argument is provided. So for Feb, the equivalent is mktime(0, 0, 0, 2, 30, 2005, true); And the 30th day of Feb, 2005 is March 2nd. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: [SPAM] - RE: [PHP] SPL Countable count() not being called - Bayesian Filter detected spam
Justin Francis wrote: Jay Blanchard wrote: [snip] No. By implementing the Countable interface, and implementing the count() method, the global count($c) function is supposed to call $c-count(). This is so the object can be treated like a countable array in the same manner. [/snip] I was asleep earlierif $c is not an array 1 will be returned. $c is one number (200), not an array. This would be true if the class does not implement the Countable interface. It does, however, and so 1 should not be returned, but instead, whatever number is returned from the count() method of the Collection class. See the SPL documentation at www.php.net/spl for more on how this is supposed to work. - Justin SPL is still teething apparently. The docs don't always match the current functionality, and, I imagine, it can change from build to build. I've recently had some bumpy rides trying to get Recursive Iterators working the way I want. I agree that it should work as you expect it to, and, in my opinion, it's a bug. My opinion doesn't count for too much, but there it is. Chris --Thinking about implementing the Countable interface now -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] OS X compile problem with GD
I've suddenly developed a peculiar compile problem in PHP5. I'm trying to build PHP 5.0.4, 5.0.5RC1, 5.0.5RC2 or 5.1RC1, and they have started giving me an odd problem with GD: gcc -I/Users/marcus/src/php-5.0.4/ext/gd/libgd -DHAVE_LIBPNG - DHAVE_LIBJPEG -DHAVE_LIBFREETYPE -Iext/gd/ -I/Users/marcus/src/ php-5.0.4/ext/gd/ -DPHP_ATOM_INC -I/Users/marcus/src/php-5.0.4/ include -I/Users/marcus/src/php-5.0.4/main -I/Users/marcus/src/ php-5.0.4 -I/usr/include/libxml2 -I/sw/include -I/sw/lib/freetype219/ include -I/sw/lib/freetype219/include/freetype2 -I/Users/marcus/src/ php-5.0.4/ext/mbstring/oniguruma -I/Users/marcus/src/php-5.0.4/ext/ mbstring/libmbfl -I/Users/marcus/src/php-5.0.4/ext/mbstring/libmbfl/ mbfl -I/usr/local/mysql/include -I/sw/include/libxml2 -I/Users/marcus/ src/php-5.0.4/TSRM -I/Users/marcus/src/php-5.0.4/Zend -I/sw/include - no-cpp-precomp -DBIND_8_COMPAT=1 -DEAPI -O3 -mcpu=G4 -mtune=G4 -I/sw/ include -c /Users/marcus/src/php-5.0.4/ext/gd/gd.c -o ext/gd/gd.o echo ext/gd/gd.lo /Users/marcus/src/php-5.0.4/ext/gd/gd.c: In function 'zm_info_gd': /Users/marcus/src/php-5.0.4/ext/gd/gd.c:504: error: 'FREETYPE_MAJOR' undeclared (first use in this function) /Users/marcus/src/php-5.0.4/ext/gd/gd.c:504: error: (Each undeclared identifier is reported only once /Users/marcus/src/php-5.0.4/ext/gd/gd.c:504: error: for each function it appears in.) /Users/marcus/src/php-5.0.4/ext/gd/gd.c:504: error: 'FREETYPE_MINOR' undeclared (first use in this function) /Users/marcus/src/php-5.0.4/ext/gd/gd.c: In function 'php_imagechar': /Users/marcus/src/php-5.0.4/ext/gd/gd.c:2810: warning: pointer targets in passing argument 1 of 'strlen' differ in signedness /Users/marcus/src/php-5.0.4/ext/gd/gd.c: In function 'php_imagettftext_common': /Users/marcus/src/php-5.0.4/ext/gd/gd.c:3189: warning: pointer targets in passing argument 4 of 'gdImageStringFTEx' differ in signedness /Users/marcus/src/php-5.0.4/ext/gd/gd.c:3189: warning: pointer targets in passing argument 9 of 'gdImageStringFTEx' differ in signedness /Users/marcus/src/php-5.0.4/ext/gd/gd.c:3195: warning: pointer targets in passing argument 4 of 'gdImageStringFT' differ in signedness /Users/marcus/src/php-5.0.4/ext/gd/gd.c:3195: warning: pointer targets in passing argument 9 of 'gdImageStringFT' differ in signedness make: *** [ext/gd/gd.lo] Error 1 I tried switching from the bundled GD to a version compiled from fink, but it made no difference. My current configure is: './configure' \ '--with-layout=Darwin' \ '--bindir=/usr/bin' \ '--disable-ipv6' \ '--enable-bcmath' \ '--enable-calendar' \ '--enable-dba' \ '--enable-exif' \ '--enable-ftp' \ '--enable-gd-imgstrttf' \ '--enable-gd-native-ttf' \ '--enable-mbregex' \ '--enable-mbstring' \ '--enable-mcal' \ '--enable-pcntl' \ '--enable-shmop' \ '--enable-soap' \ '--enable-sockets' \ '--enable-sysvsem' \ '--enable-sysvshm' \ '--enable-track-vars' \ '--enable-wddx' \ '--sysconfdir=/etc' \ '--with-apxs2filter=/sw/sbin/apxs' \ '--with-bz2' \ '--with-config-file-path=/etc' \ '--with-config-file-scan-dir=/etc/php.d' \ '--with-curl' \ '--with-db4=/sw' \ '--with-dom=/sw' \ '--with-freetype-dir=/sw/lib/freetype219' \ '--with-gd=/sw' \ '--with-gdbm=/sw' \ '--with-iconv=/sw' \ '--with-imap-ssl=/sw' \ '--with-jpeg-dir=/sw' \ '--with-png-dir=/sw' \ '--with-ldap' \ '--with-mcrypt=/sw' \ '--with-mhash=/sw' \ '--with-mysql=/usr/local/mysql' \ '--with-mysqli=/usr/local/mysql/bin/mysql_config' \ '--with-openssl' \ '--with-pcre=/sw' \ '--with-pear' \ '--with-png' \ '--with-tidy=/sw' \ '--with-ttf' \ '--with-xml' \ '--with-xmlrpc' \ '--with-xsl' \ '--with-zlib' \ '--without-oci8' you can see that I'm pulling in a fair number of things form fink, but until recently it was all working fine with 5.0.4. There are only two options that affect gd directly: --with-gd and --with-freetype- dir. The configure script doesn't report any problems: ... checking for GD support... yes checking for the location of libjpeg... /sw checking for the location of libpng... /sw checking for the location of libXpm... no checking for FreeType 1.x support... yes checking for FreeType 2... /sw/lib/freetype219 checking for T1lib support... no checking whether to enable truetype string function in GD... yes checking whether to enable JIS-mapped Japanese font support in GD... no checking for fabsf... (cached) yes checking for floorf... (cached) yes checking for jpeg_read_header in -ljpeg... (cached) yes checking for png_write_image in -lpng... (cached) yes If configure fails try --with-xpm-dir=DIR checking for FreeType 1 support... no - FreeType 2.x is to be used instead ... Any idea why this is not working? Marcus -- Marcus Bointon Synchromedia Limited: Putting you in the picture [EMAIL PROTECTED] | http://www.synchromedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Protecing files
On 8/30/05, Thomas [EMAIL PROTECTED] wrote: Hey guys, Thanks for all the answers. I had not considered leaving the xml file outside the webroot (duh!). However, in this case I don't think it would work, as the project is working through a svn structure (and some boxes run Linux, otherwise Win). I thought that the .htaccess would have been the best (apparently not?). Anyway, I will give the filtering out of the .whatever a shot. You can put the rule for filtering out a .whatever into a .htaccess file, using the code I gave you above. I discouraged the use of .htaccess because the apache group discourages it for performance reasons. If you enable .htaccess, then apache has to check every subdirectory in your webtree for a .htaccess file, which may be a resource waste. The simplest solution if you can't rely on an outside-webtree system, would be to rename your file.whatever to .htfile.whatever, although it is a bit of a hack, and not portable to other servers. The same can be said however about .htaccess. One thing on that: how about portability? What if I didn't have access to the httpd.conf file of Apache on the live server? How will I enable such rules (without having to bother the server dude, who may or may not like to do that)? From that question, .htaccess files seemm the most portable solution. Thanks again. t -Original Message- From: Rory Browne [mailto:[EMAIL PROTECTED] Sent: 29 August 2005 07:59 PM To: Thomas Cc: php-general@lists.php.net Subject: Re: [PHP] Protecing files Personally I reckon that you should simply place them outside the webroot. If you are either too lazy to do this, or too paranoid for this alone, then you could consider renaming them from filename.xml to .ht_filename.xml. There is a section in most default apache config files to make filenames beginning with .ht to be unaccessable. I would recommend against filtering out .xml files. Whilst they may only be config files at the minute, you may in future wish to serve up xml files. I would instead suggest that you change your naming scheme to have config files ending in .conf, .config, .settings, or .set or something else non-standard, and fileter out that. A file doesn't have to be called something.xml to contain xml. If for example you want to filter out pages ending in .conf, then you could do something like this(assuming my understanding of apache regex is correct - big assumption but I'm sure someone will enlighten us if it's incorrect): Files ~ .conf$ Order allow,deny Deny from all /Files You could also shove that into a .htaccess file, but apache docs recommend against it(or rather they recommend against the enabling of .htaccess. On 8/29/05, Thomas [EMAIL PROTECTED] wrote: Hi there, How can I protect all files with extension .xml from being accessed by the outside? For Apache can one use .htaccess (if yes, how?), is there a generic way of keeping stalkers from viewing your config files? Thomas SPIRAL EYE STUDIOS P.O. Box 37907, Faerie Glen, 0043 Tel: +27 12 362 3486 Fax: +27 12 362 3493 Mobile: +27 82 442 9228 Email: [EMAIL PROTECTED] Web: http://www.spiraleye.co.za www.spiraleye.co.za -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Protecing files
Thomas wrote: Hi there, How can I protect all files with extension .xml from being accessed by the outside? For Apache can one use .htaccess (if yes, how?), is there a generic way of keeping stalkers from viewing your config files? Thomas SPIRAL EYE STUDIOS P.O. Box 37907, Faerie Glen, 0043 Tel: +27 12 362 3486 Fax: +27 12 362 3493 Mobile: +27 82 442 9228 Email: [EMAIL PROTECTED] Web: http://www.spiraleye.co.za www.spiraleye.co.za What are you using the xml files for? There may be good solutions, depending on the use. Do they need to render directly or can you use a php wrapper and encode the xml stuff within it? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] User redirection, passing HTTP AUTH credentials
Kristen G. Thorson wrote: Dan Trainor wrote: Hello once more, all - I was wondering if it's at all possible to redirect a user to a remote site, while passing HTTP AUTH credentials somehow. I've been tinkering around with making a secure login gateway, and the first server that they log in to would negotiate the login sequence, but the system would have to preserve HTTP USER and HTTP PASSWD to be passed to the remote site, as to be backwards compatible with existing HTTP AUTH-based systems. I'd rather not use http://user:[EMAIL PROTECTED], however. There's got to be a different way. I understand that the user's browser is the actual element in which the username and password are stored for HTTP auth. Is there a way to inject or update this information without any interaction from the visitor him/herself? Thanks again! -dant A few weeks ago, I was asked the same question, due to new M$ security feature: http://support.microsoft.com/kb/834489 The authenticated site is third party and cannot change their login process or type, so that's why HTTP authentication cannot be turned into something else. The idea is that someone can make user:[EMAIL PROTECTED] look like this: [EMAIL PROTECTED] which would make poor unsuspecting people think they were going to microsoft.com. The real problem is described here: http://www.microsoft.com/technet/security/bulletin/MS04-004.mspx and http://support.microsoft.com/?id=833786 If you hover your mouse over the link before this security update was applied, you should only see www.microsoft.com, not the entire link url because of the %01 character. So, obviously, the whole thing has to be disabled! Okay, so then I looked into an AJAX-type thing, wondering if the browser would cache authentication if I passed it in a Javascript call. I gave it a shot, but kept getting script syntax errors. Apparently the same security update that disabled authentication in the url disabled it in the XMLHTTP open method: http://www.codingforums.com/archive/index.php/t-45348.html The workarounds MS described in 834489 (two of which are tell them to enter the user name and password and don't do it at all. shoot me.) are all MS specific, and it'd be nice to find a method that would work on all (most) browsers. This is where I ended my research, but hopefully it will keep some other poor soul from having to wade through the MS knowledge base battling vague references to vulnerabilites and security holes. Good luck, and please let me know what your solution is. kgt Kristen - That's some very interesting research that you did there. I, too, tried to look into a JavaScript solution and found the same problems. I'm going to keep farting around with it here, and I'll let you know. I don't expect to find something new, but rather, just make the whole process that much less of a pain in the ass, of typing in a new username and password. Thanks -dant -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] ZCE Reccommendations
Scott Noyes wrote: I'm taking my ZCE exam soon and would like general advice on what to study up on. I've been using php since 97 so I'm pretty confident with day-today stuff, but I'm pretty new to OOP and and looking for any study pointers I can get. Remember that the ZCE still uses PHP 4. Classes and objects changed between versions 4 and 5. If you've done some development in 5 and gotten used to it, study carefully the differences between the two. Good point. I switched over to php 5 about 6 months ago, so I guess I'll freshen up on php 4. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Help in upgrade
Hi, I am trying to upgrade my server to apache 2 from apache 1, but i am running into a problem in apache 1, i had the following line: AddType application/x-httpd-php .php ..php3 ..phtml.htm .html now if there is a certain directory where i specify to turn the engine off: Directory "/home/httpd/test"php_flag engine on/Directory it would still server the regular .htm pages fine. Unfortuanetly, it seems in apache 2, it does not allow this. if i try to server a page from a directory where i have turned the engine off, it prompts the my browser to download the ..htm file now. i can't remove .htm and .html from my AddType because I have .html files that have php code unfortuanetly. has anyone found a way around this? thanks No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.344 / Virus Database: 267.10.17/85 - Release Date: 8/30/2005 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[suspicious - maybe spam] [PHP] [suspicious - maybe spam] PHP/MySQL/XmlHTTPRequest
Where do I go learn about XmlHTTPRequest? I've done googles and all I've found was stuff about toolkits no tutorials or documents telling how to use it. --Death Gauge How do you gauge your death?! _ Express yourself instantly with MSN Messenger! Download today - it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: [suspicious - maybe spam] PHP/MySQL/XmlHTTPRequest
Hello, on 08/30/2005 04:51 PM Death Gauge said the following: Where do I go learn about XmlHTTPRequest? I've done googles and all I've found was stuff about toolkits no tutorials or documents telling how to use it. Here you may find at least 3 solutions to take advantage of XMLHttpRequest AJAX technology from PHP: http://www.phpclasses.org/najax http://www.phpclasses.org/pajax http://www.phpclasses.org/httprequest -- Regards, Manuel Lemos PHP Classes - Free ready to use OOP components written in PHP http://www.phpclasses.org/ PHP Reviews - Reviews of PHP books and other products http://www.phpclasses.org/reviews/ Metastorage - Data object relational mapping layer generator http://www.meta-language.net/metastorage.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: [suspicious - maybe spam] [PHP] [suspicious - maybe spam] PHP/MySQL/XmlHTTPRequest
Death Gauge wrote: Where do I go learn about XmlHTTPRequest? I've done googles and all I've found was stuff about toolkits no tutorials or documents telling how to use it. How about the top three results on Google? http://www.google.com/search?q=XMLHTTPRequest -- Jasper Bryant-Greene Freelance web developer http://jasper.bryant-greene.name/ If you find my advice useful, please consider donating to a poor student! You can choose whatever amount you think my advice was worth to you. http://tinyurl.com/7oa5s -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] ZCE Reccommendations
hitek wrote: I'm taking my ZCE exam soon and would like general advice on what to study up on. This is a good resource: http://zend.com/store/education/certification/zend-php-certification-objectives.php You picked a good month to take the exam, since it's $125 this month (normally $200). Chris -- Chris Shiflett Brain Bulb, The PHP Consultancy http://brainbulb.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Setup tips for oracle 9i development
hi, I'd like to start developing php applications that will access oracle 9i databases. I am trying to setup a development enviroment using Linux so I was wondering what should I download/install from oracle's web site in order to compile php with 9i support. I am assuming that there is some sort of devel package only with the libraries and headers... The database is already running (under Windows). regards, mena
RE: [PHP] Setup tips for oracle 9i development
[snip] hi, I'd like to start developing php applications that will access oracle 9i databases. I am trying to setup a development enviroment using Linux so I was wondering what should I download/install from oracle's web site in order to compile php with 9i support. I am assuming that there is some sort of devel package only with the libraries and headers... The database is already running (under Windows). [/snip] Have you read the fine manual at http://www.php.net/oracle ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] security while building online store
Hi, most probably, things like XSS (Cross-Site-Scripting) and SQL-Injections might lead to a successfull hacking-attempt. If you try to write your own online store, make sure that you do NOT use register_globals! Try to google for XSS and SQL-Injections, there might be plenty of information on the web. Good night-wishes from Germany Christian Hi, I was checking on several php/mysql based on line store, free and commercial, but didn't find any that fits the best for us. Looks like, it would be the best to develop one. To make a online store that works fine - it shouldn't be such a big problem. To make a SECURE ad SAFE online store - that's the tough one form me. Before I even start building the store, can somebody point usual traps and problems, and security problems that usually happen, some advices, any advices? Thanks for any help! -afan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Browsing Into Levels
Thanks for the replay. They are called breadcrumbs: http://www.google.com/search?q=php+breadcrumbs I didn't know the key :) (breadcrumbs), so it is now a very good help to me. use either the existing directory/file structure or a hard-coded array of your site structure to create the breadcrumbs. feel these are great solutions, specially hard-coded array, it would make me able to take full control of level browsing even though when sections are reused(I guess). ex. home Departments Articles home Categories Articles home Users Subscriptions Articles Here 'Articles' would be an action that can be reused to show articles from different patterns and levels, so with the hard-coded array I would do this, but now I must see how to call the show_location() function(where I implement the logic) and with what arguments, from the Articles' Action and how make it decide that is one section and no other(keeping the track) in some dynamic way. Hope don't fall into redundant jumping again. What do you think?... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Setup tips for oracle 9i development
Jay Blanchard wrote: [snip] hi, I'd like to start developing php applications that will access oracle 9i databases. I am trying to setup a development enviroment using Linux so I was wondering what should I download/install from oracle's web site in order to compile php with 9i support. I am assuming that there is some sort of devel package only with the libraries and headers... The database is already running (under Windows). [/snip] Have you read the fine manual at http://www.php.net/oracle ? Except one should use http://www.php.net/oci8 ext/oracle is sort of bitrotten :) Edin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Setup tips for oracle 9i development
robert mena wrote: hi, I'd like to start developing php applications that will access oracle 9i databases. I am trying to setup a development enviroment using Linux so I was wondering what should I download/install from oracle's web site in order to compile php with 9i support. I am assuming that there is some sort of devel package only with the libraries and headers... The database is already running (under Windows). regards, mena You will need to download and install Oracle Instant Client which is free. How to setup PHP to use it, you can read at http://www.php.net/oci8 Edin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[suspicious - maybe spam] [PHP] [suspicious - maybe spam] RE: [PHP] Re: [suspicious - maybe spam] PHP/MySQL/XmlHTTPRequest
Ok how do I get rid of the annoying [suspicious - maybe spam] crap that appears when I post? --Death Gauge How do you gauge your death?! Original Message Follows From: Manuel Lemos [EMAIL PROTECTED] To: Death Gauge [EMAIL PROTECTED] CC: php-general@lists.php.net Subject: [PHP] Re: [suspicious - maybe spam] PHP/MySQL/XmlHTTPRequest Date: Tue, 30 Aug 2005 17:11:47 -0300 Hello, on 08/30/2005 04:51 PM Death Gauge said the following: Where do I go learn about XmlHTTPRequest? I've done googles and all I've found was stuff about toolkits no tutorials or documents telling how to use it. Here you may find at least 3 solutions to take advantage of XMLHttpRequest AJAX technology from PHP: http://www.phpclasses.org/najax http://www.phpclasses.org/pajax http://www.phpclasses.org/httprequest -- Regards, Manuel Lemos PHP Classes - Free ready to use OOP components written in PHP http://www.phpclasses.org/ PHP Reviews - Reviews of PHP books and other products http://www.phpclasses.org/reviews/ Metastorage - Data object relational mapping layer generator http://www.meta-language.net/metastorage.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php _ Dont just search. Find. Check out the new MSN Search! http://search.msn.click-url.com/go/onm00200636ave/direct/01/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] htpasswd-style password generation w/PHP
Hello, all - I've been trying to figure out a reliable way of creating user:pass combinations to be used from within an Apache-based .htpasswd file. From what I understand, PHP's crypt() function is almost identical to the Linux system crypt() function, which 'htpasswd' uses. However, when using PHP's crypt(), my result string is much longer than the one that can be found in your ordinary .htpasswd file generated by 'htpasswd'. However, thi smight be what I'm looking for, since 'htpasswd' is know to use two different types of password encryption: (from htpasswd's manpage) htpasswd encrypts passwords using either a version of MD5 modified for Apache, or the system’s crypt() routine. Files managed by htpasswd may contain both types of passwords; some user records may have MD5-encrypted passwords while others in the same file may have passwords encrypted with crypt(). Does PHP's crypt() use that modified version of an MD5 routine, and that's what I'm seeing? Basically I'd like to make an application that can modify any .htpasswd file, adding and deleting users, without actually running the 'htpasswd' utility. Thanks! -dant -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] IMAP socket?
Hi there, Is there any way to get the file descriptor of an IMAP stream opened with imap_open? Patrick -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] IMAP socket?
Patrick Barnes wrote: Is there any way to get the file descriptor of an IMAP stream opened with imap_open? No. You'd have to manually connect to the IMAP server with socket functions or whatever. One way to look at it is that imap_* functions are a higher level of abstraction than raw file descriptors and sockets, so providing the file descriptor would break that abstraction. -- Jasper Bryant-Greene Freelance web developer http://jasper.bryant-greene.name/ If you find my advice useful, please consider donating to a poor student! You can choose whatever amount you think my advice was worth to you. http://tinyurl.com/7oa5s -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: [suspicious - maybe spam] [PHP] [suspicious - maybe spam] RE: [PHP] Re: [suspicious - maybe spam] PHP/MySQL/XmlHTTPRequest
Death Gauge wrote: Ok how do I get rid of the annoying [suspicious - maybe spam] crap that appears when I post? This won't help with that, but please stop top-posting. Your ISP is probably adding it because it thinks you're message is spam. It might be something to do with your signature, maybe the word gauge... Talk to your ISP. Jasper -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] displaying certain number of character
$words= If length is given and is negative, then that many characters will be omitted from the end of string (after the start position has been calculated when a start is negative). If start denotes a position beyond this truncation, an empty string will be returned. ; echo substr($words, 0, 50); ? I have been using this but how can I make sure I do not split a word in half? - Finishing on a space would probably do it. R. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] displaying certain number of character
$words= If length is given and is negative, then that many characters will be omitted from the end of string (after the start position has been calculated when a start is negative). If start denotes a position beyond this truncation, an empty string will be returned. ; echo substr($words, 0, 50); ? I have been using this but how can I make sure I do not split a word in half? - Finishing on a space would probably do it. R. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] displaying certain number of character
$words= If length is given and is negative, then that many characters will be omitted from the end of string (after the start position has been calculated when a start is negative). If start denotes a position beyond this truncation, an empty string will be returned. ; echo substr($words, 0, 50); ? I have been using this but how can I make sure I do not split a word in half? - Finishing on a space would probably do it. You could use wordwrap() to wrap lines at 50 characters and then just take the first line http://us3.php.net/wordwrap -philip -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] (Yet another) I'm blind ... post
In this code, I'm not getting the value of $list passed to the Mailman page. I've checked this umpteen times by now, but fail to see the error. I've beaten myself suitably with a steel ruler -- but it didn't help. Nor does the cold I'm coming down with I suppose. Anyone see the error, and feel like pointing it out to me? Martin S ?php print H2BJoin the lists/b/H2; print FORM Method=POST ACTION='http://www.bollmora.org/mailman/subscribe/' . $lista . 'br'; print Your E-mail address: INPUT type=\Text\ name=\email\ size=\30\ value=\\br; print Your Name (optional): INPUT type=\Text\ name=\fullname\ size=\30\ value=\\brbr; print Lista: select name=\lista\ /; print option value=\tvl_bollmora.org\Tävling/option; print option value=\jpg_bollmora.org\JGP/option; print option value=\styrelse_bollmora.org\Styrelse/option; print /selectbr; print You may enter a privacy password below. This provides only mild security, but shouldbr prevent others from messing with your subscription. bDo not use a valuable password/b as itbr will occasionally be emailed back to you in cleartext.brbr If you choose not to enter a password, one will be automatically generated for you, and it willbr be sent to you once you've confirmed your subscription. You can always request a mail-backbr of your password when you edit your personal options.brbr; print Would you like to receive list mail batched in a daily digest? (You may choose NoMail after you join.)BRbr; print input type=radio name=\digest\ value=\0\ CHECKED No input type=radio name=\digest\ value=\1\ Yesbrbr; print INPUT type=\Submit\ name=\email-button\ value=\Subscribe\; print /FORM; ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php