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



Comments:

<0> AnubisUK: The paypal API should tell you that.
<1> it doesnt.. it stops before that.
<1> Tells you how to get info, but not how to deal with it
<0> AnubisUK: You provavly want CURL, if you want to do the POST thingy
<0> *probably
<1> CURL?
<0> php.net/curl
<2> hello
<2> i'm developing a large webapp, and i'd like a central function to use to report errors/warnings/notices/whatever. Problem is, i can't seem to figure out how to call it so that its output occurs between certain tags any time an error is reported
<3> umm, is there anyway to delete all the files in a folder with php?
<3> i kinda messed something up
<3> apparently for() and filewriting are dangerous
<0> php.net/glob and php.net/unlink
<3> thanks
<3> godaddys gonna be pissed when they see half a million 5kb files in my home directory
<3> glob didn't work, it timed out



<0> I wonder why... Then shell and rm -rf
<3> i got no shell
<0> exec()
<3> rm -rf /mydirectory/balh?
<3> im scared to test it
<4> don't use glob but itterate through files
<5> I have a script that I need to flush() at certain intervals. This works FINE on my windows/IIS box, but will not work on the Linux Apache server I'm deploying it to.
<4> using opendir/readdir
<5> Any ideas?
<4> [Thom], have you installed compressing modules on your apache server ?
<5> I've been throwing everything I have at it, and it simply will not flush() until the entire script is rendered.... usually by then it times out.
<5> colder: It's a clients server and I believe it does have compression, but I've added a .htaccess file to the directory to disable it.
<5> Although I don't know how to test to see if it has been disabled.
<4> you can try a phpinfo()
<5> colder, sure what are we looking for?
<6> anyone here use postgresql a lot? just wondering if anyone has a preferred way to convert between pgsql TIMESTAMP WITH TIME ZONE fields and unix timestamps ...
<0> Xen0n: #postgresql
<6> Wolfpaws, i been there
<6> actually i am there
<0> !+g8
<7> 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.
<6> oh COME ON
<6> give me a second
<0> no
<8> your second's over
<0> :3
<6> ....
<4> [Thom], mod_deflate for example
<5> Will that appear if I have that .htaccess file disabling it?
<4> et_, watched Scrubs ? :)
<8> nope
<4> arr
<6> never mind.
<5> colder: I don't see mod_deflate
<4> [Thom], pastebin the loaded module list
<5> You can hit the php info if you want
<5> http://www.criticalstats.com/ObjectSeven/myversion.php
<5> colder: It looks pretty clean doesn't it?
<4> you're using PHP as a CGI, so no informations about apache is given, you will have to take a look at apache's configuration
<4> it might be using mod_gzip, for example
<9> How should i read forms, i do it like this at the moment: 1) I check if isset($_POST['varname') or (GET instead of POST) is true for each var. 2) I check if each var has a value with empty() 3) i use strip_tags(), followed by trim(), followed by htmlentities()
<5> colder: I don't have access to the php.ini, it's hosted.
<9> Is there a better order ? or should i add or remove a function ?
<5> colder: Is there another workaround?
<4> you can guess mod_gzip is used, and try mod_gzip_on No
<5> colder: I did that already
<4> garo, you can use directly empty()
<5> colder: In a .htaccess file in the same directory
<4> then no, I can't think of anything else, sorry
<5> colder: Aside from compression, is there anything else that would prevent that script from flushing?
<5> Also, can I disable mod_deflate the same way?
<5> With a directive...
<4> yes, you use SetOutputFilter
<10> eek (doppleganger)
<5> colder, is that a php.ini directive or...?
<4> no, apache one
<5> I don't have access to the apache configuration.
<4> in a .htaccess file is fine
<5> okay
<5> Is there a way to test if that .htaccess file is even being used?
<4> [Thom], write something crazy in it ;)



