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



Comments:

<0> the distinct lack of anything "php" related there was a big clue
<1> http://pastehere.com/?usjxrc
<1> ScriptAlias, AddType, Action
<1> thats all we do to configure apache to work with php as cgi right?
<2> so, was there a reason you are using CGI?
<2> or is it just for the ****s and giggles of it?
<1> the reason is irrelevant here spox, help me if you can otherwise thanks for your valuable input
<2> lol
<1> so what do you think Two-Bits
<0> is php installed to c:/php/ ?
<1> yes
<1> c:\php\php-cgi.exe is where the cgi binary is located
<1> i still dont get the reason behind forward slashes though
<0> i suppose you'd need to escape backslashes
<1> do you guys have any channel in mind that would specifically address issues like that?
<1> Two-Bits they are not escaped anywhere else in the httpd.conf file



<1> for the document root for example
<0> sounds like the problem might be elsewhere in your config
<1> which has been put there by the installer of apache itself
<0> well try backslashes then
<2> what does your error log say when you access a page?
<1> spox http://202.134.132.57:8080/
<2> yeah
<1> oh lemme check
<1> there are plenty of files in the error folder
<1> which one should i be looking at?
<0> oddly enough it sounds like the scriptalias isn't resolving
<1> ok sorry i got the error log
<0> i'd look at one of the newer ones
<1> [Wed Aug 02 00:03:07 2006] [error] [client 206.163.1.60] client denied by server configuration: C:/PHP/php-cgi.exe
<1> this is what error log says
<1> according to the error log it appears that the alias is resolving fine
<0> indeed
<0> did you try the backslashes?
<0> for ****s n giggles
<2> forward slashes are good
<0> spox: for fat32?
<2> do you have a <Directory "C:/php"> set up?
<0> i dont know at what level that's resolved
<3> is there a php function which exists to (somewhat completely) properly uppercase names, e.g. DeMarco instead Demarco, LaBumba instead of Labumba, etc.?
<1> spox http://pastehere.com/?bnjvpg check this out
<2> no
<4> robert_: there's no way to know exactly how things should be capitalized
<1> Two-Bits lemme try forward slashes, though it has been written explicitly in the docs and the httpd.conf file itself that DO NOT USE / slash use \
<3> ah well
<3> that's why you have regular expressions inside database servers, I guess
<3> heh
<0> if it says not to, then dont
<1> alright
<0> did you look into spox's question about a <Directory "C:/php"> ?
<2> B|ackBox: paste your entire conf file
<2> lets have a look at the whole thing
<1> Two-Bits i showed him all the directory tags i have in my conf file
<2> well, looking at what you have already pasted
<2> have you added a handler?
<2> AddHandler cgi-script .cgi .php .php5
<1> on i havent
<1> i read that handler only need to be added if it is configred as a module
<1> here is the entire httpd.conf http://pastehere.com/?qeewam
<2> add that to your conf, then restart apache
<2> see if you still get the error after that
<0> wtf
<1> spox i added that line and now the error has changed
<1> You don't have permission to access /index.php on this server.
<0> you're loading .so modules on winxp?
<1> i'm not doing anything in that .so part that was done by the installer
<0> DocumentRoot "C:/Program Files/Apache2.2/htdocs"
<0> did you manually set this?
<0> blah, nm. i'm just going to stay out of it
<2> in your <Directory /> you are denying all
<2> so everything is forbidden
<1> Two-Bits nop i didnt it was done by the installer
<1> spox that was added by the installer and the reason it says it has it there for is to stop hackers from browsing the entire file system
<0> B|ackBox: that's fine, but you have to re-allow access to every resource you DO want apache to access then
<1> i just commented the thing and restareted the server but didnt help
<1> so thats not cuasing the probem either
<2> okay, so your index.php is in your htdocs folder correct?



<2> in the <Directory "C:/Program Files/Apache2.2/htdocs"> there is the line: Options Indexes FollowSymLinks -> add ExecCGI to that line
<1> correct
<1> ok
<1> http://202.134.132.57:8080/ check out the error now
<1> Options Indexes FollowSymLinks ExecCGI
<1> this is what i did
<2> any more info in the error logs?
<2> also, what is in your index.php?
<1> lemme check the error log
<1> [Wed Aug 02 00:22:21 2006] [error] [client 70.34.147.76] C:/Program Files/Apache2.2/htdocs/index.php is not executable; ensure interpreted scripts have "#!" first line
<2> do you have a #!C:/php/php-cgi.exe at the top?
<1> at the top of what?
<2> your index.php
<2> it should look like:
<1> <?="Hello, World!"?>
<1> this is my index.php
<2> #!C:/php/php-cgi.exe
<2> <?php
<2> echo 'hi';
<2> ?>
<1> i've never added #!C:/php/php-cgi.exe kind of thing in my php file ever before
<2> minus your text in there
<2> yeah
<2> that's because you are trying to use CGI
<0> hold on guys
<2> which no one is sure why
<2> add that to the top of your script
<0> he shouldn't need a shebang line if he's already mapping the exe to the ext
<0> generically telling it to execute scripts using the shebang is not how you typically set up php to work with cgi anyway
<0> from what i can tell apache was simply locked down too tight and need to allow access to the php dir
<1> Two-Bits wants to say something
<1> oh sorry i was scroleld up i didnt know Two-Bits already said something
<3> :P
<2> " C:/Program Files/Apache2.2/htdocs/index.php is not executable; ensure interpreted scripts have "#!" first line"
<1> i added that to m yscript spox didnt really help
<2> same error?
<1> yeah
<0> B|ackBox: it would have to be #!c:/php/php-cgi.exe if anything
<0> but i digress
<5> question for ya..
<5> is there an easy way to get yesterdays date?
<2> @php echo date('r', strtotime('yesterday'));
<6> Result: Mon, 31 Jul 2006 00:00:00 -0700
<0> spiffy, no?
<1> Two-Bits i tried that too
<2> you could also just subtract 86400 from the current time() which is much faster
<1> didnt help
<2> @php echo date('r', time() - 86400);
<6> Result: Mon, 31 Jul 2006 12:32:09 -0700
<0> B|ackBox: revert to what you were using before we started all this mess
<5> what about like
<5> @php echo date('mdy', time() - 86400);
<0> @php echo date('r', strtotime('-1 day'));
<6> Result: Mon, 31 Jul 2006 12:32:45 -0700
<0> "yesterday" will drop the time part as you noticed
<5> i just want
<5> 073106
<2> @php echo date('mdy', time() - 86400);
<6> Result: 073106
<5> perfect
<5> thanks!
<2> again, using subtraction is faster
<5> works for me my friends
<5> TB doenst matter.. stored in a db just to see when it was added
<0> ymd allows ascii sorting to maintain date order
<0> oh.. then dont store a string at all
<5> meh
<5> lol
<0> store the unix timestamp
<5> ?
<2> @php echo time();
<6> Result: 1154460866
<2> store that


Name:

Comments:

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






Return to #php
or
Go to some related logs:

#india
codeignitor mvc
#india
#chat-world
#chat-world
#chat-world
#kl
#linux
balga
#allnitecafe



Home  |  disclaimer  |  contact  |  submit quotes