The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

adding php class to server

Discussion in 'General Discussion' started by rawan, Dec 26, 2013.

  1. rawan

    rawan Registered

    Joined:
    Dec 26, 2013
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hi guys,

    I developed a website using xampp local host, and I used a class that extends Thread interface, and every thing was working fine,

    but after I host my website using host monster, the php page didn't work, and when I checked if thread class or interface are exist using class_exists() and interface_exists() I got false for both, so I think that is my problem,
    so I'm wondering if there is any way to upload this class to the server or to my php files to be used.

    note: to make Thread class works on xampp I needed to add some php classes like pthread. so I'm wondering if I have to add them again to the php files in the server.

    many thanks in advance.
     
  2. cPanelPeter

    cPanelPeter Technical Analyst III
    Staff Member

    Joined:
    Sep 23, 2013
    Messages:
    569
    Likes Received:
    15
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello,

    Depending on configuration, your host may allow you to install additional classes or may have to do it for you. You should check with host monster to see what their policy is on that.

    If they do allow you to install them, then there should be an option within your cPanel page to do so.
     
  3. rawan

    rawan Registered

    Joined:
    Dec 26, 2013
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hi,
    thanks for reply, so do you this this is really the problem? because what I understood from you is that uploading php classes to server is not common thing, am I right?
     
  4. cPanelPeter

    cPanelPeter Technical Analyst III
    Staff Member

    Joined:
    Sep 23, 2013
    Messages:
    569
    Likes Received:
    15
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello,

    PHP Classes can either be installed (if allowed by your host) or you can upload them using FTP and have other PHP scripts simply refer to them (again if allowed by your host). This is why I mentioned you should check with your host to see what rules they have on this process.
     
Loading...

Share This Page