#50663 [Com]: exec and shell_exec don't works with msginit

From: Date: Mon, 04 Jan 2010 22:39:37 +0000
Subject: #50663 [Com]: exec and shell_exec don't works with msginit
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-146337@lists.php.net to get a copy of this message
 ID:               50663
 Comment by:       samuel dot roze at gmail dot com
 Reported By:      samuel dot roze at gmail dot com
 Status:           Open
 Bug Type:         Program Execution
 Operating System: Debian 5
 PHP Version:      5.3.1
 New Comment:

Notice: This PHP test work when using the "php file.php" command but no
on Apache. With the command, the message
"/home/samuel/Développement/workspaces/PHP/GetTextEdit/tests/php/file.po
a été créé." is printed on the shell, nothing is sent to PHP.


Previous Comments:
------------------------------------------------------------------------

[2010-01-04 22:23:19] samuel dot roze at gmail dot com

Description:
------------
The function exec or the shell_exec function are not working with the
msginit (gettext) program.

Reproduce code:
---------------
Create an empty "/home/user/file.pot" file.

<?php
$exec = exec('msginit -i "/home/user/file.pot" -o "file.po"');
var_dump($exec);
?>

Expected result:
----------------
string(X) "/home/d-sites/myonlinessh/includes/locales/ps_AK/messages a
été créé."

and that the file.po file was created.

Actual result:
--------------
string(0) ""
and the file.po doesn't exists.

Note: there's any error and the same command, with the www-data user
(used by Apache) works in my shell!


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=50663&edit=1



Thread (6 messages)

« previous php.bugs (#146337) next »