@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30



Comments:

<0> Getty: I guess a typecast to object would create a stdObject.. (a stdObject is a basic cl*** without a single function and you are free to add member vars..)
<1> Is there a way to improve that? I don't know if setting all this functionalities (showing user's ads, deleting ads, editing ads, searching other ads) on different scripts with similar code is a better idea. Any opinion on that?
<2> fangel: just when you said it, i found it, yes it was exactly this
<2> fangel: $this->obj->bla = 1 makes obj a stdCl*** Object
<2> regular i would have guessed it throws an error :-/
<0> if that even works it would (i asume) throw a E_NOTICE..
<2> fangel: nope
<2> fangel: my own debugging console <proud> doesnt shows me an error (and i get E_ALL without E_STRICT)
<0> Getty: hmm.. and $this->obj doesn't exist to begin with, does it?
<2> nope
<2> its just public $obj;
<3> Quick question: '' string is false. Is '0' string false too?
<2> and its just tested several times with if (isset($this->obj))
<2> and then there i got one place where i do: $this->obj->bla = 1;
<4> JoshX: thx
<2> and then $this->obj is stdCl***



<2> (now i check there too, so its fixed, but i think thats a think where php must throw error/notice)
<3> (yes, it is)
<0> Getty: okay.. so you have public $obj, but isn't init. as an object, but when using it as one it it silently converted to an stdCl*** ... sounds weird..
<5> Any idea on how to return sqlite results in a directory-order fashion? eg: Day 1, Day 2, Day 3, Day 11, Day 22. (Instead of: Day 1, Day 11, ...).
<2> fangel: yes
<2> fangel: i think if you build a small test case you can produce that very easy
<2> fangel: its "obvious"
<6> pod: either save the data in an integer fashion or use natsort() afterwards
<0> Getty: just working on that.. yes
<2> oh btw... want php version?...
<2> 5.0.5
<0> Getty: sure thing.. I get the same behaviour with PHP 5.0.something..
<0> 5.0.3
<2> fangel: roger
<2> fangel: someone must report it
<2> ;)
<0> Getty: I think i'll post it to the internals list when I get home from work and ask why this doesn't product a E_NOTICE..
<2> thx
<2> i even would say an error
<2> who knows that i want to use it as object?
<2> and what a user can do with stdCl*** anyway?...
<2> hey i got an idea where that comes from...
<0> at least an undefined property "bla"..
<2> its oldschool php, its an old behaviour
<2> probably was it useful in the first phase to have it that way
<2> and then noone ever made an error out of it
<2> would fit
<2> stdCl***.....
<2> what is stdCl*** anyway? cl*** stdCl*** { } ?! :)
<0> Getty: something like that - yeah
<0> Getty: do a Reflection::export(new ReflectionCl***('stdCl***')); to look at the cl***.. ;)
<2> oh :)
<2> sounds interesting
<0> Getty: it has zero of everything.. ;)
<2> LOL
<2> cl*** stdCl*** { }
<2> like i said ;)
<0> Getty: http://us2.php.net/manual/en/language.oop5.reflection.php for more info on Reflection.. ;)
<2> i was there once
<2> but never used it really
<0> neither have I ... but this was a usefull example.. ;)
<2> hehehe
<7> i have an email address, user@domain.com, which is to be set up as an e-mail to recieve support requests on
<7> i am creating a mysql-driven php support application and require a way to parse incoming e-mails
<7> the host upon which this site will run is the same physical server as the exchange server, and there is both pop and imap access to the server enabled
<7> my question, is whether there is a way to access the e-mails as they come in, or whether the best method would be to set up a script to run every x minutes that then parses any new e-mails
<0> Aeiedil: do you have shell access?
<8> TML: *poke*
<9> how can i find out if a variables value starts with something, e.g. if($var = "_*")
<8> Keloran: strpos()
<0> Keloran|Work: sure.. strpos, or if only the first char. then just char. indexes
<10> if($var[0]=="_") should work, should't it?
<9> ill give that a go
<11> I have a 6MB file, and my php.ini has the post, upload, and memory limits set to 18MB. WHen i upload my file, it tells me failed memory allocation. Any idea what i might be doing wrong? It reflects the proper limit, but for some reason a 6mb file doesnt make it up.
<12> i've got a page that includes 2 files, how do i access a variable from include A in include B?
<7> fangel, i have total access to the server so yes
<10> php needs more memory to handle your file than the filesize itself. Could it be that you've done a crappy implementation? :>
<10> DigitalReaper global?
<11> cla: I have a plain form that uploads. what should I do in memory?
<0> Aeiedil: setup an alias in /etc/aliases that delievers the mail to a php-cli-script..
<11> if I want to allow up to 12mb files, what should my settings be?



