Results 1 to 2 of 2

Thread: Mandrake Linux 9.1 and Apache problems

  1. #1
    almost retired the-mk's Avatar
    Join Date
    Jan 2003
    Location
    KI/OOE/Austria
    Posts
    1,921
    Blog Entries
    6

    Question Mandrake Linux 9.1 and Apache problems

    I've got a few problems with Mandrake Linux 9.1, especially with the Apache server and its settings.

    I wrote a small c-programm that de- or encodes a string I'll give him as argument. Works fine and does what I want.

    I want to use the output of that programm in one of my php-scripts. I want to use it with the socalled Backtick-operator (I could use proc_open() or popen() instead, but I get no error-message and no output of my program)
    Code:
    <?php
    $output = `./encode myparameter`;
    echo "<pre>$output</pre>";
    ?>
    but it doesn't do what I want. It says:
    Code:
    Warning: shell_exec() [function.shell-exec]:
    Cannot execute using backquotes in Safe Mode in /var/www/html/index.php on line 2
    The PHP-docu says that I can change that SAFE_MODE or SAFE_MODE_EXEC_DIR variables in php.ini or httpd.conf.

    So, where does Mandrake hide the php.ini-config-file or what do I need to set in the httpd.conf?
    the-mk

  2. #2
    almost retired the-mk's Avatar
    Join Date
    Jan 2003
    Location
    KI/OOE/Austria
    Posts
    1,921
    Blog Entries
    6
    OK, solved the problem...

    copied the php.ini-recommended from /usr/share/doc/libphp_common430-430/ to /etc renamed it to php.ini, restarted apache...

    Didn't work... why? I forgot about the execution-rights for my program-files chmod 755 proggy and everything works fine

    Why is there no php.ini in /etc by default in that Mandrake distribution? That was confusing me the whole time...
    the-mk

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •