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



Comments:

<0> ehh yea true sorry
<0> anybody want to help me solve a css problem? :}
<1> sporkit try #web
<0> i did
<0> its like dead
<1> !+g10
<2> Guideline #10) We don't support xyz script. We help you *write* PHP, not download and install/hack/use pre-written scripts
<1> !+g8
<2> Guideline #8) SQL Q's: #sql, #mysql or #postgresql. Apache Q's: #apache. Linux Q's: Either #yourdistro, #linuxhelp or #linpeople. HTML/CSS/JavaScript Q's: #web. Just because some other channel is 'dead' does NOT mean you can ask here.
<1> !+guidelines
<2> 1) Just ask. 2) Don't repeat. 3) /msg php-bot smart-q 4) msg the bot 5) Be polite and patient. 6) Do not paste here; /msg php-bot pastebin 7) No spam/bots/scripts/trolls/job postings or onjoin/away . 8) If it's not a PHP question, don't ask. 9) Don't PM without permission. 10) We don't support packages here. 11) ##php is a manual supplement. RTFM first! 12) Spelling matters. Use real English.
<0> you guys are text book nazis
<0> this is a sad place
<1> sporkit we had to RTFM, why can't you?
<3> is their a way to fetch internal IP's with PHP
<3> yes/no/maybe?



