[PHP] Setting Cookies

2002-06-07 Thread Scott 'INtense!' Reismanis

Hey all,
 
I am having some troubles setting cookies at the moment wondering if
anyone knows the solution.
 
Anyhow basically what is happening, is that cookies are been set fine,
however say I try to set two cookies in the one script
 
i.e.
setcookie(username, $HTTP_POST_VARS['username'], time()+31536000);
setcookie(password, $HTTP_POST_VARS['password'], time()+31536000);
 
only the cookie that was called last, i.e. 'password' will be set. I
only started noticing this problem since I installed php4.2 and
apache2.0, is that the cause? Has anyone shared a similar experience,
and if so is there a fix? Thanks for your time as always.
 
Regards,
 
 
   Scott



[PHP] error reporting

2002-06-09 Thread Scott 'INtense!' Reismanis

Hey all,
 
I recently installed Apache2, PHP4.2 on my win2k box as a module. It
works fine however say a script has a syntax error all that happens is a
blank screen is displayed. No errors are shown and thus it is very hard
to debug when I don't know what the error is, and what line it occurs
on. Have I missed some setting when installing apache? I have tried
changing the error reporting levels to no avail. Any more suggestions?
 
Regards, Scott
 



[PHP] Search - 'AND' ... 'OR'

2002-06-15 Thread Scott 'INtense!' Reismanis

Hey all,
 
I am in the middle of writing a script to allow users to search through
news archives on my website. Anyhow I am just wondering which logic you
believe best suits a search.
 
i.e. say a user types in 'games AND playstation' then only results
containing both those words will be returned
by the same token they could type in 'games OR playstation' then results
containing either word will be returned
 
However if a user does not explicity join there search critiera
i.e. 'games playstation' what should I assume?
 
What would you expect? Google for example wacks an 'AND' inbetween which
is wise considering they are searching billions of pages however my site
obviously will only be searching a few hundred so maybe I should assume
an 'OR'?
 
So basically I just am curious to know what you would expect when
entering multiple critera.
 
Regards,
 
 
   Scott
 



[PHP] Smart URLs

2002-06-02 Thread Scott 'INtense!' Reismanis

Hey all,

I was recently trying my luck at dabbling in some mod_rewrite
stuff, and I have run into numerious errors. Basically my aim is to
re-write my sites URLs so instead of being say,
mysite.com/thumbnails?type=funnygallery=4 the URL is neat, similar to
many sites who would have something like mysite.com/thumbnails/funny/4

What ways are there of achieving this (excluding, redirecting the URL
and creating the page say index.htm automatically)? I have tried
mod_rewrite for two days solid to no avail. I am not sure if it is my
poor coding or the fact that I am running apache2 on a Windows platform
which are said not to support such a module well. If any alternatives
could be proposed or even better someone could suggest a mod_rewrite
routine which would transparently transform any url like
mysite.com/whatever/4/6 to mysite.com/whatever.php it would be greatly
appreciated. So far the rewrite you see below will work with
mysite.com/whatever/ however the minute you add something onto the end
i.e. mysite.com/whatever/4/ it will raise the error Premature end of
script headers: php.exe, instead of loading whatever.php as intended.

RewriteEngine On
Options +FollowSymlinks
RewriteBase /
RewriteRule ^/(.+)/(.+) $1.php [L]

Thanks for your time and hopefully someone understands what I am trying
to say :), and as always any suggestions at all would be awesome!

Regards,
 
 
   Scott 'INtense!' Reismanis
   Mod Database System Administrator
   [EMAIL PROTECTED]
   http://www.moddb.com/ - Every Game, Every Mod, One
Site... Go Figure!




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php