@# 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> search engines handle mod_rewrite pages just fine
<0> you make it look like they are static but they are really from a single dynamic page
<1> DogWater: Aha! Then you're just thinking wrong. You only need to make them LOOK like static pages to the search engine.
<2> which means mod_rewrite
<3> http://demo.sugarondemand.com/sugarcrm_os/index.php?action=Login&module=Users - I am looking to have the same look as in tables/mouseovers/all the front end stuff - only change the actually data - What language should I look into to achieve this? - css and javascript? "login first ofcourse"
<4> so just make archive.php?page=1 look like 1.html ?
<1> mod_rewrite can do that, if you have access and want to dink with it. Or you can just ForceType to make your .html page be a PHP page, and then use $_SERVER['PATH_INFO']
<0> DogWater: indeed
<5> Or content negotiation.
<5> mod_rewrite is far from a foregone conclusion, and is quite often overkill.
<0> it is easy enough to get setup and handles it just fine for me
<4> Chillax: do you know of a good resource to read about m_rw?
<1> DogWater: Yes. Though I would make it archive/page=1/whatever.html archive is the actual PHP script.
<6> httpd.apache.org
<6> DogWater: ^



<0> DogWater: there are a plethora of tutorials on doing exactly what you want if you google for it
<0> and for easy reference, i suggest getting the cheatshet from ilovejackdaniels.com
<0> *cheatsheet
<7> hi all! :) need super lightweight forum script, know one?
<3> http://demo.sugarondemand.com/sugarcrm_os/index.php?action=Login&module=Users - I am looking to have the same look as in tables/mouseovers/all the front end stuff - only change the actually data - What language should I look into to achieve this? - css and javascript? "login first ofcourse"
<0> DogWater: http://www.ilovejackdaniels.com/cheat-sheets/mod_rewrite-cheat-sheet/
<8> Anyone recommend a good book on php ?
<0> mikefoo: that looks like the same question you asked not but a few minutes ago
<9> I've installed php (manually) on my Windows 2003 Server
<9> And it seems to be working fine (except for the extensions)
<3> Chillax: sorry.
<9> I've set extension_dir = C:\php\ext (php5)
<9> But phpinfo keeps telling me that it's set to C:\php5
<1> vano512: I don't think "forum" and "super lightweight" go together... They are all pretty bloated... Not to mention insecure. I've been told FUDForum is less insecure than others.
<9> What could be causing this?
<8> Anyone recommend a good book on php ? ;)
<1> birdfish: Where does PHP tell you it's looking for php.ini?
<1> font: http://php.net/books.php
<8> thanks
<10> php bible :)
<7> richardlynch: thanks!
<9> richardlynch: ah. It says in C:\Windows (is there a directive that I need to set in php.ini to configure that as well?)
<0> birdfish: are you modifying the correct php.ini is what he was hinting at
<11> what's the command to dump a stack trace?
<5> http://php.net/debug_backtrace
<1> birdfish: You are kinda stuck with moving your php.ini into C:\Windows, as that was compiled into the PHP binary by whomever compiled it... Apache2 has a directive to alter the php.ini path, but I'm not sure it works on doze.
<11> mattmcc: thx
<9> Chillax: Well, I haven't moved the php.ini from C:\php so I'm not sure why it would be looking for it in C:\Windows
<9> richardlynch: ah. Damn
<1> birdfish: The person who COMPILED the PHP binary chose C:\Windows for you. Bitch at them. :-)
<9> richardlynch: =P
<12> i realise that fsockopen is a RAW socket so its doing the right thing, but is there any easy way to use fsockopen and suppress http header output?
<9> richardlynch: thanks for pointing that out to me though. It would have taken me quite a while to find that :P
<1> johnm1019: while (($line = fgets($socket, 1000000)) != "\n");
<1> Or something close to that.
<13> http://pastebin.com/770590 I've nearly got this I think, can someone tell me what's wrong. There's no errors but it's not redirecting.
<1> age6racer: http://pastebin.com/770598
<13> richardlynch: Thanks for the warning... Any idea why it doesn't redirect?
<14> anyone seen mrturtle ?
<1> age6racer: If mysql-error has no output, then error_log out $row[0] and see what it is, and then tell us if you think it should work.
<13> ok
<15> why do I get this error? PHP Warning: Unknown(): Unable to load dynamic library './extensions/php_gd.dll' - ./extensions/php_gd.dll: cannot open shared object file: No such file or directory in Unknown on line 0
<15> I have gd installed and it works fine, just that keeps erroring?
<1> surfdue: Perhaps you are trying to load both GD2 and GD?...
<15> how would I know
<13> yeah, $row[0] returns the correct result... so why doesnt the page redirect??
<1> surfdue: Or, perhaps your script is doing a dl() for a module already loaded, and using the wrong directory.
<1> age6racer: And what is that correct result?
<15> i think in the extensions dir there is no php_gd.dll
<15> lol
<13> a link. http://www.crevelation.com/features/foo.html
<1> surfdue: Look at your phpinfo() outoutp to find out where php.ini is, then read php.ini for php_gd, then read your scripts.
<1> age6racer: Turn on E_NOTICE in your error_reporting. That will lead you to the problem. :-)
<15> http://host41.com/info.php where is the extensions dir located?
<15> extension=php_gd.dll
<15> it suncomented
<1> surfdue: Read this file: /usr/local/Zend/etc/php.ini
<13> oh, i wasn't using error reporting. I just echo'd the $row[0] to find out its value... I dont know anything about error reporting.
<15> i did
<15> its uncommented
<15> do i need to comment it?



