Error with capifony deployment to FreeBSD system - symfony

I have a problem with uploading code to FreeBSD server.
Deployment output:
--> Updating code base with checkout strategy
Password for user#server:
--> Creating cache directory................................✔
--> Creating symlinks for shared directories................✔
--> Creating symlinks for shared files......................✔
--> Normalizing asset timestamps............................✔
--> Copying vendors from previous release...................✔
--> Downloading Composer....................................✘
*** [deploy:update_code] rolling back
failed: "sh -c 'sh -c '\\''cd /var/www/domain.com/releases/20140215073342 && curl -s http://getcomposer.org/installer | php'\\'''" on 0.0.0.0
And if i run the code:
sh -c 'sh -c '\\''cd /var/www/domain.com/releases/20140215073342 && curl -s http://getcomposer.org/installer | php'\\'''
on server, i have a error:
-bash: php\\: command not found
Can this error in freebsd system with escape special chars?
Thank.
UPD
PHP Cli installed (Version: 5.5.9)

It seems that now you can not download composer using HTTP, only HTTPS. Capifony has hardcoded installation command for composer which uses HTTP, and does not follow redirects.
With other words it's a bug in Capifony, and it seems that there is no workaround to fix it using configuration.

I know the answer is a late but I was with the same issue and I can fix it enabling the extension phar in my server. I had this message when I tried to install composer manually .
Install it or recompile php without --disable-phar

Related

Install systemd service on Debian installation

I'm building custom Debian ISO with simple-cdd utility. It worked well till the moment when I attached my own .deb package.
build-simple-cdd --dist stretch --profiles moj --force-root --local-packages /root/iso/deb
build-simple-cdd works properly, because I saw my deb package in tmp directory structure and iso image is created successfully. However debian installation fails
I suspect, that postinst script fails, since it uses systemctl command when it may be unavailable.
#!/bin/sh
set -e
echo $1
if [ "$1" = "configure" ]; then
echo "Configuring privileges..."
chown user:user /usr/bin/Koncentrator
chmod 0755 /usr/bin/Koncentrator
echo "Enabling Koncentrator services..."
systemctl daemon-reload
systemctl enable Xvfb.service
systemctl enable Koncentrator.service
fi
I've added systemd dependency to control file, but it doesn't work.
I made workaround for this issue. simple-cdd allows to prepare post installation script. apt install is called there without problems. Two steps are required to use this solution:
Add deb package to installation disk. This is configured via profile configuration file (moj.conf):
all_extras="$all_extras /root/iso/files/customapackage_0.1.3.deb"
Run apt install in moj.postinst script:
#!/bin/sh
mount /dev/cdrom /media/cdrom
cd /media/cdrom/simple-cdd
apt install ./custompackage_0.1.3.deb
cd /
sync
umount /media/cdrom
If you want to debug your postinst script, you can insert there long sleep:
#!/bin/sh
sleep 10000000
...
And switch terminal (Ctrl+Alt+F1-6) during finish-install phase. Than call chroot /target to switch in-target environemnent

Blank page on installing Grav

I have download grav zip file and extract it to my web server or local host.iam using fedora OS with PHP version 5.6.23.on navigating localhost/grav in browser,it shows a blank page.can anyone help me to solve this?
Check /var/log/httpd/error_log, if you see errors about file permission, maybe SELinux prevented web server from writing configuration files. This often happens to a fresh installation of Fedora/apache.
You can try this:
From terminal, run su -c "dnf install policycoreutils-python-utils" to install policycoreutils-python-utils package which provides semanage
Run su -c "semanage permissive -a httpd_t" to ask SELinux to monitor apache in permissive mode and allow apache to write to its public folder.
Now refresh the page to see if Grav is now running.
If this doesn't work and you want to reserve the command semanage permissive -a httpd_t, you run semanage permissive -d httpd_t (more details)

SULU CMS installation errors with Laravel Homestead

