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



Comments:

<GarethAdams> whether $var is a simple variable or array index
<GarethAdams> tim__: how are you including the file?
<tim__> GarethAdams: I'm using an include statment: <?=include('javascripts/navigation.js')?>
<DjDarkman> when i send mails vith php ,some people get this in the message Message-Id: <20060226230142.948923018E@localhost.localdomain>
<DjDarkman> why is that?
<thin> i'm looking for anything that can help me build a useragent type of script, i need to automatically go to a site and fill out a form.. can anyone point me in the right direction for filling out forms and submitting them w/ php ?
<TML> thin: pear.php.net/package/HTTP_Client
<thin> cool thanks
<thin> hmm, i have to download it?
<tim__> GarethAdams: If I remove the "=" it works. Very odd.
<thin> i wonder if debian has it in its packages
<tim__> GarethAdams: thanks anyway
<TML> thin: No
<GarethAdams> tim__: <?= means <?php echo
<TML> And once again, my point about '<?=' being evil is proven
<GarethAdams> using the short tags is discouraged, really
<[aJ]> What is --enable-zend-multibyte ?
<cla> It's a compiler flag. It will enable Zend's multibyte functionality.
<absentia> other than php.net -- does anyone know of any good resources / demos / howtos for socket communication with php5?
<[aJ]> cla but what is zend multibyte functionality?
<[aJ]> I'm compiling php 5.0.5 and get this error configure: error: Cannot find rfc822.h. Please check your c-client installation.
<flyman> OH BOB SAGAT! im going to kill my can of coke.
<Silivren[away]> *** Silivren[away] has come back
<flyman> Anyone ever run into a situation you knew how to code the core parts, but to impliment them correctly or for it to function like you have in your brain and just can't produce?
<TML> [aJ]: That has nothing to do with --enable-zend-multibyte
<cla> [aJ]: http://www.phpbuilder.com/lists/php-i18n/2002091/0002.php
<TML> [aJ]: Here's an idea: Ask configure what might be looking for c-client. "./configure --help | grep c-client"
<absentia> no
<Zyclops> how would you send an array through GET &name[1]=alex&name[2]=david kinda thing?
<absentia> writing core functions is the easiest part... having marketing and design fvck things over is another.
<TML> Zyclops: php.net/faq.html
<[aJ]> TML: thanks
<[aJ]> cla: so if I want a true i18n site I'm going to need this enabled
<TML> You only need multibyte support if you're going to be localizing your site in a very small handful of languages. Chinese, Japanese, Korean, a few others.
<[aJ]> TML: thanks
<[aJ]> TML: Now if I can figure what I need to isntall to get imap from throwing this error during config I'll be all set
<rodenta> if a host allows php, do they need to change any php settings to prevent people from hacking the server, and what are they
<ShuaiKing> I know this is not #mysql, but I have a question on how to set variables to the outputs of MySQL queries things
<ShuaiKing> SO... if I have a "select" thing, how do I set that to a variable $id?
<jonez> rodenta, typically hosts which run php are compromised when they let customers use sloppy insecure code.
<rodenta> how do they prevent them from doing it?
<Zyclops> TML: thanks for that, there's a rearlly good function to get array's through a query_string on that page
<jonez> how do you prevent a customer from using sloppy insecure code? I dunno.. it's a bit of a black art :)
<jonez> rodenta, are *you* setting up hosting?
<rodenta> maybe whyt
<jonez> maybe?
<rodenta> probably?
<jonez> how about a simple "yes" or "no" answer.
<rodenta> "yes"
<jonez> what platform are you planning to use?
<jonez> we should discuss this in private, I think
<rodenta> ok
<ShuaiKing> Hi
<ShuaiKing> If I'm trying to increase $writeid by 1, can I do $writeid=$result++?
<ShuaiKing> sorry, result**
<jonez> ShuaiKing, did you try it?
<Stormchaser> ShuaiKing: Why don't you use $result+1?
<ShuaiKing> Ok.
<rodenta> i cant private message
<rodenta> im planning on using a unix and win server, but i guess you cant help me right now
<TML> [aJ]: You need to have the c-client development files. --with-imap=somedir looks for somedir/include/c-client.h and somedir/lib/libc-client.(so|a)
<jonez> rodenta, I could help you with the unix server, but I will not touch the windows one.
<devicenull> is there any problems with the sapi module for 4.4.2 and apache 2.0.53/
<devicenull> I cant seem to get it to load
<jonez> devicenull, anything in error_log?
<devicenull> The specified module could not be found.
<devicenull> which makes no sense
<devicenull> because Ican find it at that path
<absentia> hey -- does anyone know of any examples ... in PHP ... showing how to send and how to receive (parse) HTTP POST ... with PHP -- that is -- not using $_POST .. but reading the raw socket, etc.
<TML> devicenull: Are you on windows?
<devicenull> yes
<TML> devicenull: "The specified module could not be found." is your OSes (broken) way of saying "I can't resolve all the dependencies in the DLL."
<devicenull> how about this: "THe specified procedure could not be found"
<thin> i'm trying to match the '
<TML> More of the same
<devicenull> I get one error on my computer, another on the server
<Artnez> has anyone ever dealt with PCRE regex and recursion?
<TML> devicenull: You probably didn't follow the installation directions correctly. You can either start over with them, or try googling for "dependency walker" and open said DLL in that to see which symbol(s) cannot be resolved.
<thin> i'm trying to match the 'Confirm_ID' part of name="Confirm_ID" but #(name=\"?)[^\s\"]+#i is including the 'name="' part. how do i exclude that?
<TML> devicenull: Then you have to identify which file(s) on your computer provide those symbols on put them somewhere on your %PATH%
<devicenull> ok
<TML> thin: Check out php.net/pcre.pattern.syntax
<TML> Artnez: What's the question?
<Artnez> TML: imagine an instance where i need to user preg_replace_callback to replace a nested set of tags
<Artnez> TML: for example, [b][b][/b][/b] (this wouldnt make much sense, as it would be useless, but you get the point i hope)
<Artnez> this is the pattern that i am using now:'
<Artnez> http://pastebin.com/574063
<devicenull> ah
<Artnez> this will pick up the first {%loop%} and the FIRST {%endloop%}
<devicenull> apache didnt want to use my Path variable
<devicenull> I dunno why
<Artnez> if i change the second subpattern to (.*) instead of (.*?)
<Artnez> then it will matche the first {%loop and the LAST {%endloop%}
<Artnez> however, if i have {%loop%} nested within another {%loop%}, everything breaks
<Artnez> i read about the (?R) feature implemented , but i'm having some trouble understanding exactly how it works
<TML> Artnez: That's because you're using (.*?)
<pabl***o> hey there
<TML> Artnez: Which means it'll read N {%loop%}'s, but will stop at the first {%endloop%}
<pabl***o> anyone uses scite for editing php?
<Artnez> TML: correct. if i use (.*), it will stop on the last {%loop%}
<Artnez> however, i could have multiple {%loop%} statements within a page -- each with their own nested {%loops%}
<Artnez> *on the last {%endloop%} .. that is
<Artnez> TML: another, more visual example: http://pastebin.com/574069
<devicenull> is there a way to optimize php more? I've got it spiking up to like 50% cpu usage, and I'm not sure why
<Artnez> devicenull: what kind of application is it?
<devicenull> thats the problem.. theres a couple sites hosted off one copy of apache, and I dont know which is causing the cpu usage
<TML> Artnez: Seems to me like you already know what you need to do to fix your problem, so I'm not sure what the question is.
<Systemadmin> how do i display image content without issuing this command header(Content-Type: image/jpeg);
<Artnez> TML: look here http://pastebin.com/574076
<Artnez> that is the desired result
<Artnez> for it to stop at the top-level
<Artnez> of the first {%loop%} instance
<Artnez> and move on the next one
<Jymmm> !+enter
<php-bot> Don't use the enter key as puncuation. Think in complete thoughts, then type.
<Artnez> my apologies :)
<devicenull> I actually think the problem is a custom forum engine that is being used
<Artnez> devicenull: how much usage are you getting?
<Artnez> devicenull: i've seen badly configured servers with log files about 3 gigs in size after a week :P
<devicenull> 50-60%
<devicenull> well, yea I should rotate the logs
<devicenull> I'm fairly certain all that usage is coming off one script
<Artnez> devicenull: is there any remote scripting involved? if used unwisely, it could flood your server's log files and possibly strain the server if it's used in conjuction with system calls or many database requests
<devicenull> well, the log file for that site is about 400mb... after a full month has gone by
<Systemadmin> Header("Content-Type: image/jpeg");
<Systemadmin> how do i rewrite this not to do header but disply the image
<Artnez> devicenull: if you think it might be the code, i'd say either turn it off for a while. if you MUST keep the potential culprit around, it may help to step through the code and see where it could screw up
<devicenull> yea, I cant exactly turn the site off to see
<Artnez> and check for system calls. if it's not your software, you never know what's going on. if it's bad code, it could be straining MySQL somehow -- say some idiot tried to retireve a list of 50 categories, and do a foreach() loop through each category, making database queries on each loop
<H0ly> Hi anyone more knowing alive? :)
<Artnez> devicenull: it's just hard to tell without knowing more of what's going on. usually taking a site down for maintenance is inevitable anyhow.
<devicenull> good point
<Artnez> regex will be the end of me
<H0ly> Basically i want to define value like this value="<?=$_SERVER['PHP_SELF']?>". But when i dont allow short tags it wont parse with value="<php?=$_SERVER['PHP_SELF']?>" anyone more into how the compiler parsing then me that know the reason?
<Artnez> i shouldn't have quit smoking, i should have quit regex 0_o
<Rushino> Hello, i need help on something.. I have a login page when i click on the button it check the authorization on the same page then open a popup which is hte control panel.. the big problem is that the session are turned off in that popup. Any ideas how i could solve this problem ?
<H0ly> ohh ofcourse i dont put "?" after php
<H0ly> value="<?php=$_SERVER['PHP_SELF']?>"
<H0ly> :P
<devicenull> would having huge log files slow down apache?
<Artnez> devicenull: oooh helll yeeesssss
<Artnez> devicenull: i had around 88% usage once with a 3 gig access log (the box was pretty damn good too)
<Artnez> if you've ever tried opening a 200mb file in notepad, you'll understand the load it puts on a cpu
<devicenull> yea
<devicenull> I'll just archive the logs
<devicenull> easy enough
<devicenull> I'd love to set up logrotate eventually
<H0ly> value="<?php=$_SERVER['PHP_SELF']?>" fails value="<?=$_SERVER['PHP_SELF']?>" works, someone know why?
<Rushino> because of the php
<Rushino> php look like to detect it as a variable
<Rushino> ? cant be used as a variable so that why its working


Name:

Comments:

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






Return to #php
or
Go to some related logs:

aujuta
sabnzbd 64bit
threads tkintern
#dns
clint
#math
nothing repeat offset while preg_match
kde components autostart applications
tcpdump reverse
msttcorefonts available versions ubuntu



Home  |  disclaimer  |  contact  |  submit quotes