Elastux: Apache 500 eror after fresh install - asterisk

After installing the Elastix 4.0 distro, I always have a broken web-admin panel. What am I doing wrong?
/var/log/httpd/ssl_error_log
[Fri Oct 07 22:34:08.636204 2016] [:error] [pid 4510] [client 192.168.88.88:50414] PHP Fatal error: Uncaught --> Smarty: unable to write file /var/www/html/var/templates_c/wrt57f7eaa09b4319_91812285 <-- \n thrown in /usr/share/php/Smarty/sysplugins/smarty_internal_write_file.php on line 46

You'll need to make the /var/www/html/var/templates_c directory writable by the user the web server is running under. For example:
chmod -R +w /var/www/html/var/templates_c

Apache should work under asterisk user.
/var/www/html/ and /var/lib/php should be changed to same owner.

Related

I can access the site over SSH but not via HTTP?

I have a wordpress instance on AWS Lightsail.
I can access the VPS via SSH but it won't load over HTTP??
Here is what my error_log is saying:
[Mon May 13 10:58:14.946209 2019] [proxy:error] [pid 2780:tid 139711779657472] (2)No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /opt/bitnami/php/var/run/wordpress.sock (wordpress-fpm) failed
[Mon May 13 10:58:14.946221 2019] [proxy_fcgi:error] [pid 2780:tid 139711779657472] [client 78.46.85.236:11708] AH01079: failed to make connection to backend: httpd-UDS
I have checked all services are running. i.e apache2, mySQL & PHP
this isn't Apache complaining. Apache is running just fine and cannot reverse proxy to the unix socket wordpress-fpm. It is likely that there is an issue where the php-fpm service is either not started, or your app is erroring. there should be a separate php error log and apache error log (this looks like the apache one). of course try the below commands to make sure your app is running at all.
$ sudo service php-fpm start # <- start it
$ sudo service php-fpm stop # <- stop it
$ sudo service php-fpm restart # <- restart it
$ sudo service php-fpm reload # <- reload it

Update to pyodbc 4 causes "Segmentation fault"

I have a Django+celery site running on Elastic Beanstalk that used pyodbc 3. Because of another issue, I had to update to pyodbc 4.
However, the web site starting giving error 500 and this is the information logged:
[Fri Feb 24 20:02:14.448536 2017] [core:notice] [pid 27978] AH00052: child pid 28292 exit signal Segmentation fault (11)
[Fri Feb 24 20:02:15.145503 2017] [core:error] [pid 27988] [client 205.165.34.225:50040] End of script output before headers: wsgi.py, referer: ...
During that time the Celery worker was still running and working just fine! I've re-deployed the whole server (Rebuild Environment in AWS) and it didn't fix the issue.
I had to revert to pyodbc 3 and it started working just fine. Any ideas?
django 1.10.4, pyodbc 4.0.11, django-pyodbc-azure 1.10.0.1
We have run into this issue as well, and will be providing a stack trace and related information to pyodbc on Monday. We've fixed it by pinning our requirements like this:
pyodbc==3.1.1
django-pyodbc-azure==1.10.4.0
While this doesn't get you pyodbc 4.0 yet, it will work for the rest of your site. We had some luck using 4.0.5 for running the site, but ran into some issues with migrations. (Note: if you use django-pyodbc-azure, you should use the highest version that matches your Django version, I.e. 1.10.4.0 for Django 1.10.)
Good luck!

Ubuntu 14.04 Apache 2.4.7 symfony2 site is not working Permission Denied

I have installed Ubuntu 14.04 and Apache2.4.7 But when I tried to create the vhost it start giving me the error. after that I have put my project in the /var/www/html directory its still not accessible.
[Thu Apr 16 09:56:38.559161 2015] [core:error] [pid 3412] (13)Permission denied: [client 127.0.0.1:59566] AH00035: access to /cls/web/app_dev.php denied (filesystem path '/var/www/html/cls/web') because search permissions are missing on a component of the path
I have fixed the issue i just have changed the permissions of the directory to 755 and it worked for me.
sudo chmod 755 /to/directory

I get some errors trying to install cpXstack. It fails at the end

