Strict Standards errors since changing servers
Permalink 2 users found helpfulMy goal is to update all my older C5 sites (as I should have long ago) which should correct the errors. The code added to the .htaccess file didn't work for me though.
Any suggestions?
I must admit all this is quite confusing to me but my host said something about being able to set up a local php.ini file. I don't know where such a file needs to go.
I thought a manual upgrade would make things right but having trouble there as well.
I'm giving your code in index.php a try now. Thanks again.
error_reporting(E_ALL & ~E_DEPRECATED & ~E_STRICT)
Warning: session_start(): open(/home/verve/public_html/files/tmp/sess_8db3d2c3692ac0c78e5369474e1b67bd, O_RDWR) failed: Permission denied (13) in /home/verve/public_html/concrete/startup/session.php on line 32
error_reporting(E_ALL & ~E_DEPRECATED & ~E_STRICT) <?php require('concrete/dispatcher.php');
<?php error_reporting(E_ALL & ~E_DEPRECATED & ~E_STRICT); require('concrete/dispatcher.php');
This change with the index.php didn't work. Any other suggestions?
http://www.fuquadesign.com
http://www.verveshow.com
Come to find out, I think I was seeing the site on my old server which made me think the code change corrected everything. As you'll see, this problem continues.
I have another C5 site which is working perfectly and, I thought, the same version as the verveshow one showing the errors.
The other still throws out the session start errors. I don't know if updating it will fix the issue or not so, if anyone had any further ideas, I'd welcome any suggestions.
That's quite bad, can you check the installation files ? are they here ?
Can you post the content of the index.php please ?
My index.php code is:
<?php error_reporting(E_ALL & ~E_DEPRECATED & ~E_STRICT); require('concrete/dispatcher.php');
Thanks again for all your advice.
I did a fresh install thinking Id messed up some data and the error would always come back. Finally I figured that at least one or more of the tools I use such as wamp, eclipse or the Ruby command prompt does something to interfere with the directory tree that my wamp server crazy. Also the error occurred at random intervals, ie refresh the page 3 times, then another 6 times, 2 times, leading me to believe my config file may not have been getting read on every page load?
Also I know that eclipse keeps getting out of sync with the file system, when c5 and or my sass/css files change. All I can say from my observations is once this started happening I could not get rid of the error and things got worse.
Whats worked is Ive done a fresh install and loaded the database from backup, I havent experienced any issues yet. And my new page type was recognized.
I did a fresh install thinking Id messed up some data and the error would always come back. Finally I figured that at least one or more of the tools I use such as wamp, eclipse or the Ruby command prompt does something to interfere with the directory tree that my wamp server crazy. Also the error occurred at random intervals, ie refresh the page 3 times, then another 6 times, 2 times, leading me to believe my config file may not have been getting read on every page load?
Also I know that eclipse keeps getting out of sync with the file system, when c5 and or my sass/css files change. All I can say from my observations is once this started happening I could not get rid of the error and things got worse.
Whats worked is Ive done a fresh install and loaded the database from backup, I havent experienced any issues yet. And my new page type was recognized.
The supposed fix reported by several people on the forums (adding the error_reporting setting to a php.ini file in the site root) does not solve the problem because error_reporting is reset numerous times in the core Concrete5 code itself.
The solution for me was to search through the \concrete\ folder and find instances of
error_reporting(E_ALL ^ E_NOTICE ^ E_DEPRECATED)
or
error_reporting(E_ALL ^ E_NOTICE)
(for example in concrete\startup\debug_logging.php and concrete\controllers\upgrade.php)
and change them to the following:
error_reporting(E_ALL & ~E_DEPRECATED & ~E_STRICT & ~E_NOTICE)
This got my sites running again.
http://legacy-documentation.concrete5.org/tutorials/how-fix-strict-...
if you have strict standard warnings displayed, this is because, somehow, you have turned on the E_STRICT error_reporting of PHP.
Concrete5 is not (yet?) ready for such, and so, you should not use E_ALL or any other combination containing E_STRICT for error_reporting configuration.
in your php.ini you should have this :
Luckily, if you can not (or don't want) to change your global configuration, you can add the following line just before the require in the index.php :
which should fix it just the same.