开发者

PEAR on Apache/PHP 5.3, .phar

Yesterday I managed to install PEAR using SSH on one of my customers servers. Today I tried to install it on a similar Server but without SSH-access.

The manual on pear.php.net claims that:

If you are running your site at a web hosting provider with no direct access to the server (via local logins, Telnet or SSH), you can use the PEAR Installer using the Web Frontend or (S)FTP.

Go to http://pear.php.net/go-pear.phar and save as go-pear.phar. Copy go-pear.phar to your server and open the corresponding URL in your browser, for example http://example.com/pear/go-pear.phar.

So I downloaded it, put it in the folder via FTP and... i can see the contents of the file. I tried downloading it by file_put_contents(file_get_contents()) and again.. nothing but the contents - but no "Installing Interface", which i expected.

So I'm totally new to Archives, especiall the PHP-Archive. But how do I manage to install PEAR without SSH (or Telnet, etc...) only with FTP? How do I "execute" a .phar file in the Browser like the Doc of pear.php.net states?

And furthermore, how do I install packages after installing PEAR? After all.. there is still no command line.

On more thing I tried is to call the archive file:

include('phar://go-pear.phar/index.php');

However this doesn't get me far. I now can see "Below is a suggested file layout for your new PEAR installation. To change individual locations, type the number in front....", which is the standard PEAR installation introduction BUT this is only a text. How could I tell a text to change the directory... ? :confused:

Thanks a lot for your help. I rea开发者_开发知识库lly searched the docs and google however in both I could not find the answer.

Running: PHP 5.3.2 on Apache/2.2.16

No access to httpd.conf, only .htaccess. It's a shared server.


You propably forgot to add .phar to the list of parsable php files in httpd.conf.

AddType application/x-httpd-php .phar


Why don't you install PEAR locally and just upload it with the classes you need/want? That's probably the easiest way to do it if you don't have access to the CLI.

See Installation of a local PEAR copy on a shared host

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