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



Comments:

<0> ok
<1> just for the record to interested parties, it's an easy google. I'm reading up on it now.
<2> haha
<2> nm
<3> Can somebody write me a short RegEx ? I need one, but I have no idea how to write one... I need one to find every space in brackets. (for use with preg_replace) So for example " test 1 (test 1)" should become " test 1 (test1)"
<4> schapht UncleMantis /join #100 if you want info
<5> If I'm stepping through an array using foreach ($myArray as $id=>$el) {}. And the array uses numeric indices (but not necessarily concurrent numbers...there can be gaps), how can I tell if I'm at the last element? Would I do something like: if ($id == max(array_keys($myArray))) {}? It looks messy...so I thought there might be a better way
<4> Sebbecking
<4> !+mre
<6> [MRE] 'Meal, Ready to Eat' used by the military in the field and others during a disaster as they have a long shelf life. But you probably wanted 'MRE - Mastering Regular Expressions' the bible of regex http://www.oreilly.com/catalog/regex2/ also get http://www.weitz.de/regex-coach/
<7> No answer/advices for my questions ?
<8> AaronCampbell: php.net/end
<8> LMJ: What was your question?
<7> I have to 2 little questions for my very little script i'm doing, fist of all, a variable $namepac contain the name of file + its extention, how can i extract just the name ? (who could with dots too) Second question, my little script if a small form who generate a basic html pages with answers, how i can purpose the user to download automaticly with a kind of "save as" popup the file my script just generated ?
<5> Elazar: but that returns the value. And there can be duplicate values.
<1> Sebbecking: that seems like a pretty simple regexp too. probably a good first one to learn how.



<3> @schapht: Yeah, but I don't have enough nerves to learn it.
<5> Elazar: so if I test against that, I might think I'm at the end when I'm not. Also, I need to still step through the whole thing...I just need to add one little thing on the last time through (selected="selected")
<3> It's just for this short one.
<9> LMJ: look at substr() and header()
<7> ok, thanks
<7> gonna check them out
<1> Sebbecking: you can do it! Get some of your favorite stimulant and get crackin!
<8> AaronCampbell: Hm... I think the way you're doing it is the way to go, then.
<8> Sebbecking: Seriously, if you have to ask for someone to write a regexp that simple, you need to learn how to do it yourself.
<8> Sebbecking: If you need them at all, it's best to go ahead and learn them. Besides, they rock. :D
<3> I know, but they're complicated.
<3> ^^
<8> Sebbecking: I have a copy of the book that Jymmm referenced.
<8> Sebbecking: Only if what you need them for is complicated to begin with.
<8> Sebbecking: Simple ones really aren't that hard.
<3> a digital copy ?
<8> Sebbecking: Go read the online version of that book. I've read it and it's a good one, even for beginners.
<10> hi all...how can i capture external output program (shell_exec or system) on a Win system?
<8> Sebbecking: They have some sample chapters, but no, it's not entirely online. You'd have to buy it.
<8> Sebbecking: One second... I think I know of a tutorial that might help.
<3> Ok, thanks.
<8> Sebbecking: http://www.phpbuilder.com/columns/dario19990616.php3?aid=46
<8> Sebbecking: It's a bit old, but it will show you the basics with examples.
<8> Sebbecking: Anything referenced in that article should work with preg. The only difference is you have to put a / at the beginning and end of the pattern string.
<8> Sebbecking: Beyond that, read the Introduction here: http://www.php.net/manual/en/reference.pcre.pattern.syntax.php
<3> Okay, I'll gie my best ;)
<8> And after that, read this (one of the advantages of using preg over ereg): http://www.php.net/manual/en/reference.pcre.pattern.modifiers.php
<8> If you have questions, I'll be around for about a half hour.
<7> thanks CryWolf, substr worked, let's test header() ;)
<11> how do i output the current session id?
<8> UncleMantis: session_id() ... wow, that was a stretch. :P
<11> never mind
<11> i just now found it
<2> What is the proper way to keep track of data, prior to a paypal submit for payment, such that after I get to a successful state with paypal actually paying I do something?
<8> UncleMantis: I can sympathize.
<12> hi #php, does anyone know why my php5 installation broke <? and is now requiring <?php its going to cause me a lot of work if i cant fix that
<2> should I use some kind of Session?
<8> pUmkInhEd: Check your php.ini file and turn short_open_tags on.
<12> Elazar: ty
<7> Ok, header() do what i want, i provide a file to download, but now, how i can create this file to download ? it's a dynamic file created from a web form. Do i have write the output to a file maybe ?
<13> is there an upper limit to what a session can hold?
<7> CryWolf , you have an idea for this new question ?
<14> vhuren: only a practical one
<13> ||cw: which would be? cause a lot of my sessions keep timing out
<14> well, in order to get data into a session, it has to be loaded into memory first, and there are limits there
<14> if sessions are timing out, it's not because they are too big
<13> ||cw: you are positive? what could it be then?
<14> unless you are running out of space on your tmp folder
<14> vhuren: it couldbe that you don't use them for the default 20 minutes?
<14> could be the client not keepeing the cookie?
<15> hwo do you convert an array to a string?
<16> implode?
<15> explode?
<14> serialize()
<13> ||cw: how can you force them to keep the cookie?
<15> ah.. thanks erik
<17> Warning: move_uploaded_file(pliki/file.mp3): failed to open stream: Permission denied in /home/user/xxxx/public_html/upload.php on line 3
<17>
<17> Warning: move_uploaded_file(): Unable to move '/tmp/phpr4nymu' to 'files/file.mp3' in /home/user/domains/xxx/public_html/upload.php on line 3



