[PHP] is_prefix() - checking wheather $A is prefix for $B
I want to write a function to check whether string $A is a prefix for string $B or not. I writing this function in order to prevent directory traversal during a download request. (e.g., download.php?file=..\index.php) I want to make sure that the realpath() of the requested file is within the realpath() of the download-directory. Trying to make sure that the the $download_dir is a prefix for $filepath. @see: http://en.wikipedia.org/wiki/Directory_traversal ** *TWO FUNCTIONS:* function is_prefix1($prefix, $str) { return (0 == strncasecmp($prefix, $str, strlen($prefix))); } function is_prefix2($prefix, $str) { return (0 === stripos($str, $prefix)); } *USAGE:* if (is_prefix1('a', 'abcdef')) echo 'prefix1 returned True!', 'br /'; if (is_prefix2('a', 'abcdef')) echo 'prefix2 returned True!', 'br /'; Do these functions do the same job? Which one provides better performance? -behzad
Re: [PHP] is_prefix() - checking wheather $A is prefix for $B
2007. 12. 29, szombat keltezéssel 13.39-kor AmirBehzad Eslami ezt írta: I want to write a function to check whether string $A is a prefix for string $B or not. if (strpos($B, $A) === 0) { echo '$B begins with $A'; } else { echo '$B does not begin with $A'; } greets Zoltán Németh I writing this function in order to prevent directory traversal during a download request. (e.g., download.php?file=..\index.php) I want to make sure that the realpath() of the requested file is within the realpath() of the download-directory. Trying to make sure that the the $download_dir is a prefix for $filepath. @see: http://en.wikipedia.org/wiki/Directory_traversal ** *TWO FUNCTIONS:* function is_prefix1($prefix, $str) { return (0 == strncasecmp($prefix, $str, strlen($prefix))); } function is_prefix2($prefix, $str) { return (0 === stripos($str, $prefix)); } *USAGE:* if (is_prefix1('a', 'abcdef')) echo 'prefix1 returned True!', 'br /'; if (is_prefix2('a', 'abcdef')) echo 'prefix2 returned True!', 'br /'; Do these functions do the same job? Which one provides better performance? -behzad -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] script stoped working over christmas ?
Can anyone see why this has stopped working... latest.php is used with ? include(/home/sever2/public_html/teaup/article/article_summary.php) ? to show the latest news articles. Cheers Chris config.php ?php $max_summary = 6; $max_latest = 7; $summary_template = t_summary.tp; $article_template = t_article.tp; $password = password; ? latest.php ?php require('config.php'); $filename = article_summary.php; #- open article summaries if(file_exists($filename)){ $fh = fopen($filename, r); $old_news = fread($fh, filesize($filename)); fclose($fh); } #- get article $articles = explode(!--ARTICLE--, $old_news); $i=0; foreach ( $articles as $article ){ if(count($articles)$i){ if($max_latest = $i++){ print $article; } } } ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: script stoped working over christmas ? (whoops)
Whoops sorry the include should be include(/home/sever2/public_html/teaup/article/latest.php) Chris In news: [EMAIL PROTECTED] - Joker7 wrote : Can anyone see why this has stopped working... latest.php is used with ? include(/home/sever2/public_html/teaup/article/article_summary.php) ? to show the latest news articles. Cheers Chris config.php ?php $max_summary = 6; $max_latest = 7; $summary_template = t_summary.tp; $article_template = t_article.tp; $password = password; latest.php ?php require('config.php'); $filename = article_summary.php; #- open article summaries if(file_exists($filename)){ $fh = fopen($filename, r); $old_news = fread($fh, filesize($filename)); fclose($fh); } #- get article $articles = explode(!--ARTICLE--, $old_news); $i=0; foreach ( $articles as $article ){ if(count($articles)$i){ if($max_latest = $i++){ print $article; } } } -- Cheap As Chips Broadband http://yeah.kick-butt.co.uk Superb hosting domain name deals http://host.kick-butt.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] is_prefix() - checking wheather $A is prefix for $B
In case you haven't realized it, I have already written two functions to check for a prefix !! The question is: Which function is better? (is_prefix1() or is_prefix2()) On 12/29/07, Zoltán Németh [EMAIL PROTECTED] wrote: 2007. 12. 29, szombat keltezéssel 13.39-kor AmirBehzad Eslami ezt írta: I want to write a function to check whether string $A is a prefix for string $B or not. if (strpos($B, $A) === 0) { echo '$B begins with $A'; } else { echo '$B does not begin with $A'; } greets Zoltán Németh I writing this function in order to prevent directory traversal during a download request. (e.g., download.php?file=..\index.php) I want to make sure that the realpath() of the requested file is within the realpath() of the download-directory. Trying to make sure that the the $download_dir is a prefix for $filepath. @see: http://en.wikipedia.org/wiki/Directory_traversal ** *TWO FUNCTIONS:* function is_prefix1($prefix, $str) { return (0 == strncasecmp($prefix, $str, strlen($prefix))); } function is_prefix2($prefix, $str) { return (0 === stripos($str, $prefix)); } *USAGE:* if (is_prefix1('a', 'abcdef')) echo 'prefix1 returned True!', 'br /'; if (is_prefix2('a', 'abcdef')) echo 'prefix2 returned True!', 'br /'; Do these functions do the same job? Which one provides better performance? -behzad
Re: [PHP] is_prefix() - checking wheather $A is prefix for $B
You should benchmark and tell us - anyway, just looking at the code, I'd say 'is_prefix2()' is faster since there's 1 function call instead of 2 AmirBehzad Eslami wrote: In case you haven't realized it, I have already written two functions to check for a prefix !! The question is: Which function is better? (is_prefix1() or is_prefix2()) On 12/29/07, Zoltán Németh [EMAIL PROTECTED] wrote: 2007. 12. 29, szombat keltezéssel 13.39-kor AmirBehzad Eslami ezt írta: I want to write a function to check whether string $A is a prefix for string $B or not. if (strpos($B, $A) === 0) { echo '$B begins with $A'; } else { echo '$B does not begin with $A'; } greets Zoltán Németh I writing this function in order to prevent directory traversal during a download request. (e.g., download.php?file=..\index.php) I want to make sure that the realpath() of the requested file is within the realpath() of the download-directory. Trying to make sure that the the $download_dir is a prefix for $filepath. @see: http://en.wikipedia.org/wiki/Directory_traversal ** *TWO FUNCTIONS:* function is_prefix1($prefix, $str) { return (0 == strncasecmp($prefix, $str, strlen($prefix))); } function is_prefix2($prefix, $str) { return (0 === stripos($str, $prefix)); } *USAGE:* if (is_prefix1('a', 'abcdef')) echo 'prefix1 returned True!', 'br /'; if (is_prefix2('a', 'abcdef')) echo 'prefix2 returned True!', 'br /'; Do these functions do the same job? Which one provides better performance? -behzad -- Antinori and Partners - http://www.antinoriandpartners.com PHP solutions - in Italy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: [PHP-DEV] Sayonara PHP
Martin Alterisio wrote: Well, it was my intent not to say that in particular because is rather personal. I just wanted to pass on all the things that may be of some use to another developer. Sorry I didn't mean to drag it out of you :) If you must know, there are three reasons why I'm distancing myself from PHP. 1) I'm tired of web development as a whole. Too many clients which do not understand what the web is. Too many opiniologists who should know what the web is but talk about a second web, which is nothing more than the old web with logos on shiny floor. It feels like the bubble all over again (luckily I was too young to be affected when the first happened, now I cannot say I won't be affected). That's fair enough really. I'm still enjoying it, even if I'm not always at the bleeding edge! 2) I started in the business of software development with a dream that I was told afterwards it was childish and immature. Now I've learned enough to know that my dream, being a game developer, it's neither childish nor immature, totally the opposite, it's probably the most serious and important job in the whole software development industry. I wanna give it a try chasing that rainbow. Absolutely. I have a lot of friends in that industry and it's definately a market in which there are lots of opportunities in many different areas of testing etc. It's hard work and from what I hear long hours, but it's certainly rewarding in terms of work enjoyment :) 3) I'm not so sure anymore if PHP is profitable as a language choice for web development. The small and medium projects market is becoming infested with developers who I cannot compete anymore in terms of cost, and software quality is something this market did not yet got a grasp on. Big projects market has scalability requirements that aren't easily met on PHP grounds, and if it does, the cost is code quality or performance, two things that this market doesn't easily overlook. I think it depends on how you use PHP to be honest. If you're playing about on small to medium sized projects for clients PHP is an excellent choice IMO. With the right approach and understanding PHP is also an excellent choice for large scale projects (Facebook anyone??). One of the interesting points you make about code quality I think is true but that's simply because of the low barrier for entry into PHP coding. Lots of people are self taught and their PHP projects are often their first programming projects. Even if they've had a programming background, web projects are often quite different. I know a lot of my code is crap and I'm now working hard to replace the old bits with new designs and approaches and am becoming increasingly happy with the potential for scalability and maintenance etc. so I'm happily sticking with PHP for the time being for most of my projects. Right now, the future of web development is mostly uncertain, too many things are happening too fast. If I had to I would bet on Java for server technology and Flash for client technology. The performance of Java6 have left PHP and the many other scripting languages panting for air way way behind. And its scripting API has engulfed all the good things about scripting languages into its domain. And yet the most important thing about Java is its scalability. Let's be honest, how can anyone expect to beat Sun in its own turf (networking)? Anyway, PHP developers, remember this word: Quercus. Well I think this is true to an extent but there are always going to be several platform technologies out there and I think PHP will continue to be a major player in that area, regardless of the success of JSP/ASP/RoR etc. And the Flash guys pulled a rabbit out of the hat and called it Flash 9. They broke every compatibility known to developers, but finally developing for Flash doesn't suck. And also, they are going with the open-source approach as the Sun guys did (I pity the poor graphic designer, he still has to get a commercial license to author some content for the flash environment). And we have now many tools to apply the AJAX technique and DHTML easily, but I would still beat the crap out of anyone who thinks that building a thick client on HTML DOM and javascript is a good idea. I think this is very true too, but not always. Flash is fine and I think it will play a key part in some applications I will develop in the future but I don't think DHTML+JS will die just yet. It really depends on your application - if you want a funky system for email or another desktop-like app, then Flash is a good choice, if you just want small bits of interactivity in your webpage I really don't have a problem with javascript (especially with the excellent jQuery). Flash has too many drawbacks in terms of accessibility and indexibility for it to be a general replacement for all things client side (not that you were suggesting that). So again, I think there is plenty room for all sorts of things out
Re: [PHP] is_prefix() - checking wheather $A is prefix for $B
2007. 12. 29, szombat keltezéssel 15.36-kor AmirBehzad Eslami ezt írta: In case you haven't realized it, I have already written two functions to check for a prefix !! The question is: Which function is better? (is_prefix1() or is_prefix2()) ehh, sorry I did not read your mail carefully before replying... must be because it's saturday but I have to work ;) your function is_prefix2() is almost the same as what I've written. I think that would be better, but that's just personal taste, actually I don't think there would be significant difference in performance between the two functions. greets Zoltán Németh On 12/29/07, Zoltán Németh [EMAIL PROTECTED] wrote: 2007. 12. 29, szombat keltezéssel 13.39-kor AmirBehzad Eslami ezt írta: I want to write a function to check whether string $A is a prefix for string $B or not. if (strpos($B, $A) === 0) { echo '$B begins with $A'; } else { echo '$B does not begin with $A'; } greets Zoltán Németh I writing this function in order to prevent directory traversal during a download request. (e.g., download.php?file=..\index.php) I want to make sure that the realpath() of the requested file is within the realpath() of the download-directory. Trying to make sure that the the $download_dir is a prefix for $filepath. @see: http://en.wikipedia.org/wiki/Directory_traversal ** *TWO FUNCTIONS:* function is_prefix1($prefix, $str) { return (0 == strncasecmp($prefix, $str, strlen($prefix))); } function is_prefix2($prefix, $str) { return (0 === stripos($str, $prefix)); } *USAGE:* if (is_prefix1('a', 'abcdef')) echo 'prefix1 returned True!', 'br /'; if (is_prefix2('a', 'abcdef')) echo 'prefix2 returned True!', 'br /'; Do these functions do the same job? Which one provides better performance? -behzad -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] script stoped working over christmas ?
2007. 12. 29, szombat keltezéssel 11.23-kor Joker7 ezt írta: Can anyone see why this has stopped working... what does it mean stopped working? what error message do you get? etc etc greets Zoltán Németh latest.php is used with ? include(/home/sever2/public_html/teaup/article/article_summary.php) ? to show the latest news articles. Cheers Chris config.php ?php $max_summary = 6; $max_latest = 7; $summary_template = t_summary.tp; $article_template = t_article.tp; $password = password; ? latest.php ?php require('config.php'); $filename = article_summary.php; #- open article summaries if(file_exists($filename)){ $fh = fopen($filename, r); $old_news = fread($fh, filesize($filename)); fclose($fh); } #- get article $articles = explode(!--ARTICLE--, $old_news); $i=0; foreach ( $articles as $article ){ if(count($articles)$i){ if($max_latest = $i++){ print $article; } } } ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Unix date (even more bazaar)
On Dec 28, 2007 11:06 PM, mano [EMAIL PROTECTED] wrote: N.Manohara Kurup, Thoppil House, Pollethai P.O, Mararikulam, Alappuzha- 688567, Kerala, India. Tel: 0478- 2865432 Mob; 9495211159 E-mail: [EMAIL PROTECTED] Web: http://mano.bizhat.com Sir, I wish to create my website www.manonivas.org so as i f anyone wish to enter in it they should pay a payment to my bank account online. As soon as they transfered money to my account then only they have to login my site and enter the link www.manonivas.org/radial_remedies.htm . Then login session expires after 24 hours and if they wish to reenter they have to pay the same amount. Please send me a script and other designing details to create my website as above described format. Please send the reply to my email ID: [EMAIL PROTECTED] or as a reply for this message. Regards N. Manohara Kurup Yeah, like that's going to happen. -- Daniel P. Brown [Phone Numbers Go Here!] [They're Hidden From View!] If at first you don't succeed, stick to what you know best so that you can make enough money to pay someone else to do it for you. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] when does php stop php executing when user clicks stop
On Dec 28, 2007 8:43 PM, Eric Wood [EMAIL PROTECTED] wrote: Eric Wood wrote: If database operations are underway when a user accesses a web page, then user clicks stop on the browser, does the php stop immediately too? I'd rather the php continue behind the scenes to fullfill all the actions I need it do to whether the user wants to see if happen or not. Overall I wonder how modphp keeps the code executing even if the browser drops the connection via stop. Any insight is greatly appreciated. thanks, -eric wood I pretty much found my answers over at: http://us2.php.net/manual/en/features.connection-handling.php thanks anyway, You may also want to look into ignore_user_abort(), Eric. -- Daniel P. Brown [Phone Numbers Go Here!] [They're Hidden From View!] If at first you don't succeed, stick to what you know best so that you can make enough money to pay someone else to do it for you. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: [PHP-DEV] Sayonara PHP
On Dec 28, 2007 11:17 PM, Martin Alterisio [EMAIL PROTECTED] wrote: 2007/12/26, Colin Guthrie [EMAIL PROTECTED]: 3) I'm not so sure anymore if PHP is profitable as a language choice for web development. The small and medium projects market is becoming infested with developers who I cannot compete anymore in terms of cost, and software quality is something this market did not yet got a grasp on. Big projects market has scalability requirements that aren't easily met on PHP grounds, and if it does, the cost is code quality or performance, two things that this market doesn't easily overlook. try telling that to yahoo, or wikipedia, or facebook.. no, php scales just fine. the problem is most people dont put in the effort learning how to scale with php. and for those people who sacrifice code quality, well thats their own decision and they should be aware of the consequences. if a business owner is too niaeve to know, said business owner should be told by a competent developer or project manager what risks are being taken. i would venture to say java or .net are potentially more costly depending on what your particular technology mix is. really anything that you can sell, built on open source, should inherently be high margin products / services. Right now, the future of web development is mostly uncertain, too many things are happening too fast. If I had to I would bet on Java for server technology and Flash for client technology. The performance of Java6 have left PHP and the many other scripting languages panting for air way way behind. And its scripting API has engulfed all the good things about scripting languages into its domain. And yet the most important thing about Java is its scalability. Let's be honest, how can anyone expect to beat Sun in its own turf (networking)? Anyway, PHP developers, remember this word: Quercus. i know all about quercus. im on the resin interest mailing list as well. to be frank quercus has its own problems. lets face it; java is serious. there are many aspects of java i prefer over php, for example the comparatively clean apis provided in the standard libraries. i dont see java doing so well on the web compared to php though, and i think php is better suited for the web. if you want to compare them overall in terms of what all they can do, eg. daemons, desktop apps, applets and such; well i think its clear java has more and although php does have some ports to the desktop im not one to say whether theyre any good as ive not used them. however i shall not stray from my point which is php is well, and ill say it, *better* suited for the web (server side) than java. it is also highly scalable albiet techniques that arent packaged with the language itself. btw; i liked you comment about coding c like a cowbow to gain any notice from the internals group ;) -nathan
Re: [PHP] Re: Unix date (even more bazaar)
2007. 12. 29, szombat keltezéssel 09.42-kor Daniel Brown ezt írta: On Dec 28, 2007 11:06 PM, mano [EMAIL PROTECTED] wrote: N.Manohara Kurup, Thoppil House, Pollethai P.O, Mararikulam, Alappuzha- 688567, Kerala, India. Tel: 0478- 2865432 Mob; 9495211159 E-mail: [EMAIL PROTECTED] Web: http://mano.bizhat.com Sir, I wish to create my website www.manonivas.org so as i f anyone wish to enter in it they should pay a payment to my bank account online. As soon as they transfered money to my account then only they have to login my site and enter the link www.manonivas.org/radial_remedies.htm . Then login session expires after 24 hours and if they wish to reenter they have to pay the same amount. Please send me a script and other designing details to create my website as above described format. Please send the reply to my email ID: [EMAIL PROTECTED] or as a reply for this message. Regards N. Manohara Kurup Yeah, like that's going to happen. I didn't even receive this one... greets Zoltán Németh -- Daniel P. Brown [Phone Numbers Go Here!] [They're Hidden From View!] If at first you don't succeed, stick to what you know best so that you can make enough money to pay someone else to do it for you. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Unix date (even more bazaar)
Yeah, and to what bazaar are you going, old man? Look, I'm so loopy right now, I'm top-posting. How bizarre /Dan Ohhh, I hate it when that happens -- but, I have had even more embarrassing moments. As to the problem I posted about strings being different, it was a gremlin I found in the string. A hex edit of the file showed that the space between the date and time, which should have been a space (20) was actually a new line (0A) character. Oh well, at least I found it. Thanks all. 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
Re: [PHP] Re: Unix date (even more bazaar)
At 4:58 PM +0100 12/29/07, Zoltán Németh wrote: 2007. 12. 29, szombat keltezéssel 09.42-kor Daniel Brown ezt írta: I wish to create my website www.manonivas.org so as i f anyone wish to enter in it they should pay a payment to my bank account online. As soon as they transfered money to my account then only they have to login my site and enter the link www.manonivas.org/radial_remedies.htm . Then login session expires after 24 hours and if they wish to reenter they have to pay the same amount. Please send me a script and other designing details to create my website as above described format. Please send the reply to my email ID: [EMAIL PROTECTED] or as a reply for this message. Regards N. Manohara Kurup Yeah, like that's going to happen. I didn't even receive this one... That's OK, because I received two of them. Where do people that that come from? 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
Re: [PHP] Re: Unix date (even more bazaar)
On Sat, 2007-12-29 at 11:37 -0500, tedd wrote: At 4:58 PM +0100 12/29/07, Zoltán Németh wrote: 2007. 12. 29, szombat keltezéssel 09.42-kor Daniel Brown ezt írta: I wish to create my website www.manonivas.org so as i f anyone wish to enter in it they should pay a payment to my bank account online. As soon as they transfered money to my account then only they have to login my site and enter the link www.manonivas.org/radial_remedies.htm . Then login session expires after 24 hours and if they wish to reenter they have to pay the same amount. Please send me a script and other designing details to create my website as above described format. Please send the reply to my email ID: [EMAIL PROTECTED] or as a reply for this message. Regards N. Manohara Kurup Yeah, like that's going to happen. I didn't even receive this one... That's OK, because I received two of them. Where do people that that come from? You guys answered this wrong... I have the solution for you, to get it you will need to log into my site and make a large payment. That will get you to the first line of the solution. To see the next line, or after 5 minutes you will need to log in again and make another large payment. This process will continue for a while, specifically until I have all your money or you have all my solution. Cheers, Rob. -- ... SwarmBuy.com - http://www.swarmbuy.com Leveraging the buying power of the masses! ... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: fopen() for http:// sometimes working, sometimes not
Dan [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] You really need to filter your input more, have a list of what is acceptable not what is unacceptable. That being, make it a requirement that the url input has a TDL(.com, .net, .org, etc.) or is a valid IP(ping it), only allow alphanumerics for the name, etc. When you don't validate your site can get hacked, I know it's not really insecure but it's just an example of input you may not expect, if you try to validate http://localhost it goes ahead and validates your server's html. I make sure it starts with http: or https: and change spaces to %20 so it will work. I also check for some possible recursion issues. I think I'm fairly secure just doing that. What could happen security wise? What else do you think I need to do? I don't want to check for a TLD as there are many and I don't think it is necessary... and pinging doesn't seem like a good idea either as some servers probably won't respond to pings. The localhost issue is interesting, but I don't see it as a security issue. I would like to know if there are any serious secirity issues I may be overlooking though. Thanks, Albert -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Unix date (even more bazaar)
On Dec 29, 2007 11:43 AM, Robert Cummings [EMAIL PROTECTED] wrote: On Sat, 2007-12-29 at 11:37 -0500, tedd wrote: At 4:58 PM +0100 12/29/07, Zoltán Németh wrote: 2007. 12. 29, szombat keltezéssel 09.42-kor Daniel Brown ezt írta: I wish to create my website www.manonivas.org so as i f anyone wish to enter in it they should pay a payment to my bank account online. As soon as they transfered money to my account then only they have to login my site and enter the link www.manonivas.org/radial_remedies.htm . Then login session expires after 24 hours and if they wish to reenter they have to pay the same amount. Please send me a script and other designing details to create my website as above described format. Please send the reply to my email ID: [EMAIL PROTECTED] or as a reply for this message. Regards N. Manohara Kurup Yeah, like that's going to happen. I didn't even receive this one... That's OK, because I received two of them. Where do people that that come from? You guys answered this wrong... I have the solution for you, to get it you will need to log into my site and make a large payment. That will get you to the first line of the solution. To see the next line, or after 5 minutes you will need to log in again and make another large payment. This process will continue for a while, specifically until I have all your money or you have all my solution. I've received six exact copies of the same email. Some people are ignorant. And sure, I'm one of them just not this time. And that feels pretty good. ;-P -- Daniel P. Brown [Phone Numbers Go Here!] [They're Hidden From View!] If at first you don't succeed, stick to what you know best so that you can make enough money to pay someone else to do it for you. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php.ini in php5.2.1
On Dec 28, 2007, at 10:40 PM, Jochem Maas wrote: jekillen schreef: Hello; I have not had the necessity to deal with php.ini files for some time. Now, because I switch from Sendmail to Postfix on one system I need to adjust the sendmail path variable. are you sure you need to change it? doesn't postfix come with some kind of compatibility wrapper [script] that takes the place of sendmail itself ... IIRC most MTAs are sendmail compatible in that way. I cannot find a php.ini file in the specified location. That is not a problem because I can use ini_set(). What is puzzling is that my system, I built and installed from source on a number of different systems and seem to remember that the process creates a php.ini file. Maybe I have it wrong but in the past I seem to remember being able to find one to make sure register variables was set to off. (or maybe I ignored it because that is the default now). So, is the fact that this file is missing something I should be concerned about? php uses it's defaults if it can't load an .ini file - the only concern is whether this bothers you. note that you can also set .ini settings via webserver configurations files (e.g. in apache's httpd.conf or .htaccess files) No, it does not bother me accept if I should have had a file created by the install. I can create on with all the values I want to change, right? I have been looking at my copy of the manual. Postfix sendmail path is different than default sendmail path in php (at least on my system) and does not use options to invoke it. This is to send a confirmation message to an address entered into a registration from. Thanks for your reply. Jeff K -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Unix date (even more bazaar)
On Saturday 29 December 2007 17:59:01 Daniel Brown wrote: On Dec 29, 2007 11:43 AM, Robert Cummings [EMAIL PROTECTED] wrote: On Sat, 2007-12-29 at 11:37 -0500, tedd wrote: At 4:58 PM +0100 12/29/07, Zoltán Németh wrote: 2007. 12. 29, szombat keltezéssel 09.42-kor Daniel Brown ezt írta: I wish to create my website www.manonivas.org so as i f anyone wish to enter in it they should pay a payment to my bank account online. As soon as they transfered money to my account then only they have to login my site and enter the link www.manonivas.org/radial_remedies.htm . Then login session expires after 24 hours and if they wish to reenter they have to pay the same amount. Please send me a script and other designing details to create my website as above described format. Please send the reply to my email ID: [EMAIL PROTECTED] or as a reply for this message. Regards N. Manohara Kurup Yeah, like that's going to happen. I didn't even receive this one... That's OK, because I received two of them. Where do people that that come from? You guys answered this wrong... I have the solution for you, to get it you will need to log into my site and make a large payment. That will get you to the first line of the solution. To see the next line, or after 5 minutes you will need to log in again and make another large payment. This process will continue for a while, specifically until I have all your money or you have all my solution. I've received six exact copies of the same email. Some people are ignorant. butbut... I just got this one And sure, I'm one of them just not this time. And that feels pretty good. ;-P -- Daniel P. Brown [Phone Numbers Go Here!] [They're Hidden From View!] If at first you don't succeed, stick to what you know best so that you can make enough money to pay someone else to do it for you. -- --- Børge Holen http://www.arivene.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: [PHP-DEV] Sayonara PHP
At 1:17 AM -0300 12/29/07, Martin Alterisio wrote: That's all. I don't think that rant may be of use to anyone, but at least it felt nice to let go of some steam. Best Regards and Happy New Year, Martin Alterisio Good luck with your gaming programming -- not that I regret my decision, but I often wonder where my gaming would have taken me, if I had stayed with it, after writing gnop gnip (ping pong) in 1971. That's a few years before Pong, which was the same game. But, Pong wasn't invented by me either -- it was developed by Bell Labs (I think, or Westinghouse) back in 1956. Luck, talent, and opportunity -- if you happen to be on the cusp of all three, the world can change in a heartbeat. 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
Re: [PHP] script stoped working over christmas ?
In news: [EMAIL PROTECTED] - Zoltán Németh wrote : 2007. 12. 29, szombat keltezéssel 11.23-kor Joker7 ezt írta: Can anyone see why this has stopped working... what does it mean stopped working? what error message do you get? etc etc greets Zoltán Németh latest.php is used with ? include(/home/sever2/public_html/teaup/article/article_summary.php) ? to show the latest news articles. Cheers Chris config.php ?php $max_summary = 6; $max_latest = 7; $summary_template = t_summary.tp; $article_template = t_article.tp; $password = password; latest.php ?php require('config.php'); $filename = article_summary.php; #- open article summaries if(file_exists($filename)){ $fh = fopen($filename, r); $old_news = fread($fh, filesize($filename)); fclose($fh); } #- get article $articles = explode(!--ARTICLE--, $old_news); $i=0; foreach ( $articles as $article ){ if(count($articles)$i){ if($max_latest = $i++){ print $article; } } } No error message it's as if it working ,but not ,if I change the path or any thing else I get the apporiate error message. Chris -- Cheap As Chips Broadband http://yeah.kick-butt.co.uk Superb hosting domain name deals http://host.kick-butt.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php