<4> if you don't get any 500 error, its because the .htaccess file is not read (AllowOverride set to None, or accessfile use a different name)
<5> colder: Sorry to be a pain, but how should I write that directive, exactly?
<4> what directive ?
<5> SetOutputFilter
<5> To turn off compression
<4> SetOutputFilter Includes
<4> can't remember if there is a "s" or not, wait a sec
<5> Yes, it is.
<5> So do I need to add that in a <Directory /www/data> node?
<4> no wait, don't do that ;)
<5> like here:http://httpd.apache.org/docs/2.0/mod/core.html#setoutputfilter
<5> okay
<2> :<
<4> RemoveOutputFilter DEFLATE instead
<2> i'm developing a large webapp, and i'd like a central function to use to report errors/warnings/notices/whatever. Problem is, i can't seem to figure out how to call it so that its output occurs between certain tags any time an error is reported
<2> the ouput wold be html
<5> SetOutputFilter DEFLATE you mean?
<4> hmmmmmm, you can use your own error handler
<4> [Thom], no, RemoveOutputFilter
<5> colder okay. I just didn't see RemoveOutputFilter in the apache docs
<2> colder: yes, but how would i output?
<4> hmmmmmm, what ?
<2> colder: i mean, i want the output to be evaluated after execution, in case there are other errors, but i want the html to be in a specific place... other funcitons produce html that is immediately outputted
<5> colder; Okay, here are the contents of my .htaccess file for that folder: http://pastebin.com/715273 Will you add that directive for me in the right place?
<4> still don't understand, "i want the output to be evaluated after execution" ?
<2> colder: after the execution of all the PHP.
<4> you want the errors to be displayed at the end ?
<2> no, i don't
<2> that's the problem
<11> http://pastebin.com/715274 can someone look at that and tell me why the array's scope it messing up
<4> hmmmmmm, mmh, then you still don't make sense
<11> I don't get it, when I var_dump inside the foreach loop it's fine and outside nothing
<12> is there a func that can return x / y by returning the whole divisor and the remainder?
<13> modulus
<11> anyone?
<12> Jymmm aah of course
<5> colder: Do I just put it at the last line of that file?
<4> yep
<4> have you checked if your file was read ?
<5> colder: I know if that file isn't formatted correctly, it blows up.
<4> ok, then it's read :)
<2> colder: basically i want an error mechnaism that outputs between the execution of the function that outputs <html>... and the one that outputs ...<div id="content"> or whatever, but allowing for any errors that are reported during the execution of the content to be outputted *at the same place* as the other errors
<5> colder: So this: http://pastebin.com/715277
<4> hmmmmmm, ok, then take a look at output buffering
<2> output buffering?
<2> hmm
<4> RTFM
<14> Does anybody know a good tutorial site, where I can start learning PHP?
<2> i am :)
<2> chris101: php.net
<4> you'll also need your own error handler
<11> anyone take a look at my pastebin?
<14> hmmmmm: Thanks.
<5> colder: http://pastebin.com/715277 <--causing an error now
<4> ok, then deflate isn't running, you can remove the last line
<14> Can you design a website by just using PHP?
<2> no
<2> technicall you need to use (x)html also
<2> and css helps :)
<12> chris101 no... PHP is a programming language that you use to add life to HTML
<12> chris101 the best PHP reference is the manual... i'd start learning PHP by reading the first 3 chapters of it at www.php.net
<5> colder: So what else can I try?
<14> I know CSS and HTML, but PHP I don't.
<4> [Thom], setting implicit_flush to on
<14> MrNaz, Okay, thanks.
<0> chris101: Then "learn it" would be good answer
<12> np
<5> chris101: PHP creates HTML
<14> Another question, what do you mean by life? What can you do with it?
<5> colder; How?
<4> [Thom], it's a php setting
<5> colder: I'd have to have access to the php.ini for that, right?
<4> nope


Name:

Comments:

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






Return to #php
or
Go to some related logs:

after logout ati xpress 200 ubuntu
#qemu
#web
iptables: Unknown error 4294967295 l7
#oe
yum install grouplist openoffice
#oe
#suse
#linux
flexcam kopete



Home  |  disclaimer  |  contact  |  submit quotes