<13> ||cw: one other question the /tmp folder contains a lot of 0byte session files
<8> vhuren: Can't... all you can do is check to see if it exists and if it doesn't deny them access.
<14> vhuren: they should keep it unless the browser is closed. if it doesn't, then that browser is broken.
<17> what do i do wrong ?
<13> ||cw: I see..
<8> Adam_eM: Permissions on the destination folder must be such that PHP can't put the file there.
<14> |Adam_eM|: well, it would seem your permissions are wrong
<17> should i chmod 777 to the directory then ?
<2> probably stupid questions huh?
<18> why does it returns TRUE if( ! isset( $_REQUEST['cat_id'] ) || !( int )$_REQUEST['cat_id'] || $_REQUEST['cat_id'] < 0 ) when $_REQUEST['cat_id'] is something like 3sdd?
<18> i have to remove !
<18> i reckon
<18> hm
<19> this is where you could do 3 ifs to see which one returns true
<19> there is probably some smarter way to do it
<19> but the ifs work
<20> lng: I have no idea, why you have this !( int )$_REQUEST['cat_id'] part...
<18> just in case someone p*** string val
<20> lng: If you want to check for number, the use is_int() or is_numeric()
<18> is_numeric()
<20> lng: You don't use (int) $ in an IF statement... (int) is typecasting command
<18> Stormchaser, i know
<20> so... Why is it there?
<18> Stormchaser: i removed it. thanx!
<20> Why was there in the first place?
<7> Ok, header() do what i want, i provide a file to download, but now, how i can create this file to download ? it's a dynamic file created from a web form. Do i have write the output to a file maybe ?
<10> how can i capture external output program (shell_exec or system) on a Win system?
<18> Stormchaser: first place?
<21> hi all :)
<22> ok.. back to my question which i'll restate .. i have a PHP script that calls a CGI script on a different server via a Header("Location: perlscript.cgi?var=1&var2=2") call .. the perl script executes fine but the PHP script waits for the perl script to finish executing before it redirects to the thank you page .. i've tried using a php socket instead of a header call and setting the socket to be non-blocking, but that didn't work. also edited the perl sc
<21> I search for the web based solution for IRC integrated with php, or similar. Any sugestion? this is very important.
<22> i've tried calling exec from php, using something like exec("wget $cgiurlwithvariables &"), but that doesn't even seem to execute the script at all. :(
<14> chronos: what kind of integration
<11> rollin rollin rollin!
<21> ||cw: that it makes possible me to manage commands IRC from php
<20> what?
<14> BilldaCat: header in that way does a redirect, not a call. and php doens't do backgrounding very well. if it's not time dependant, add the info to a queue (file or database table) and exec it from cron
<14> chronos: there is plenty of stuff for connecting to IRC from php, including how to make a bot in php
<21> example: I click in ban this user, and execute /kick nick
<22> ugh.
<23> Hi, I need to install imagegd2 for eZ publish
<23> how do i do that?
<21> I don't know none
<12> i just upgraded php4 to php5 on my freebsd box and now dbx_connect calls dont work, says undefined function
<23> anyone?
<14> pUmkInhEd: then you didn't install the module that addds that support
<20> munti78: imagegd2?
<14> munti78: so "install" it.
<24> Hey! Does php5 supports prototypes of the functions?
<21> ||cw: I see PHP:IRC, but don't know if it is good :), you know?
<23> Stormchaser: yes
<21> ||cw: You have sugestions?
<14> chronos: try it
<12> ||cw: will the php4-dbx port work?
<14> pUmkInhEd: no
<20> munti78: I don't know what that is...
<14> pUmkInhEd: php.net/dbx
<23> it's used to create images. eZ publish http://ez.no is demaning it for installation
<20> munti78: Oh, yah. Just install GD
<12> ||cw: ty
<14> munti78: does it mean gd2? there's no such thing as imagegd2
<23> I did go into php.ini and removed the ";" before the gd extension
<23> restarted apache but nothing happend
<12> ||cw: looks like its necc to recompile php5 w --with-dbx as a configure arg?
<20> ||beta: actually -- there is :)
<14> pUmkInhEd: no, read
<14> pUmkInhEd: is it 5.0 or 5.1?
<20> s/||beta/||cw
<23> cw: is's something: http://lv2.php.net/imagegd2
<23> i guess it's gd2 also
<20> munti78: I repeat: install GD.


Name:

Comments:

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






Return to #php
or
Go to some related logs:

python startswitch
#centos
etc/hotplug + pcspkr
where postfixadmin
joss193
run eternal lands kubuntu
uf8 latin1
gentoo kwlan portage
gnome xinit.rc gentoo
ubuntu allocate more swap



Home  |  disclaimer  |  contact  |  submit quotes