logs archiveIRC Archive / Freenode / #php / 2006 / March / 10 / 1
Fushuing
DIE ZEND! DIE!
lig
Morning
Dangermouse
The Zend! The! ?
(Action) had his german class this evening
hi lig
mkrufky
lol
lig
Hello Dangermouse
Pooky
Mrdini: Well, I'm running it via the php command, not as part of a page served from apache
Mrdini
zerg rush! kekeke
pooky, er, that WAS my point
$_SERVER's "filled" by Apache
Pooky
Mrdini: and I've had it work elsewhere, it's just not working on this box for some reason
mkrufky
Mrdini: i guess that means that we're wrong :-/
Pooky: i had no idea that was possible
         

Anomaly
Pollita, you around?
Mrdini
hmmm, I just checked & there's no $_SERVER['user']
http://uk2.php.net/manual/en/reserved.variables.php#reserved.variables.server
mkrufky
Pooky: perhaps cron might be running the job as {nobody} .... but in that case, you'd probably get 'nobody' back instead of (null)
Dangermouse
Do you want the user environment variable?
Pooky
I want the user running the script, I want to check if it's root, and allow it, otherwise fail
Dangermouse
Pooky: That's more likely to be in $_ENV if anything i think
Pooky
_ENV["USER"] => (null)
Dangermouse
maybe not then
Pooky
I have a php info bening mailed to me by the server, via a script in cron
that's where I'm getting these vars from
that's why, though you may say _SERVER["USER"]doesn't exist, it is showing up in my PHP Variables section, of the php_info output
and it fills them all out
except user and logname
Mrdini
pooky, ummm.... can you put your phpinfo() online somewhere?
Pooky
Mrdini: one moment
Dangermouse
Pooky: If all all else fails try get_current_user() or something like $user = `whoami`
Pooky
Dangermouse: good idea!
I didn't know there was a get_current_user()
Dangermouse
Pooky: check the user notes too
Pooky
Dangermouse: will do. But, for arguments sake, let me get this phpinfo hosted someplace, so others can look at it.
http://betaserver.pvusd.k12.az.us/cronoutput.txt
Fushuing
Notice: Undefined index: PHP_AUTH_USER in test45.php on line 20 <-- why am i getting this, even though i get a HTTP authentication dialog?
Stormchaser
Fushuing: check $_SERVER
Fushuing
i get a lot of stuff, except what i need :/
Pooky
Mrdini: the variables are down near the bottom, as I'm sure you can see
Mrdini
pooky, I saw & I have NFI any more :D
         

