PDA

View Full Version : Mandrake Linux 9.1 and Apache problems



the-mk
01-18-2004, 11:15 AM
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)

<?php
$output = `./encode myparameter`;
echo "<pre>$output</pre>";
?>
but it doesn't do what I want. It says:

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
01-18-2004, 01:04 PM
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 :bang: chmod 755 proggy and everything works fine :D

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