Author Topic: Can Someone help my about my problem?  (Read 650 times)

rolanduk

  • New Member
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Can Someone help my about my problem?
« on: August 17, 2010, 07:40:19 AM »
                                                           Hy all
  I try to setup my PTC script, but when i upload and try to run me srcipt, is all the time comming the next error message:
 
  Warning: shell_exec() has been disabled for security reasons in /home/a6930502/public_html/lib/lib_functions.php on line 11
 
  I check the php file and there is find this
 
  9 }
  9
  10 function mysql_ver() {
  11   $output = shell_exec('mysql -V');
  12   preg_match('@[0-9]+\.[0-9]+\.[0-9]+@', $output, $version);
  13   return $version[0];
 
  What i should do tho resolve this problem, cos now i even cant login to the admin are.
 
  Thanks Roland

phphelp

  • Administrator
  • Senior Member
  • *****
  • Posts: 777
  • Karma: +3/-0
    • View Profile
    • PHP Help forum
Re: Can Someone help my about my problem?
« Reply #1 on: August 17, 2010, 07:54:42 AM »
Looks like your hosting provider disabled this function in php.ini (directive: disable_functions). If you have no access to php.ini on your server, you need to avoid using disabled functions in your code.

In your code, you can replace line #11 to this:

PHP Code: [Select]
  $output "4.0";  // or whatever MySQL version is on your server
Are you experienced in PHP programming and willing to share your knowledge?
Join us at php help forum!

rolanduk

  • New Member
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Re: Can Someone help my about my problem?
« Reply #2 on: August 17, 2010, 07:59:24 AM »
Thank you so much, is work

I look in the internet allready like 5 days, how to fix my problem and here i get the answer in 5 min. Again thank you very much!

phphelp

  • Administrator
  • Senior Member
  • *****
  • Posts: 777
  • Karma: +3/-0
    • View Profile
    • PHP Help forum
Re: Can Someone help my about my problem?
« Reply #3 on: August 17, 2010, 10:49:22 AM »
No problem. Good luck in learning php!
Are you experienced in PHP programming and willing to share your knowledge?
Join us at php help forum!