I'm trying to install cpXstack on my site http://tequierocali.org, But it fails every time I try to get it done.
I get the following errors, I wonder if anybody has figured this out:
Complete!
sed: can't read /var/spool/incron/root: No such file or directory
PID unreadable in: /usr/local/cpanel/3rdparty/mailman/data/master-qrunner.pid
[Errno 2] No such file or directory: '/usr/local/cpanel/3rdparty/mailman/data/master-qrunner.pid'
Is qrunner even running?
/etc/exim.pl.local.build syntax OK
PID unreadable in: /usr/local/cpanel/3rdparty/mailman/data/master-qrunner.pid
[Errno 2] No such file or directory: '/usr/local/cpanel/3rdparty/mailman/data/master-qrunner.pid'
Is qrunner even running?
/etc/exim.pl.local.build syntax OK
info [rebuildhttpdconf] 'local' datastore in use (/var/cpanel/conf/apache/local)
Built /usr/local/apache/conf/httpd.conf OK
Waiting for httpd to restart................finished.
httpd (/usr/local/apache/bin/httpd -k start -DSSL) running as root with PID 10333 (pidfile check method)
Apache successfully restarted.
[10366] [2013-02-07 06:36:31 +0200] [main] Current process '20664' stopped
[Thu Feb 7 06:36:32 2013] Starting /usr/local/cpanel/libexec/tailwatch/tailwatchd daemon
Log is at /usr/local/cpanel/logs/tailwatchd_log
cat: /opt/pifpm/pifpm.config: No such file or directory
./cpxstack.sh: line 39: /etc/init.d/php-fpm-5.3.21: No such file or directory
error reading information on service php-fpm-5.3.21: No such file or directory
./cpxstack.sh: line 39: /etc/init.d/php-fpm-5.4.11: No such file or directory
error reading information on service php-fpm-5.4.11: No such file or directory
Installation failed: contact cpxstack#sysally.net
Thanks,
Caro
You should check the initial stages of the error to understand what is really happening .
I am one of the programmers of this plugin ;I can assist you better if you provide the exact reason why the install failed .

symfony 2.1 application not work on free openshift

