Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Installer v1.2
#1
at Step 4: Enter THT Details

PHP Code:
Warningshell_exec() has been disabled for security reasons in /home/ihostnet/public_html/tht/includes/variables.php on line 27 

I don't have shell_exec enabled in my php.ini and my host wont't turn this feature on. can you do something about it?
#2
Can't you just progress with that being there?
Jonny H - THT Main Developer & Founder


#3
This is Line 27:
PHP Code:
$output shell_exec('mysql -V'); 
It's getting attempting to get the MySQL version.

This will be fixed in 1.2.1 and we'll give you patch instructions for 1.2. When we find a good solution, of course. Smile
By any chance, is safe_mode enabled?
I think I know how to fix this bug. I'll post my solution when I get more time. Wink
Kevin Mark - TheHostingTool Lead Developer
#4
Line 27:
PHP Code:
$output shell_exec('mysql -V'); 

In the mean time you can quiet it by doing :
PHP Code:
$output = @shell_exec('mysql -V'); 
#5
(09-16-2009, 01:11 PM)SaBRENT Wrote: Line 27:
PHP Code:
$output shell_exec('mysql -V'); 

In the mean time you can quiet it by doing :
PHP Code:
$output = @shell_exec('mysql -V'); 

That could mess some things up later down the road. The best simple fix for right now is comment that and some other things out and replace it with some static info.
Kevin Mark - TheHostingTool Lead Developer
#6
Rainbow 
Ok. Here is the fix for this. Replace these two lines in includes/variables.php (27 & 28)
PHP Code:
$output shell_exec('mysql -V');
preg_match('@[0-9]+\.[0-9]+\.[0-9][email protected]'$output$version); 

With the following. I haven't tested it that much so please let me know of the outcome and if it solves your problem.

PHP Code:
if(ini_get('safe_mode') or strpos(ini_get('disable_functions'), 'shell_exec') != false) {
    
$version[0] = "N/A";
}
else {
    
$output shell_exec('mysql -V');
    
preg_match('@[0-9]+\.[0-9]+\.[0-9][email protected]'$output$version);

Kevin Mark - TheHostingTool Lead Developer
#7
thank you
#8
Topic Closed.

No problem!
Kevin Mark - TheHostingTool Lead Developer


Forum Jump:


Users browsing this thread: 1 Guest(s)