adding php class to server

rawan

Registered
Dec 26, 2013
2
0
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.
 

cPanelPeter

Technical Analyst III
Staff member
Sep 23, 2013
575
21
143
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.
 

rawan

Registered
Dec 26, 2013
2
0
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?
 

cPanelPeter

Technical Analyst III
Staff member
Sep 23, 2013
575
21
143
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.