Page 1 of 1

Issue with paths.

Posted: Tue Jan 08, 2013 7:10 pm
by tabarepatino
Hello!

We have a customer to which we are currently assisting installing your script. Everything seems to work fine except for this:

Imagemagick lib path error ? /usr/bin/convert returns error -1
Mysqldump path error ? /usr/bin/mysqldump returns error -1
PHP path error ? /usr/local/bin/php returns error -1, check scj/includes/config.php

Those paths are correct and works fine. Even if I "su" to the user and execute those binaries it works. However, your application still says that they are not correct.

The permissions for files and folders have been assigned as you required.

Do you have any issue why it is not recognizing those paths?

Awaiting your reply.

Tabare.

Re: Issue with paths.

Posted: Tue Jan 08, 2013 7:22 pm
by admin
Test this code plz

create a file (lets say scj/admin/1.php)
run it in browser and lemme know output

Code: Select all

<?php

cmd_exec('/usr/bin/convert', $res, $err);

echo $res;

function cmd_exec($cmd, &$output, &$error) {

	$output = array();
	$tmpfname = tempnam("../tmp", "exec");

	$cmd = escapeshellcmd($cmd);

	exec($cmd . ' 2>' . $tmpfname, $output, $error);
	if ($error) {
		$output[] = file_get_contents($tmpfname);
	}
	unlink($tmpfname);

}


thank you.

Re: Issue with paths.

Posted: Tue Jan 08, 2013 7:27 pm
by tabarepatino
Here you have:

Warning: exec() [function.exec]: Unable to fork [/usr/bin/convert 2>/home/bonanza8/public_html/scj/tmp/exec3cMq2C] in /home/bonanza8/public_html/scj/admin/1.php on line 14
Array

Hope it helps!

Re: Issue with paths.

Posted: Tue Jan 08, 2013 7:36 pm
by admin
is it a windows based host ?
Google shows those error as related to windows systems.

Re: Issue with paths.

Posted: Tue Jan 08, 2013 7:45 pm
by tabarepatino
Hello!

This is a linux server based on CentOS. Is weird because it was working fine, but now the script is reporting issues with those paths, which of course works fine.

Let me check the tmp folder, I'm not sure If I saw that folder.

Please stand by.

Re: Issue with paths.

Posted: Tue Jan 08, 2013 7:56 pm
by tabarepatino
Hello!

The folder is present with correct permissions and ownership.

I'm not sure what the issue is. We can provide you access if you want to check.

Thanks.

Re: Issue with paths.

Posted: Tue Jan 08, 2013 7:56 pm
by admin

Re: Issue with paths.

Posted: Tue Jan 08, 2013 7:58 pm
by admin
It's not a folder issue - 100%
check system and php settings, you have a code of this little script, ask admin to try to find out why it doesnt work.
As you can see this little script does not include any other parts.

Re: Issue with paths.

Posted: Tue Jan 08, 2013 8:05 pm
by tabarepatino
Hello!

I'm the system administrator of this server. I'm a RHCE. I can tell you that the binaries and php configuration is fine. However, could you please provide me the complete list of PHP requirements for this script?

Maybe there's something we didn't configure yet. Awaiting your reply!

Re: Issue with paths.

Posted: Tue Jan 08, 2013 8:08 pm
by admin
tabarepatino wrote:Hello!

I'm the system administrator of this server. I'm a RHCE. I can tell you that the binaries and php configuration is fine. However, could you please provide me the complete list of PHP requirements for this script?

I dont think that little script needs any special thing to be installed.
Why do you think that code doesnt work at that host ?

You can try it on any other system