| |
| |
| |
|
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
Comments:
<0> because the page just sits there and gives me no output, so it's difficult to debug it <1> ndee; flush ()l <0> sean`: thx, gonna try that <0> sean`: is there also a way to output the stuff from the php script to stderr or something? <2> Hi guys. As we run many sites, I have code in my header.php which will change any url which doesn't have 'www' in it to that, along with the file they requested. This is via: if (strpos ($_SERVER['HTTP_HOST'], 'www.') !== 0) { header ('Location: http://www.url.com' . $_SERVER['REQUEST_URI']); exit(); }; <2> This works perfectly, however we want to do the opposite now - and remove the www. How can I do that ? <2> !strpos? <1> !== false) <3> why not do it in apache transparently <1> if (strpos ($_SERVER['HTTP_HOST'], 'www.') !== false) { header ('Location: http://url.com' . $_SERVER['REQUEST_URI']); exit(); }; <2> thanks <2> Cheez, we run Zeus and we have lots of sub-sites, so it's a bit more awkward - that method works great :) <3> erm, in zeus its even easier <3> its like 3 lines to apply it to all domains <2> yes, but we don't want it on all domains - just this 1 :)
<3> well, just do it for the one domain then <0> sean`: also no output with the flush method being called. I have SO no clue how I shall debug that stupid script. <3> i really dont see the issue <3> but, if thats your choice, so be it :p <1> ndee; Are you sure therer is output, and do you know how to use the flush function? <0> sean`: http://pastebin.com/651061 <-- that's the script <2> Cheez, I'll take a look into it - thanks <2> I didn't realise you could do it per site <0> sean`: flush is on line 68. <0> all I want from that script is an error message or something but it's playing hard-to-get. <1> http://iscene.nl/foo.php <1> ndee; take a look at that url <1> if ($file != "index.php" && $file != "showpic.php" && $file != "localconf.php" && $file != "localconf.php~" && !is_link($file)) {, create an array and use in_array ('foo', $arr) <1> ndee; Try using: flush (); var_dump ... flush (); <1> or use exit.. <0> sean`: ok. gonna try something <4> Is there a way to refer to a inherited overloaded object functions? <5> super-> <4> thx, thought it was something like that :) <0> sean`: I cannot put is_link in the array, correct? <4> no leading $ in super->? <6> Mitja, which emacs mode for php do you use? <1> ndee; You can.. <7> enot, php-mode. What makes you think I'm using Emacs? :) <0> sean`: http://pastebin.com/651068 <-- like that? <6> Mitja, that one by Fred Yankowski? <7> enot, don't know <7> enot, you want me to check? <1> ndee; Why would you use is_linnk btw.. <6> that would be nice Mitja ;) <7> enot, Turadg Aleahmad <0> sean`: so that it doesn't follow the symlinks but I can leave that out anyway. <0> Warning: in_array(): Wrong datatype for second argument in /www/kawasaki.ch/typo3conf/ext/ed_lpesync/res/cl***.ftp.php on line 65 <8> hi all <0> ah sorry, typo <9> do you know a function in php/gd that adds some transparency ? <6> Mitja, thanks, gonna try that one <8> what's te difference between fopen(...); and @fopen(...); <8> ? <10> enzo: Go read the docs.. go on.. off you go :) <10> ~+@ <10> Bah, so many bots with differnt syntaxes. <8> hehe <9> i've been doing that for 2 days on gd FauxFaux <10> php-bot: tell beatdown about @ <10> Gaah. <4> candyProgrammer: Doesnt work :S <8> hehehe <8> then the bot, knows the answer... <8> ok <8> thanks <11> i'm looping through an array with foreach .. how can i find the current place i am? <11> what item number of the array i'm at <10> automagically: foreach ($array as $index => $value); <5> how can i use a metropolis hastings algorithm for a levelset-alignment using distancemaps to find the global energyminimum? <10> ... <11> so if i have 20 things it my array, $value will == 0,1,2,3,4, ..? <5> :P <5> haha <10> automagically: Atm you have foreach ($array as $value), right? Adding the "$index =>" bit will mean that the $index variable will be avaliable inside the loop and, coincedenitally, be ***igned to the value of the index of the current element of the array.
<0> sean`: that still takes longer than 4 minutes -> same error happens again <1> ndee; How sure are you that the script even gets to the var_dump? <11> ok i'll try that. i'm looping through an array, need to know the first and last thing in the array, so I can give them a CSS cl*** <0> sean`: I tried it with: if (in_array($file, $excludes)) { and it gave me all the file names that were in the array, I check the xferlog(ftp log) and see some activity <0> it's executed like this: It's a form and when I press the "Synchronize now" button, it starts loading and just never advances. <1> ndee; Try exiting the script ondifferent places with different text <1> See where it stops.. <0> ok <1> debugging man <0> it's just stupid because it's a recursive function and ah, just a PITA <12> i need a web designer/php coder any one interested in free lancing ? <5> How do i make nested groups in PEAR html_quickform? <8> bye all <13> Any body heard of these webhosts ? Dedicated-Servers.iWeb.Ca ... ? <14> babo: looks like a scam :} <14> good hosts always have a full domain <15> Drakas: looks like it is possible :D <14> wait let me rephrase <14> :D <14> bad hosts always have a subdomain <14> but bad hosts also have domains ;] <15> i'm having a minor issue with the comments though. the closing '-->' isn't on a new line... yet another special check? <13> They have a good offer though ... $69 /month for Debian dedicated server ... <13> They have their own domain ... they just use a subdomain for their dedicated hosting bit ... <16> Good afternoon guys. <13> Check out redplaid.com's tagline .... Redplaid.com .... we're out of business if our servers get hacked or go down ... well that's nice to know :0 <12> i need a web designer/php coder any one interested in free lancing ? <17> zax1: what ya got <12> some site redesign <17> got the specs? <12> just a sec <12> phone <12> sorry, wanna talk in private ? <12> join zax <18> witch <10> Which witch? <19> hi folks <20> Hi folk <19> how can I prevent PHP (4.1.2) from appending ?PHPSESSID to my <a> tags? I have one server that does this, and Id prefer it to use only cookies if its possible <19> i have another server, which is a newer version of PHP4, running the same website, which doesnt append that onto the links <19> but I cant upgrade it <20> There's a setting in php.ini <21> hi guys, anyone know how to run xWindow program using php via apache? is it possible? <20> Regarding session autostart <19> ive been searching through it, any idea what its called? <19> I do need sessions, just without the ID being put in the URL <15> loply: session.use_trans_sid <19> disabling that option shouldnt cause any problems with regards to the function of sessions should it? <22> Is there a way to create a new text field upon entering another field ? <15> thunder00: yes. via javascript <23> How do MIME types work, do they need file extensions, or not? <22> deadroot: do you have any links? <15> loply: read the php.ini. it's described there. the manual may also have more info <15> thunder00: well, you probably need to know how to manipulate the DOM in the browser, so www.quirksmode.org <24> are there any simple php syntax highlighters? i only need highlighting for java code, really <25> bluefish <24> sorry, i mean like, online <24> like on pastebin.com <26> uhm, if i want to clear out a temp folder every two hours, what would be the easiest method with a crontab? <26> i shouldn't have to use php to clear out the folder right? <27> hi every body <27> i have question about the recent stable source of php <27> can anyone help me <27> hello all <27> sorry i am new to mIRC <27> why i cannot see any talking here <28> just ask your question <27> should i do something <27> i want to know what is the latest stable release pg PHP <27> of PHP <15> shouldn't that be listed at php.net? <27> is 5.1.2 stable and i can use it ?? <15> it is stable for a reason, so that people can use it <27> thank you i just want to be sure of that
Return to
#php or Go to some related
logs:
#css #linux #linux Gnokii itegno #python #lisp no-suexec ubuntu stop x win32-codex #debian
|
|