Follow this document http://docs.sulu.io/en/latest/book/getting-started.html at the end of installation process I got this error:
Target: cache
cache:clear ({"--no-optional-warmers":true,"--no-debug":true,"--no-interaction":true})
// Clearing the admin cache for the dev environment with debug true
[Symfony\Component\Filesystem\Exception\IOException]
Failed to remove directory "/home/vagrant/Code/sulu/var/cache/admin/de~/doctrine": .
sulu:build [-D|--nodeps] [--destroy] [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [-s|--shell] [--process-isolation] [-e|--env ENV] [--no-debug] [--] <command> [<target>]
Before that I was trying to set up file permissions with this:
HTTPDUSER=`ps axo user,comm | grep -E '[a]pache|[h]ttpd|[_]www|[w]ww-data|[n]ginx' | grep -v root | head -1 | cut -d\ -f1`
sudo setfacl -R -m u:"$HTTPDUSER":rwX -m u:`whoami`:rwX var/cache var/logs var/uploads var/uploads/* web/uploads web/uploads/* var/indexes var/sessions
sudo setfacl -dR -m u:"$HTTPDUSER":rwX -m u:`whoami`:rwX var/cache var/logs var/uploads var/uploads/* web/uploads web/uploads/* var/indexes var/sessions
and also had these errors:
setfacl: web/uploads: Operation not supported
setfacl: web/uploads/media: Operation not supported
setfacl: web/uploads/media: Operation not supported
My host OS : Ubuntu 16.04
Vagrant : v.1.9.3
VirtualBox : v.5
Homestead: v.5.2.1
Does anyone have successful installation Sulu CMS with Homestead?
What is the option to solve these my issues?
Sulu CMS looks very promising but unfortunately I could not install it locally still with many attempts.
UPDATE
After comment of Daniel I've tried other way to install Sulu but again got error at the very end of installation:
Executing builders
==================
Target: cache
cache:clear ({"--no-optional-warmers":true,"--no-debug":true,"--no-interaction":true})
// Clearing the admin cache for the dev environment with debug true
[Symfony\Component\Filesystem\Exception\IOException]
Failed to remove directory "/home/vagrant/Code/sulu/app/cache/admin/de~/annotations": .
Opened test.app in browser I see this error:
Fatal error: Uncaught
Symfony\Component\Debug\Exception\FatalThrowableError: Call to a member function getLocale() on null in /home/vagrant/Code/sulu/vendor/sulu/sulu/src/Sulu/Bundle/WebsiteBundle/Twig/Content/ContentPathTwigExtension.php on line 70
Symfony\Component\Debug\Exception\FatalThrowableError: Call to a member function getLocale() on null in /home/vagrant/Code/sulu/vendor/sulu/sulu/src/Sulu/Bundle/WebsiteBundle/Twig/Content/ContentPathTwigExtension.php on line 70
Tried to delete cache folders manually - the same error.
All console commands work fine.
Any ideas?
P.S. I have a good experience of installation other Symfony-based applications under Homestead and all went smooth basically (Sylius, eZ etc.). So I am very surprised....
To get around this, you need to remove this folder from the host machine, because it's an artifact from the previous process of trying to set things up and it's in god-mode, created by a no-longer existing almighty entity.
vagrant destroy (needed to release filesystem locks)
Remove folder on host: rm -rf .../sulu/app/cache/admin
type: nfs on folder binding
vagrant up
Should work then, encountered this same problem recently.
If you're using Homestead Improved, use the built-in "sulu" project type for a decent Nginx auto-setup:
sites:
- map: homestead.app
to: /home/vagrant/Code/Project/web
type: sulu

Error installing Meteor on linux x86_64 chrome os

I am trying to install Meteor on the HP14 Chromebook. It is a linx x86_64 chrome os system.
Each time I try to install it I run into errors.
The first time I tried to install it the installer just downloaded the Meteor preengine but never downloaded the tarball or installed the actual meteor application structure.
So, I decided to try as sudo.
sudo curl https://install.meteor.com | /bin/sh
This definitely installed it because you can see it when ls
chronos#localhost ~/projects $ chronos#localhost ~/projects $ ls /home/chronos/user/.meteor/
bash: chronos#localhost: command not found
Now when I try to run meteor --version or meteor create myapp without sudo I get the following error.
````
chronos#localhost ~/projects $ meteor create myapp
'/home/chronos/user/.meteor' exists, but '/home/chronos/user/.meteor/meteor' is not executable.
Remove it and try again.
````
When I try to run sudo meteor --version or sudo meteor create myapp I get this error.
chronos#localhost ~/projects $ sudo meteor create myapp
mkdir: cannot create directory ‘/root/.meteor-install-tmp’: Read-only file system
Any ideas? Thinking I have to make that partition writeable. I made partition 4 writeable.
Put your chrome book into dev mode.
http://www.chromium.org/chromium-os/developer-information-for-chrome-os-devices
Boot into dev mode.
ctrl-alt t to crosh
shell
sudo su -
cd /usr/share/vboot/bin/
./make_dev_ssd.sh --remove_rootfs_verification --partitions 4
reboot
After rebooting
sudo su -
mount -o remount,rw /
mount -o remount,exec /mnt/stateful_partition
Write yourself a read/write script
sudo vim /sbin/rw
#!/bin/bash
echo "Making FS Read/Write"
sudo mount -o remount,rw /
sudo mount -o remount,exec /mnt/stateful_partition
sudo mount -i -o remount,exec /home/chronos/user
echo "You should now have full Read/Write access"
exit
Change permissions on script
sudo chmod a+x /sbin/rw
Run to set read/write root
sudo rw
Install Meteor as indicated on www.meteor.com via curl and meteor create works!
Alternatively you can edit the chomeos_startup though that might not be the best idea. It is probably best to have read/write on demand as illustrated above.
cd /sbin sudo
sudo vim chromeos_startup
Go to lines 51 and 58 and remove the noexec options from the mount command.
Down at the bottom of the script, above the note about ureadahead and below the if statement, add in:
mount -o remount,exec /mnt/stateful_partition
#uncomment this to mount root r/w on boot
mount -o remount,rw /
Again, editing chromeos_startup probably isn't the best idea unless you are so lazy you can't type sudo rw.
Enjoy.
This is super easy to fix!!
Just run this (or put it in .bashrc or .zshrc to make it permanent):
sudo mount -i -o remount,exec /home/chronos/user
Based on your question (you are using sudo) I assume you already have Dev Mode enabled, which is required for the above sudo command to work.
ChromeOS mounts the home folder using the noexec option by default, and this command remounts it with exec instead. And boom, Meteor will work just fine after that (and so will a bunch of other programs running out of your home folder).
Original tip: https://github.com/dnschneid/crouton/issues/928

symfony2 app console: no available command

After HDD crash, I had to reimport my symfony2 app into Eclipse from my SVN server.
After syncing everything, I can't use the console anymore. I only get 2 commands : list and help.
I tried:
php bin/vendors install --reinstall
At the end, I got the following message:
[InvalidArgumentException]
There are no commands defined in the "assets" namespace.
[InvalidArgumentException]
There are no commands defined in the "cache" namespace.
My configuration is pretty simple:
- ubuntu server 11.04 (64bits)
- virtualbox OSE
How can I fix it?
Here is the result of app/console list command:
oc#ubuntu-server:/var/www/projets/Simoov2/src$ app/console list
Symfony version 2.0.0-RC4 - app/dev/debug
Usage:
[options] command [arguments]
Options:
--help -h Display this help message.
--quiet -q Do not output any message.
--verbose -v Increase verbosity of messages.
--version -V Display this program version.
--ansi Force ANSI output.
--no-ansi Disable ANSI output.
--no-interaction -n Do not ask any interactive question.
--shell -s Launch the shell.
--env -e The Environment name.
--no-debug Switches off debug mode.
Available commands:
help Displays help for a command
list Lists commands
OK. As I thought, this is not related to symfony2 but related to virtualbox mounting system.

Resources