PHP Coding
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsPHP RelatedPHP Coding

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here!
  #1  
Old September 1st, 2002, 04:26 PM
alsaffar alsaffar is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 58 alsaffar User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
Configure php.ini via .htaccess file?

Hi guys,

How can I configure php.ini file via .htaccess file?

It seems that session.use_trans_sid is disabled with me, so my WebHost told that I have to reconfigure the php.ini file from .htaccess file that lied in the public_html directory, I tried in so many ways, but everytime it gave "Internal Server Error" when I borwose my script via IE!!!

My scripts to test the SID insertion in the URL if the cookies are disabled failed:

Session1.php:
<?
session_start();
$IPAddress = getenv ("REMOTE_ADDR");
session_register("IPAddress");
echo "My IPAddress is $IPAddress";
?>
<a href="Session2.php?<?=SID?>"> Click here to test session variable</a>

and Session2.php:
<?
session_start();
$IPAddress = $HTTP_SESSION_VARS[IPAddress];
echo "My IPAddress is $IPAddress";
?>

If you set:

IE 6.0.26 -> Tools -> Internet Options -> Privacy -> Advance -> Select Prompt for First-Party Cookies

and Test the first script "Session1.php" you'll be prompt to accept the requested cookie, just block it, and then if you click on the link provided you'll be prompt one more time, just block that cookie, finally, the SID is not sent automaticaly when the cookies are disabled!

Please help me to test these 2 scripts with your server, will you get the same problem that I have? if not, then I have to re-configure the .htaccess file to enable session.use_trans_sid.

I tried to set session.use_trans_sid on by the follwoing command:

php_flag session.use_trans_sid = on

as its mentioned at http://www.faqts.com/knowledge_base...id/13037/fid/51

and I tried to set it like this:

<IfModule mod_php4.c>
php_flag session.use_trans_sid = on
</IfModule>

as its mentioned at http://www.php.net/manual/en/printwn/configuration.php

But none of them worked fine with me? why?

Please anyone can help?

Reply With Quote
  #2  
Old September 1st, 2002, 04:46 PM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
RE: Configure php.ini via .htaccess file?

php_flag session.use_trans_sid 1

try that in the .htaccess file...


Reply With Quote
  #3  
Old September 1st, 2002, 09:03 PM
alsaffar alsaffar is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 58 alsaffar User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
RE: Configure php.ini via .htaccess file?

After configuring the .htaccess file with:

php_flag session.use_trans_sid 1

Now, it stopped giving me the "Internal Server Error" but still its not inserting the SID automaticaly in the URL if the cookies are disabled!!!

What do I have to do? Isn't supposed that the SID should be inserted automaticaly if the cookies are disabled? Because this way, it's not working.

Please HELP.

Reply With Quote
Reply

Viewing: Codewalkers ForumsPHP RelatedPHP Coding > Configure php.ini via .htaccess file?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway