I am following this tutorial http://azure.microsoft.com/en-gb/documentation/articles/storage-php-how-to-use-blobs/ on ussing the Azure PHP SDK to access Azure Storage Blobs.
I need to read and write to these blobs from my live Cloud Service running my PHP App. It says that the SDK is dependent on some PEAR Packages and that they should be installed using the "Pear package Installer"
The PHP Client Libraries for Azure have a dependency on the HTTP_Request2, Mail_mime, and Mail_mimeDecode PEAR packages. The recommended way to resolve these dependencies is to install these packages using the PEAR package manager.
This is all well and good on my DEV server, I simply install PEAR and then install the packages. But obviously once the App is packaged and pushed to my Azure Production Cloud Service, it doesn't contain Pear or any of packages. PHP is installed on the Cloud Service when it is spun up using the ServiceDefinition.csdef Startup Tasks. Every new instance has PHP installed on startup.
So how do I get PEAR and these Packages on my Cloud Instance? I have Googled and cannot find anything that explains using Pear on Cloud Instances, yet all the SDK documentation says it is needed?!?
Am I misunderstanding something?
While the PEAR package manager has been a mainstay in days gone by, I think it's rapidly being replaced by Composer and the like.
You don't HAVE to install using the PEAR tool, however. All it is is an early package manager. You can download the PEAR libraries individually and place them in a common directory
http://pear.php.net/package/PEAR/download
The caveat here is that this is 100% manual and all on you to update packages but PEAR updates are few and far between. Download each package and then do something to set the base include directory.
set_include_path('/path/to/pear');
Related
I have an old project that relies heavily on PEAR. I need to run the script that installs pear packages daily on a clean virtual machine. In other words, I have to install packages daily since it's a new vm everyday.
Now that PEAR is down and there is no ETA, I can't instal from php.pear.net
My question is how to install pear packages now that pear server is down.
Download the zip you need from https://github.com/pear/ for example: https://github.com/pear/Pager and then pear install package.xml
Unfortunately, this is a terrible solution and it remains to wait until the party gets up.
I tried install package pear Pager in this way:
Download zip from github -> in console I went to the downloaded folder -> I used the command: sudo pear install package.xml
then Pager is installed, but with many package this is very problematic...
I got info from another dev that I have to wait for the website to get up, but it has been going on for so long...
How the heck do you install the PHP OAuth package on Heroku?
The Heroku docs say this https://devcenter.heroku.com/articles/php-support#using-optional-extensions
which then says
The following third-party extensions can be enabled through composer.json (internal identifier names given in parentheses):
and then it refers to http://docs.php.net/oauth
I have it working locally as I installed it according to directions, but the Heroku directions are extremely lacking.
what are you suppose to put in composer.json?
Does anyone have any experience installing the OAuth package on heroku?
I am trying to get my head around how to install composer. Really confusing!
I have downloaded the windows installer and during the installation was asked to locate "php.exe". Does that mean I need to have a local server (Wamp) installed?
Lets say I manage to install composer on my PC. How do I get it to work on my web host? Do i copy files there or do I need to install composer on web host as well?
Composer requires php executable, but not webserver. So installing php from php site is sufficient. However, if you plan to develop or run php applications on your computer, you would prefer to install full stack (eg wamp) right away.
Composer is needed only to install and update dependencies, once you do it, all are just files, and you transfer them as you transfer other files to your webhost. So copy, no need to install composer on web host.
I am using XAMPP 1.8.1.
I need to write code with PHPUnit.
When I try to install PEAR using command prompt, I get the message below:
Are you installing a system-wide PEAR or a local copy?
Could some one suggest which option I should use?
Thanks in advance.
PEAR is usually installed system-wide. The benefit of this is that the various packages can be reused between different projects.
One reason why you might install a local copy of PEAR is that the administrator[s] of the server you are installing on might be reluctant to install additional packages or upgrade existing ones.
By performing a local install of PEAR you can choose the location of where the PEAR installer places the packages/PEAR code that you install.
So, another reason for installing local, even multiple, copies of PEAR is to have separate installs for each project you might be working on, though using Composer in this scenario is much more common place.
Naturally if you do install a local copy of PEAR then you will need to adjust your include-path accordingly.
I want to install PEAR on PHP 5, so I can use Spreadsheet_Excel_Writer.
I don`t know how to install it on my ISP nor my personal MacBook.
Thoughts for both?
The PEAR Manual has a quite extensive list of instructions on how to install the PEAR manager on Windows, *NIX and Mac OS X. The manual also has a section on installing PEAR remotely, for example using FTP. Following those instructions, you should be able to install PEAR (nearly) anywhere. :)
From the command line, do this:
pear install Spreadsheet_Excel_Writer
You can also download the package directly here without using PEAR: http://download.pear.php.net/package/Spreadsheet_Excel_Writer-0.9.1.tgz. It's pretty easy to use if you have the script located anywhere within your include path.
For your personal computer, using the "pear" script that ships with most PHP distributions is a good idea.
For shared hosting, you can
Track your dependencies manually, and copy all the appropriate files to the server yourself
With pear installed, do "pear install -R/my/root_dir -a Spreadsheet_Excel_Writer". This will install the package and all dependencies to the specified root directory. Copy this installation to your webhost.
You should also have a look at "pear help" and "pear help install".
You can't install pear to your isp's core. But you can install the individual files from pear's site and upload them to your host:
http://pear.php.net/package/Spreadsheet_Excel_Writer/download