Error using Install Scripts

Hello,

I try to install eTicket or osTicket with the Install Scripts and get the following error message:

PHP module mysql is required .. Enabling module in PHP configuration .. Failed to install script : Missing file to open at WebminCore::/usr/share/webmin/web-lib-funcs.pl line 2695

Status: 
Closed (fixed)

Comments

Could you add the line error_stack=1 to /etc/webmin/config , then re-try the script install and post the full error message here?

Here it is:

Failed to install script : Missing file to open at WebminCore::/usr/share/webmin/web-lib-funcs.pl line 2695
Call Stack Trace
File  Line  Function
  /usr/share/webmin/web-lib-funcs.pl  7391  WebminCore::error
  /usr/share/webmin/web-lib-funcs.pl  2695  WebminCore::open_tempfile
  /usr/share/webmin/virtual-server/scripts-lib.pl  941  WebminCore::flush_file_lines
  /usr/share/webmin/virtual-server/scripts-lib.pl  2310  virtual_server::setup_php_modules
  /usr/share/webmin/virtual-server/script_install.cgi  124  virtual_server::setup_script_requirements
  (eval 48)  6  (eval)
  /usr/share/webmin/miniserv.pl  2145  (eval)
  /usr/share/webmin/miniserv.pl  753  miniserv::handle_request

Ok, it looks like Virtualmin cannot find the global php.ini file, which is usually under /etc .

One work-around may be to switch the domain to run PHP scripts as the domain owner, at Server Configuration -> Website Options -> PHP script execution mode -> FCGId.

Switching to Fcgi tells me:

Failed to save website options : No <Directory> section found for mod_fcgid directives
Call Stack Trace
File  Line  Function
  /usr/share/webmin/virtual-server/php-lib.pl  197  WebminCore::error
  /usr/share/webmin/virtual-server/save_phpmode.cgi  53  virtual_server::save_domain_php_mode
  (eval 48)  6  (eval)
  /usr/share/webmin/miniserv.pl  2145  (eval)
  /usr/share/webmin/miniserv.pl  753  miniserv::handle_request

The next problem in the Install Script with Fcgi:

This script cannot be installed, as this virtual server does not meet its requirements : eTicket must be installed with PHP scripts executed using mod_php

Switching back to mod_php works without errors.

The global php.ini is in the folder /etc/php5/apache2.

In /etc/webmin/phpini is a file config, which references php_ini=/etc/php4/apache/php.ini. This file does not exist. Perhaps an update issue?

Ok, I think I see the cause of this bug .. try replacing the file /usr/share/webmin/virtual-server/scripts/eticket.pl with the file attached to this bug report.

Now the installation works partially:

Now installing eTicket version 1.7.3 ..

eTicket database setup failed
More information on using this script can be found at http://eticket.sourceforge.net/.
.. installation was only partially complete.

Still a database problem.

If you go to the URL you installed eTicket at and try to complete the install process manually, does it work OK?

The manual completion of the installation works. I can configure the database, set up users and passwords and eTicket creates all the tables. So the issue is solved for me, but isn't the installation script of Virtualmin supposed to do the initial configuration task?

Yes, it should ..

When you get that error about "database setup failed", a more detailed error should get logged to /var/webmin/miniserv.error . Could you post/attach that here?

Getting similar issue with etickets

"This script cannot be installed, as this virtual server does not meet its requirements : eTicket must be installed with PHP scripts executed using mod_php"

Pretty new installation on debian...

Hi Lior -- what version of Virtualmin are you using?

The error you got means that you'd simply need to change the PHP execution mode to mod_php -- but if I recall correctly, that requirement is a pretty old one, you should be able to use it with CGI and FCGID now.

I am using Virtualmin version 3.76 Pro

That may be a current requirement of the Install Script then. You can enable mod_php by going into Server Configuration -> Website Options, and setting the "PHP script execution mode" to "mod_php".

I just looked at the code for etickets -- there is no reason for it to require mod_php and installs just fine using cgi or fcgi -- the install script needs to be updated to reflect this.

Scott - that's good news, as it didn't use to be the case. Which distro and version did you successfully install on?

eTicket 1.7.3

osTicket is the same thing... in fact I used osticket for over a year using php-cgi

All I did was install it manually then used the web gui to finish and under both fcgi and php-cgi and it installed without any issues.

Oh and I originally used osticket on mandriva and then switched to debian.

eTicket I tested it on debian lenny.

Attached is a new eticket install script that solves both the "setup failed" and mod_php requirement issues. You will need to save it as /usr/share/webmin/virtual-server/scripts/eticket.pl

Now installing eTicket version 1.7.3 ..

eTicket database setup failed

More information on using this script can be found at http://eticket.sourceforge.net/.

.. installation was only partially complete.

is this normal ? I thought the DB creation was fixed ?

If I browse to the install directory I get....

Fatal Error: install Should be removed for security reasons.

Looks like you still have to finish the install through the web gui at eticket/install/

Otherwise it installs with the new script and fcgi or php-cgi

That's odd, the new script works fine for me..

If you do a command-line install, it should provide more information about exactly why the DB creation is failing. This can be done with a command like :

virtualmin install-script --domain example.com --type eticket --version latest --path /ticket --db mysql example_eticket --newdb --title "My tickets"

cli isn't working for me at all

virtualmin install-script --domain borgnet.net --type eticket --version latest --path /eticket --db mysql eticket --newdb --title "My tickets"

Installs a third-party script into some virtual server.

virtualmin install-script --domain domain.name
                          --type name
                          --version number|"latest" [--unsupported]
                         [--path url-path]
                         [--db type name]
                         [--opt name value]
                         [--upgrade id]
                         [--force-dir directory]
                         [--mongrels number]
                         [--user username --pass password]
                         [--log-only]

Sorry .. replace the --title "My tickets" with --opt title "My tickets"

virtualmin install-script --domain borgnet.net --type eticket --version 1.7.3 --path /eticket --db mysql scott_eticket --newdb --opt title "My tickets" --user XXXX --pass XXXX

Checking dependencies .. .. done

Checking PHP version .. .. done

Fetching required files .. .. done

Configuring Apache PHP settings .. .. already done.

Now installing eTicket version 1.7.3 .. eTicket database setup failed .. installation was only partially complete.

Re-loading Webmin .. .. done

Nothing new

Scott - if you like, I could login to this system myself and see what is going wrong.

Ok -> roddenberry.borgnet.us

This is a billing server so please be careful.

Thanks for the login .. however, I still wasn't able to debug this. For some reason, this system behaves differently to all my test machines..

If you create another test domain, can eticket be installed into that?

Ok tested the script on another server and it worked just fine. No errors.

I wonder what I have set on the other server that cause it to fail....

Do you perhaps have any special php.ini settings on that domain, like gzip compression?

I tried the installation again with the patched version from the post on Sun, 2009-12-06 17:37. Still the database error. Attached you can find the content of miniserv.error. The file looks shreddered to me, because I can see the last log from a mongrel application with timestamp from yesterday and then a lot of html code, which seems to be related to the eticket install attempt.

Automatically closed -- issue fixed for 2 weeks with no activity.