I've deployed my Symfony 2.1 application on openshift and it doesn't work.
Calling app.php server return 200 OK and a white page (in my local server work well).
Log:
=> php-5.3/logs/error_log-20130306-000000-EST <== [Tue Mar 05 19:16:00 2013] [error] [client 127.5.146.1] PHP 3. require_once()
/var/lib/openshift/5e487f6c4a484700999d9213755b64eb/app-root/runtime/repo/php/app/bootstrap.php.cache:4
[Tue Mar 05 19:16:00 2013] [error] [client 127.5.146.1] PHP 4.
require()
/var/lib/openshift/5e487f6c4a484700999d9213755b64eb/app-root/runtime/repo/php/app/autoload.php:5
[Tue Mar 05 19:16:00 2013] [error] [client 127.5.146.1] PHP 5.
ComposerAutoloaderInit12cecca862685bdd480babbdd1b1ec7a::getLoader()
/var/lib/openshift/5e487f6c4a484700999d9213755b64eb/app-root/runtime/repo/php/vendor/autoload.php:7
[Tue Mar 05 19:16:00 2013] [error] [client 127.5.146.1] PHP Fatal
error: require(): Failed opening required
'/var/lib/openshift/5e487f6c4a484700999d9213755b64eb/app-root/runtime/repo/php/vendor/kriswallsmith/assetic/src/functions.php' (include_path='.:/var/lib/openshift/5e487f6c4a484700999d9213755b64eb/app-root/runtime/repo//libs/:/var/lib/openshift/5e487f6c4a484700999d9213755b64eb/php-5.3/phplib/pear/pear/php/:/usr/share/pear/')
in
/var/lib/openshift/5e487f6c4a484700999d9213755b64eb/app-root/runtime/repo/php/vendor/composer/autoload_real.php
on line 42 [Tue Mar 05 19:16:00 2013] [error] [client 127.5.146.1] PHP
Stack trace: [Tue Mar 05 19:16:00 2013] [error] [client 127.5.146.1]
PHP 1. {main}()
/var/lib/openshift/5e487f6c4a484700999d9213755b64eb/app-root/runtime/repo/php/web/app.php:0
[Tue Mar 05 19:16:00 2013] [error] [client 127.5.146.1] PHP 2.
require_once()
/var/lib/openshift/5e487f6c4a484700999d9213755b64eb/app-root/runtime/repo/php/web/app.php:7
[Tue Mar 05 19:16:00 2013] [error] [client 127.5.146.1] PHP 3.
require_once()
/var/lib/openshift/5e487f6c4a484700999d9213755b64eb/app-root/runtime/repo/php/app/bootstrap.php.cache:4
[Tue Mar 05 19:16:00 2013] [error] [client 127.5.146.1] PHP 4.
require()
/var/lib/openshift/5e487f6c4a484700999d9213755b64eb/app-root/runtime/repo/php/app/autoload.php:5
[Tue Mar 05 19:16:00 2013] [error] [client 127.5.146.1] PHP 5.
ComposerAutoloaderInit12cecca862685bdd480babbdd1b1ec7a::getLoader()
/var/lib/openshift/5e487f6c4a484700999d9213755b64eb/app-root/runtime/repo/php/vendor/autoload.php:7
Any idea or suggestion?
Seems like you're missing some of the files in your gear repository. Did you add-commit-push all of your files?
You can get list of the deployed *.php files by running:
ssh <INTO-YOUR-GEAR> 'cd ~/app-root/runtime/repo/php && find ./ -name \*.php'
(obviously you need to substitute <INTO-YOUR-GEAR> with your SSH string)
You have not "warm-up" your cache since the bootstrap.php.cache file isn't there, it seems like you just push your repo and do nothing yet on the openshift side.
You'll need to configure your symphony app first, that is download all the dependencies, fill in all the database settings, mailer settings and all other stuff.
ssh into your gear using this command rhc ssh -a <yourappname>, cd into your symfony root directory, and run php composer.phar install this will start everything that is needed to deploy your app completely
The best way to deploy a Symfony app to Openshift is:
Be sure you have a Symfony2 app working well in localhost (dev and prod)
Your proyect have to be using git.
Your .gitignore file is ignoring vendors, cache, bootstrap, logs, composer etc.
You have committed every pending change.
You need an openshift gear using PHP 5.4 and a cartridge of MySql 5.5
You need rhc to be installed and configured
Config your gear to public a branch called release: rhc app-configure --deployment-branch release -a <app-name>
Create a new php file that will give MySQL access to your app:
<?php
# app/config/params.php
if (getEnv("OPENSHIFT_APP_NAME")!='') {
$container->setParameter('database_host', getEnv("OPENSHIFT_MYSQL_DB_HOST"));
$container->setParameter('database_port', getEnv("OPENSHIFT_MYSQL_DB_PORT"));
$container->setParameter('database_name', getEnv("OPENSHIFT_APP_NAME"));
$container->setParameter('database_user', getEnv("OPENSHIFT_MYSQL_DB_USERNAME"));
$container->setParameter('database_password', getEnv("OPENSHIFT_MYSQL_DB_PASSWORD"));
}?>
This will tell the app that if is openshift environment it needs to load different user an database
Import this file (params.php) to your app/config/config.yml file:
imports:
- { resource: parameters.yml }
- { resource: security.yml }
- { resource: params.php }
...
Commit your changes.
Create a new branch that will push your changes to Openshift: git checkout -b release
Add your remote repository from openshift: git remote add openshift -f <youropenshiftrepository.git>
Merge the differences between both repositories git merge openshift/master -s recursive -X ours
Create a 'deploy' file (the one executed in openshift after you push your app) in your new folder "/.openshift/action-hooks" (Created when you added your openshift repository):
#!/bin/bash
# Symfony deploy
export COMPOSER_HOME="$OPENSHIFT_DATA_DIR/.composer"
if [ ! -f "$OPENSHIFT_DATA_DIR/composer.phar" ]; then
curl -s https://getcomposer.org/installer | php -- --install-dir=$OPENSHIFT_DATA_DIR
else
php $OPENSHIFT_DATA_DIR/composer.phar self-update
fi
unset GIT_DIR
cd $OPENSHIFT_REPO_DIR/
php $OPENSHIFT_DATA_DIR/composer.phar install
php $OPENSHIFT_REPO_DIR/app/console cache:clear --env=dev
chmod -R 0777 $OPENSHIFT_REPO_DIR/app/cache
chmod -R 0777 $OPENSHIFT_REPO_DIR/app/logs
rm -r $OPENSHIFT_REPO_DIR/php
ln -s $OPENSHIFT_REPO_DIR/web $OPENSHIFT_REPO_DIR/php
rm -r $OPENSHIFT_REPO_DIR/php
ln -s $OPENSHIFT_REPO_DIR/web $OPENSHIFT_REPO_DIR/php
php $OPENSHIFT_REPO_DIR/app/console doctrine:schema:update --force
Give this file permissions to be executed. In windows: git update-index --chmod=+x .openshift/action_hooks/deploy In Linux and Mac: chmod +x .openshift/action_hooks/deploy
Add your new file to the git project and make the commit.
Push to openshift: git push openshift HEAD
Your console will show you every step it is working on.
Come back to your master branch. git checkout master
Then you can keep working normaly on your project, commit your changes and move to release branch to deploy your new changes: git checkout release git merge master git push openshift HEAD git checkout master
And that's how I work with Symfony and Openshift. (These instructions are a mix from many ways I read and I imporved with some changes. It works very well for every app I've made.

Resources