|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here! |
|
#1
|
|||
|
|||
|
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? |
|
#2
|
|||
|
|||
|
RE: Configure php.ini via .htaccess file?
php_flag session.use_trans_sid 1
try that in the .htaccess file... |
|
#3
|
|||
|
|||
|
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. |
![]() |
| Viewing: Codewalkers Forums > PHP Related > PHP Coding > Configure php.ini via .htaccess file? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|