@# 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



Comments:

<0> You're welcome
<1> Or what 126 means?
<2> CopyNinja - you need to read about Cl***es
<1> kuja: sorry then
<2> Cl***es and Recursion
<3> kuja: Can I ask why you said that?
<1> kuja: My problem is, I always get 126 back for the third argument to exec() when I should really be getting 0 or 1.
<0> terribleCabbage: Say what?
<0> !+func exec
<4> string exec(string command [, array output [, int return_value]]): Execute an external program
<2> CopyNinja - if you want an example, you can look at the code that runs my portfolio site: http://portfoliol.game-advance.net/
<2> oops
<0> Your program seems to return 126 then.
<1> Actually, it's int &return_value kuja
<2> http://portfolio.game-advance.net/



<5> AnarkiNet: Okay... I'll give this loop-thing one more shot... and if I don't succed I will check out cl***es.. And thanks for the URL, I will give that a look aswell! =)
<1> kuja: my program does not, ever, return anything else than 1 or 0.
<3> kuja: I was taking the piss. Apologies.
<2> you wont be able to do it with loops
<1> kuja: and I've made sure on that on the shell
<2> not with raw code
<2> you need to create a function that calls itself
<6> whjen grabbing a news feed, is there a simple way i can detect what news items i already have?
<0> rapha: What sort of program is it?
<1> kuja: a perl script.
<7> kuja: coooool.... :) thx
<1> kuja: my guess was, 126 is something that exec() sets when something didn't work out and I'd like to know what exactly.
<0> I ***ume with a Perl script you want somehting like `exit'? /me knows no Perl
<1> kuja: yes, exit is exactly the perl keyword for it And this specific script does either "exit 0" or "exit 1".
<1> The comments for exec() unfortunately don't mention this either
<0> kuja@shugotenshi:~$ php -r 'exec("php -r \"exit(200);\"", $foo, $ret); echo $ret;'
<0> 200
<0> PHP seems to exit with what I tell it too... hmmm
<1> kuja: I tested my script with "perl script.pl; echo $?" if that helps any
<0> kuja@shugotenshi:~$ php -r 'exec("perl -e \"exit 1;\"", $foo, $ret); echo $ret;'
<0> 1
<0> Can't say I can be of much help. Perl seems to be giving me the correct exit.
<5> rapha: Look at this page, might help you...: http://www.codecomments.com/archive227-2005-3-439796.html
<8> j sql
<8> whoops
<0> BAH!
<1> Thanks anyway kuja!
<1> Aaah!
<5> Seems like the 126 return is some kind of permission issue... The URL explains the same problem, but with a C++ executable
<1> The path my script is in is not is_dir()
<1> CopyNinja: I've made everything 777, but if it didn't exist, maybe that could bring the same error code
<5> yeah probably... also be sure to check your apache logs... maybe you can find something useful in that...
<1> sh: customchecks/vnr.pl: Permission denied
<1> There you go
<1> Even though it is 777
<5> yup! as I thought... does your vnr.pl application call any external programs itself or any libraries? you need to be sure that the user that runs PHP and Apache has the permissions for those aswell in that case.
<1> Nope
<1> Nothing
<1> Okay, gave it the apache user/group and now it works
<1> Kinda...
<1> customchecks/vnr.pl: line 15: ^M: command not found / customchecks/vnr.pl: line 16: sub: command not found / customchecks/vnr.pl: line 17: syntax error near unexpected token `$number' / customchecks/vnr.pl: line 17: ` my ($number) = @_;^M'
<1> Very strange indeed.
<1> CopyNinja: you need to prefix it with '/usr/bin/perl ' even if the script has a shebang
<2> perl is silly
<2> :/
<2> also, whoever called the #!/path/to/interpreter thing a "shebang" is silly too.
<9> AnarkiNet, you would rather hear "she bangs"?
<1> AnarkiNet: as long as I can call the script, I'm happy. I didn't make the descision for that script to be written in Perl. Plus, I didn't decide to code in PHP; I'm more of a Ruby guy, so...
<2> eh
<2> its all about the .NET :)
<1> ROFL
<1> .NET Bill's ***.
<2> C# is my favourite language of: PHP, Python, C++, Perl, Java
<2> i've programmed in PHP, Python, and C++, and had a rediculous time trying to set up Perl on my server, and Java just eats too much memory
<2> theres seriously NOTHING wrong with the .NET platform
<10> heh
<1> C#'s fine. The company's not.
<7> C# is not the company
<7> take mono



