#php
30 September 2007
Total 38 pages. You are browsing page 1/38.
First :: Prev :: [1] [2] [3] [4] [5] [...] :: Next :: Last
--- Log opened Sun Sep 30 00:00:16 2007
--- Day changed Sun Sep 30 2007
00:00 <****>
00:00 <****> sorry for 2x?
00:00 <****> kenguest: is it possible to have a link in a plain text mail?
00:02 <****> MisterMonty: Sure. Most mail clients recognize a URL in a plain text message.
00:02 <****> Thanks Samus_Aran && aunes
00:03 <****> ...
00:03 <****> ?
00:04 <****> Good day! I'm making a simple PHP login and it's been a while so I'm a little rusty. Are there any resources you can recommend?
00:07 <****> hi is possible to automatically detect string encoding and translate it to utf-8?
00:08 <****> MisterMonty: Pattern recognition can find URLs without HTML..
00:09 <****> i have php6 installed as a shared object in apache2. i'm using application/x-httpd-php though i receive only a blank screen when trying to view a php script.
00:10 <****> xeer: What error messages, if any, do you get on a) the Apache error log and b) The php error log, given that you have enabled error logging, right?
00:10 <****> xeer: as you're running PHP6 you're expected to know what you're doing, it's not generally released yet
00:10 <****> matt, but what if i want to add a url without it being recognized by the pattern recognition?
00:11 <****> for example if i wanna add: "if you cannot see the link, copy paste the following url into your browser:"
00:11 <****> and than a url that is not clickable
00:11 <****> any good refs for someone like me coming from asp.net to learn php?
00:12 <****> why would you want to
00:12 <****> me?
00:12 <****> Level9Wizard: I meant what HTTP header are you changing ? it could possibly be affecting whether or not the session cookie is being loaded. also, are you sure you are in fact doing session_start() ?
00:13 <****> Monie: welcome
00:13 <****> MarkR42, i receive no error in apache's log, where is the php log located at?
00:14 <****> xeer: Wherever you've configured it in the php.ini, as described in the manual, just like you always did for PHP5
00:14 <****> MisterMonty: it sounds like what you are after is a mixed mode mail, both plain text and HTML (which is the way it should always be sent, if you are including an HTML version at all)
00:14 <****> xeer: I am assuming you have all errors enabled, which you will do, as you would in PHP5 if you had any sense at all
00:15 <****> i just want to send a mail that does not get blocked by spam filters, because it's an activation mail for my site
00:15 <****> MisterMonty: textual clients will just display the text version, HTML mail clients will display the HTML one by default (unless the user set their prefs differently)
00:15 <****> Seeing as this is definitely a non-production system, you might want to enable display_errors too, which should work as it did on PHP5
00:15 <****> what would be the ideal solution?
00:15 <****> MisterMonty: in general, spam blocking has far more to do with your mail server than the contents of the mail
00:15 <****> MisterMonty: Make sure you're not on shared hosting,
00:16 <****> i have a dedicated server
00:16 <****> If you're on shared hosting, you probably share it with a spammer, this will give your mail a very bad reputation
00:16 <****> MisterMonty: does your mail server have both forward and reverse DNS with a proper MX record ?
00:16 <****> MarkR42, .. yes i do have errors enabled. i was trying to view a script i had created in php5. i noticed an error and warning which i corrected. now there is no output
00:16 <****> MisterMonty: around half the big mail servers these days block mail from people without proper DNS information
00:16 <****> You definitely need a correct reverse DNS for your server. You need to not forge the domain name. You need to make the message not look like spam
00:16 <****> Many, many organisations block mail from hosts without a proper reverse dns
00:16 <****> it's not looking like spam
00:16 <****> hmm, apache is leaking LOTS of memory... and I think PHP is causing it... a couple of 100 requests and my server is down on its knees (apache using 6*200MB or memory or so)
00:16 <****> MisterMonty: due to the proliferation of home computers being taken over and used for spamming directly from random IPs
00:17 <****> ok thanks
00:17 <****> oskie: yikes. what is your PHP memory limit set to ?
00:17 <****> what does the php_svn module do ?
00:17 <****> oskie: er, did you mean 200 requests or a couple ?
00:18 <****> oskie: Are you really sure it definitely is leaking memory, not just *using* memory, these things are not the same. You can set the request limit so it recycles its child processes. You could also consider changing to using a threaded MPM instead of Prefork on Linux/unix
00:18 <****> Most Apache installations with PHP have MaxClients set too high
00:18 <****> hmm I might look have to look into request limit
00:18 <****> heh.. memory_limit = 128M .. might be a bit overkill?
00:19 <****> Work out how much memory PHP might reasonably use. If you're on prefork, multiply that by MaxClients. If the result is not an amount of memory the server could reasonably allocate, set either memory limit or MaxClients LOWER.
00:19 <****> MarkR42: well, it doesn't seem to ever redeem the memory.. also, apache doesn't stop after apache2ctl stop (kill -TERM fixes it tho)
00:19 <****> oskie: try setting that to around 8 to 16M, but it depends on what your code is actually doing =)
00:20 <****> On a moderately busy web site (dedicated, obviously), MaxClients 40 is typically enough
00:20 <****> I'm not sure what apache2ctl is
00:20 <****> MarkR42: it's just /etc/init.d/apache2 stop
00:21 <****> apache2ctl is a wrapper script for Apache
00:21 <****> Are you using an official (unpatched) build of PHP? An unpatched Apache? A supported OS?
00:21 <****> MarkR42: I am using prefork... maybe I should switch to something more modern
00:21 <****> prefork is safe but memory intensive
00:21 <****> MarkR42: Debian unstable, linux 2.6.22.1, php 5.2.4, apache 2.2.6
00:21 <****> If your distribution has bastardised Apache or PHP in any way, you may wish to do clean builds of those
00:21 <****> Hi all. Trying to do: preg_match('/\//', "", "1923/12/12"); to remove slashes but it's not working?
00:22 <****> oskie: are you actually doing anything on the site which could use 128M of RAM in one go ? that seems very excessive. but if your code isn't producing that much RAM usage, that will not increase the RAM used, it is just an upper limit
00:22 <****> MarkR42: prefork safe in what way?
00:22 <****> Samus_Aran: I doubt it, I probably raised that limit ages ago when 16M was not enough...
00:22 <****> Threaded web servers are apparently incompatible with PHP in some cases, the manual is distinctly vague about it
00:23 <****> However, they contradict this by recommending them on win32
00:23 <****> Is extract($GLOBALS, EXTR_REFS) a very heavy operation? I was hoping it'd be quite light cause it's extracting references. Does anyone know from experience?
00:23 <****> using references is heavy by design
00:23 <****> that limit is just there to deal with broken code, mainly. like a for loop that doesn't end, or accidentally dumping an ISO image into a variable =p
00:23 <****> Hey, anyone here who's familiar with both PHP and Ruby on Rails, which would be easier?
00:24 <****> JDigital: That depends on whether you know your way around PHP or RoR more.
00:24 <****> JDigital: Rails is a framework, PHP is a language.
00:24 <****> JDigital: If you don't know Ruby at all, and just trying to jump to Rails, then you'd have quite some trouble.
00:24 <****> kuja, references can only makes things slower when you start mixing them with normal variables, don't use them unless you require them
00:24 * oskie wishes PHP had object oriented classes for base types like string, ..
00:24 <****> JDigital: I have not used RoR, but in my experience as an end user of some Ruby scripts and my years with PHP: both are excellent languages, however there is a vastly larger PHP community
00:24 <****> Say I had to build a new site in one or the other. I've recently learned Ruby, and I learned PHP a while ago so even though I know it slightly better I'm a little rusty.
00:25 <****> ekneuss: I was looking for a decent way to include PHP files within a function scope whilst making it look like it was included from the global scope.
00:25 <****> any good articles comparing asp.net to php
00:25 <****> JDigital: You'd still have to *learn* Rails.
00:25 <****> It's useless until you actually learn it.
00:25 <****> Never mind, should be: preg_replace('/\//', "", "1923/12/12"); to remove slashes
00:25 <****> I have the skateboard book!
00:25 <****> kuja, well, if you intent to allow the modification of the variables, then yes use references, but if you don't, you can only get worse results
00:26 <****> I mean : preg_replace('/\\//', "", "1923/12/12"); to remove slashes
00:26 <****> JDigital: PHP
00:26 <****> JDigital: perhaps look at some RoR sample code, and see if it looks "nice" to your eyes =)
00:26 <****> ekneuss: But a plain extract($GLOBALS) is even worse, no?
00:26 <****> GRRR, in debian, the default php packets only works with apache2 prefork, not worker :(
00:26 <****> there is not much difference between the creation of a variable and a reference, only a flag in the struct
00:26 <****> I'm looking towards creating a content management website which can allow me unlimited levels of categorization of content....what would be the best approach....I always find the already available CMS very limited......I think its better to go with some php framework ?
00:26 <****> JDigital: Try watching the "10 minute blog" screencast by DHH on the Rails website at rubyonrails.org, and see if you like it.
00:26 <****> oskie: When I was using Debian, I always built my own Apache and PHP .debs
00:26 <****> There are probably a lot of similar screencasts out there for PHP.
00:27 <****> kuja, remember that variables won't get copied if not required, like $a = "..."; $b = $a; $c = $a; no copy here
00:27 <****> JDigital: if its going to go big, use PHP ;; Twitter is one of the very few popular apps, and it has tons of problems, not to mention finding RoR hosting isn't as easy, and the RoR webserver takes craploads of memory
00:27 <****> kuja, while $a = "..." $b = &$a; $c = $a; copy here
Total 38 pages. You are browsing page 1/38.
First :: Prev :: [1] [2] [3] [4] [5] [...] :: Next :: Last
