Current time: 05-24-2012, 12:57 AM Hello There, Guest! (LoginRegister)

 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Installer v1.2
09-13-2009, 01:07 AM
Post: #1
Installer v1.2
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?
Find all posts by this user
09-13-2009, 03:53 AM
Post: #2
RE: Installer v1.2
Can't you just progress with that being there?

Jonny H - THT Main Developer & Founder
Find all posts by this user
09-15-2009, 07:44 PM (This post was last modified: 09-15-2009 09:34 PM by Kevin.)
Post: #3
RE: Installer v1.2
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
Visit this user's website Find all posts by this user
09-16-2009, 01:11 PM
Post: #4
RE: Installer v1.2
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'); 
Find all posts by this user
09-16-2009, 03:55 PM
Post: #5
RE: Installer v1.2
(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
Visit this user's website Find all posts by this user
09-16-2009, 06:14 PM
Post: #6
Rainbow RE: Installer v1.2
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]+@'$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]+@'$output$version);


Kevin Mark - TheHostingTool Lead Developer
Visit this user's website Find all posts by this user
09-26-2009, 05:39 AM
Post: #7
RE: Installer v1.2
thank you
Find all posts by this user
09-26-2009, 12:10 PM (This post was last modified: 09-26-2009 12:12 PM by Kevin.)
Post: #8
RE: Installer v1.2
Topic Closed.

No problem!

Kevin Mark - TheHostingTool Lead Developer
Visit this user's website Find all posts by this user


Forum Jump:


User(s) browsing this thread: 1 Guest(s)