<10> Noel4DMB: I was referring to the codebehind page you're submitting to.
<7> win 2k3 server fangel
<7> and am unfamiliar with php-cli scripts etc
<0> Aeiedil: okay.. so now i'm lost again.. ;)
<0> Aeiedil: you could setup a scheduled task to run once a minute that checks for new emails..
<11> cla: nothing in my code is executed because the server returns the memory error
<7> fair enough :) once every 5-10 would suffice really but was hoping there'd be a more elegant way to do it :)
<11> DigitalReaper: if you declare a value in page A, it will be there when you include page B.
<10> Noel4DMB: what error?
<0> Aeiedil: cli scripts are virtually identical to "normal" php scripts.. you just have a few extra functions and vars to play with..
<0> Aeiedil: their might be.. but I don't know when running in windows..
<7> fair enough :)
<11> cla: Fatal Error. memory allocation failed, limit 18mb, then it says "tried to allocate x bytes"
<7> i've got some big old mcse books to read through so will cehck through teh exchange one
<12> Noel4DMB: well foreach ($items as $item) errors out unless i put $items = array(); on the line before it :/
<12> $items is an array in include A
<7> theres got to be a way to run scripts or something upon e-mail recieviing, else i guess i'll have to go for the scheduled tasks approach :) Thanks anyway :)
<12> i even declared it in the main page just incase it was a scope problem
<10> what's x?
<11> DigitalReaper: If you have a main PHP document, and you do: include 'pagea.php'; include 'pageb.php'; those PHP documents will be included as if they were part of the main document.
<0> Aeiedil: check with you mail-server.. it might have some config for it..
<12> i know... but i cant access $items from include B
<12> it just errors out
<11> is $items always an array?
<12> Warning: Invalid argument supplied for foreach() in /var/www/torrentflux/html/killboard/include/incViewKillFuncs.php on line 4
<12> yes
<11> try var_dump($items); at the end of pagea, and then do the same at the top of pageb
<11> see if it's there both times
<7> fangel :) my mailserver hates me with a p***ion ;)
<13> danbee: i have no $query = <insert statment>,$result = @pg_query($result) and then if (!$result) { <error handling> }
<0> Aeiedil: thats considered normal..
<7> twas a mission getting it to have imap operate again hehe :D
<11> cia: x represents whatever memory it tried to allocate
<11> cla:
<12> A lists the contents, B outputs NULL
<7> i remember hte first time i set upa mailserver, twas linux that time though :0
<13> danbee: how can i now rollback when i got an pg_error?
<7> i just couldn't get my head around how to do it :) anyway thats a story for somewhere else :) *back to work*
<10> Noel4DMB: I know. What IS x?
<14> phimic: um, you need that error handling then
<11> DigitalReaper, is your main page a PHP document, and are you including two additional PHP docs?
<12> yes
<14> otherwise you won't know whether to rollback or commit
<13> danbee: i have $err = pg_last_error();
<11> are you using $items in a function?
<12> yes
<11> ah, then you must either globalize $items, or return $items at the end of the function
<8> DigitalReaper: pastebin the code.
<12> include A is just a block of code, include B tries to use $items in a function
<11> digitalreaper: at the top of your function in pageb, put: global $items;
<14> phimic: probably easier just to write your code as you first said, $result = pg_query... etc
<8> Ew. Avoid globals as much as possible.
<15> Hi everyone!
<15> would like to know if there's some media cataloguer script around
<12> $items in B is still NULL
<11> cla: Fatal error: Allowed memory size of 37748736 bytes exhausted at (null):0 (tried to allocate 10800 bytes)
<11> i hate large files
<11> its only a 5 meg file, i dont understand why its giving me memory errors when i have it jacked up to 38mb
<8> Noel4DMB: What is the good reason to use globals?
<8> DigitalReaper: PASTEBIN THE CODE!
<12> what part?
<8> all of it
<11> all of it
<11> you aren't using unset($items) are you lol
<12> no
<12> where can i paste it?
<16> hashphp.org
<12> http://hashphp.org/pastebin.php?pid=6211
<8> um
<17> how can I print which the used web browser? if the browser is Lynx I want to print out "Lynx"
<18> globals gos inside the function
<8> DigitalReaper: Why don't you p*** $item in the function declaration?
<12> $item or $items?


Name:

Comments:

Please enter the result of the sum 63 + 46 (to avoid spam):






Return to #php
or
Go to some related logs:

kernel panic 2.6.16 rec_len
unable to create IPC shm instance
#perl
mysql + SELECT + INTO OUTFILE + utf8
#lgp
helldragon irc
kernel /sbin/init 432: cannot open dev/console: No such file
ubutu server install gnome
human gtk1.x theme
definition of zooted



Home  |  disclaimer  |  contact  |  submit quotes