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



Comments:

<0> ok ... i try to ... thx
<1> Mine is putting a ` by accident and trying to figure out why it was putting out errors in lines far away from the `
<2> NotHere: The funniest was that some of the error mnemonics are transliterated hebrew.
<3> mine is that i kept writing die() because it was just an angry day
<0> well i was tryng to post it there ..i am sure it doesent make much sens http://www.pastebin.it/1508
<4> I have a conference now, sorry.
<4> I'm sure someone else will help. :)
<2> bomus: You're not actually reading the rows from the query. You're just opening it, issuing the query without fetching the results, then closing it.
<2> bomus: Look at the examples in the comments at php.net/manual/en/ref.ibase.php
<5> when using include (or include_once, require, require_once, etc) -> where does search for the file? Does it start from document root first and then all subdirectories?
<6> gamengineer, include_path
<6> php.ini setting
<7> how do i enable magic quotes?
<8> tanker_: You really don't want to do that :)
<9> does imap_headers() work as it should do? I can connect using $mbox = imap_open(...) but when I try $headers = imap_headers($mbox), $headers is false.. How come? :(
<7> y?



<5> err, cool! ok, i'm thinking aloud, so that wasnt a very clever question on my part. Here goes: I want to include a file with all my daatabase settings outside the web servers root directory. I do this because I dont want anyone to have access to it. If I include it in a php file liek this, "include '/home/me/db.php'; can anyone "sniff" this content?
<8> gamengineer: They shouldn't be able to; mind you, they shouldn't be able to even if it was *IN* your web root
<5> or will it be included under the root directory anyways, if my server environment was ever compromised?
<5> markr: I've been reading on poor coding, and since Im new to php, I figure I might let someone in? So you're saying there's no way to really get to this information even if I include it from within my server env? foolproof?
<5> and can I get it in writing :)
<2> MarkR: Not exactly true. If a file is in your DocumentRoot, if they guess the filename, they can view it. I protect against that by naming all my includes (whatever).php.inc, then I configured apache to not display *.php.inc files, the same way it won't display .htaccess files.
<8> gamengineer: People can't read files from your server unless you put them in your web root, or they gain additional rights
<8> dj_segfault: However, if it is called .php, it will not have its source shown normally
<10> or, just config apache to parse .inc as php
<2> yes, that's true. Just make sure all of the content is inside a <?php> tag
<8> I normally keep such includes in a directory called "include" in my web root, where I put in .htaccess "Deny From All"
<8> Then it doesn't matter if I call them .php, .inc or .abc, however, I call them .php anyway
<2> MarkR: yeah, that's a variant on what I do. I just don't put it in a different directory.
<5> good to know guys! this is the exact info I needed to hear. Thanks,
<11> How do you indent text using PHP's DOMXML?
<12> could someone explain me what OOP with PHP is?
<6> !+oo5
<13> To learn about Object Orientated Programming in PHP 5, see the following: http://www.php.net/manual/en/language.oop5.php
<12> tnx :)
<11> How do you indent text using PHP's DOMXML?
<14> is there a way, with the DOM functionality, to get the nodeName for a CDATA section instead of just "#cdata-section"
<6> enygma, erm, you mean the node in which the CDATA resides?
<14> yeah
<6> check it's parent :)
<15> lo all
<15> anyone know a quickie for cropping a multi-line variable to say, 10 lines?
<6> enygma, it must be Monday morning, CDATA is <p>this text only</p> if you have a property you need from the <p> it's the parent to the CDATA
<15> can't make trim do it
<6> zi99y, strpos and substr()
<15> thanks Davey|Work I will give that a go
<16> zi99y: php5 or above?
<15> php4
<15> 4.3.10-16 in fact
<15> is there any reason I should upgrade?
<6> wow, that version doesn't exist
<6> it's obviously a distro package ;)
<15> it's the default package for debian stable
<6> but yes, there are security reasons to upgrade to the latest PHP 4.4.x at least
<6> ah, Debian probably backported the fixes (what a waste of time)
<15> there is a php5 package, I think I'll try it, didn't want to rock the boat after I got it working nicely :D
<16> zi99y: nevermind, my idea doesn't care: implode("", array_slice(explode("\n", $string),0,10));
<17> hey all
<15> Davey|Work: can I use substr to count whole words instead of chars?
<15> thanks anyway kennebel
<17> how would i compose a script to check the db for an ip? I am creating a table that will log all ips and then compare the time it last submitted and allow a post or not. I just can't grasp how to make it check the db...
<16> zi99y: (version independant) It will split on line endings, take only the amount you want, and recombine. it should probably be implode("\n",...
<17> i have a while but with the wile it will go thru each one and do something if it doens't match and if it does then it won't... I don't think that will work
<17> if the ip doesn't exist then allow the post. if the ip does exist but is more than a week old then allow post, if it exists and isn't more than a week old don't allow post
<18> I am looking for a basic php script that verifies udername and p***word .. the form is is consructed using xform .. anyone have a url?
<18> username*
<5> I'm looking for some ideas on how to do navigation in php from an OO standpoint? does anyone use model-view-controller to process navigation?
<19> hi
<19> i'm a bit lost in php source code, i'm lookin for strip_tags source code in tarball
<20> is there a nice way to take fields from the db and then use the type they require to validate forms?
<21> grep -ri 'strip_tag' *
<22> is it possible to free up memory that used by net_socket?
<19> find . -name "*.c" -exec grep -H strip_tags {} \;
<21> brainbox: no, not really.
<22> Stormchaser, im having battle neck due to memory exhausted
<22> bottle*



<22> Stormchaser, any advice?
<21> brainbox: Python.
<22> Stormchaser, i haven't use python before. but do you think is there a way to free up memory, i use HTTP_REQUEST and i got error on the net_socket(). if net_socket() can free the previous used memory if thats posslbe??
<21> brainbox: no, PHP doesn't free it's memory...
<23> Is there some way I can check whether PHP calls the destructor when the script is done processing, or when an objekt is no longer being referenced to ?
<24> print statement?
<22> Stormchaser, thanks. do you think python is the best way to this? or perl?
<23> VT?
<21> brainbox: I'd probably write the net application in Python or C++... I don't know PErl, but that might be a good choice as well...
<8> brainbox: If you're getting memory exhausted, either the PHP script is using too much memory, or there are bigger problems on your server
<25> Jemt: sure, but it's easier if you just read the manual. http://php.net/oop5
<22> MarkR, i already scan my script by checking if what section increase the memory use and i really found out that using the HTTP_REQUEST (calling net_socket) is the cultprint.
<23> caffinated: Ah, of cause - under OOP.. I just did a quick and dirty search in http://dk2.php.net/manual/en/ after the word 'destruc' :)
<25> :)
<8> brainbox: I've never heard of that, are you sure this is PHP? Are you sure you're not trying to do something obviously silly (like reading a 100Mb file into ram?)
<22> MarkR, yeah im serious of this
<25> Jemt: anyhow, in the constructor/descructor area they talk about when that event is fired
<22> i found out that while my script is looping and using the HTTP_REQUEST the memory use increases, im just wondering why it increases while i'm not adding or executing other functionality aside on using the HTTP_REQUEST
<23> caffinated: That I know. It is fired when the script has finished. I need to know whether my object is referenced to or not. I want the destructor to remove the data which my object represents from the database. But it is being removed on every refresh
<22> MarkR, have you tried HTTP_REQUEST before?
<22> i'm talking about the PEAR HTTP_REQUEST
<26> brainbox: when you loop through are you ***igning variables from the HTTP_REQUEST?
<22> dools, yeah but after getting the response code i did a unset for the object i've created.
<22> any workaround to free up memory aside on unset(), mysql_free_result()?
<22> or is this a bug of pear::net_socket?
<8> If you unset all variables referring to an object, PHP will throw it away
<8> However, I don't know whether this dodgy http request library may keep hidden references to stuff
<22> MarkR, that's what i did! and i'm wondering why net_socket() did not free up.
<22> MarkR, ic..
<22> MarkR, you have a point..
<21> !+typing english
<13> ##PHP does not allow aolbonics (or leetspeak) such as "u for you, r for are, ic for i see -- etc" and typing like this will result in you being silenced; furthermore, inability to adapt may result in a ban.
<8> brainbox: I have had problems with another library which held hidden references in an undocumented global to all its objects
<27> how do i make an if statement where TWO arguments are REQUIRED?
<27> because && ain't doing it
<26> Fushuing: pastebin
<21> and why not?
<28> hey, im having some problems watermarking images, im sure its dead easy, but im just being stupid today
<10> if ((foo=bar)&&(jack=jerry)) {
<28> I want to resize my watermark image, but it keeps appearing black, i know its to do with transparency but i cant seem to work out the right code
<27> http://pastebin.com/665228
<10> Fushuing: look at my example
<10> you need to (encapsulate)
<27> Rewt`: did that too
<27> same thing
<10> if ((condition_a) && (condition_b)) {
<27> yes, I DID
<10> ok
<10> then define your get out side
<27> ?
<10> uh
<10> man
<27> what i just pasted was before you showed the example
<10> your parethesis are all whacked
<27> what i have now in my IDE is your example
<27> same result
<27> hrmmm.... === does the job
<21> isset($_GET['action']) == 'reply' && $_GET['threadid'] != '' && $_GET['forumid'] != '' <-- o.O
<3> isset($_GET['action']) == 'newthread'
<3> that doesn't make sense
<3> isset only returns true or false
<10> if (($_GET['action'] == "newthread") && ($_GET['fourumid'] !=(''))
<3> www.php.net/isset
<27> Rewt`: i am trying to avoid notices
<22> Stormchaser and all thanks for your time. good night!
<10> theotherlight is correct though
<18> I am looking for a basic php script that verifies username and p***word .. the form is is consructed using xform .. anyone have a url?
<10> [Apprentice]: http://www.google.com
<2> Stormchaser: isset returns a bool, not the value being checked.
<27> so then what am i supposed to use? :/
<3> if ( isset($_GET["action"]) && $_GET["action"] == "newthread" )
<14> [Apprentice] - you're fired
<3> maybe
<10> foshing: if (($_GET['action'] == "newthread") && ($_GET['fourumid'] !=(''))


Name:

Comments:

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






Return to #php
or
Go to some related logs:

#debian
#web
ralink 2500 knoppix boot problem
#linux
kubuntu riserfs
#linux
HP raid management
#css
what is SQL*LOADER controlfile
#web



Home  |  disclaimer  |  contact  |  submit quotes