Menu

ICE Problem - "Ice.php" file...

Help
Anonymous
2012-07-30
2013-01-04
1 2 > >> (Page 1 of 2)
  • Anonymous

    Anonymous - 2012-07-30

    Hi there,

    I am using CEntOS 6.3 with nginx 1.2.2 (with php-fpm), MySQL 5.5.x and PHP 5.3.15. I installed Mumble on it and it is running fine. I installed Zeroc Ice from the Zeroc Ice repo and it created a Ice.php in /usr/share/php/ . In the /etc/php.ini i set include_path to ".:/usr/share/php" and am getting the message, that phpMumbeAdmin does not find the Ice.php file. Is there another way of including the path to the Ice.php? I also created the Murmur.php via slice2php.

     
  • ipnoz

    ipnoz - 2012-07-30

    Hi.

    Did you restarted your Nginx server after you modified your php.ini?

    Verify that the file is called Ice.php with upper i too. Sensitive case is importante.

    Regards.

     
  • Mirko Rolfes

    Mirko Rolfes - 2012-07-30

    Yes, i restarted both nginx, php-fpm and even the whole server.

    -bash-4.1# find -name Ice.php
    ./usr/share/php/Ice.php
    ./var/lib/mumble-server/Ice.php

    -bash-4.1# php -ini
    Configuration File (php.ini) Path: /etc
    Loaded Configuration File:         /etc/php.ini
    Scan for additional .ini files in: /etc/php.d
    Additional .ini files parsed:      /etc/php.d/curl.ini,
    /etc/php.d/fileinfo.ini,
    /etc/php.d/ice.ini,
    /etc/php.d/json.ini,
    /etc/php.d/mysql.ini,
    /etc/php.d/mysqli.ini,
    /etc/php.d/pdo.ini,
    /etc/php.d/pdo_mysql.ini,
    /etc/php.d/pdo_sqlite.ini,
    /etc/php.d/phar.ini,
    /etc/php.d/sqlite3.ini,
    /etc/php.d/suhosin.ini,
    /etc/php.d/zip.ini

    -bash-4.1# php -c /etc/php.ini -r 'echo get_include_path()."\n";'
    .:/usr/share/php:/usr/share/pear

    That should match it or am I wrong?

     
  • ipnoz

    ipnoz - 2012-07-30

    Your configuration seems good.

    Check if the user running your nginx daemon can read the file /usr/share/php/Ice.php .

    Do you use the php safe mode?

     
  • ipnoz

    ipnoz - 2012-07-31

    Btw, I can see that find locate the Ice.php file in your current pwd ( ./usr/share/php/Ice.php ), but you have set in your php.ini the absolute path ( /usr/share/php/Ice.php ).

    Maybe the error come from here…

     
  • Nobody/Anonymous

    Thank you for the answer. It has shown the dot, because I was at / when I used find. I now added the user and group nginx to the folder and file with read and execute permissions. How can I see if I use php in safe mode?

     
  • Nobody/Anonymous

    OK, found it. safe_mode is off. Adding nginx to the folder and Ice.php file did not work.

     
  • ipnoz

    ipnoz - 2012-07-31

    If the nginx user cant access to upper folders, like /usr/share, the problem is still the same.

    Try to read "/usr/share/php/Ice.php" with an user with no privilege.

    You can try another thing to test if your nginx user can read Ice.php.
    At the top of the file "PMA_folder/index.php", you add this:

    var_dump( include "/usr/share/php/Ice.php" ); die();

    Save and load your phpMumbleAdmin web page.

    If the output is "int(1)", it's means that the file can be read by your nginx user and the issue is not a permission problem.

     
  • Nobody/Anonymous

    I change /usr /usr/share and /usr/share/php to the following permissions.

    # owner: root
    # group: root
    user::rwx
    user:nginx:r-x
    group::r-x
    group:nginx:r-x
    mask::r-x
    other::r-x

    The output is bool(false) . Though it seems the problem is, that nginx is not a real user.  (Got a "no login" in the passwd file). But I do not know how to change that. If I use a manually created user with no access rights I am able to read /usr /usr/share /usr/share/php and even use nano /usr/share/php/Ice.php .

     
  • ipnoz

    ipnoz - 2012-07-31

    Ok.

    The problem is not because nginx isn't a "real user", for sur.
    If your new user can acccess to the Ice.php file, nginx should too.
    You should reset your original permissions on /usr/share/php folders.

    In the index.php file, try this 2 lines:

    error_reporting( -1 );
    var_dump( include "/usr/share/php/Ice.php" ); die();

    and give me the output please.

     
  • Nobody/Anonymous

    Will test it tomorrow. I am restoring a backup just in case. I was able to login as nginx and use nano /usr/share/php/Ice.php . Probably php-fpm, which handles php, uses a different user, which needs to get access aswell.

     
  • Mirko Rolfes

    Mirko Rolfes - 2012-08-01

    I added your stuff the to the index.file and am still getting

    bool(false)

    in return. I also added rwx to nginx and apache (php-fpm runs under the user apache). If I login as both apache or nginx I am able to read Ice.php and I am even able to create a file Ice2.php. So the users should have enough rights.

     
  • ipnoz

    ipnoz - 2012-08-01

    I expected that "error_reporting( -1 );" will give more informations about your problem.

    I'm pretty sur the issue come from a PHP option that dont let scripts to go anywhere in your server.

    Take a look to "open_basedir" in php.ini.

    http://www.php.net/manual/en/ini.core.php#ini.open-basedir

     
  • ipnoz

    ipnoz - 2012-08-01

    Can you set in php.ini
    display_errors = On

    then retry

    error_reporting( -1 );
    var_dump( include "/usr/share/php/Ice.php" ); die();

    That's why you didnt get more errors informations.

    After that, you can go back to
    display_errors = Off

     
  • Mirko Rolfes

    Mirko Rolfes - 2012-08-01

    Thank you for the answer. When I add the text at top of the file (before <? php) I get it as text output. If I add it under <? php (after the comments field before $microtime_start) it still shows bool(false), though I enabled showing the errors and even restarted nginx and php-fpm via /etc/init.d/nginx (php-fpm) restart.

    On the bottom of the site it shows

    phpICE: 3.4.2
    ice.slice:

    Could it be that it does not get the ice.slice command? Is it a problem with murmur 1.2.4 (the latest beta on the website)?

     
  • Mirko Rolfes

    Mirko Rolfes - 2012-08-01

    I over read your other post. open_basedir is set to /usr/share/nginx/html .

     
  • ipnoz

    ipnoz - 2012-08-01

    I over read your other post. open_basedir is set to /usr/share/nginx/html

    Here it is.
    PMA can't open script located in /usr/share/php.

    try
    open_basedir "/usr/share/nginx/html:/usr/share/php/"

     
  • Mirko Rolfes

    Mirko Rolfes - 2012-08-01

    OK, now I got a new message.

    No slice definition found
    PMA can't connect to ICE interface.
    This means that none of Murmur.ice / php-Slice has been loaded
    Please check your php-ICE configuration

    But I tried it inside ice.ini with two lines.

    ice.slice = slice2php -I/usr/share/Ice-3.4.2/slice /var/lib/mumble-server/Murmur.ice
    ;ice.slice = slice2php -I/usr/share/Ice-3.4.2/slice Murmur.ice

    If I manually switch to /var/lib/mumble-server and use slice2php -I/usr/share/Ice-3.4.2/slice Murmur.ice it creates a Murmur.php.

    Or do I need to add that as well to the basedir directive and adding nginx and apache to the folder(s)?

     
  • ipnoz

    ipnoz - 2012-08-01

    ice.slice is obsolte with ICE 3.4

    Put the Murmur.ice you created in the PMA/slice-php/ folder and then, select it with PMA

     
  • ipnoz

    ipnoz - 2012-08-01

    Correction:

    ice.slice is obsolet with ICE 3.4

    Put the Murmur.php you created in the PMA/slice-php/ folder and then, select it with PMA

     
  • Mirko Rolfes

    Mirko Rolfes - 2012-08-01

    Even if I copy the Murmur.php to that folder and choosing it in the configuration menu it still gives the error. I also tried to recreate it with the slice2php -all -ice switch, but got the same error message.

     
  • Mirko Rolfes

    Mirko Rolfes - 2012-08-01

    But ice should work.

    -bash-4.1# netstat -apn | grep 6502
    tcp        0      0 127.0.0.1:6502              0.0.0.0:*                   LISTEN      1355/RY_PATH=/lib/i

     
  • Mirko Rolfes

    Mirko Rolfes - 2012-08-01

    I did some further tests and got MumPI working. So ice works fine. Any idea where the problem could be? And really thank you for taking the time to help me getting it to work.

     
  • ipnoz

    ipnoz - 2012-08-01

    Check that Murmur.php is readable by nginx user. :)

    Anyway, you can try to load another slice-php file with PMA configuration to see if it's resolve your problem.

     
  • Nobody/Anonymous

    Both users nginx and apache can read Murmur.php inside /usr/share/nginx/html/phpMumbleAdmin/slice2php and I tried all other files there. The result is the same. I also copied over the php files from MumPI with the same result.

     
1 2 > >> (Page 1 of 2)

Log in to post a comment.