@# 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 34 35 36



Comments:

<0> I'm using "meta-names" there. They won't be called that precisely.
<1> apache2.conf on apache2.
<2> Aap, here you go http://pastebin.com/593505
<0> iPod-nano: Being neither a user of apache2 nor of Windows, I can't say for sure. My recommendation would be to listen to these other fine folks.
<0> iPod-nano: On the other hand, if it were I, I'd probably just "grep -ri errordocument /path/to/apache"
<3> LOL
<0> If you don't have grep installed on your windows box, it's available at unxutils.sf.net
<3> I'm on a Mac right now.
<4> thx man
<0> iPod-nano: You'd run the grep command on the windows machine, not your local machine
<3> Yes I know.
<4> okay but why the GLOBALS and reference??
<3> freeone3000: Are you sure it's not httpd.conf?
<0> iPod-nano: You've been given a number of methods to try and find the ErrorDocument line. Let me know when you've discovered where apache is logging errors.
<1> iPod-nano: Only if you're using apache1 instead of 2.
<2> because GLOBALS makes it available everywhere (no variable scope)



<1> iPod-nano: On apache2, httpd.conf is normally an empty file.
<2> and reference, because i want to work on that object and *NOT* on a copy
<0> freeone3000: Might that be distro-specific?
<4> yes but i'm always learned not to use globals
<3> I'm in the conf directory, it's the only .conf file I see.
<0> Just guessing
<5> freeone3000- since when?
<3> httpd.conf that is.
<5> I've never seen any version of Apache use anything other than httpd.conf
<1> TML: ...Might be.
<0> iPod-nano: Does it contain an ErrorDocument line?
<0> Dragnslcr: Well, on debian, it's apache2.conf, IIRC
<0> Dragnslcr: I imagine other distros have followed suit
<5> Then the Debian package is screwed up
<2> Aap, $GLOBALS if used alot to store your db connection. is it good practice... not really but alot of developers use it.
<1> It is screwed up. However, it works.
<3> It has ErrorDocument lines, but they're all commented.
<5> vinadelmar- $GLOBALS is never good practice
<4> yes, thx for the code, but i'm not sure if i'll use it
<2> Dragnslcr, didn't i say that 07s ago ?
<0> Do you have any other files under the apache root, such as a virtual host conf file?
<5> vinadelmar- thought you were asking if it is
<5> Sorry. I'll go learn to read now
<6> What's the easiest way to strip /foo/bar.php/baz down to /baz without requiring hard-coding of the script name?
<0> Dragnslcr: That's certainly one opinion. Personally, I think the apache 1.3.x packages on debian are the most beautifully constructed way to do conffiles that I've ever seen.
<7> deltarion, preg_*
<0> deitarion: php.net/basename
<2> drink your milk kid :)
<5> TML- dunno, but Apache 2.2 has yet another new way to do it
<8> iPod-nano: are you in /etc/apache2/?
<6> TML: That wouldn't work with /foo/bar.php/baz/foo --> /baz/foo
<0> Dragnslcr: I'll have to take your word for that, as I'm still on 1.3.26
<5> Now it has a directory called conf/extras/ with a bunch of different files for each "section"
<4> so Dragonslcr, you have a better method to call the getInstance() in another method?
<2> Aap, there is no 36 other ways to implements a getInstance() method ;)
<0> deitarion: I'm afraid I don't understand
<3> No such directory on Windows, rares000.
<4> yes
<5> Aap- is getInstance static?
<4> yes
<6> TML: basename would turn /foo/bar.php/baz/foo into /foo, not /baz/foo
<2> Dragnslcr, here is my way http://pastebin.com/593505
<5> And you want to call it from some non-static method of the same cl***?
<2> that is impossible
<0> deitarion: Indeed it would. However, that was not your question.
<6> TML: It was what I intended my question to be.
<5> vinadelmar- no offense, but that code is really fugly
<4> call it from a non static method of another cl***
<9> fugly needs no qualifier
<5> Aap- MyCl***::StaticMethod()
<0> deitarion: Are you trying to do "pretty URLs"?
<2> Dragnslcr, no offense taken but explain
<5> vinadelmar- for one, you don't need the &
<6> TML: Partly.
<2> i need it
<5> In PHP5, objects are always p***ed and returned by reference
<0> deitarion: And the other part?
<5> Two, $GLOBALS is always a bad idea
<2> and i work w/ php4
<5> The correct way to do a singleton is with a static property
<4> let me explain my problem better: if i call the static method (getInstance) out of another cl*** with Site::getInstance() , then calls the getInstance the constructor. (well, he can, but ONLY if no instance is created yet)



