I am attempting to work with XML-RPC via PHP on a GoDaddy server.
This same server is hosting a Wordpress Blog that makes use of XML-RPC and is functioning, though that may be unrelated...
Whenever I attempt to use any functions that are integrated into PHP for use with XML-RPC, I get an error (function list here: http://us3.php.net/manual/en/ref.xmlrpc.php) e.g.:
Fatal error: Class 'xmlrpc_client' not found
Is this because XML-RPC's PHP functions are not enabled on my server? If so, how do I go about enabling those - it would seem I would have to install the XML-RPC library to do so and of course I cannot do that on a shared server. Doesn't Wordpress use the same batch of XML-RPC functions though (it works fine)?
I think I have managed to thoroughly confuse myself. I have zero experience with XML-RPC.
The first point you made regarding the same server hosting a site supporting XML-RPC, is quite odd, as XML-RPC is enabled at compile time. There are no directives to be used in the php.ini file, and you therefore couldn't enable XML-RPC at run time using ini_set(). This would point to either a different server or several PHP instances running on the same server.
Either way you need to have this extension enabled at compile time, which is out of your hands. So you would have to contact somebody at GoDaddy to get this working.
An alternative to that, would be to look at something like Zend_XmlRpc which is well supported and doesn't require the PHP XML-RPC extension to work.
Good luck.
Related
I am using a shared host. PHP is compiled with --disable-sysvshm. I get the following error while running a script:
Fatal error: Call to undefined function shm_attach() in ...
Is there any way to enable it without re-compiling php?
There is, but as a regular user, you can't do it. You'll need admin access.
If you have root access, then your package manager should have the extension available if it doesn't come built into PHP. For SuSE, it's looking like a php-sysvshm package would do it. If there's no package, you'll still need to rebuild, but it's doable.
If you don't have the access you'd need to build PHP or install packages, you won't be able to build or install, let alone load, extensions (which are pretty much the only way you can add functionality without replacing your existing PHP). In that case, you'll need to talk to your web host and see if they will install it for you. If they won't, then that's pretty much it.
Is it possible to find a php module that can connect with ssl proxy, without need for install php or a apache mods?
I'm not quite sure what you're trying to achieve, but either PHP's cURL library or fopen() function should do what I think you're looking to do.
cURL does need to be installed (but is often present by default). However, I believe the slower fopen() function should be available in most shared hosting environments (which is what I assume you're using).
Is there a pure PHP implementation of SQLite that will run on PHP 5.1.6? I am working on an application that would benefit from being able to store data in a relational database, but the server that it has to run on is stuck with PHP 5.1.6 and has been configured "'--without-sqlite"
I have no control over this server; cannot recompile, upgrade or otherwise modify PHP aside from using .htaccess files. Hosting externally is also not an option, unfortunately. MySQL may be possible but would be a nightmare trying to get their IT to create a database for me. (It took them 6 weeks to get .htaccess files enabled because of red tape and other things)
Am I out of luck? My fall back is to write everything to flat files but I really would rather not do that.
EDIT: Fixed typo. PHP does not have the SQLite extension and was configured "'--without-sqlite" according to the output of phpinfo()
Actually, you could easily download and install sqlite in your userspace, whether on windows or on a linux remote shell doesn t usually matter unless your host is unusually restrictive, if that is the case you should change service provider.
Once sqlite is installed, you can one of the available pear extensions or pecl extension to allow easy access through php.
Tutorial and code examples for the pear solution here.
I use Rackspace Cloud Sites for web hosting. I was trying to use a couple of the posix_* functions and noticed that they aren't available. Using phpinfo() I was able to see that --disable-posix is part of the "Configure Command". Also, the disable_functions directive has this string leak,posix_getpwuid,posix_getpwnam,posix_getgrid,posix_getgrnam,posix_getgroups.
Is there a way to override this using .htaccess? I didn't see any mention of it in the manual.
Configure commands like --disable-posix are part of the compilation process.
Unless they let you compile and run your own build of PHP (I'm not familiar with RackSpace Cloud), you can't change that.
No. They are disabled for a reason. That's the price you pay for using Rackspace Cloud Sites. If you need to enable stuff and change configuration settings beyond what .htaccess allows you to do, you'll need to setup a Rackspace Cloud Server for your web hosting (which is not managed by Rackspace b.t.w.)
Edit: Though I should clarify what I meant by "not managed by Rackspace"... They manage the hardware, but not the software that goes on your server. That's completely up to you.
I have a library written in C that gets distributed as a PHP extension, and my users are having problems accessing the library when running in a Shared Hosting environment.
Previously (In PHP versions less that 5.2.5) our customers could simply use the dl() function and the full path to the library to access it.
Since PHP 5.2.5 the dl() function can not contain any path information and so the library must be installed by a System administrator in the global PHP extensions directory.
As of PHP 5.4 the dl() function has been deprecated and has been removed completely from PHP 6.0. This will mean that all libraries must be installed by a System Administrator and also loaded via the PHP.ini.
As far as I can tell this is the new reality for PHP extensions in a shared hosting environment and there are no 'work arounds'.
What are the key things I need to do with my distribution to maximise the likelihood that a Shared Host Administrator will install it on behalf of my customers?
A lot of shared hosts are going to disable the dl() function, even if its usable in their particular version of PHP. In short, shared hosting is rapidly becoming antiquated except for those who just want to host a blog or some other kind of vanity site.
Its going to be quite some time before most people are 'in the clouds', however I don't see anything wrong with you expecting more serious users to have a VPS .. and specify the need for one as a system requirement.
I feel the same burn on both sides. I own a small hosting company and also develop custom PHP extensions. Fortunately, for me, I can make my products available to clients that I host without hassle.
Have you thought of just bringing up a shared server and offering hosting to those who need it?