logs archiveIRC Archive / Freenode / #php / 2006 / March / 11 / 1
Marupa
(Action) sighs. Ok, I think my brain has died. I figured out the error.
itrebal
BigE: what would be an effective useage?
Marupa
I was using database name of 'site' instead of 'sites'
itrebal
BigE: larger bodies of text?
BigE
itrebal: Would you like to debug a full page of heredoc? :P
itrebal
BigE: hell no :)
BigE
(Action) has seen it done ... *shudder*
itrebal
BigE: but, i dont use heredoc, if i can avoid it
BigE
Same here.
I've only had a few uses for it.
         

inono
Is there a way to send the results of QuickForm to an email
itrebal
inono: as in... HTML_QuickForm ?
inono
yes
marccd
is there a way to alphebtize an array?, i.e, move around the position of the keys based on A-Z ?
itrebal
when you process the form, you just have it send it in an email....
but, #pear
aspekt`
anyone here?
numist
ya
ask
aspekt`
hang on im gonna put it in pastebin
leri
arccd, look at ksort ()
aspekt`
http://pastebin.com/595297
kenroy_
is it possible to get the value of the innerHTML of an element with an ID
using php
Dragnslcr
Of what element?
aspekt`
i get undefined variable line 31
30*
Dragnslcr
aspekt`- go read about $_POST
And $_GET for that matter
caffinated
http://php.net/variables.predefined to be exact
aspekt`
ok
antix
on one server I can use this: if($page == "about") but on another I have to do like this: if($_GET['page'] == "about")
is that some setting on the server php.ini or something else?
aspekt`
I've read about them both
colder
antix, youre looking for register_globals
antix, notice that $_GET will work on both, and its the best method.
antix
colde, ok thanks!
         

Punkcut
can someone tell me what a T_LNUMBER is?
Pir8
where is the oracle module in php5 ?
Elazar
Punkcut: What's the full error message you're getting?
Pir8
aaah n/m found it heh
Jayinwww
greetings
Punkcut
Elazar : unexpected T_LNUMBER - Parse error: parse error, unexpected T_LNUMBER in
ramirez
Punkcut, its just a parser token: http://www.php.net/tokens
Punkcut
hey this is a nifty page
Pir8
pear/Calendar is not valid !
aidan
... not valid, okay
Pir8
im trying to install pear/Calendar
keep getting Invalid
benlake
pear install Calendar
aidan
Pir8: perhaps you could provide some useful information... perhaps
kodekrash
aidan: that'd be asking to much, no?
aidan
like, HOW you are trying to install it, and what ACTUAL error you are getting
Pir8
pear install Calendar
http://hashphp.org/pastebin?pid=6297
aidan
Pir8: have you read the error message?
specifically about the latest version
pear install Calendar-beta
Pir8
aaah ok
had to specify Calendar-0.5.3
my bad, didnt read the error carefully :(
aidan
you know that's incredibly annoying, right?
ironpig
any here have experience with writting JS to file?
like to create a .js file
Pir8
aidan yes I realize that.
aidan
ironpig: ... it's just a plaintext file
dools
main, 5.1.2 has some issues with notices...
aidan
no, 5.1.2 has issues with invalid code
hutch_
from the following http://pastebin.com/595382 what's the best method to extract latt and longitude?
Tresnar
dools: If you just mean the large amount of them, you do have control over what is displayed in the page, what is logged to your error-log file, etc.
aidan
hutch_: simplexml
ironpig
aidan, can you look at a piece of code? its not the whole thing, this the part thats screwing stuff up
dools
Tresnar: i upgraded from 5.0.4 yesterday, 0 notices, now bam!! it sends out notices for missing function arguments and _then_ says that the variable is undefined. that's not right. also loads of places where i had if($object) send out hte notice 'object could not be converted to in'
aidan
ironpig: paste it in a pastebin and let everyone look
dools
int
aidan
dools: write proper code then
ironpig
http://pastebin.com/595251
aidan
dools: clearly you've changed your error_reporting level
dools
aidan: nah, always had E_ALL
ironpig
its writting js to file, and then I load that file into another .php with include.
dools
aidan: you saying that if($object) is not proper?
aidan
dools: yes, of course, what the hell is that code meant to do?
ironpig: why would you include js code?
hutch_
\msg aidan pre php5?
aidan
ironpig: readfile it if you want it to be displayed in the html
dools: logically, what do you think that code should do?
dools
aidan: check if a variable is set to anything
aidan: ie. $var = ''; $var = new Class(); if($var)
aidan
dools: ... an object doesn't have a value, so how could php do that?
Stormchaser
hutch_: Don't /msg people if they don't permit you...
SDE
dools: what is your error_reporting setting in php.ini?
dools
SDE: E_ALL
aidan: well 5.0.4 had no probs with it
aidan
dools: if you want to see whether the object exists, use if (isset($object)), if you want to see if it's an object, if (issset($object) && is_object($object)) {
SDE
dools: was php4 setup as E_ALL ?
ironpig
readfile? is that a function?
aidan
dools: write proper code and you won't have a problem
ironpig; php.net/readfile, you tell me
ironpig
thanks
dools
aidan: and it has no prob with it in a simple example, but just something to do with some of my object instances
aidan
dools: write proper code and you won't have a problem
SDE
oh lord, what gret advice
dools
aidan: i fail to see how it's not proper code at all, and previous version of php had no problem and it's a pain to go back and redo it. i'm perfectly aware of other methods for ensuring a variable is an object
aidan: i think you're just getting on your high horse
SDE
php snobs need enimas.
aidan
dools: if ($object) doesn't mean anything logically. if() tests if something returns true or false. An object doesn't return true or false. I think it's pretty obvious.
xeer
if i have a array("name" => "value"); and i want the nth array item
how can i give it a int and get back the name and value?
dools
aidan: $var = ''; if($var) { //do something }
SDE
i forgot when php turned into a strictly typed language.
Julian
SDE, did it?
SDE
sorry julian, sarcasm.
aidan
dools: that typecasts $var to true or false. You can't typecast an object. Your code is still wrong in that example, but it will work.
SDE
that explains his notices. lol.
dools
aidan: it's not wrong at all! '' evaluates to false in php. its the same as saying if 0
SDE
dools: was your php4 php.ini file set to report all ?
dools
SDE: it was 5.0.4
SDE
oh, same php.ini file?
dools
SDE: yeah
aidan
dools: it is wrong, are you testing to see if the variable is set, or if the variable has a non-false value? someone reading your code has no idea - that's why it's wrong.
SDE
so you actually want notices printed? ok. i dunno why the behavior changed that. interesting.
dools
xeer: you can use $arr = array_keys(); $key = $arr[$n];
aidan: if i was testing to see if it was set, it would be isset($var)
aidan
dools: right, so do the same with your objects?!?!?
dools
aidan: but the variable _is_ set
aidan: it's set to false
aidan: by default, in the constructor of the class
aidan
it's not set to false, it's set to '', which evaluates as false
dools: one line per thought, please
dools
aidan: so is_object would be the best way, or even instanceof
aidan
dools: ... so do it? why are you telling me what I just told you
dools
aidan: because if($var) doesn't require a function call, is faster to write, and worked up until php 5.1.2!
SDE
his original question was about the notices. regardless if it is 'proper code standards' or not, it would be interesting to know why notices get thrown now.
outlaw84
If I wanto check to variable to see if their value is the same what should I use?
dools
outlaw84: ==
aidan
dools: if ($object) { works fine in php5.1.2, I don't get any notices thrown
outlaw84
I tryed 'if(var1 != var2) but that didn't do the trick
colder-
"You can't typecast an object" err, actually you can
aidan
outlaw84: if ($var1 === $var2) {
dools
colder-: when did i say that?!
aidan
colder-: yes, you can
I said that
dools
oh
aidan
you can typecast it to an array
dools
aidan: or a string
aidan: or an int
aidan: sorry, that was two thoughts that occurred in quick succession
aidan
to an int or string isn't valid, in my opinion (unless you have __toString defined)
colder-
to a boolean is plain stupid, it will return true :)
freeone3000
So __ is magic.
outlaw84
Its just not working with ==...
« prev 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 next »