<1> surfdue: Well, I think so. GD is probably compiled into your PHP binary already.
<15> it is
<15> wait thats a windows module
<15> thanks :)
<16> I'm using apache2 and php5, for some reason when I set a session variable on a different page, it doesn't carry through to other pages on my site...
<1> Buchannon: Are you doing session_start() at the top of EVERY page?... You have to.
<16> richardlynch: at every page? AHH that would make sense I guess... why would it need every page?
<1> Buchannon: Well, only on the pages where you want to USE the session data...
<16> richardlynch: well of course, but I thought once the session starts it would work for all your pagse? I guess putting it on each page makes sense..
<16> I'll try that
<1> Buchannon: PHP keeps things flexible and fast by only using session stuff on the pages with session_start() in it is the best way I can explain it.
<16> richardlynch: haha I feel like a fool - I spent all morning messing with that
<16> richardlynch: it's working now, thank you - I upgraded php and apache a couple times and was looking through code to see where I screwed up on /sigh
<1> Buchannon: Only took ME two days to figure it out, oh so long ago.
<1> :-)
<16> hehe
<16> gotta love it I guess
<16> thanks so much for the tip =)
<13> how do I check if my array has any values in it?
<1> age6racer: count($array)
<13> thanks
<17> which language is best (IYO) for developing web apps? PHP, Python, PERL, ASP, Ruby, other
<1> ChrisC35: The one you know best is the best. :-)
<16> richardlynch: argh it's still not working... I have session_start() every page I want to use it but something is still fishy - it's better though!
<1> Buchannon: You'll have to define "fishy" better to get any help... :-)
<16> richardlynch: heh I know, I'm still playing around with some stuff - I'll try and figure it out
<18> can I remove the "powered by" line in a script licensed under GPL?
<16> richardlynch: it's still not changing the session variable for other pages... like I have a page that you must have $_SESSION['login'] = 1 to see, if they are logged in I have a link to another page to log out that makes the variable 0, then if I go back to the page it still says it's 1
<19> yes, you can do anything you want to it
<5> The GPL does not protect "powered by" content.
<5> Further, the GPL doesn't apply to how you _use_ a product, only how you distribute it.
<1> Buchannon: pastebin your two pages of code for login/logout.
<17> that would be php
<16> richardlynch: hm.. weird - I had been editing the session variable to 0, then the next line redirecting with header(), I removed the header and it's acting how I want it do
<16> richardlynch: *how I want it to
<16> richardlynch: do you have to have pauses before redirects or something?
<1> Buchannon: Because of the way session headers and Location headers work, you CANNOT do that reliably. The browser gets the cookie/location headers, and acts on them IN THE ORDER IT CHOOSES.
<1> Stop using header("Location:") as a programming construct, and start using include to **** in the different PHP you want instead.
<16> richardlynch: ah wtf, why wouldn't it do it line by line? so what do I need to do?
<13> richardlynch: thanks for the help this eve. i've done what i needed to do, everything works great.
<4> anyone know whats wrong with my concat here? "".$i.".html
<4> err its \"".$i.".html
<16> richardlynch: I'm using includes already... so I shouldn't even be linking to different pages? I'm confused...
<1> DogWater, show us the whole line -- You are missing quotes in both you've posted.
<1> Buchannon: Don't do the redirect with header(). Use an include to **** in the page you want them to redirect to.
<16> richardlynch: I guess I still dont understand, sorry... how would an include redirect someone?
<4> echo "<a href=\"archive\"".$i.".html\">$i</a>";
<1> Buchannon: Unless you are redirecting them to somebody else's with (which seems unlikely with a login) then include 'welcome.htm' is the same as Location: welcome.htm.
<19> echo "<a href='archive{$i}.html'>{$i}</a>"; is much prettier, imho :)
<1> Except it's faster, and uses up less HTTP connections, and doesn't abuse their browser and bandwidth as much...
<4> well, archive is a directory.. mcfly :D
<4> so its supposed to be archive\1.html
<16> richardlynch: weird... I guess that makes sense, but it wouldn't work with an 'include.php' file would it? wouldn't that just add it to the current page rather than redirecting?
<19> then you're missing that in your line
<19> echo "<a href='archive/{$i}.html'>{$i}</a>";
<1> Buchannon: Yes -- but then whatever you are doing with header("Location") should be at the tippy-top of your script, with nothing output yet anyway... So what's in your page so far? Nothing.
<16> richardlynch: I still dont really understand but I'll play around with it some and see if I can get what you are talking about
<16> richardlynch: ahh ok - I got it - duh... I'm sorry for being so stupid
<1> Buchannon: Not stupid. Just wrapping the brain around a new and novel concept. :-0
<16> richardlynch: I <3, thanks for all the help - that is really weird how headders mess everything up
<17> washing machine....
<16> richardlynch: is there a right time to use headders then?
<5> Sure. Before you send output.
<1> Buchannon: Headers, sure. Header("Location:")... almost never, in my opinion.
<16> richardlynch: ah ok, that is interesting to just use include - I guess that works though heh
<16> richardlynch: argh... ok now I have two links on seperate pages that point to my logout script - one works and actually changes the session variable to '0' the other doesn't work, even though they are both pointing to the same script... that doesn't make sense
<5> richardlynch: Not a fan of redirecting a user after a post?
<1> mattmcc: Since it can be screwed up by using back/forward buttons fast enough, no, I'm not a fan of that at all.
<5> Hrm. Can it?
<5> In my experience, since the response to the post has no content, it never enters the browser history.
<1> mattmcc: Well, as of the time *I* tested it back when... You had to catch it at the point where the browser had gotten the Location: header, but hadn't acted on it...
<1> I think.
<1> All I know is, it generates and extra HTTP exchange, and chews up precious HTTP connections. I'd much rather just manage the data than rely on Location hack.
<16> richardlynch: it's still saying the same $_SESSION['variable'] is different for different pages even though I have session_start() on my pages


Name:

Comments:

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






Return to #php
or
Go to some related logs:

dhcp on ubuntu
#linux
colinux xserver-xorg
#web
access loop0p1
#math
#perl
#perl
+kubuntu nautilus-open-terminal
#physics



Home  |  disclaimer  |  contact  |  submit quotes