Pooky
Mrdini: k, thanks for the effort.
Fushuing
Stormchaser: so what could be wrong?
p_mash
is there a regex expect here .. want to make the : after CLIENTS optional .... preg_match('/(^\!CLIENTS:\s*)(.*?)(^\;)/sm', $data, $clients_block tired CLIENTS[:] and CLIENTS{:} but not rowk ;-(
MID-Cloud
I'm passing thorugh the data that comes from a mysql query with a while structure, each times it loops it prints a section, meanwhile it should also prints subsections in the right sections, and to do that I'm also going through a new array (coming from a new mysql query) with a while cycle. So I have an ID in the second array corresponding to a section of the first one. How can I compare the ID in the second while loop with a section of the f
irst while loop?
AaronCampbell
when using PHP5's __set object inside a class, is there a way to tell if it was =, .=, +=, -=, etc?
this ends up with only <pre>test2</pre> : $tpl->content = '<pre>test</pre>'; $tpl->content .= '<pre>test2</pre>';
Mrdini
MID,pastebin?
MID-Cloud
Mrdini, yep, give me a sec
AaronCampbell
while ($info = your query) {while ($info2 = your query) {if($info->id == $info2->id){/*do something*/}}} ...or am I missing simething
MID-Cloud
Ok, here is what I've done so far: http://pastebin.com/593412
It does print all the three sections right, but it puts all the subsections under the first one instead of putting them under the "right" one...
Mrdini
MID, eh? "subsections"?
MID-Cloud
You can see the ouput here: http://atelier.inf.unisi.ch/~marforic/linkstest.php, and the desired one here: http://atelier.inf.unisi.ch/~marforic/links.php
lra_
mhh - i don't seem to be able to set the user agent string from a fsockopen
Mrdini
404
lra_
it is possible right?
MID-Cloud
(take off the last comma :( )
Mrdini
ooops
MID, you only retrieve data from $links once
MID-Cloud
How can I retrieve it more times? and having to print only the right ones under the right subsecs?
Mrdini
also
if ($lcategory = $categoryid)
y
hello http://rafb.net/paste/results/0KvADU79.html how can i fix this?
Mrdini
==
MID-Cloud
Ok, with == it takes only the right ones, but as you said it cycle through the second while just one time.
How can I fix that?
bo0o
hi
i'm looking for a profile script where people can view each others profiles
i have a signup/login form already
Mrdini
MID, different ways
bo0o
but i can't seem to find a profile script where i can use with my database
?
i looked on google
couldn't find anything good
anyone kno any?
Mrdini
MID, one way could be php.net/mysql_data_seek
eduardo-
Anyone in the chicago area looking for a fulltime job? :)
MID-Cloud
but if the first while loops loops three times and the first one enters the second while loops, why then it does not enter it again the second and the third time?
(btw I'm heading to php.net/mysql_data_seek)
TML
Heh...good call, itrebal.
I was indeed thinking "WTF?"
"There are TML *engines* now?"
Pollita: You in?
itrebal
TML: :)
TML
!tell eduardo- about g7
MID-Cloud
Mrdini, I cannot understand how I can use mysql_data_seek within my function...
TML
itrebal: Not that I would be *opposed* to such a device, mind you
itrebal
TML: of course not
Mrdini
MID, rewind the internal pointer
TML
itrebal: The mere idea of automated TMLs running around fills me with a particularly wicked glee
Pooky
Dangermouse: thanks, your suggestions were very helpful, while the get_current_user was useless for my needs, the contributed notes were golden.
Mrdini
mysql_data_seel($blah, '0');
MID-Cloud
uhm, I try that
Mrdini
(and no that code snippet isn't right - look up the right syntax yourself)
itrebal
TML: the idea fills me with a particular cringe :P
jonsu
Hi
I have got the latest stable version of phpmyadmin, but when I try to export a sql database, I have got this error message
Error
File could not be read
any idea how to fix it?
robcole
is this line legit if( isset($site && $site2 && $site3) )
TML
jonsu: Export it to a file and directory where you actually have permissions
robcole: No
robcole
what must i use
TML
robcole: That says one of two things: isset(TRUE) or isset(FALSE)
lra_
i'm trying to retrieve a page from the net but when i grab it with fsockopen i get a different page to what i get via a browser - any ideas?
the page that i am getting from the script has a code of 200
jonsu
TML, I or the apache user?
robcole
how can i make it check for three values
?
TML
jonsu: The apache user
MID-Cloud
Yes, it is right, instead of $blah $links did the job ;)
TML
robcole: Call isset() on a single value
jonsu
I try to use 0777 and I have the same problem :(
TML
robcole: And chain the isset()s, not the values.
MID-Cloud
Mrdini, now it works flawlessy, thank you very much!!!
TML
jonsu: Then you'll need to seek help from a phpmyadmin forum.
mikeX
hello, how can I read the current working directory ?
robcole
hmm i dont understand how to go about doingthat tml
like a nesting?
TML
robcole: isset() && isset() && .....
jonsu
TML some php.ini option can block the file uploads from phpmyadmin?
robcole
ok
TML
robcole: Chain the *isset()*, instead of the *value*
jonsu
like safe_mode On or something like this
robcole
so thats multiple if isset lines?
Mrdini
MID, np
TML
jonsu: Could be. You'd need to ask a phpmyadmin support forum.
robcole: if (thing1 && thing2 && ...)
jonsu
thanks
jonnay
I'm having a problem with pecl install.. every time i issue the pecl install apc, it comes back with the error "ERROR: pecl.php.net/APC: conflicting files found:" and a list of files. how the heck do I resolve this issue?
TML
robcole: Might I suggest Greg Lemon's book "Beginning Logic"?
robcole
thanks
TML
!tell jonnay about PEAR
jonnay
Whups. SOrry.
Mrdini
!tell me about PEAR
hmm, efnet huh? *goes*
iPod-nano
Could somebody please tell me everything I need to have and where I need to have it in order to make PHP for Windows work with MySQL?
Apparently mysql_connect() is an undefined function.
TML
A brain, and in your head?
:P
spox
iPod-nano: modify your php.ini file
http://www.php.net/mysql
iPod-nano
I tried enabling extension=php_mysql.dll
TML
iPod-nano: php.net/mysql has a section labelled "Installation on Windows Systems"
iPod-nano
Been there, done that.
I wouldn't be here if that hadn't worked.
err had.
TML
iPod-nano: Then you'll have to give us a detailed description of what is happening before we can tell you which step you did incorrectly.
« 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 27 28 29 30 31 32 33 34 35 36 next »