I have a problem installing TYPO3 10.2.2 on Ubuntu 18.04.3 LTS, Apache 2.4.29, PHP 7.2
I did follow the "Install TYPO3 Without Composer" How to. When I want to access the Installer I see a blank page. So far nothing new, I have seen that a lot of times. I did set the access rights correct but still a blank page.
The Apache error log says:
AH01071: Got error 'PHP message: PHP Fatal error: Uncaught
LogicException:PSR-11 Container is not available in
/var/www/typo3_src/typo3/sysext/core/Classes/Utility/GeneralUtility.php:3398
In the mentioned php I see additional information 'PSR-11 Container is not available', 1549404144.
I did search on the web to find a possible solution but this time without any luck.
My question: Did someone see that bevore or has a hnt for me what to do?
Thanks a lot in advance.
Dabbelju
I just ran into the same problem (Installation with composer by the way).
The problem is that the web server does not have the needed access rights on the Typo3 project folder.
When using the Apache HTTP Server this can be solved with
chown -R :www-data YourProjectFolder
chmod -R g+w YourProjectFolder
This recursively changes the group of all contained files to 'www-data' which is the group used by the Apache server and grants write access for this group.
When did you get the error message? Just after accessing the site for the first time after creating FIRST_INSTALL?
Are there any other error messages before this error message? (If you open the file GeneralUtility and look in the specified line, you will notice that the $container was not created. The question is why?). Problem is most likely somewhere during autoloading / dependency injection.
I never had this error, but here are some tips for generally handling exceptions and solving / debugging these types of things yourself.
As already mentioned, the logfile may show additional information. On non-Composer installations you will find this in typo3temp/var/log
If you already got so far to enter the backend, you may want to set the Configuration Preset to "Debug" in settings to see more output (do not do this in production)
If you finished the installation procedure, but cannot access the backend (with /typo3), see if you can access the install tool (with /typo3/install.php, create a file ENABLE_INSTALL_TOOL in typo3conf)
Since you know the code of the Exception, you can look up the Exception page in the wiki: https://wiki.typo3.org/Exception/CMS/1549404144 (unfortunately in this case it is empty, but it may be helpful for other exceptions)
check your permissions, typo3temp must be writable for the user / group Apache is running under (e.g. www-data)
As a last resort, if all else fails, removing the entire content of typo3temp might help. This is not good practice and should usually not be necessary, but it lets you restart with a clean state.
Also see troubleshooting tips in Installation Guide.
P.S. I just followed the Installation Guide: Quick Install without Composer to be sure and it works on my system, Ubuntu 19.04, PHP 7.2, Apache/2.4.38 without any problem.
To wrap this one up:
It was a permission problem. Due to the missleading Error message it took me a while to figure that out. In the mentioned guide it does not say something about permissions.
My conclusion: Whenever it comes to the point that T3 says that a folder can not be created fix the permission problem instead of adding the folder manually.
Thanks to all who did guide me to the right solution.
Related
I'm working on a new project in TYPO3. It's my frist installation of TYPO3 9.5.5 so I don't know if this is some sort of bug or anything but sometimes, and I really can't give you any more information about it since I dont know where it comes from and how to reproduce this error, my enire typo3 crashes with this error message:
(1/1) #1476107295 TYPO3\CMS\Core\Error\Exception
PHP Warning: rename(/var/www/html/var/cache/code/cache_core/5cab444370d80224649952.temp,/var/www/html/var/cache/code/cache_core/site-configuration.php): No such file or directory in /var/www/html/public/typo3/sysext/core/Classes/Cache/Backend/SimpleFileBackend.php line 234
Since it's in my var directory I figured to just delete the entire folder but as soon as I try to delete it Windows tells me I don't have permission to delete this file or even change it. When I try to open it in an editor it tells me that the file doesn't exist and I can't do anything about it unless I restart my entire PC.
I've found some people with the same issue here, but no way to fix it or anything on how to prevent it from happening.
I'm using the composer installation of TYPO3 with ddev on Windows 10.
Does anyone know about this error or can tell me anything on how to fix it?
Did you try to flush all TYPO3 caches?
To do so, go to Admin Tools => Maintenance => Flush TYPO3 and PHP Cache.
If the problem persists, you can try to got to Admin Tools => Environment => Directory Status and check if all permissions are set properly.
And since you run TYPO3 with ddev, you can use the shell (Putty or whatwever) and do a ddev ssh to login directly to the container and delete the files there.
So I am trying to get Symfony working on my server by following these install instructions.
http://symfony.com/doc/current/book/installation.html#book-installation-permissions
I got to the part where I ran this command in console in the directory where I wanted the framework to be installed.
symfony new my_project_name
I then followed these instructions to set my web root directory to /web as I believe I'm supposed to do?
It installed all the files correctly since I can see them in the folder. I made sure to restart apache and I'm positive document root is in the correct location.
http://tecadmin.net/how-to-change-document-root-of-primary-domain-in-cpanel/#
Once I did this I was supposed to be able to test the installation, but nothing seems to happen except that 406 error?
This is the exact error I get.
An appropriate representation of the requested resource /app.php could not be found on this server.
Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.
I'm not sure what else to do.
Please note, that since I'm using CPANEL I can't change the virtual host configurations of apache if that is the issue, so I'm looking for a CPanel specific answer. Thank you!
Okay so I finally figured out what to do, I had 2 problems. Because I installed as the 'root' user I had to run the following command on the symfony installation.
chown -R devdistribution:devdistribution .
In my case, my username is devdistribution but you would just put your own. Make sure to do this on the top level not just the /web folder.
I knew this was one of the errors because the apache log said something along these lines
Mismatch between target UID (520) and UID (501) of file "/home/devdistribution/public_html/distribution_tech/web/app.php"
This fixed the 500 error, but not the 406. To fix the 406 error you need to login into WHM and type modsecurity to find it in the search field.
go to the configuration option for it, you will see this.
Rules Engine SecRuleEngine
This setting controls the behavior of the rules engine.
Process the rules.
Do not process the rules.
Process the rules in verbose mode, but do not execute disruptive actions.
Select 'Do not process the rules'. Then save at the bottom. This fixed the issue for me and I was able to see the opening symfony screen!
However, this I'm sure leaves security vulnerabilities now...so I still need help on the proper way to handle mod security with symfony in this case if anyone knows? I'll make a separate question for this.
Step 1:
Login to your cPanel account and start searching for the file manager icon under the files section.
Step 2:
As always, you need to make sure, you see the public_html directory. Depending on the web hosting you have, you may also see the home directory after opening the file manager.
Step 3:
Find the .htaccess file and right-click to edit.
Step 4:
After choosing an edit option, you see a popup asking to disable encoding if you wish. You have to click on the Edit button to continue.
Step 5:
On a new tab, you can see many rewritten rules. You have to add the code to the .htaccess file.
<IfModule mod_security.c>
SecFilterEngineOff
SecFilterScanPOSTOff
</IfModule>
I'm trying to set up a FuelPHP app, and I've run into a puzzling problem. Every time the app tries to connect to the database, I get the following error:
Fuel\Core\Database_Exception [ Error ]: invalid data source name
I've set FUEL_ENV to "stage" in Apache's VirtalHost configuration and the database credentials in fuel/app/config/staging/db.php seem to be correct: I can log in to PhpMyAdmin using the same username and password. I'm stumped as to what else to try - any advice would be much appreciated.
In case it helps, I'm using FuelPHP 1.4 on an Amazon EC2 instance running Ubuntu 12.04 LTS on which I've installed MySQL and PHP via apt-get. I have another app (on another instance) running an older version of FuelPHP (1.2.1) which runs with no problems.
Incidentally, this question is probably closely related to this one, but I'm asking it as a separate question because the problem I'm having is not limited to the command line.
Ok, this has taken far too long to get to the bottom of, but it turns out to be simple to fix: for some reason, in FuelPHP 1.4 the stage environment's config directory is called staging (in previous versions it was stage).
I don't know whether this is a directory naming mistake, or whether this is a new name and something somewhere in FuelPHP hasn't been updated to use it, but I found changing the directory's name to 'stage' fixed the problem.
I had the same issue when running unit tests with FuelPHP's oil utility. If you're running into this issue, it most likely is a configuration issue.
To debug, somewhere in the code that isn't working put something like the following to see what environment FuelPHP is trying to use:
<?php
echo "env: " . Fuel::$env;
exit;
In my case, it showed it was trying to use the 'Test' environment. Since I didn't have a 'test' folder in my app's config folder, it was failing.
In most versions of FuelPHP, however you have the Fuel::$env set in your .htaccess file will work throughout all versions of FuelPHP. However in older versions, you may run into this issue.
You can either edit the bootstrap.php file and manually set the FuelPHP environment how you want, or setup the environment that it's trying to use.
Apache web server: SetEnv FUEL_ENV DEVELOPMENT Hope this helps someone
For those of you who none of this worked make sure of two things
there are multiple db.php files /fuel/app/config/development/db.php. check environment as #Chad Hutchins mentioned and double check the username and password is correct
Make sure /var/mysql/mysql.sock exists. In my case I was using /Applications/XAMPP/xamppfiles/var/mysql/mysql.sock so i needed to create a symlink. Followed the instructions here
Hope that helps someone
Since I have a number of test-sites running in MAMP/htdocs, do all of the errors for all test-sites have to go to the single php_error.log? Can I change this? (I know I can change the log location in php.ini, but I see no way to "divide it up")
The trouble comes from installing "fire_log" logging Spark on one of my CodeIgniter test sites and it seems to want to look for log files relative to the Codeigniter Install. That's what I'm thinking anyway, since it is not finding my logs.
I think it wants to see MAMP/CI_test_site/logs/php_error.log
And I've obviously got
/MAMP
/logs
php_error.log
/htdocs
/CI_test_site
/..folders
/Other_site
/DIfferent_site
So do I have any control over this in MAMP?
You should be able to set it on a per project basis from your code, if that's an option:
ini_set("error_log","/path/to/error.log");
I have this trouble: i copy symfony project files on my pc, after that change paths and db settings, and it still not working, even dont tell about errors! Maybe there is some specific actions for setting up symhony on another server?
Almost the same problem How to configure symfony project in local server? but when i try execute "php symfony" it prints "no such file or directory"
There are no any php errors at all.
Using Fedora 15 OS, and apache. php work in command line, symfony is not working. I tried to find out what is happening - inside Controller.class some error, when it use processObjects method, it take 11 objects, and after first of them (header.object.php) it stops.
The white screen generally means symfony can't write to cache and/or log dir, check on apache error logs to see details.
if 'php symfony' on command line throws no such file or directory could mean php is not in your system path.
Please add more information to get answers
myabe, as said below is a permission problem of the caché and log files. Check if they are writable. Good Luck!