<2> global vars must be used sparingly that's all
<6> TML: The use of mod_rewrite in this situation is not preferred.
<0> deitarion: I wouldn't have ever suggested mod_rewrite
<0> deitarion: So, what's the other part?
<4> i did everything i have to and it doesnt work
<10> goddamn singleton pattern. it seduced me, chewed me up and spat me out. i was a fool.
<11> TML the problem was open:basedr, adding open_basedir :/tmp fix the problem :)
<4> Xyphoid; you got the answer?
<2> Dragnslcr, i would be curious to see your implementation
<4> yes me too
<2> Aap, just face the truth
<6> TML: The URL structure has to be www.site.com/templater.php/category/subcategory/page?option1=whatever
<2> it is out there...
<10> i missed the question
<5> vinadelmar- http://pastebin.com/593530
<5> There ya go
<2> Dragnslcr, before i look at it
<2> it's fugly
<5> No guarantees it's perfect, but you get the idea
<2> oh man, that aweful
<2> ok, let's see the code
<4> is that the right one Dragnslcr?
<12> i always forget how big this room is
<5> Aap- should be
<12> anyone have any recommendations on an html markup language/parser?
<4> protected??
<12> wiki markup would be cool
<12> i just need something
<6> Mrdini: Yes, but is there an easier way than using preg_split( basename($_SERVER['SCRIPT_FILENAME']), $_SERVER['PHP_SELF']) and then taking the second item in the resulting list?
<5> Aap- or private, depending on if you need it in any subcl***es
<13> Shadowhand -- Markdown is a good choice.
<4> subcl***es like in inheritance?
<2> well ok, i see the picture
<5> Aap- yup
<12> laspb12, is there a php parser for it?
<12> O.o
<13> Yes.
<12> ed
<13> It's a nice function.
<13> Hold on, I'll get the url
<12> ok, i'll go check it out
<13> http://daringfireball.net/projects/markdown/
<2> unfortunately, my Site clas has no child
<4> okok but Dragn, why INIT in stead of COnstructor?
<4> because the constructor is called anyways (in each case ) ?
<14> http://pastebin.com/593505
<14> Whoever did this
<0> deitarion: Yes, there is. Use MultiViews and PATH_INFO.
<14> ...thanks, you've made my day.
<4> don't use it Shadda
<0> deitarion: Although I'm a bit confused as to why you're using a '?' inside a munged query string.
<4> that's the discussion
<2> hehe i saved his day :)
<4> lol
<4> okay then
<4> leave it that way then
<2> Aap, c'mon. that code is okay
<0> !+singleton
<5> Aap- because you don't want to ever construct more than one instance of the cl***
<15> If you're using PHP5, see http://www.sitepoint.com/article/1192/9. Otherwise, try http://www.phppatterns.com/docs/design/singleton_pattern
<4> so that's it Dragn???
<5> Well, you have to supply the code in the Init method
<0> vinadelmar: It's not horrible, but it does mis-use references.
<4> man , i'm used to programm in Java/C++ and I just think that PHP forces OOP a bit too much
<5> And I usually use a name shorter than getInstance, but that's just because I'm lazy
<2> TML, not really
<0> vinadelmar: Really.
<0> vinadelmar: You need to "return &"
<2> consider that i work w/ php4
<6> TML: The semantic meaning. ? is for options while paths beyond the PHP script are what the browser thinks they are, paths.
<5> Aap- well, PHP's OO is kind of a hacked-in afterthought
<0> vinadelmar: I am considering it.
<0> vinadelmar: Otherwise I would have said you're misusing :: as well


Name:

Comments:

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






Return to #php
or
Go to some related logs:

ubuntu gcompmgr package
ubuntu install pcf
sometimes-rpc5
#lisp
#perl
#python
python check version module how to __version__
wrieress
#linux
SequenceModelNode



Home  |  disclaimer  |  contact  |  submit quotes