ISPconfig with suexec and fastcgi

Discussion in 'Tips/Tricks/Mods' started by todvard, Jan 24, 2007.

  1. todvard

    todvard New Member

    Hello,

    i am working on a suExec + FastCGI patch to ISPConfig. I'm, almost done with it, its working like a charm. Now i have two questions:

    first, i would like to put a checkbox and a longtext to the Basis layer of the ISP Web form. I tried to put them over there, but every time, when i add these something else (usually the "web_httpd_include") is not rendered on the Basis tab anymore. Is there an item number or a page hight limit on this page?
    As a workaround i put them on Optionen layer.

    second question: as i read here, there could be some problems with upgrading ispconfig if something is modified in the forms. Is it possible to create a patch about the form modifications?

    Thank you,
    Todvard.
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Thats great news!

    No, there is no limit on the number of Items. This phenomenon is caused by this side effect: The fields in the form are numbered internally and some fields are hidden by the code in the file ispconfig_isp_web.lib.php in the function web_show(...).

    If you put your input fields at the end of the form, everything should work as expected. If you move the fields more to the top, the fields get reordered and your fields are getting the internal numbers of the field that was on the same position before. To fix this, the field numbers in the web_show function must be corrected to in the statements that look like this:

    $doc->deck[6]->elements[17]->visible = 0;

    The field number of the statement above is 17. I hope you understand what I mean :) If you have problems with this, put your fields at the end of the form and check the patch into the SVN, write me a email where the fields should be moved to and I can do it.

    Creating a patch will be problematic as the form definitions are stored in the database only (table: doctype) and you can not modify the mysql database with a normal patch. But when you upload the modified scripts to SVN or send them to my by mail, we can make them part of the next ISPConfig release.
     
  3. todvard

    todvard New Member

    ok, i think i got it. :)

    I'll send the patch soon to you by mail, then i'll post a short howto here about the patch prerequisites and how to use it.

    That would be great :)

    Tod.
     
  4. todvard

    todvard New Member

    Another question: i am thinking about placing a "PHP" Layer on the Settings page of Management window. On this new page i would like to place 4 or 5 rows with 3 cells each. In these rows one can setup different PHP-cgis with different php.ini-s, something like this:

    version ::::: cgi-location ::::::: php.ini-location
    php4.4.2:::::/usr/bin/php4-cgi:::/etc/php4/fcgi/php.ini
    php5.1.2:::::/usr/bin/php5-cgi:::/etc/php5/fcgi/php.ini
    php4.4.4:::::/usr/local/bin/php:::/usr/local/etc/php/php.ini

    This information could be used to place a dropdown menu on Basis layer to let reseller choose from php versions installed on the system.

    I could imagine situations when this separation of php versions and config files would be useful. Tell me what do you think about it?

    Thank you.

    Tod.
     
  5. todvard

    todvard New Member

    i have started to implement the function what i have mentioned in my last post, and another question came up. I would like to put a PHP version dropdown menu into the Basis layer, and i'd like to use database as source. I have used isp_server_ip table as a reference to create my table (isp_server_phpver). Here is the structure of the table:
    Code:
    CREATE TABLE `isp_server_phpver` (
      `doc_id` int(11) NOT NULL auto_increment,
      `server_id` int(11) NOT NULL default '0',
      `phpver1` char(10) NOT NULL,
      `phpver1_bin` varchar(255) NOT NULL,
      `phpver1_ini` varchar(255) NOT NULL,
      `phpver2` char(10) default NULL,
      `phpver2_bin` varchar(255) default NULL,
      `phpver2_ini` varchar(255) default NULL,
      `phpver3` char(10) default NULL,
      `phpver3_bin` varchar(255) default NULL,
      `phpver3_ini` varchar(255) default NULL,
      PRIMARY KEY  (`doc_id`),
      UNIQUE KEY `doc_id` (`doc_id`),
      KEY `phpver1` (`phpver1`),
      KEY `phpver2` (`phpver2`),
      KEY `phpver3` (`phpver3`)
    ) ENGINE=MyISAM DEFAULT AUTO_INCREMENT=1 ;
    
    
    Now the questions, do i have to use doc_id and server_id fields? If yes, then what will be the doc_id? (i guess server_id will be '1', right?)
     
  6. falko

    falko Super Moderator Howtoforge Staff

    doc_id is unique in each table, i.e., you just count it up. server_id would be 1.
     
  7. Hans

    Hans Moderator Moderator

    @Todvart,

    Great to hear that ISPConfig will work with suExec + FastCGI in the near future!

    Thanks for your work so far, from my side!
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    doc_id and server_id have only to be used when you want to use the ISPConfig form editoe to fill values in your table. In case you use the form editor, the database table is created automatically when you add a unput field in the form editor. I guess in your case it is not nescessary to use the form editor.
     

Share This Page