FatalErrorException in PropelBundle.php line 29: Compile Error: Propel\PropelBundle\PropelBundle::boot(): Failed opening required - propel

Im trying to use propel ORM with sympfony v-2.7
In my composer I've added this line
"propel/propel-bundle": "^1.4",
and installed this package successfully.
Then I load the Bundle into my karnel using this
$bundles = array(
new Propel\PropelBundle\PropelBundle(),
);
My config.yml settings
propel:
path: "%kernel.root_dir%/../vendor/propel"
phing_path: "%kernel.root_dir%/../vendor/phing"
logging: %kernel.debug%
dbal:
driver: %database_driver%
user: %database_user%
password: %database_password%
dsn: %database_driver%:host=%database_host%;dbname=%database_name%;charset=UTF8
options: {}
attributes: {}
But when I try to access- http://localhost/my-serp/web/
I got this Error
FatalErrorException in PropelBundle.php line 29:
Compile Error: Propel\PropelBundle\PropelBundle::boot(): Failed opening required 'D:\wamp\www\my-serp
\app/../vendor/propel/runtime/lib/Propel.php' (include_path='D:\wamp\www\my- serp\vendor/phing/phing/classes;D:\wamp
\www\my-serp\vendor/propel/propel1/runtime/lib;D:\wamp\www\my- serp\vendor/propel/propel1/generator/lib;.;C:\php\pear')
in PropelBundle.php line 29
at PropelBundle->boot() in bootstrap.php.cache line 2414
at Kernel->boot() in bootstrap.php.cache line 2442
at Kernel->handle() in app_dev.php line 28
at {main}() in app_dev.php line 0
I follow the documentation from github, can anybody say me what i've missed ??

Check/change your propel path to:
path: "%kernel.root_dir%/../vendor/propel/propel1"

Related

Codeigniter mkdir: Permission denied error

How to resolve these errors?
A PHP Error was encountered
Severity: Warning
Message: mkdir(): Permission denied
Filename: drivers/Session_files_driver.php
Line Number: 136
Backtrace:
File: /var/www/html/application/controllers/Home.php
Line: 8
Function: __construct
File: /var/www/html/index.php
Line: 315
Function: require_once
Warning: Uncaught Exception: Session: Configured save path '/var/www/html/application/cache/session' is not a directory, doesn't exist or cannot be created. in /var/www/html/system/libraries/Session/drivers/Session_files_driver.php:138 Stack trace: #0 [internal function]: CI_Session_files_driver->open('/var/www/html/a...', 'ci_session') #1 /var/www/html/system/libraries/Session/Session.php(143): session_start() #2 /var/www/html/system/core/Loader.php(1281): CI_Session->__construct() #3 /var/www/html/system/core/Loader.php(1174): CI_Loader->_ci_init_library('Session', 'CI_', NULL, 'session') #4 /var/www/html/system/core/Loader.php(1037): CI_Loader->_ci_load_stock_library('Session', 'Session/', NULL, NULL) #5 /var/www/html/system/core/Loader.php(1082): CI_Loader->_ci_load_library('Session', NULL, NULL) #6 /var/www/html/system/core/Loader.php(218): CI_Loader->_ci_load_library('Session', NULL, NULL) #7 /var/www/html/system/core/Loader.php(202): CI_Loader->library('session', NULL) #8 /var/www/html/system/core/Loader.php(13 in /var/www/html/system/libraries/Session/drivers/Session_files_driver.php on line 138
Fatal error: session_start(): Failed to initialize storage module: user (path: /var/www/html/application/cache/session) in /var/www/html/system/libraries/Session/Session.php on line 143
A PHP Error was encountered
Severity: Error
Message: session_start(): Failed to initialize storage module: user (path: /var/www/html/application/cache/session)
Filename: Session/Session.php
Line Number: 143
Backtrace:
if you're using an apache2-Webserver, check the directory permissions for /var/www/html/application/cache/session. It has to be legible and writable for www-data user.
To set the permissions, simply run sudo chown -R www-data /var/www/html and sudo chmod -R u+rw /var/www/html. This sets the directory permissions recursively to your webroot and all subdirectories.

Applying Codeigniter 3 to a new domain host gives mkdir() error for session_files_drive.php

I have a Codeigniter framework setup that I move cross multiple domain setups as a default starting point. It gives me the below error. It is the same when I added a clean install of CI3 and added database info, and theese following autoloads:
$autoload['libraries'] = array('database', 'session', 'user_agent', 'upload');
$autoload['helper'] = array('form', 'url');
I tried removing the 'session', library and the error went away.
Below you see the error:
A PHP Error was encountered
Severity: Warning
Message: mkdir(): Invalid path
Filename: drivers/Session_files_driver.php
Line Number: 136
Backtrace:
File: /customers/9/0/3/***.***/httpd.www/index.php
Line: 315
Function: require_once
A PHP Error was encountered
Severity: Warning
Message: Cannot modify header information - headers already sent by (output started at /customers/9/0/3/***.***/httpd.www/system/core/Exceptions.php:271)
Filename: core/Common.php
Line Number: 564
Backtrace:
An uncaught Exception was encountered
Type: Exception
Message: Session: Configured save path '' is not a directory, doesn't exist or cannot be created.
Filename: /customers/9/0/3/***.***/httpd.www/system/libraries/Session/drivers/Session_files_driver.php
Line Number: 138
Backtrace:
File: /customers/9/0/3/***.***/httpd.www/index.php
Line: 315
Function: require_once
I have hidden the domain name. Sorry for that, but I dont think thats extremly vital.
Here is my config for sessions:
$config['sess_driver'] = 'files';
$config['sess_cookie_name'] = 'ci_session';
$config['sess_expiration'] = 7200;
$config['sess_save_path'] = NULL;
$config['sess_match_ip'] = FALSE;
$config['sess_time_to_update'] = 300;
$config['sess_regenerate_destroy'] = FALSE;
If you use Codeigniter's /default) file session storage driver, you need to keep in mind that it only supports absolute paths for $config['sess_save_path']
the config.php states:
| The location to save sessions to, driver dependent.
|
| For the 'files' driver, it's a path to a writable directory.
| WARNING: Only absolute paths are supported!
|
| For the 'database' driver, it's a table name.
| Please read up the manual for the format with other session drivers.
|
| IMPORTANT: You are REQUIRED to set a valid save path!
depending on your environment use these:
mkdir /<path to your application directory>/sessions/
chmod 0700 /<path to your application directory>/sessions/
chown www-data /<path to your application directory>/sessions/
or
$config['sess_save_path'] = sys_get_temp_dir();
//php function which returns the directory path used for temporary files
more info on CI-sessions files driver
P.S. have a look at Session_files_driver.php (in your system/session/driver directory). There you see their use of mkdir in line 136: if ( ! mkdir($save_path, 0700, TRUE))=>>through error if dir is not writable)

Email sending error in elastalert. SMTPSenderRefused: (530, '5.5.1 Authentication Required)

i got gmail authentication error. my config and error message as below
I already allowed less secure apps in gmail.
Config.yaml file email section as below
name: frequency_rule
type: frequency
index: security
num_events: 50
timeframe:
days: 1
filter:
- term:
host.keyword : "azure-2"
alert:
- email
email:
"to_address#gmail.com"
smtp_host: "smtp.gmail.com"
smtp_port: "465"
smtp_ssl: true
from_addr: "from_address#gmail.com"
user: "from_address#gmail.com"
password: "password"
Error message as below
PS C:\Users\smiforce-2ndPC\Downloads\Compressed\elastalert-master\elastalert-master> python -m elastalert.elastalert --verbose --config ./config.yaml --rule ./alert_rules/frequency4.yaml
INFO:elastalert:Starting up
INFO:elastalert:Queried rule frequency_rule4 from 2017-11-20 09:48 Central Standard Time to 2017-11-21 09:48 Central Standard Time: 24 / 24 hits
ERROR:root:Traceback (most recent call last):
File "C:\Users\smiforce-2ndPC\Downloads\Compressed\elastalert-master\elastalert-master\elastalert\elastalert.py", line 1246, in alert
return self.send_alert(matches, rule, alert_time=alert_time, retried=retried)
File "C:\Users\smiforce-2ndPC\Downloads\Compressed\elastalert-master\elastalert-master\elastalert\elastalert.py", line 1326, in send_alert
alert.alert(matches)
File "elastalert\alerts.py", line 451, in alert
self.smtp.sendmail(self.from_addr, to_addr, email_msg.as_string())
File "C:\Python27\lib\smtplib.py", line 737, in sendmail
raise SMTPSenderRefused(code, resp, from_addr)
SMTPSenderRefused: (530, '5.5.1 Authentication Required. Learn more at\n5.5.1 https://support.google.com/mail/?p=WantAuthError l4sm636961ioc.69 - gsmtp', 'from_address#gmail.com')
ERROR:root:Uncaught exception running rule frequency_rule4: (530, '5.5.1 Authentication Required. Learn more at\n5.5.1 https://support.google.com/mail/?p=WantAuthError l4sm636961ioc.69 - gsmt
The user and password fields should not be stored in the same config.yaml file but in another file which is referenced in config.yaml.
For instance, create another file named auth.yaml and add the user and password configuration into it:
user: "from_address#gmail.com"
password: "password"
Then in config.yaml you can reference that file using this setting:
smtp_auth_file: "/path/to/auth.yaml"

CodeIgniter v3 + Smarty v3 SmartyCompilerException Error at form validation time

An uncaught Exception was encountered
Type: SmartyCompilerException
Message: Syntax error in template **"/home/usedvala/public_html/UsedVala/views/templates/registration/registration.tpl"
on line 96 "
[~ci_form_validation field='email'~]
" unknown tag "ci_form_validation"**
Filename: /home/usedvala/public_html/UsedVala/third_party/smarty/libs/sysplugins/smarty_internal_templatecompilerbase.php
Line Number: 96
Backtrace:
File: /home/usedvala/public_html/UsedVala/third_party/smarty/libs/sysplugins/smarty_internal_templatecompilerbase.php
Line: 687
Function: trigger_template_error
File: /home/usedvala/public_html/UsedVala/third_party/smarty/libs/sysplugins/smarty_internal_templatecompilerbase.php
Line: 457
Function: compileTag2
File: /home/usedvala/public_html/UsedVala/third_party/smarty/libs/sysplugins/smarty_internal_templateparser.php
Line: 1395
Function: compileTag
File: /home/usedvala/public_html/UsedVala/third_party/smarty/libs/sysplugins/smarty_internal_templateparser.php
Line: 2265
Function: yy_r33
File: /home/usedvala/public_html/UsedVala/third_party/smarty/libs/sysplugins/smarty_internal_templateparser.php
Line: 2360
Function: yy_reduce
File: /home/usedvala/public_html/UsedVala/third_party/smarty/libs/sysplugins/smarty_internal_smartytemplatecompiler.php
Line: 114
Function: doParse
File: /home/usedvala/public_html/UsedVala/third_party/smarty/libs/sysplugins/smarty_internal_templatecompilerbase.php
Line: 391
Function: doCompile
File: /home/usedvala/public_html/UsedVala/third_party/smarty/libs/sysplugins/smarty_template_compiled.php
Line: 226
Function: compileTemplate
File: /home/usedvala/public_html/UsedVala/third_party/smarty/libs/sysplugins/smarty_template_compiled.php
Line: 152
Function: compileTemplateSource
File: /home/usedvala/public_html/UsedVala/third_party/smarty/libs/sysplugins/smarty_template_compiled.php
Line: 199
Function: process
File: /home/usedvala/public_html/UsedVala/third_party/smarty/libs/sysplugins/smarty_internal_template.php
Line: 246
Function: render
File: /home/usedvala/public_html/UsedVala/third_party/smarty/libs/Smarty.class.php
Line: 820
Function: render
File: /home/usedvala/public_html/UsedVala/libraries/Asoft_smarty.php
Line: 63
Function: fetch
File: /home/usedvala/public_html/UsedVala/controllers/Usedvala.php
Line: 94
Function: view
File: /home/usedvala/public_html/index.php
Line: 292
Function: require_once
Please help me how to solve this problem:-)
You just have to read the error. The template is trying to call a function named ci_form_validation that doesn't exists in your installation. You probably forgot to put some files in your smarty plugin's folder

Cloud Init Fails to Install Packages on CentOS 7 in EC2

I have a cloud config file defined on my EC2 instance in the user data. Many of the parts/actions are run by the server properly, but package installation seems to fail invariably:
#cloud-config
package-update: true
package-upgrade: true
# ...
packages:
- puppet3
- lvm2
- btrfs-progs
# ...
I see the following in the logs:
May 20 20:23:39 cloud-init[1252]: util.py[DEBUG]: Package update failed
Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/cloudinit/config/cc_package_update_upgrade_install.py", line 74, in handle
cloud.distro.update_package_sources()
File "/usr/lib/python2.6/site-packages/cloudinit/distros/rhel.py", line 278, in update_package_sources
["makecache"], freq=PER_INSTANCE)
File "/usr/lib/python2.6/site-packages/cloudinit/helpers.py", line 197, in run
results = functor(*args)
File "/usr/lib/python2.6/site-packages/cloudinit/distros/rhel.py", line 274, in package_command
util.subp(cmd, capture=False, pipe_cat=True, close_stdin=True)
File "/usr/lib/python2.6/site-packages/cloudinit/util.py", line 1529, in subp
cmd=args)
ProcessExecutionError: Unexpected error while running command.
Command: ['yum', '-t', '-y', 'makecache']
Exit code: 1
Reason: -
Stdout: ''
Stderr: ''
May 20 20:23:39 cloud-init[1252]: amazon.py[DEBUG]: Upgrade level: security
May 20 20:23:39 cloud-init[1252]: util.py[DEBUG]: Running command ['yum', '-t', '-y', '--exclude=kernel', '--exclude=nvidia*', '--exclude=cudatoolkit', '--security', '--sec-severity=critical', '--sec-severity=important', 'upgrade'] with allowed return codes [0] (shell=False, capture=False)
May 20 20:23:52 cloud-init[1252]: util.py[WARNING]: Package upgrade failed
May 20 20:23:52 cloud-init[1252]: util.py[DEBUG]: Package upgrade failed
Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/cloudinit/config/cc_package_update_upgrade_install.py", line 81, in handle
cloud.distro.upgrade_packages(upgrade_level, upgrade_exclude)
File "/usr/lib/python2.6/site-packages/cloudinit/distros/amazon.py", line 50, in upgrade_packages
return self.package_command('upgrade', args=args)
File "/usr/lib/python2.6/site-packages/cloudinit/distros/rhel.py", line 274, in package_command
util.subp(cmd, capture=False, pipe_cat=True, close_stdin=True)
File "/usr/lib/python2.6/site-packages/cloudinit/util.py", line 1529, in subp
cmd=args)
ProcessExecutionError: Unexpected error while running command.
Command: ['yum', '-t', '-y', '--exclude=kernel', '--exclude=nvidia*', '--exclude=cudatoolkit', '--security', '--sec-severity=critical', '--sec-severity=important', 'upgrade']
Exit code: 1
Reason: -
Stdout: ''
Stderr: ''
May 20 20:23:52 cloud-init[1252]: util.py[DEBUG]: Running command ['yum', '-t', '-y', 'install', 'puppet3', 'lvm2', 'btrfs-progs'] with allowed return codes [0] (shell=False, capture=False)
May 20 20:24:03 cloud-init[1252]: util.py[WARNING]: Failed to install packages: ['puppet3', 'lvm2', 'btrfs-progs']
May 20 20:24:03 cloud-init[1252]: util.py[DEBUG]: Failed to install packages: ['puppet3', 'lvm2', 'btrfs-progs']
Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/cloudinit/config/cc_package_update_upgrade_install.py", line 88, in handle
cloud.distro.install_packages(pkglist)
File "/usr/lib/python2.6/site-packages/cloudinit/distros/rhel.py", line 70, in install_packages
self.package_command('install', pkgs=pkglist)
File "/usr/lib/python2.6/site-packages/cloudinit/distros/rhel.py", line 274, in package_command
util.subp(cmd, capture=False, pipe_cat=True, close_stdin=True)
File "/usr/lib/python2.6/site-packages/cloudinit/util.py", line 1529, in subp
cmd=args)
ProcessExecutionError: Unexpected error while running command.
Command: ['yum', '-t', '-y', 'install', 'puppet3', 'lvm2', 'btrfs-progs']
Exit code: 1
Reason: -
Stdout: ''
Stderr: ''
May 20 20:24:03 cloud-init[1252]: cc_package_update_upgrade_install.py[WARNING]: 3 failed with exceptions, re-raising the last one
May 20 20:24:03 cloud-init[1252]: util.py[WARNING]: Running package-update-upgrade-install (<module 'cloudinit.config.cc_package_update_upgrade_install' from '/usr/lib/python2.6/site-packages/cloudinit/config/cc_package_update_upgrade_install.pyc'>) failed
May 20 20:24:03 cloud-init[1252]: util.py[DEBUG]: Running package-update-upgrade-install (<module 'cloudinit.config.cc_package_update_upgrade_install' from '/usr/lib/python2.6/site-packages/cloudinit/config/cc_package_update_upgrade_install.pyc'>) failed
Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/cloudinit/stages.py", line 553, in _run_modules
cc.run(run_name, mod.handle, func_args, freq=freq)
File "/usr/lib/python2.6/site-packages/cloudinit/cloud.py", line 63, in run
return self._runners.run(name, functor, args, freq, clear_on_fail)
File "/usr/lib/python2.6/site-packages/cloudinit/helpers.py", line 197, in run
results = functor(*args)
File "/usr/lib/python2.6/site-packages/cloudinit/config/cc_package_update_upgrade_install.py", line 111, in handle
raise errors[-1]
ProcessExecutionError: Unexpected error while running command.
Command: ['yum', '-t', '-y', 'install', 'puppet3', 'lvm2', 'btrfs-progs']
Exit code: 1
Reason: -
Stdout: ''
Stderr: ''
When I actually run the command yum -t -y install puppet3 lvm2 btrfs-progs as root, it just runs fine, but Cloud Init is failing to run it on its own.
Is there something I'm doing wrong here?
Evidently there was a bug fixed with later versions of the image. If this is happening to you, it may be a legitimate bug in Cloud-Init or your servers implementation of it. A package upgrade may fix the problem, also an update to the image will fix it globally.

Resources