My project is working fine on local but when I am uploading it on server then it is showing this error dont know what is this.
I had the same problem when I have had migrated a drupal website to new server...
To solve the problem I just used the composer command:
First cd into website directory, EX:
cd /var/www/your_website
Run composer to install drupal 8 dependencies that it's need in the website directory;
composer install
If you use the sudo command, make sure the .../vendor directory has the right permission to be accessed by the user who in the /var/wwwdirectory;
sudo composer install
I want to install composer on mounted folder in localhost /opt/lampp/htdocs/myProject
But I am unable to do it.
Because on my mac terminal cd /opt/lampp/htdocs/myProject command not working it says
-bash: cd: /opt/lampp/htdocs/myProject: No such file or directory
While the project exist. Below is the project full path:
nfs://192.168.64.2/opt/lampp/htdocs/myProject
The project is in the localhost xampp. And I have to mounted and explore whenever I need to open myProject.
I tried many things but terminal always says no such file or directory exits and I am not able to install composer.phar, composer.json in my project.
Kindly suggest what I am doing wrong.
I have these things:
the file http://api.odtu.lu/composer.phar
http://api.odtu.lu/phpinfo.php
ftp access
cPanel
Cron jobs on FreeBSD
PHP, Perl, CGI-BIN, Python, Curl.
How can I install Composer? (My aim is to install Restler)
Edit: I do not have SSH access.
This tutorial worked for me, resolving my issues with /usr/local/bin permission issues and php-cli (which composer requires, and may aliased differently on shared hosting).
First run these commands to download and install composer:
cd ~
mkdir bin
mkdir bin/composer
curl -sS https://getcomposer.org/installer | php
mv composer.phar bin/composer
Determine the location of your php-cli (needed later on):
which php-cli
(If the above fails, use which php)
It should return the path, such as /usr/bin/php-cli, /usr/php/54/usr/bin/php-cli, etc.
edit ~/.bashrc and make sure this line is at the top, adding it if it is not:
[ -z "$PS1" ] && return
and then add this alias to the bottom (using the php-cli path that you determined earlier):
alias composer="/usr/bin/php-cli ~/bin/composer/composer.phar"
Finish with these commands:
source ~/.bashrc
composer --version
It depends on the host, but you probably simply can't (you can't on my shared host on Rackspace Cloud Sites - I asked them).
What you can do is set up an environment on your dev machine that roughly matches your shared host, and do all of your management through the command line locally. Then when everything is set (you've pulled in all the dependencies, updated, managed with git, etc.) you can "push" that to your shared host over (s)FTP.
I have successfully installed Composer (and Laravel) on my shared hosting with only FTP access:
Download and install PHPShell on a shared hosting
In PHPShell's config.php add a user and an alias:
php = "php -d suhosin.executor.include.whitelist=phar"
Log in to PHPShell and type: curl -sS https://getcomposer.org/installer | php
When successfully installed, run Composer: php composer.phar
You can do it that way:
Create a directory where you want to install composer (let's say /home/your_username/composer)
Go to this directory - cd /home/your_username/composer
Then run the following command:
php -r "readfile('https://getcomposer.org/installer');" | php
After that if you want to run composer, you can do it this way (in this caseyou must be in the composer's dir): php composer.phar
As a next step, you can do this:
alias composer="/home/your_username/composer/composer.phar".
And run commands like you do it normally: $ composer install
Hope that helps
I was able to install composer on HostGator's shared hosting. Logged in to SSH with Putty, right after login you should be in your home directory, which is usually /home/username, where username is your username obviously. Then ran the curl command posted by #niutech above. This downloaded the composer to my home directory and it's now accessible and working well.
SIMPLE SOLUTION (tested on Red Hat):
run command: curl -sS https://getcomposer.org/installer | php
to use it: php composer.phar
SYSTEM WIDE SOLLUTION (tested on Red Hat):
run command: mv composer.phar /usr/local/bin/composer
to use it: composer update
now you can call composer from any directory.
Source: http://www.agix.com.au/install-composer-on-centosredhat/
Most of the time you can't - depending on the host. You can contact the support team where your hosting is subscribed to, and if they confirmed that it is really not allowed, you can just set up the composer on your dev machine, and commit and push all dependencies to your live server using Git or whatever you prefer.
PHP API using: https://github.com/sandeepshetty/shopify_api
I have PHP 5.3.27 installed
I installed Composer (by going to
the website and using their install.exe)
It mentions that
"This will download shopify_api into the
vendor/sandeepshetty/shopify_api directory."
But I do not see the folders or files anywhere on the computer.
The plugin author is saying that if you download Composer with the instructions he provided (via Terminal), then Composer will autoload those files for you. Unfortunately, though easier, simply going to the source URL for the Composer tool won't do that for you.
First, make sure you have created the composer.json file and stored it in your project directory. Then, log into your server or system via the command line (Terminal for Mac OS, Putty for Windows). Cd into your project directory, and install by entering these commands:
$ curl -s http://getcomposer.org/installer | php
$ php composer.phar install
I need to install PEAR on a server which does not have outsite access to the net. There is no go-pear.bat in the php folder and even if it had go-pear.bat i think it needs access to the net.
I looked an the Installing PEAR from a local copy from the PEAR website. But it needs PEAR to be already installed for it to work.
So do any of you guys know how to install PEAR without access to internet?
You don't need PEAR installed on the webhost, just on your local machine.
The two main approches are
Track your dependencies manually, and copy all the appropriate files to the server yourself
With pear installed on your local machine, do pear install -R/my/root_dir -a PEAR. This will install the PEAR package and all dependencies to the specified root directory. Copy this installation to your webhost.
I think it's possible to use pear to manage an installation via FTP also. I never tried.
You should also have a look at "pear help" and "pear help install".
There is a way to do this if you are on Windows and have the PHP installer.
You can select, during the PHP installation time, the PEAR option under extension menu when selecting the components for PHP installation in order to install PEAR package.
If you already have PHP installed, you just have to click on the installer to choose "modify", and choose the correct option.
http://lh4.ggpht.com/_SDci0Pf3tzU/SgBXLClDWEI/AAAAAAAAEuI/TgnBA_SEHFs/s400/pear%20install.jpg
I wrote an article on this very subject:
http://christian.roy.name/blog/install-pear-without-network-no-internet-accessoffline
It will allow you to use the pear command as well.
Create temporary folder that I will get ride of later.
mkdir pear-temp
cd pear-temp
Upload all the PEAR packages to that temp folder (using SFTP, FTP, Whatever).
If you use a USB key, then you copy them all like this:
cp /mnt/usb/*.tgz ./
Extract the core packages in a separate folder.
mkdir lib
tar x -C lib -zf PEAR-*.tgz
tar x -C lib -zf Console_Getopt-*.tgz
tar x -C lib -zf Archive_Tar-*.tgz
tar x -C lib -zf Structures_Graph-*.tgz
This bash function is to be able to set the include_path joined by colons.
function join() {
local IFS=$1
shift
echo "$*"
}
pear requires output buffering and needs to load all the core packages from the lib folder.
PHPOPT="-d output_buffering=1 -d include_path=.:$(join ':' lib/*)"
First we setup our configuration file.
php $PHPOPT lib/PEAR-*/scripts/pearcmd.php config-create $HOME/ $HOME/.pearrc
Now we install ALL our packages. Make sure you have all the required dependencies as well.
php $PHPOPT lib/PEAR-*/scripts/pearcmd.php install -o -O *.tgz
Cleanup
cd ..
rm -Rf pear-temp
Put pear in your path:
PATH="$PATH:$HOME/pear"
Edit your .profile or .bashrc if you want this to be permanent.
Edit your php.ini too or add it using set_include_path() function, whichever :)
Drink to sucess!