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



Comments:

<0> strav : that not vim
<1> stands for graphical vim, http://www.vim.org/download.php
<2> Ahroun- Oh.. So you do $s .= " AND bob_id=$whatever";
<2> Ahroun- And multi-line it that way? by appending the string?
<0> i meant thats not vim
<1> oh. Dunno. There should be one.
<3> No, the string is all multiline. Pastebin'ing, gimme a moment.
<3> Enox93: http://php.pastebin.com/642112
<3> then later I do $res = mysql_query($conn, QUERY_01_02);
<1> about mime 1.0 and gmail? ... I just generated two email and surprises me that squirrel mail dosen't show mime "warning" message while gmail does...
<2> Ahroun- Hm.. Neat.
<3> Though I really must find a better way to do my indenting. That half-indent I use for my operators is annoying.
<3> Enox93: that particular query used to reside directly in the mysql_query command, before I migrated all my pre-created queries to a single include file.
<3> Enox93: In all its multi-line glory.
<2> Ahroun- I like mine better ;)
<3> Enox93: *g* Hey, just showing you other ideas. Like I said, every time someone's mentioned <<< >>>, it's been because it's given them weird white-space errors. ;)



<4> i wonder why all the if (!$whatever) doesn't work on my windows latest php
<4> and it works on my freebsd latest php
<4> if ($hello)
<2> Ahroun- http://pastebin.com/642123
<4> etc.
<2> Ahroun- You have to be very careful you don't put anything after the EOD;
<2> Ahroun- The queries are quite a bit more complex than the example, of course.
<4> if then else works different on windows
<4> you cant specify if elseif
<3> Enox93: I've noticed. :) But still, by doing it as a multi-line string, if I forget to terminate somehting, it's REAL easy to track down, as opposed to one single little bitty byte of whitespace.
<4> it just includes everything
<2> Ahroun- Agreed. PHP really should improve it's error reporting in that respect.
<3> Enox93: *smiles* It's so pleasant to be able to calmly discuss the pros and cons of different approaches without things devolving into a flame war or a programmer jihad. :)
<5> could somone explain this 'If you do turn on session.auto_start then you cannot put objects into your sessions since the cl*** definition has to be loaded before starting the session in order to recreate the objects in your session.'
<2> Ahroun- Yep. It's just perference.
<5> do I have to use session_start() on every page then just to store some session variables?
<6> hello
<2> Ahroun- And you showed me syntax I'd never seen before. :)
<6> is there any way to redirect a path with apache or symlink that dirname(__FILE__) won't get the real path but the redirected one?
<2> Ahroun- Where are you from?
<7> hello is it possible to write a cookie for a third party site. ie. I have a site www.customers-site.com and www.our-app.com from www.our-app.com I want to write a cookie that can be read by www.customers-site.com. Is this possible or will the browsers reject it?
<8> wabi; You mean $_SERVER['REQUEST_URI'] ?
<3> Enox93: Well it's the only right way to do it! Anyone who does it differently has no business programming in PHP. DIE! **whistles innocently** Me? Arkansas.
<2> Roman- Put the cookie ***ignment in an image sourced from a common site.
<2> Roman- Well.. That isn't perfect.. BUt it might do what you want if you add some other fancyness.
<7> Enox93: ok, but is it possible to do what I asked?
<9> sky: to exand on that... when an object is stored in a session, it is restored as soon as the session is started. with auto_start it's as if you put session_start() as the first line of all your pages, and so any objects may not have the cl*** files included when the sessions starts and so the cl*** cannot be restored because object won't exsist
<6> how to rewrite or symlink a path so that dirname(__FILE__) will not get the actual path but the one before redirection?
<5> are variables considered cl***es?
<2> roman- So you have b.com and a.com.. You want a cookie ***igned by a visit from b.com to be readable by a.com ?
<9> sky: no. a cl*** is a cl***
<7> Enox93: that is correct
<5> ok
<5> why would you put a cl*** in a session?
<5> (an exmaple?)
<9> sky: persistance
<2> roman- As long as you don't need the cookie to be usable by b.com.. You can source an image from a.com on the b.com site
<9> like if you made a shopping cart cl***
<2> roman- And then read & use that cookie when they visit a.com
<8> wabi; __FILE__ returns the absolute path to the file that is being evaluated by the C core
<2> roman- That is somewhat limited.. But it popped into my mind.
<9> instead of the cl*** storing data in the sesison, you just store the whole shopping cart in the session
<6> sean: is there no way to do this?
<7> Enox93: why do I need to use images, can't I just generate a cookie and set the domain to be the other site?
<2> roman- No.
<10> how would I retrieve the name of a file minux the extension, and account for extra periods in the filename, e.g., audio.cl***.php?
<10> *minus
<2> roman- Cookies are designed to prevent that. It's a privacy problem.
<9> wabi: so you want the path of the symlink?
<6> yes
<9> ^Migs^: pathinfo()
<6> best would be if I could somehow link the file that it does get the correct path
<9> wabi: the symlink isn't what's being parsed. a hardlink should do keep the path you want though
<11> do you know a good script for video chat written in php ? :)
<7> Enox93: What I need to do is when a customer logs in to our system. It generates a cookie which lets our system know who the user is. But it also needs to have a mechanism for some low security static pages that live on the other domain. These can just have some javaascript that checks for a cookie and either redirects to the login page or displays the page.
<10> it would need a string function of some sort, though
<6> ok I'll try hardlinks
<10> pathinfo() alone won't cut it
<6> but that's impossible for directories
<9> datamine: video and chat are seperate things, combining them in frames is trivial though
<2> roman- Are they linking to the other domain via your domain?



