I've installed solarium with composer using below commands in ubuntu:
php composer.phar require solarium/solarium
I've also used silex micro framework. After installing solarium, when I tried to run sample php file in examples folder, I got error
"Fatal error: Class 'Solarium\Client' not found in
/api/vendor/solarium/solarium/examples/1.1-check-solarium-and-ping.php on line 7"
How to get this work as expected?
I want to use both silex and solarium in a project.
Related
I have tried to install the Symfony 4 on my Macbook Air by using Composer. I have used the below commands for installing and running Symfony application
composer create-project symfony/website-skeleton symfony4
cd symfony4
composer require server --dev
php bin/console server:run
And then tried to access the application in http://127.0.0.1:8000/. Below is the error message
Below image shows the error in which line and file
I am using PHP 7.2.3 and installed by using Homebrew. At the same time when I use the below command to install, Symfony welcome page appears without any error.
composer create-project symfony/skeleton symfony4
There is no default welcome page when you create new symfony flex application and there is an issue and a pull request already.
Everything is working fine you just don't have any pages.
Here you can read how to create a symfony page: https://symfony.com/doc/current/page_creation.html
I am fairly new to Codeigniter (last 6 months) and just recently started learning about sparks and how to use them. I followed Option 1 for installing Sparks here from getsparks.org and I received the Spark Manager has been installed successfully message. I then went to install my first spark found here and received this message: Spark installed to ./sparks/GoogleAPIClient/0.6.0 - You're on fire!
Upon trying to load my application I first had an error of EXT constant being undefined. After reading some threads it was suggested I add define('EXT', '.php'); to the application/config/constants.php file so I did. Now when I try to access it I get an Error has occurred message with this:
Cannot find spark path at sparks/sparks/0.0.9/
I verified the setup was installed correctly for both the manager and my spark. I read that adding APPPATH . 'sparks/' to the SPARKPATH constant would solve it (it didn't) and then trying '../sparks/' and that didn't. What am I missing?
Using Codeigniter 3.0
Usually with codeigniter4, spark comes along with bundle however you can still try the following commands on terminal (codeigniter4 or older versions still works). I ran these commands on mac osx sierra 10.12 with php 8 and codeigniter3. Go to terminal and try command :
$ php -r "$(curl -fsSL http://getsparks.org/go-sparks)"
it should give below output on terminal-
"Pulling down spark manager from
http://getsparks.org/static/install/spark-manager-0.0.9.zip ...
Pulling down Loader class core extension from
http://getsparks.org/static/install/MY_Loader.php.txt ...
Extracting zip package ...
Cleaning up ...
Spark Manager has been installed successfully!"
you can then use below command to verify if everything works.
php tools/spark help
it should return some text and description and some commands.
I am trying to installing the library of the zend framework2.I have downloaded the skeleton application of zend framework2 and run the command in command prompt as in the zend framework installation guide on zend site but i am getting an error
it shows me an error could not open input file composer.phar
I checked the library which i have downloaded from git there is no composer.phar.There is only composer.json and a lock file of composer.I google out about this problem and find that it is due to open_ssl exention is disable in php.ini file.I checked the php.ini and found enabled.I am still getting the same error.
Regards to the official documentation for the skeleton application here
Github documentation it says
The easiest way to create a new ZF2 project is to use Composer. If you don't have it already installed, then please install as per the documentation.
with the documentation here
Composer documentation
And the Composer website here
Plus, from your screen behind your cmd line we can see this line taken from the website you show :
ZendSkeletonApplication is set up to use Composer (http://getcomposer.org) to resolve its dependencies. In this case, the dependency is Zend Framework 2 itself.
Composer is a soft his name is called composer.phar. It is what your looking for
go to C:\ProgramData\ComposerSetup\bin using command prompt then run composer cammands
I installed Composer successfully and now I'm trying to install Symfony 2 on a Macbook 10.5.8.
I downloaded Symfony Standard 2.5.0 (.tgz) on http://symfony.com/download and I tried to use the create-project command to generate a new Symfony application using
php composer.phar create-project symfony/framework-standard-edition path/to/install
but I get this error:
Fatal error: Class 'Phar' not found in /Users/jenisawesome/composer.phar on line 13
Maybe it's because I have an old php version? I'm not sure. I can't even run Composer when I type in this command:
php composer.phar
I get the same error:
Fatal error: Class 'Phar' not found in /Users/jenisawesome/composer.phar on line 13
Based on discussion in the comments, this error appears to be because you're using PHP 5.2. Composer required at least 5.3.2 to run.
Aside from that, this question appears to be a duplicate of PHP: Class 'Phar' not found
I am a php noob. I'm trying to use Solarium to connect to Solr. I installed solarium using composer. I autoloaded solarium using the following line:
require __DIR__.'/vendor/autoload.php';
I'm trying to test the Solarium version now, just to see if everything is fine. I am using the code from the examples: echo 'Solarium library version: ' . Solarium\Client::VERSION . ' - '; for printing the version.
However, I get the following error:
Fatal error: Class 'Solarium\Client' not found in /var/www/index.php
I have tried using use Solarium\Client; before using Solarium\Client as suggested here but the same error still came up. What is causign this and how does fix it?
You can easily get it working by reinstalling solarium using composer.
First of all remove solarium from composer.json.
Then run composer update
After that add latest version of Solarium in composer.json as "solarium/solarium": "3.3.0" in require.
Then run composer install
Then try your ping query.
Hope it helps.