#php
14 November 2007
Total 39 pages. You are browsing page 1/39.
First :: Prev :: [1] [2] [3] [4] [5] [...] :: Next :: Last
--- Log opened Wed Nov 14 00:00:19 2007
--- Day changed Wed Nov 14 2007
00:00 <****> cyth: all opcode caches, afaik, take a major hit from include_once/require_once. don't you use one?
00:00 <****> arpad, of course I've used one but never NOTICED a performance hit
00:01 <****> How can I take a time like HH:MM:SS and turn that into seconds? So, if I have 00:01:30 it returns 90 seconds?
00:01 <****> strptime?
00:01 <****> cyth: bench it sometime...
00:02 <****> i'll give that a try.
00:02 <****> thanks luke-jr
00:02 <****> arpad, most opcode caches I know flip out if you try to include a class more than once
00:03 <****> juanbond: strtotime() would do the trick for input less than 24 hours
00:04 <****> cyth: as does php, so you structure your code so you don't, or use *_once..
00:05 <****> arpad, right
00:05 <****> juanbond: list($h, $m, $s) = explode(':', $str); $s += 60 * $m + 3600 * $h;
00:06 <****> but structering code like that... ugh... maintenance nightmare
00:07 <****> wow, thanks arpad :)
00:07 <****> plus that would leave plenty of opportunity to break code reuse
00:07 <****> cyth: easier maintenance != better
00:08 <****> arpad, a few milliseconds faster != better
00:08 <****> i'm using an api, and someone told me to use try catch
00:08 <****> on the call
00:08 <****> cyth: you're talking about something you hadn't even heard of 5 minutes ago, and now you're quantifying it in milliseconds... stop talking out of your arse please
00:09 <****> what does that mean
00:09 <****> PaulB: http://php.net/oop5
00:09 <****> arpad, then what are we talking? since your so hard on it, I am sure you have benched it.
00:09 <****> arpad thanks and no thanks
00:09 <****> I didn't mean to start a flame war :p
00:10 <****> i mean I can quantify it as such that I do use an opcode cache and my scripts run in milliseconds.
00:11 <****> hi
00:11 <****> so it's either milliseconds or less
00:11 <****> cyth: a number of milliseconds is a meaningless for something like this. in a reasonably complex application, with ~50 files involved at the maximum, i'd expect a difference of something like 10-20 requests per second per server
00:12 <****> Could I use file_exists() to check if a directory exists ?
00:12 <****> Hmm, when recursing through an array, how do you find out what the actual key name is
00:12 <****> PaulB: oh, it's documented separately.. look up exceptions
00:12 <****> hi guys, I need help with a custom PHP installation and blank screens after logins
00:12 <****> arpad thanks
00:13 <****> we tried everything, we are using the last PHP 4 version
00:13 <****> OS is FreeBSD
00:13 <****> Apache is 1.3
00:13 <****> cyth: did you see my response? i just got disconnected for a moment
00:13 <****> arpad, yes
00:13 <****> cyth: cheers
00:14 <****> hmdl: looked in your error log or tried turning display_errors on?
00:14 <****> arpad, seems lke a pointless fight anyway
00:14 <****> yes
00:14 <****> arpad, it says nothing
00:14 <****> http://unyicio.com.ar/phpinfo.php
00:15 <****> programs like SquirrelMail or Ilohamail dont work
00:15 <****> cyth: iyho
00:15 <****> after login screen we get a blank screen
00:15 <****> if your sacrificing maintenance to squeeze 10-20 more requests per second out of a server, there's some issues other than either of them together.
00:17 <****> cyth: but you're not necessarily sacrificing [ease of] maintenance. if you can structure your code to avoid the issue without too much hassle that seems to me unarguably wise
00:17 <****> "if you can"
00:17 <****> yeah
00:17 <****> no arguments there
00:17 <****> hmdl: any segfaults in the apache log?
00:18 <****> no :[
00:18 <****> nothing at all
00:19 <****> hmdl: those applications are possibly setting up their own error reporting
00:20 <****> but they die
00:20 <****> the blank screen its not a "normal" blank screen
00:20 <****> for example, Firefox wants to save the page
00:20 <****> Opera and IE show the blank page
00:20 <****> hmdl: error_reporting(0); undefined_function(); also "dies"
00:26 <****> when posting a form regardless if a value is sent, the fieldname is sent, right?
00:27 <****> *first sent = set
00:27 <****> TAseth: no
00:28 <****> arpad: ok. what is my way around getting an 'undefined index' error?
00:28 <****> does PEAR::DB has anything to do with creating hash values for PHP?
00:29 <****> TAseth: check variables with isset() before using them
00:30 <****> arpad: ahhh i see. I was isset(submit) instead of input name
00:30 <****> hey Guys I was wondering if I'm doing a registration script... and I want the script to redirect back to my index page and at the sametime print msg "Processing data" is there a way to do that?
00:34 <****> I wrote a script to open a local file with fopen. It has come to a point where it would be easier to grab this file that's hosted elsewhere. What function would be best used to grab a file from a url? It is a text file that will be parsed.
00:36 <****> nullfs: depends, how will it be parsed?
00:36 <****> arpad: I'm using fgets() with explode() currently
00:36 <****> nullfs: you can do $lines = file('http://myfile.txt'); and then use a for loop to grab the text from it
00:37 <****> Murdoc: sure, html or javascript
00:37 <****> yep
00:37 <****> I think you can also read in txt files like that too right?
00:37 <****> (..to answer your redirection question)
00:37 <****> a meta tag in html or setTimeout & window.location in javascript
00:38 <****> so there's just no way php can do this?
00:38 <****> there's no possible way to print a message and then do header("location...")?
00:38 <****> Murdoc, a redirect?
00:38 <****> yeah
00:38 <****> Murdoc: it is saying fgets(): supplied argument is not a valid stream resource
00:38 <****> it's for like a registration page
00:38 <****> nullfs: sounds like fopen() and fgetcsv() might save you some time - all php file functions can work with remote files if allow_url_fopen is on
00:39 <****> Murdoc: that's a limitation of http, not php
00:39 <****> oh
00:39 <****> ah
00:39 <****> =/
00:39 <****> nullfs: you don't use fgets for that
00:39 <****> for each ....
00:39 <****> Murdoc, if you want to redirect, yeah you need js or html... the best php can do is include the destination's pages source
00:39 <****> http://ca.php.net/file
00:39 <****> Hello, does anyone know any free hosting service? I need to test some stuff in php but all free hosts i found had 'open_basedir' restriction :(
00:40 <****> daomao, localhost?
00:40 <****> Ktron i dont know how to do it
00:40 <****> daomao, platform?
Total 39 pages. You are browsing page 1/39.
First :: Prev :: [1] [2] [3] [4] [5] [...] :: Next :: Last