<9> ^Migs^: strrpos?
<2> roman- If so then p*** a parameter that says it's ok
<9> Enox93: it's not up to js or php, it's the browser blocking it.
<7> Enox93: I can't do that, some of the pages link down to other pages that need protecting.
<10> oh that's it, okay
<7> Enox93: thanks for the info anyway, I have an alternative method, just would have been easiest if I could use the -domain attribute of the cookie to write a cookie for the other domain
<12> what is the 'or' statement in PHP? Like and is '&' or '||'. I can't seem to find it on php.net
<12> well when searching
<12> '<>'?
<3> grogoreo: & is a bitwise operator, && is boolean. Do you want the bitwise or boolean?
<12> bitwise
<3> then just |
<12> right then, thank you
<13> what's the difference between a boolean and bitwise operator?
<9> 'or' also works
<12> oh right! Makes sense!
<3> Shariff: boolean does logic, bitwise does math. (over simplification here... I know.)
<9> boolean can only result in true or false
<13> Ah.. and bitwise doesn't necessarily have to be 1 bit?
<3> $x && $y tells you if $x and $y evaluate both to be true. $x & $y bitwise 'ands' the two values together and gives you another value.
<13> for instance 100100 & 010101 ... ?
<14> hiya..
<3> *nods to Shariff*
<13> Ah thanks!
<9> bitwise are for working with bitmasks
<3> 100100 & 010101 = 000100. Whereas 100100 && 010101 = TRUE.
<9> generaly
<12> can | be used in an 'and or' situation. like if (isset ($var1 &| $var2)
<15> no
<3> gro: No, not like that.
<16> i'm getting a warning imagejpeg(): open_basedir restriction in effect. but in the manual it doesn't say that imagejpeg() is restricted in safe mode.. any ideas ?
<3> gro: if( isset($var1) || isset($var2) )
<12> ah right, thanks again
<14> my website is getting really big and complex - im wondering if theres any software available that lets me map functions across files? like, a flowchart thing that lists files and what functions are in them and what they're linked to?
<9> lugzer: open_basedir restricts /everything/
<16> ||cw, does that mean i won't be able to use imagejpeg() to create thumbs of images for example ?
<9> lugzer: if they are outside the open_basedir path, that's correct
<17> I'm getting "not found" errors in my http-error log when I run an exec on a file that does exist and has full permissions. Any ideas?
<9> masonf_: i dont' see why apache would be logging exec() errors
<18> i'm running php-cgi with lighttpd. my problem is that lighttpd spawns a few php processes on startup, and those cling to the terminal - i.e., i cannot log out of the terminal i started lighttpd from. does anyone know this?
<16> ||cw, one more q.. if my allowed path is /home/public_html/, will /home/public_html/test/ be allowed for open_basedir ? seems here that it's not
<9> i would think it would, but I don't use it
<16> okay.. cause it is not.. and i;m not sure if it's the way it shoudl be.. the hosting i test it on is very restrictive, no .htaccess no phpinfo().. nothign
<12> I'm trying to have my navigation elements change their background colour if their page is being visited. I'm using this code, http://pastebin.com/642178 (HTML), which works for http://pastebin.com/642181 (HTML). The problem is, if the $page variable isn't set with just having index.php, the news page that is showed first when the site loads, isn't highlighted. I'm using a CMS called CMS Made Simple and am asking in their IRC too but I can't think of h
<12> ow I can put in the part for my home page.
<12> (sorry that's quite a lot there)
<11> ||cw so do you know a good video script written in PHP i've browsed around and i didn't find anything useful
<11> :)
<9> datamine: "video script" is pretty vauge. best php could do though as a way to choos e a strean and point a <embed> at t or something
<16> ok thanks ||cw
<11> ||cw, excuse me, i didn't explained it well
<11> i am looking for a script that can handle webcam signal
<11> and i think i need two sides server and user side
<9> datamine: then you need a video chat server, you can't do that with a web server
<11> ||cw usually java or cpp right?
<9> probably
<11> thank you :)
<9> and probably big money
<11> huge :)
<19> hi, i have a problem about a special chars ' ' , i can not send forms include ' '
<19> how can i solve this problem
<20> ALORA: You will ned to use addslashes
<20> ALORA: Sec..
<20> ALORA: http://dk2.php.net/manual/en/function.addslashes.php
<20> ALORA: See also http://dk2.php.net/manual/en/function.stripslashes.php
<20> ALORA: I guess it's a SQL problem, right?
<19> i use addslashes
<19> i cant paste this char here
<19> it's kind of '
<21> ?
<20> Ah, it's a form issue, not a PHP issue?
<19> yes
<20> Kind of but not equal to - ok..
<19> i tried addslashes, htmlspecialchars


Name:

Comments:

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






Return to #php
or
Go to some related logs:

#php
fstab manager
Xubuntu inittab
#css
#ubuntu
acerhk rpm fc5
#perl
#fedora
udevd hung
#ubuntu



Home  |  disclaimer  |  contact  |  submit quotes