Code Monkey home page Code Monkey logo

Comments (8)

matang-dave avatar matang-dave commented on September 27, 2024

Hi @sjuliper7, does you config file have the read access for the user from which you are running php hello.php ?

from phprados.

sjuliper7 avatar sjuliper7 commented on September 27, 2024

Hello Mr @matang-dave , i have set change the file permission to 644, and i try to run the file, PHP Fatal error: rados_pool_list(): This function can't be called when not connected

from phprados.

matang-dave avatar matang-dave commented on September 27, 2024

Can you please check what is the return value of rados_connect($rados). In case of error, it should return you an object with error description.

from phprados.

sjuliper7 avatar sjuliper7 commented on September 27, 2024

when i'm run without sudo php hello.php
the error is array(2) { ["errCode"]=> int(2) ["errMessage"]=> string(25) "No such file or directory" }
when with sudo 'sudo php hello.php'
bool(true)

and my code :

<?php
$rados = rados_create();
rados_conf_read_file($rados, '/etc/ceph/ceph.conf');
$check =  rados_connect($rados);
var_dump($check);
rados_shutdown($rados);
?>

from phprados.

matang-dave avatar matang-dave commented on September 27, 2024

Hmm, now it is clear that non-sudo user does not have access to the file.
Can you please also check the permission on the directory level also?

from phprados.

sjuliper7 avatar sjuliper7 commented on September 27, 2024

hello @matang-dave ,
this my permission level -rw-r--r-- 1 root root 166 Jun 14 08:14 hello.php

from phprados.

matang-dave avatar matang-dave commented on September 27, 2024

No, I am talking about the permission of config and the all the folder above it. /etc/ceph/ceph.conf
This StackOverflow article should help you.
https://stackoverflow.com/questions/3740152/how-do-i-change-permissions-for-a-folder-and-all-of-its-subfolders-and-files-in

from phprados.

sjuliper7 avatar sjuliper7 commented on September 27, 2024

Hello @matang-dave ,
wait do you mean this.., do i change the permission the directory?
-rw------- 1 root root 151 Jun 14 07:36 ceph.client.admin.keyring -rw-r--r-- 1 root root 266 Jun 14 07:03 ceph.conf -rw-r--r-- 1 root root 92 Nov 19 2018 rbdmap -rw------- 1 root root 0 Mei 22 13:12 tmpHXEpLx -rw------- 1 root root 0 Mei 22 13:27 tmpkp7Cmp -rw------- 1 root root 0 Mei 22 13:23 tmppj2BwC -rw------- 1 root root 0 Mei 22 13:24 tmprFzcau

like this? and do i change to all of in folder /etc/ceph to 644 @matang-dave ?

Thank you

from phprados.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.