Koozali.org: home of the SME Server

individual php.ini for ibay

Offline AlexG

  • ****
  • 110
  • +0/-0
individual php.ini for ibay
« on: October 30, 2007, 03:52:34 AM »
Hi

Is it possible to write an individual php.ini for a special ibay? If yes - is there a how to?

Best regards
AlesG

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: individual php.ini for ibay
« Reply #1 on: October 30, 2007, 09:41:54 AM »
Hi

Is it possible to write an individual php.ini for a special ibay? If yes - is there a how to?

Best regards
AlesG
You can override values using the php_admin_value in the httpd.conf template, there is no way to make a individual php.ini file. If you want to make it for one or a selection of ibays you will need to make a copy of the /etc/e-smith/templates/etc/httpd/conf/httpd.conf/90e-smithAccess40ibays template to the templates-custom tree and make your modifications there, probably based on a selection on the key() property.
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline AlexG

  • ****
  • 110
  • +0/-0
Re: individual php.ini for ibay
« Reply #2 on: October 30, 2007, 09:59:13 AM »
Hi

Quote
If you want to make it for one or a selection of ibays you will need to make a copy of the /etc/e-smith/templates/etc/httpd/conf/httpd.conf/90e-smithAccess40ibays template to the templates-custom tree and make your modifications there, probably based on a selection on the key() property.

:-? You mean I copy this file (for sample) to /etc/e-smith/templates-custom, edit this file there and then?
Hmm, I just want to set the 'session.use_trans_sid' to off in the php.ini.
« Last Edit: October 30, 2007, 10:17:03 AM by AlexG »

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: individual php.ini for ibay
« Reply #3 on: October 30, 2007, 12:54:48 PM »
Hi

:-? You mean I copy this file (for sample) to /etc/e-smith/templates-custom, edit this file there and then?
Hmm, I just want to set the 'session.use_trans_sid' to off in the php.ini.
Yes. Since you stated you would like to do that for an individual ibay you will have to add an overwrite in the /etc/httpd/conf/httpd.conf templates, otherwise if you want it as a general setting you will have to make your changes in the /etc/php.ini templates tree.
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline AlexG

  • ****
  • 110
  • +0/-0
Re: individual php.ini for ibay
« Reply #4 on: October 31, 2007, 03:31:49 AM »
Hi

I have copied the php.ini to the templates folder. Edited the copy of php.ini in my templates folder to my changings, and then 'expand /etc/php.ini'. OK it seems it has changed the php.ini in the /etc/folder - but not really. It attached my changings at the end of the /etc/php.ini. Is it possible to change just the content - I mean not to attach something?

Best regads

Offline raem

  • *
  • 3,972
  • +4/-0
Re: individual php.ini for ibay
« Reply #5 on: October 31, 2007, 04:09:32 AM »
AlexG

What you describe doing sounds very wrong.

Here is the correct way to make the change you are asking for.
Undo or reverse or delete anything you have done so far.
Delete the file you copied.
Then probably wise to do
signal-event post-upgrade
reboot

Then do

mkdir -p /etc/e-smith/templates-custom/etc/php.ini/
cp /etc/e-smith/templates/etc/php.ini/80ModuleSettings /etc/e-smith/templates-custom/etc/php.ini/

then edit the fragment to make your change

pico -w /etc/e-smith/templates-custom/etc/php.ini/80ModuleSettings

change the line for
session.use_trans_sid    =1
to
session.use_trans_sid    =0

Save & exit
Ctrl o
Ctrl x

Then expand the template & restart service
expand-template /etc/php.ini
sv t /service/httpd-e-smith
sv s /service/httpd-e-smith

Your changes should now be reflected in /etc/php.ini
Test and see if your sme server now does what you want/expect.
...

Offline AlexG

  • ****
  • 110
  • +0/-0
Re: individual php.ini for ibay
« Reply #6 on: October 31, 2007, 06:21:57 AM »
That's it - great  :D

Thank you for your help
Best regards
AlexG

Offline magwm

  • *
  • 159
  • +0/-0
  • SmeLover
    • Gadis Tourist Service Italia SRL
Re: individual php.ini for ibay
« Reply #7 on: April 22, 2008, 03:48:22 PM »
Hello, I followed the above indications, and in effect it did work.

Only, how is this affecting one ibay only?? or is it affecting all of them?

ciao, Michel
MagWm

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: individual php.ini for ibay
« Reply #8 on: April 22, 2008, 03:51:25 PM »
Here is the correct way to make the change you are asking for.
No it is not as this changes the general setting system wide, and the question was to have a individual setting for one ibay for which I suggested a rudimentary solution in one of my earlier posts in this thread.
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)