EIE Posted May 29, 2017 Share Posted May 29, 2017 Dear All, We are desperate for a solution and our project is stuck since 2 weeks, cannot launch ! We have a root server. We need to create an automatic FTP username password for users who register on our website. We have been able to generate this via XML RPC and but cannot install it in PHP as our code is written in PHP. It's become highly frustrating and any assistance in this would be highly appreciated. Can someone get us through this small issue? Thanks everyone for looking into this. Regards Mani Quote Link to comment https://forums.phpfreaks.com/topic/304032-how-to-enable-rpc-xml-extension-on-php/ Share on other sites More sharing options...
requinix Posted May 30, 2017 Share Posted May 30, 2017 Normally this sort of thing is handled by putting authentication in a database; the FTP server software looks in there for the username and password, as well as home directory and whatnot, rather than in a file or expecting system-level users. Your post is a bit lacking in details. What can't you do? Generate what with XML RPC? You can't install something in PHP because the code is written in PHP? Quote Link to comment https://forums.phpfreaks.com/topic/304032-how-to-enable-rpc-xml-extension-on-php/#findComment-1546913 Share on other sites More sharing options...
EIE Posted May 30, 2017 Author Share Posted May 30, 2017 Thanks for your reply. XML RPC extension is enabled on the server. In PHP code, its not generating a response. Can you help please? Here's the response code <?php require_once('PleskApiClient.php'); $host = getenv('REMOTE_HOST'); $login = getenv('REMOTE_LOGIN') ?: 'admin'; $password = getenv('REMOTE_PASSWORD'); $client = new PleskApiClient($host); $client->setCredentials($login, $password); $request = <<<EOF <packet> <ftp-user> <add> <name>abhisheknew</name> <password>jdnHHbe6Gc</password> <home/> <webspace-id>1</webspace-id> </add> </ftp-user> </packet> EOF; $response = $client->request($request); print_r($response); echo "Response: ".$response; Quote Link to comment https://forums.phpfreaks.com/topic/304032-how-to-enable-rpc-xml-extension-on-php/#findComment-1546920 Share on other sites More sharing options...
requinix Posted May 30, 2017 Share Posted May 30, 2017 Are there any errors or warnings? Is the request being received? What is the value of $response? Quote Link to comment https://forums.phpfreaks.com/topic/304032-how-to-enable-rpc-xml-extension-on-php/#findComment-1546921 Share on other sites More sharing options...
EIE Posted May 31, 2017 Author Share Posted May 31, 2017 No error or response, blank. When we are doing echo $response, no output.. Everything is working in XML, only bringing in PHP is the issue. Can we solve this? XML request ok <ftp-user> <add> <name>abhisheknew</name> <password>jdnHHbe6Gc</password> <home/> <webspace-id>1</webspace-id> </add> </ftp-user> This generated a user in ftp, but in PHP we cannot generate somehow.. IS there a way to connect with you sir? Quote Link to comment https://forums.phpfreaks.com/topic/304032-how-to-enable-rpc-xml-extension-on-php/#findComment-1546951 Share on other sites More sharing options...
requinix Posted May 31, 2017 Share Posted May 31, 2017 "echo $response" might not show anything. What does var_dump($response);show? If you say there's no output then there is some other problem and you probably don't have PHP set up to show errors properly. Quote Link to comment https://forums.phpfreaks.com/topic/304032-how-to-enable-rpc-xml-extension-on-php/#findComment-1546953 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.