Symfony 3 deploying app via ftp error - php

I need to upload my symfony 3 project online, but I have only access to ftp. So I did all necessary steps I found:
composer update
Clear the cache for production: php app/console cache:clear --env=prod
Upload all app folder on server
After I open my website I got the following error:
Fatal error: require(): Failed opening required
'/nfsmnt/hosting2_1/a/8/a87b3594-7cfe-459e-ad62-286d2dba2c54/zorbfutbal.sk/web/var..\vendor\symfony\symfony\src\Symfony\Component\ClassLoader\ApcClassLoader.php'
(include_path='.:/usr/php56/lib/php') in
/nfsmnt/hosting2_1/a/8/a87b3594-7cfe-459e-ad62-286d2dba2c54/zorbfutbal.sk/web/var/bootstrap.php.cache on line 1780
I checked the file and I have it there and also set all permissions.
What is confusing me is that path from error before my actual domain name.
"/nfsmnt/hosting2_1/a/8/a87b3594-7cfe-459e-ad62-286d2dba2c54/"
I dont know where it comed from and how to fix it.
Any idea? Thanks

You are absolutely sure you set the file permissions correctly like indicated here:
http://symfony.com/doc/current/setup/file_permissions.html#using-acl-on-a-system-that-supports-setfacl-linux-bsd
The message you posted seems to point to something like that.
Also run:
php bin/symfony_requirements
just to check that you've met all the other requirements.

Related

Symfony 3 upload by FTP

Hello I am trying to upload a symfony 3 project to the hosting.
The hosting php version is 7.
I am uploading It by FTP beacause I do not have SSH acces and I request to the support of the hosting, and I do not have the right acount for have SSH user.
On localhost with xamp the proyect run perfectly but when I uploaded It, the next issue apears:
Fatal error: Uncaught RuntimeException: Session Storage was not able to create directory "\app/../var/sessions/prod" in var/cache/prod/classes.php:292 Stack trace: #0 /var/cache/prod/appProdProjectContainer.php(2131): Symfony\Component\HttpFoundation\Session\Storage\Handler\NativeFileSessionHandler->__construct('/usr/home/farma...') #1 /vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Container.php(274): appProdProjectContainer->getSession_HandlerService() #2 /var/cache/prod/appProdProjectContainer.php(2170): Symfony\Component\DependencyInjection\Container->get('session.handler') #3 /vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Container.php(274): appProdProjectContainer->getSession_Storage_Native in /vendor/twig/twig/lib/Twig/Loader/Filesystem.php on line 94
I read some problems like these on stack and I tryied change the permission of the forlders making them at 777 however It not work.
Someone know how can I solve these? Or other idea for try?
PD:
Right now looking the structure folder I saw a strange folder.
That folder is "var\logs". I can not delete It also It creates after I try inside symfony project.
On local I do not have that fodler.
Try to clear cache by this command:
bin/console cache:clear --env=prod
Or delete var/cache/ manualy

laravel - Move app to another server, blank page and artisan error

I need to move app in laravel from web server to local sever (I trying on XAMPP). I moved all files, database and in files I changed URI in:
/index.php
<? header("Location: http://localhost/public"); ?>
but I get errors in:
On http://localhost/ I have blank page
On http://localhost/public and every another route I getting error: http://pastebin.com/zUFqS8ET
When I use php artisan or another commands I getting error:
[ErrorException]
Undefined index: HTTP_USER_AGENT
I forgot about somethink?
EDIT:
Ok, I downgrade my PHP to 5.6.* but artisan still not working - same error, what's the problem?
EDIT 2:
Here is logs - problem is in SMF but I don't know why ...
http://pastebin.com/HZQ7CZeg
Sorry, I know this is obvious. But, have you run PHP composer install? And as a basic test you can create an empty laravel project to test your computer's configuration. If it works then you know its something in your project you need to update.
Laravel installation

Failed opening required database.inc (attempting to use drupal)

I am trying to setup a drupal web server with FreeBSD.
When I try to access the drupal index i am greeted with:
Fatal error: require_once(): Failed opening required
'/usr/local/www/apache24/data/drupal/includes/database/sqlite/database.inc'
(include_path='.:/usr/local/share/pear') in
/usr/local/www/apache24/data/drupal/includes/database/database.inc on
line 1685
I am new to freeBSD but i tried setting chmod 667 to the:
sqlite/database.inc
database/database.inc
sqlite
database
Also, i do not understand why it is looking for /usr/local/share/pearas there is no such directory.
I am using MySQL55, PHP5, Drupal-7, and Apache.
I think this might be related but when i access the install.php i get:
Undefined index: distribution_name in drupal_install_profile_distribution_name() (line 201 of /usr/local/www/apache24/data/drupal/includes/install.inc).
did you use drush?
That looks as if you already installed drupal, or at least drupal thinks so. and also with the wrong database settings. normally, you will be prompted to enter them in the web interface, but you also can enter them directly in the settings php. Propably you should just move the old settings.php and run install.php in your browser and enter the database details anew.
drupal_install_profile_distribution_name can be changed in the database under system->standard_profile and variable->install_profiles directly or using drush (www.drush.ws) with
vset install_profile standard
or any other install profile you used.
Anyways, the install script asks for that as well.
hope, this was your problem.

Symfony 2.4 You have requested a non-existent service "payment.encryption_service"

I'm migrating a symfony project from 2.0 to 2.4 version.
I've correctly configured all the parameters and services.
But the problem occured with JMS vendor, this is the error shown:
Fatal error: Uncaught exception
'Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException'
with message 'You have requested a non-existent service
"payment.encryption_service".' in
C:\wamp\www\symfony\app\bootstrap.php.cache on line 2027
This message is blocking me, do you have any issue, any idea?
I had the same problem. I don't know exactly what happened, but my problems went away after I manually cleared the cache using
rm -rf app/cache/prod/*
Considering your settings are on Windows, try manually deleting entries at app\cache\prod using Windows Explorer. I couldn't use app/console cache:clear --env=prod since the console would crash after showing that error message.
Another correct answer could be checking every service.yml in yml parser, for example http://yaml-online-parser.appspot.com
You have requested a non-existent service
could mean, that symfony can't parse correctly .yml files.
This means your the mentioned parameter is missing from your app/config/parameters.yml or other alike file that you are using to store your parameters. Set this parameter to a value and it should work.
E.G. I had the same error being "You have requested a non-existent parameter "domain".
I then added following line to the parameters.yml file:
domain: example.com
That did the trick.

cakePHP bake fails on opening .core.php file

im trying to bake a test project to evaluate cakePHP 2.4.1, and when i do cake bake, before the DB configuration i get the following warnings\errors:
Warning Error: file_get_content(/core.pp): failed to open stream: No such file or directory in [C:\cakePHP\lib\cake\Utility\File.php, line 157]
and after that, a whole bunch of errors (unable to set seed, unable to set cache prefix , unable to set CAKE_CORE_INCLUDE_PATH etc.)
Any help will be appreciated,
Boris.
I also setup recently cakePHP 2.4.1 and there is no error as such you described. Also there is no file like core.pp, it is core.php.
You can download it again from https://github.com/cakephp/cakephp/zipball/2.4.1 and set it up again.
Found the problem:
i set the skel path to the cakePHP base folder, and not to cakePHP\app.

Categories