|
|||
|
Hello,
I am using Cpanel with Linux and would like to add an "Enhanced Script Library" icon in the Cpanel for the clients to be able to select which PHP Version to use for there domain and be able to edit the PHP.INI Can any body point me in the right direction? Thanks, Mike |
|
||||
|
Don't know how to implement this without custom coding it yourself.
While it is definitely possible to run different PHP versions for each account and even different PHP configurations for each account, this requires modifications to the VirtualHost section of your Apache configuration and that is usually done manually for something like that although it is something that could at least theoretically be scripted. A much easier approach is to make both versions of PHP available to all clients and setup different filename extensions for each version. With this kind of configuration, you won't need any special scripting or manual configuration and could even do this from EasyApache. However ... I do have a question as to what you mean by "VERSIONS" exactly? Assuming you mean offering some clients "PHP4" and some "PHP5", it would be far better if you drop PHP4 entirely and just offer PHP5 only as we are now long past the official death date of PHP4 and it is no longer supported and is not really supposed to be used anymore.
__________________
My Server Expert: Server support, security, and management! |
|
|||
|
Php.ini
Thanks for the feedback spiral
Yes I was talking about PHP4 and PHP5 The reason I wanted this is some scripts wont run on PHP5 without fixing. Also would be a good troubleshooting tool when trying to upgrade the script to PHP5. Could keep switching back and forth to see the effects. The reason I wanted to have the Clients be able to modify the PHP.INI file is to reduce support calls. I know on Fatcow I could modify the file in Cpanel (I Think They use Cpanel?) with out having to open a ticket. And Waiting....And Waiting... Regards, Mike |
|
||||
|
Quote:
versions compatible with PHP5 before PHP4 was ultimately declared dead. At this time, you really shouldn't have any scripts that don't work on PHP5 as most everything out there has already long since been updated. If you have some archaic old script designed for PHP4 specifically which for whatever reason was never updated, chances are very good that it will work perfectly fine under PHP5 without any modifications as PHP5 is more than 98% fully backwards compatible with PHP4 and the functions and reserved names that have changed enough to require code changes are more rarely used and generally not present in most old PHP4 scripts. Quote:
Just as a side note, we officially discontinued support for PHP4 over five years ago at all my companies, hosted thousands of accounts, and never had a single complaint about any script not working properly. Most of the complaints you see out there about certain old scripts not working on PHP5 actually stemmed more from the hosting providers not knowing how to properly install PHP5 than from any actual real compatibility issue and though there were some scripts out there with compatibility issues, they were actually extremely rare. You wouldn't believe how many arguments I got in over the years with software authors who they themselves did not realize their own scripts worked 100% perfectly fine on PHP5 without any modifications whatsoever and time and time again, they would say their programs were incompatible and then have their foot in their mouth when I would show them first hand how wrong they were. Fortunately, much of that is all past history now. PHP4 is officially dead and no longer support and all scripts out there are supposed to be written at least minimum PHP5 standard now anyway. Those very few scripts out there that were never updated because perhaps development was stopped or the projects were abandoned most likely still work fine under PHP5 with no modification and if in the rare instance some modification were required, it would most likely be something very minimal and able to patch in seconds. Quote:
it will definitely open up a lot of new security headaches for you. If you must run both PHP4 and PHP5, I would suggest setting up to run under different extensions such as "filename.php4" for PHP4 and then use "filename.php" or "filename.php5" for normal PHP5 and just allow all accounts to use both PHP4 and PHP5. Those who want to be parsed by PHP4 would then only need to rename their script filenames. I would recommend running both as CGI modules under SuPHP but you could also run one as a CGI (again preferably with SuPHP) and the other as an Apache DSO module. However, you cannot run PHP4 and PHP5 simultaneously both as Apache modules -- at least one must be CGI unless you do some patching to the PHP source code a bit.
__________________
My Server Expert: Server support, security, and management! |
|
|||
|
Dysonsphere, thanks for A :-)
As Spiral told, you won't find much problem in using your php scripts in PHP 5. When i upgraded my servers with php 4 to php 5, no clients complained about that. I have done upgrade for some client servers too, never had a problem, some times need to tuen on register_globals and adjust error_reporting. Only very few clients need custom php.ini, for them just copy php.ini to their folder. Disadvantage is they can do whatever they need, for example if you have some functions disabled on your server for security, user can enable them. They get full control can create security problem.
__________________
HostOnNet.com |
|
||||
|
Quote:
As for letting users edit their own PHP.ini via a GUI, that would be done by creating a cPanel Plug-in.
__________________
Want our technical analysts to login to your server to assist you? You can contact our technical analysts at: http://tickets.cPanel.net/submit |
|
||||
|
Quote:
This problem does not exist if you run your PHP as SuPHP! PHP overrides are restricted to PHP.INI file only and any custom PHP.INI files are specified in the HTTPD.CONF and their locations and the files themselves need not be user accessible.
__________________
My Server Expert: Server support, security, and management! |
![]() |
| Tags |
| cpanel hosting , linux dedicated servers , php.ini |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| php.ini and override default php.ini | areh | cPanel and WHM Discussions | 6 | 08-24-2009 06:45 PM |
| custom php.ini for cpanel | Cristi4n | cPanel and WHM Discussions | 0 | 08-20-2008 11:59 AM |
| [ask] /usr/local/cpanel/3rdparty/etc/php.ini | finly | cPanel and WHM Discussions | 4 | 05-30-2008 09:43 AM |
| /usr/local/cpanel/3rdparty/etc/php.ini ?! | sehh | cPanel and WHM Discussions | 3 | 12-02-2007 02:28 PM |
| cpanel overwriting php.ini | tifosi | cPanel Newbies | 5 | 06-27-2007 08:22 AM |