<1> That's true, yes
<2> but... i forgot, this is freenode, nobody cares if its the best thing since sliced bread...you guys are all a bunch of MS-hating zombies
<7> lol
<1> But then it still is also about personal preference a lot, and I just like Ruby a lot more than C#.
<7> and that you say to a guy who uses windows on his desktop ;)
<2> similar to the way some people arbitrarily hate apple just because they dont like the Mac OS
<1> Isn't it morelike the Mac OS users are hating Microsoft arbitrarily?
<1> (Or maybe because of the fact they're preventing their favourite OS from becoming more widespread)
<2> no. i was making the point that if microsoft does anything wrong, like having the idea for Internet Explorer, all the linux-fanboys jump down the company's collective back for EVERY peice of code that MS has ever produced
<11> that was just as bad a gernerallization as the point you are trying to make
<2> go into #linux and say "i love windows" and i bet you at least 75% of the non-idle population will be flaming you within 3 seconds
<11> still, it was a gerneralization
<5> lol funny reading ;)
<5> Comparing Windows with Linux is just as comparing Volvo with Saab... Either you hate or love any of them... Its a personal experience... Nothing to discuss...
<5> End of lesson! =)
<2> yeah
<11> no, your are wrong
<11> I am a linux user
<11> have been for many years
<5> AnarkiNet: And btw... The categorybased thingie could be fixed using loops ;)
<11> I do not hate windows
<11> I just do not use it
<2> but in this case i'm talking about comments like: <2> its all about the .NET :) <1> ROFL <1> .NET Bill's ***.
<5> zaphod: please stop now =) just say you hate windows instead... so we can end this discussion at once ;)
<11> i has it purposes, adn it works great for them
<11> **** bill gates, he is stoopid!
<5> well... I guess he owe your *** in IQ though ;)
<9> /topic welcome to #foofight
<2> personally, my experiences with linux have all been rather negative
<12> how
<5> Ok so what about him? He was smart taking money from the people using his system... And look at him now... He is one of the worlds richest men... Linus Torvalds could have been to, if he wanted to put some money to his project as Bill did...
<9> guys, what happened to php? you all kicked it to another channel?
<2> hans_ - this is a software debate
<9> no it isn't
<2> if you want to be OMG INTERNET POLICE! then you can be, however i have a feeling the channel will ignore you
<9> it's a stupid os fight, nothing but trouble about some 48 system calls in a kernel
<5> ;)
<5> Take this debate lightly... nothing to wind yourself up about... its just fun to spill some time at work =)
<2> lechunk - first time i tried to install linux, i ended up having no WM because i had chosen the wrong mouse type or keyboard type (or something, i'm still not sure what the hell the problem was) and so the WM wouldnt work properly
<13> bah
<2> second time, using slackware instead of debian, the display was corrupt once the WM loaded
<5> LOL =)
<5> Never had those problems with either Debian or slack
<13> slack and debian are both stupid
<12> AnarkiNet: did you look at the debug messages from X?
<2> linux just seems like its overly complex just so it can be complex
<12> AnarkiNet: I had to change my mouse from /dev/mouse to /dev/input/mice
<2> i used DOS easily when i was 6 years old, and while not EVERYTHING was logical and straightforward, almost all of it was
<2> linux was confusing with no purpose
<12> AnarkiNet: While windows just makes arbitrary decisions for you
<13> you should not compare a poor system like dos with unix
<2> yes, and provides a lightning-fast interface to change things that you dont like
<5> wait for that new OS written in PHP instead... that will owe everything!
<14> In phpmyadmin there is some kind of function that tells you how many rows you have edited when doing something like this: UPDATE maps SET file_type='8' WHERE file_name LIKE '%rpg%' AND file_type!='8' whats that function called?
<2> whereas linux you have to either memorize everything, ask someone in a support channel, or else go digging through manuals
<10> the manual states: "Write and Close handlers are called after destructing objects since PHP 5.0.5. Thus destructors can use sessions but session handler can't use objects." Can the session handling not be done by methods inside objects then?
<12> AnarkiNet: and when you know how to do stuff and have things set up perfectly it won't break itself
<12> besides, I don't trust win
<2> well, thats your problem
<2> windows works better than fine for me
<2> linux, does not work for me
<5> I use windows as a development and working environment... but I run unix on my servers...
<5> so I prefer both systems actually!
<2> i use Windows Server 2003
<2> and run Apache/MySQL/PHP
<14> mysql_affected_rows
<2> also, all of my programming and development is game-related, and I like to play games as well
<15> use whatever you want ffs
<2> so using linux would be like walking around with one foot stuck in a cement block
<12> AnarkiNet: do you work for a game co?
<2> lechunk - no
<2> i'm 17
<12> hehe
<12> k


Name:

Comments:

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






Return to #php
or
Go to some related logs:

#linux
#physics
chrisg631
uploadProgress Shadda
550 permission denied proftpd
konverter rpm FC5
Your administrator has disallowed changing your image.
diable netfilter
#osdev
kth-krb error gentoo



Home  |  disclaimer  |  contact  |  submit quotes