<4> internal IPs?
<3> for example
<3> actual ip 69.176.29.30 network ip 192.168.1.101
<4> no
<3> latter being internal
<3> k
<5> good day
<4> I doubt it
<4> good morning :)
<6> is there a function for me to get the file extension of a file?
<7> krzkrzkrz: php.net/pathinfo
<7> Among others
<6> thanks
<8> It's kinda funny last time I was in here that's the first question that was asked.
<6> filesize($filename) will work if i put filesize(file.ext), will it be the same case for filesize(path/to/file.ext) ?
<8> krzkrzkrz: depends what your 'working directory' is.
<8> and if that file exists.
<8> file_exists();
<6> ah i see now
<6> thanks
<9> why do i get a FATAL error: undefined call to realpath?
<9> my host provider is netsol and they're using php 4.4.1, CGI
<9> is this a php bug?
<8> lakbu: more than likely real_path($string); // $string is either null or empty or not even defined.
<7> lakbu: Your hosting provider has almost certainly disabled the "realpath" function
<8> s/real_path/realpath
<8> ... that was my next guess really.
<7> lakbu: Wait. Are you getting an error saying that the function realpath() is undefined, or something else?
<8> ... wouldn't it say function realpath undefined if that was the case?
<8> or something along those lines.
<9> TML, yes. the function was undefined
<7> lakbu: You need to speak to your hosting provider.
<9> is this a known bug?
<7> lakbu: It's not a bug
<8> let me check something out ....
<9> TML, i did. but the support is hard headed. maybe he has no clue what's going on
<9> this is the error: Fatal error: Call to undefined function: realpath() in .....
<7> lakbu: Your hosting provider has modified their PHP.
<9> TML, yes. before, everything was working fine. but i saw in phpinfo their new build was jan 27, 2006
<9> here's the phpinfo, http://www.povertyenvironment.net/phpinfo.php
<8> realpath($string) works even if $string is null.
<7> lakbu: This isn't a bug, this is something someone did on purpose.
<9> this is really annoying :(
<7> *shrug* Pick a better host?
<9> TML, yes. that's what im going to do... but i still have 5 months
<8> realpath doesn't even seem like a security risk ...
<9> darn. any alternative function for realpath?
<9> <plug>network solutions, s**ks! bigtime!</plug>
<8> lakbu: you could build one based off of getcwd()
<6> is it possible to get a width and height of a file if its an image?
<9> the-erm, i actually did that. and it fixed my first problem ...
<7> krzkrzkrz: php.net/imagesize
<8> I'm not sure if $_SERVER['PWD'] is a shell variable or not.
<9> the-erm, im using Drupal CMS and it's using realpath in of its include files extensively
<8> $_SERVER['DOCUMENT_ROOT'] might be of use.
<7> krzkrzkrz: Notice how I can put random guesses in there and PHP will search the manual for me and return likely results? Maybe you could try that, too.
<10> try $HTTP_SERVER_VARS['PWNED']
<8> ya it does a great job when you type things like image size
<9> <sigh/> gotta hack the cms ... remove all the realpath functions ... wish me luck guys :(
<7> lakbu: Why not just file a ticket with your hosting provider?
<9> TML, i already did. but they said that i have to talk to my developer instead! darn, im the developer. :(



<8> lakbu: what you could do ... write a function called realpath($filename) define('DOC_ROOT',$_SERVER['DOCUMENT_ROOT']); somewhere along the way. Then in your realpath function add the filename.
<8> or the path to the filename.
<9> the-erm, thanks. ill try all your suggestions.. gotta simulate what realpath does
<8> lakbu: at the very least you could do an if (!function_exists(realpath)) { function realpath($filename) { return $filename }}
<8> granted it could produce a *big* security risk. if someone figured out a way to inject /etc/shadow and /etc/p***wd
<8> of course ... if they are half way smart ... /etc/shadow should only be read by root.
<8> What am I saying ... you don't admin the server ...
<8> so like you would care.
<7> lakbu: That's when you tell the support guy "I need to speak to your manager"
<6> isnt $this->errorMessage[] = 'Error 1901' correct?
<6> i get: cannot use [] for reading
<8> other than missing a ; it looks ok.
<6> sorry its: $this->$errorMessage[]
<7> krzkrzkrz: You have to ***ign something when using []
<11> hi all
<11> what's the best function to check a string if it contains <p> and </p> tags?
<11> i thought of splitting it
<7> mmmmmmmmm: Easiest would be strpos
<8> mmmmmmmmm: the complex way would be preg_match_all
<11> thx
<6> should it be: $this->$errorMessage[] or $this->errorMessage[]
<7> krzkrzkrz: Is errorMessage a cl*** property or a variable that contains a cl*** property name?
<6> TML its a cl*** property
<12> Is there a PHP function to strip all {X}HTML tags from the result of something returned from mysql_fetch_array?
<6> TML an array variable
<7> krzkrzkrz: $foo->property
<8> ... correct me if I'm wrong, but you just typed $this->$errorMessage[] twice.
<7> the-erm: You're wrong
<7> the-erm: "$this->$errorMessage" vs. "$this->errorMessage"
<8> nitishp: There's no easy function to do that. preg_match_all will find all your <tags>
<7> the-erm: Notice the lack of a second $ in the second example
<8> I see the extra #
<8> $
<12> the-erm: Yeargh. Alright that's cool I guess.. :S
<8> I mean.
<8> nitishp: there's an example that grabs all the tags.
<7> nitishp: Have you tried php.net/strip_tags ?
<8> boy I feel stupid.
<8> TML is right.
<8> maybe I'm not as smart as I was.
<8> thought I was.
<7> Funny how google.com takes you right to strip_tags() if you google for "PHP strip tags". :)
<13> What is the very best way to make sure a picture is updated everytime you visit a webpage?
<8> I think there's a metatag you can set to nocache.
<13> Have tried, but it seem not to obey properply
<8> something in the header
<13> I also tried xxx.gif?x=uniqid((double)microtime()*1000000,1)
<7> StormS: Did you try the stuff on php.net/header
<7> s/$/?/
<13> I will have a look
<8> ... man that's funny ... right there perfect example.
<13> I ***ume the htm is <meta http-equiv="expires" content="0">
<7> It's been too long since I read 2616, but I'm pretty sure an expires of 0 isn't what you want.
<8> I would just use the header() examples.
<8> The problem also might be that your server is caching the images ...
<7> Yeah, as a server admin, I'd be pretty pissed if I found your script. :)
<8> which script?
<7> A script that forced a dynamic image to be regenerated for every request.
<8> I can see it for a counter.
<8> Maybe an ad.
<8> that's it tho.
<13> where would the setting for caching on the server be? linux/freebsd
<8> StormS: apache?
<13> session_cache_limiter() ???
<7> StormS: That's a red herring. Stop chasing it.
<14> Hi there, I'm trying to work out how to round a price to the nearest 5 cents. I've had a mind blank :( Any clues?
<8> StormS: No it's an apache setting /etc/httpd/conf or /etc/apache
<7> College: php.net/round ?
<13> ok TML
<14> TML: I've looked at that, but it simply rounds to nearest integer
<8> College: number_format will also be of use if you don't know about it.
<13> I'm focusing on <META HTTP-EQUIV="expires" CONTENT="Wed, 09 Aug 2000 08:21:57 GMT">
<13> or the php meth
<13> +od


Name:

Comments:

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






Return to #php
or
Go to some related logs:

#perl
ubuntu mount hfs rw
pure-ftp cannot ls
suse file_put_contents
#perl
image1.cdr
Why doesnt mysql_insert_id() Work PHP5
#qemu
Linux mysql error unknown variable old_passwords
#gentoo



Home  |  disclaimer  |  contact  |  submit quotes