Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    Oct 2008
    Posts
    4

    Default /usr/local/cpanel/php/cpanel.php error

    Hi.

    I am getting this error:

    Warning: fsockopen() [function.fsockopen]: unable to connect to unix://:-1 (Connection refused) in /usr/local/cpanel/php/cpanel.php on line 39
    There was a problem connecting back to the cpanel engine. Make sure your script is ends with .live.php or .livephp Domain name:

    What I see is that PHP is unable to read a environment variable that has the name of a Unix socket, therefore it can not open the socket...

    Do you how to fix this... maybe I could write to environment the variable by myself before including /usr/local/cpanel/php/cpanel.php.

    Any thoughts?

    Regards,

    B.

  2. #2
    cPanel Product Evangelist Infopro's Avatar
    Join Date
    May 2003
    Location
    Pennsylvania
    Posts
    7,893
    cPanel/Enkompass Access Level

    Root Administrator

    Lightbulb

    Not sure what you're up to, but this link may be useful.
    http://www.cpanel.net/plugins/xmlapi/
    Fav cPlinks this week: Blog - cPanel & WHM 11.32 we love it! | cPanel University study for it! | Attracta is coming! we want this!

  3. #3
    Registered User
    Join Date
    Oct 2008
    Posts
    4

    Default

    Already been there...

    I am trying to use the PHP API as in here:

    http://www.cpanel.net/conference/08/files/APIs.pdf

    It seems that there is a Unix socket that does not exists or an environment variable that isn't there.

    I am trying to use that because I would like to create my own administration interface. I am customer of Site5. I've bought a reseller plan. I also bought a certificate for my domain. But I can not use it on the :2083 :2087 :2096 interfaces of Cpanel (only for my website). I have asked Customer Service to enable that feature following this instructions: http://www.cpanel.net/support/docs/1..._man_cert.html. However they said they can't because they would have to enable SSL for all (as you can see in the step 3 of Only One SSL Certificate Can Be Installed Per Service). That just sucks because I can not offer a secure channel to my customers with my own domain name.

    That's why I decided to create my own interface using a CMS. That and the fact that the X3 has the worst usability I ever seen. RVSkinLight is better but is not easy to brand. I do not see how to change stylesheets for instance. Anyway, if I can not use my own certificate for that, therefore I do not care about default interfaces.

    Since that PHP API is not working right now... I am creating a PHP library that lets you communicate indirectly with Cpanel using this: http://www.cpanel.net/docs/seminar07/XML_API.pdf. However with that I must use a TCP socket, but Unix sockets have more performance... (By the way this is not working with API2, as you can see in another thread I posted, I get a timeout or something error).

    Best regards,

    B.

  4. #4
    Member
    Join Date
    Mar 2005
    Posts
    6

    Default same error here

    I get the same error here

    Warning: fsockopen() [function.fsockopen]: unable to connect to unix://:-1 (Connection refused) in /usr/local/cpanel/php/cpanel.php on line 39
    There was a problem connecting back to the cpanel engine. Make sure your script is ends with .live.php or .livephp

    Is this a bug?

  5. #5
    cPanel Partner NOC cPanel Partner NOC Badge RSimoes's Avatar
    Join Date
    Oct 2008
    Location
    Austin, TX
    Posts
    18

    Default

    Quote Originally Posted by karel_wolfs View Post
    I get the same error here

    Warning: fsockopen() [function.fsockopen]: unable to connect to unix://:-1 (Connection refused) in /usr/local/cpanel/php/cpanel.php on line 39
    There was a problem connecting back to the cpanel engine. Make sure your script is ends with .live.php or .livephp

    Is this a bug?
    Might that be the problem?
    Last edited by RSimoes; 10-17-2008 at 12:40 PM.

  6. #6
    Member
    Join Date
    Dec 2001
    Posts
    746

    Default

    In order to use the live php functionality, the pages must be served by cpsrvd. You'll need to place the .livephp or .live.php files in /usr/local/cpanel/base/frontend/$themename in order to access the APIs. Sorry for any confusion, I'll have the README updated for future releases.

Similar Threads & Tags
Similar threads

  1. PHP: Error parsing /usr/local/lib/php.ini on line 827
    By Nicarlo in forum New User Questions
    Replies: 9
    Last Post: 04-29-2011, 10:13 PM
  2. PHP: Error parsing /usr/local/lib/php.ini on line 782
    By BerbBrown in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 04-11-2011, 05:07 PM
  3. PHP: Error parsing /usr/local/lib/php.ini on line 1136
    By desiguru in forum New User Questions
    Replies: 1
    Last Post: 12-08-2009, 07:11 PM
  4. Replies: 4
    Last Post: 11-30-2004, 06:28 AM
  5. Horde Error -/usr/local/cpanel/base/horde/lib/Registry.php
    By compunet2 in forum cPanel and WHM Discussions
    Replies: 8
    Last Post: 01-20-2004, 08:19 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube