I'm trying to set up a cronjob for magento.
My cronjob is:
*/5 * * * * /bin/sh /var/www/vhosts/#######/httpdocs/cron.sh >/dev/null 2>&1
This works well, but cron.sh is giving this error:
PHP Deprecated: Comments starting with '#' are deprecated in /etc/php5/cli/conf.d/imap.ini on line 1 in Unknown on line 0
PHP Deprecated: Comments starting with '#' are deprecated in /etc/php5/cli/conf.d/mcrypt.ini on line 1 in Unknown on line 0
[eAccelerator] This build of "eAccelerator" was compiled for PHP version 5.3.2-1ubuntu4.9. Rebuild it for your PHP version (5.3.2-1ubuntu4.14) or download precompiled binaries.
PHP Warning: Directive 'safe_mode' is deprecated in PHP 5.3 and greater in Unknown on line 0
PHP Warning: realpath(): SAFE MODE Restriction in effect. The script whose uid is 0 is not allowed to access /var/www/vhosts/########/httpdocs/app owned by uid 10001 in /var/www/vhosts/########/httpdocs/app/Mage.php on line 273
PHP Fatal error: Uncaught exception 'Mage_Core_Exception' with message ' is not a directory or not readable by this user' in /var/www/vhosts/########/httpdocs/app/Mage.php:594
Stack trace:
#0 /var/www/vhosts/########/httpdocs/app/Mage.php(278): Mage::throwException(' is not a direc...')
#1 /var/www/vhosts/########/httpdocs/app/Mage.php(752): Mage::setRoot()
#2 /var/www/vhosts/########/httpdocs/cron.php(29): Mage::isInstalled()
#3 {main}
thrown in /var/www/vhosts/########/httpdocs/app/Mage.php on line 594
Deleted the first line of /etc/php5/cli/conf.d/mcript.ini (Number 12)
This may help you
For reference :
https://bugs.launchpad.net/ubuntu/+source/php5/+bug/573436
eaccelerator : https://wiki.archlinux.org/index.php/EAccelerator
safe_mode : just comment safe_mode or Laravel shared hosting - Directive 'safe_mode' is deprecated in PHP 5.3 and greater
app :file permission issue give -R 777
Related
When I use the option "enable_stackdriver_integration: true" on Google App Engine (Flexible PHP) with the Laravel framework to send logs (and error logs) to Google Stackdriver, it works.
But when I'm tryin to run a PHP command line (Eg: php artisan migrate) from the php docker container into an instance of the app engine, I got the following error:
PHP Warning: sem_get(): failed for key 0x41019ecd: Permission denied in /app/vendor/google/cloud-core/src/Batch/SysvConfigStorage.php on line 71
PHP Warning: sem_acquire() expects parameter 1 to be resource, boolean given in /app/vendor/google/cloud-core/src/Batch/SysvConfigStorage.php on line 81
PHP Warning: shm_attach(): failed for key 0x41019ecd: Permission denied in /app/vendor/google/cloud-core/src/Batch/SysvConfigStorage.php on line 130
PHP Warning: shm_attach(): failed for key 0x41019ecd: Permission denied in /app/vendor/google/cloud-core/src/Batch/SysvConfigStorage.php on line 156
PHP Warning: shm_remove_var() expects parameter 1 to be resource, boolean given in /app/vendor/google/cloud-core/src/Batch/SysvConfigStorage.php on line 157
PHP Warning: sem_release() expects parameter 1 to be resource, boolean given in /app/vendor/google/cloud-core/src/Batch/SysvConfigStorage.php on line 91
PHP Fatal error: Uncaught RuntimeException: Failed to attach to the shared memory in /app/vendor/google/cloud-core/src/Batch/SysvConfigStorage.php:132
Stack trace:
#0 /app/vendor/google/cloud-core/src/Batch/BatchRunner.php(191): Google\Cloud\Core\Batch\SysvConfigStorage->load()
#1 /app/vendor/google/cloud-core/src/Batch/BatchRunner.php(74): Google\Cloud\Core\Batch\BatchRunner->loadConfig()
#2 /app/vendor/google/cloud-core/src/Batch/BatchTrait.php(201): Google\Cloud\Core\Batch\BatchRunner->__construct()
#3 /app/vendor/google/cloud-logging/src/PsrLogger.php(150): Google\Cloud\Logging\PsrLogger->setCommonBatchProperties(Array)
#4 /app/vendor/google/cloud-logging/src/LoggingClient.php(575): Google\Cloud\Logging\PsrLogger->__construct(Object(Google\Cloud\Logging\Logger), NULL, Array)
#5 /app/vendor/google/cloud-error-reporting/src/Bootstrap.php(40): Google\Cloud\Logging\LoggingClient->psrLogger('app-error', Array)
#6 /app/vendor/google/cloud-error-reporting/src/prepend.php(68): Google\Cloud\ErrorReporting\Bootstrap::init(NULL)
#7 in /app/vendor/google/cloud-core/src/Batch/SysvConfigStorage.php on line 132
Off course, if I remove the option from the app.yaml there is no problem. Do you know why ?
I have a shared hosting at iPage. I did the steps listed here : Deploy Laravel 5 using only FTP in a shared hosting (Moving files, editing htaccess) and yet still facing the same 500 error :
20161126T060216: bluepenlabs.com/projects/peugeot/public/index.php PHP
Warning:
require(/hermes/bosnaweb28a/b1452/ipg.bluepenlabscom/projects/peugeot/public/bootstrap/autoload.php):
failed to open stream: No such file or directory in
/hermes/bosnaweb28a/b1452/ipg.bluepenlabscom/projects/peugeot/public/index.php
on line 22 PHP Fatal error: require(): Failed opening required
'/hermes/bosnaweb28a/b1452/ipg.bluepenlabscom/projects/peugeot/public/bootstrap/autoload.php'
(include_path='.:/usr/local/lib/php-5.5.22-amd64/lib/php') in
/hermes/bosnaweb28a/b1452/ipg.bluepenlabscom/ 20161126T061559:
bluepenlabs.com/projects/peugeot/public/index.php
PHP Parse error:
syntax error, unexpected '.', expecting '&' or variable (T_VARIABLE)
in
/hermes/bosnaweb28a/b1452/ipg.bluepenlabscom/projects/peugeot/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php
on line 475
20161126T061939: bluepenlabs.com/projects/peugeot/public/index.php PHP
Parse error: syntax error, unexpected '.', expecting '&' or variable
(T_VARIABLE) in
/hermes/bosnaweb28a/b1452/ipg.bluepenlabscom/projects/peugeot/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php
on line 475
Note that i'm trying to install the laravel project in a subdirectory /projects/peugeot/
Thank you
I once hosted a laravel project on iPage(shared hosting). I faced 500 errors. Not showing much description.
This may be because of the Laravel 5.3 min server requirements.
Ipage hosting site normally give a version below the min requirement. You need to change the setting on your Control Panel. Try upgrading your PHP version.
Hope this helps.
I am working on vagrant / homestead, and have a box configured.
I could enable Xdebug in PhpStorm!
Now, I want to enable PHPUnit, but I can't do it...
I followed several tutorials:
https://blog.mayflower.de/5274-Run-your-tests-with-PHPStorm-on-your-vagrant-box.html
https://confluence.jetbrains.com/display/PhpStorm/Running+PHPUnit+tests+over+SSH+on+a+remote+server+with+PhpStorm
Here are my settings:
Here is the message I receive when running PhpUnit with Code Coverage
vagrant:///Users/julien/Homestead/usr/bin/php -dxdebug.coverage_enable=1 /home/vagrant/.phpstorm_helpers/phpunit.php --coverage-clover /home/vagrant/.phpstorm_helpers/coverage/Laravel_PhpUnit.coverage -- configuration /home/vagrant/Code/vendor/autoload.php /Users/julien/Documents/Proyectos/laravel/tests/functional
Testing started at 11:12 AM ...
bash: line 0: cd: /Users/julien/Documents/Proyectos/laravel/tests/functional: No such file or directory
PHP Fatal error: Uncaught UnexpectedValueException: Cannot create phar '/home/vagrant/Code/vendor/bin', file extension (or combination) not recognised or the directory does not exist in /home/vagrant/.phpstorm_helpers/phpunit.php:181
Stack trace:
Fatal error: Uncaught UnexpectedValueException: Cannot create phar '/home/vagrant/Code/vendor/bin', file extension (or combination) not recognised or the directory does not exist in /home/vagrant/.phpstorm_helpers/phpunit.php on line 181#0 /home/vagrant/.phpstorm_helpers/phpunit.php(181): Phar- >__construct('/home/vagrant/C...')
#1 /home/vagrant/.phpstorm_helpers/phpunit.php(250): IDE_PHPUnit_Loader::init()
#2 {main}
UnexpectedValueException: Cannot create phar '/home/vagrant/Code/vendor/bin', file extension (or combination) not recognised or the directory does not exist in /home/vagrant/.phpstorm_helpers/phpunit.php on line 181
thrown in /home/vagrant/.phpstorm_helpers/phpunit.php on line 181
Call Stack:
0.0006 442920 1. {main}() /home/vagrant/.phpstorm_helpers/phpunit.php:0
0.0006 442920 2. IDE_PHPUnit_Loader::init() /home/vagrant/.phpstorm_helpers/phpunit.php:250
0.0006 451168 3. Phar->__construct() /home/vagrant/.phpstorm_helpers/phpunit.php:181
Process finished with exit code 255
Setting up vagrant with PhpStorm and PHPUnit can be a little bit daunting as it is really not that straight forward... From your console output I'd say that your interpreter setting is not correct since it executes PHP on your local machine.
The way that always worked for me was setting up vagrant as SFTP Deployment Configuration and use that configuration as PHP interpreter. As you are already using Homesteasd, these tutorials might shed some more light onto the setup:
Setting up PhpStorm with Vagrant on a Laravel Homestead box
Setting up Laravel with PHPUnit on Vagrant in PhpStorm
Here are the essential parts:
I am having a problem with running commands via cli doctrine-cli.php file. I am using Doctrine 2 and Codeigniter 2. I would like to generate entities via Command Line Tool, but without success. Page is hosted by Hostgator. On this server is installed by default PHP version 5.2, but you can use PHP version 5.3 by adding some commands to .htaccess file located in root.
In the Command Line Tool I get this error:
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/tig3rb0y/public_html/naselsi/application/doctrine-cli.php on line 10
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/tig3rb0y/public_html/naselsi/application/doctrine-cli.php on line 10
Parse error: syntax error, unexpected T_STRING in /home/tig3rb0y/public_html/naselsi/application/doctrine-cli.php on line 10
If I run a file with PHP version via url, I get PHP version 5.3, but if I run the same file via Command Line Tool, I get php version 5.2. Why is that so?
Is there any solution for that?
Regards, Mario
I have a solution. As already #KeesSchepers said, there was a problem that in command line there was default 5.2.17 PHP version. I solved that simply, I just added prefix /opt/php53/bin/php to all doctrine2 commands, example:
/opt/php53/bin/php doctrine-cli.php orm:...
Thank you guys!
I want to use APC with Magento. I added the folling code in app/etc/local.xml:
<cache>
<backend>apc</backend>
<prefix>MAGE_</prefix>
</cache>
but I am getting the error below.
APC is already enabled on the server and working with other sites.
The error message
Warning: simplexml_load_file()
[function.simplexml-load-file]:
Entity: line 58: parser error :
expected '>' in
/var/www/html/webkul/magento/partner/app/Mage.php
on line 645
Warning: simplexml_load_file()
[function.simplexml-load-file]:
in
/var/www/html/webkul/magento/partner/app/Mage.php
on line 645
Warning: simplexml_load_file()
[function.simplexml-load-file]: ^ in
/var/www/html/webkul/magento/partner/app/Mage.php
on line 645
Notice: Trying to get property of
non-object in
/var/www/html/webkul/magento/partner/app/Mage.php
on line 647
Notice: Trying to get property of
non-object in
/var/www/html/webkul/magento/partner/app/Mage.php
on line 647
Notice: Trying to get property of
non-object in
/var/www/html/webkul/magento/partner/app/Mage.php
on line 647
What could lead to this error?
I'm use memcache to provider back cache
that magento can not read config file please makesure you config is correct
BTW:apc is not compatible X64 OS
Make sure your LAMP stack has all of the requirements being met:
http://www.magentocommerce.com/knowledge-base/entry/how-do-i-know-if-my-server-is-compatible-with-magento
Particularly SimpleXML.