Multiple Warning: session_start() [function.session-start] - wordpress

I am trying to help install a third party theme onto a WordPress installation and I get these three error codes when I click "live preview" or "activate" the theme:
Warning: session_start() [function.session-start]: open(/var/chroot/home/content/66/5232766/tmp/sess_1n0eifrftmjfu96hop17kihi35, O_RDWR) failed: No such file or directory (2) in /home/content/66/5232766/html/wp-content/themes/Drlawyer/functions.php on line 461
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/content/66/5232766/html/wp-content/themes/Drlawyer/functions.php:461) in /home/content/66/5232766/html/wp-content/themes/Drlawyer/functions.php on line 461
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/content/66/5232766/html/wp-content/themes/Drlawyer/functions.php:461) in /home/content/66/5232766/html/wp-content/themes/Drlawyer/functions.php on line 461
How can I fix these things?

try commenting the line out and removing your addition
function cp_admin_init() // { if (!session_id()) session_start(); }
If this is godaddy hosting you might need to do this (I run into this problem all the time)
Add this to your php5.ini file then you will need to kill all processes from your godaddy hosting control panel and it will work. check your phpinfo.php file to make sure it took
upload_tmp_dir = /var/chroot/home/content/56/10594156/html/temp
session.save_path = /var/chroot/home/content/56/10594156/html/temp
of course change the pathto to yours and then create a /temp dir in your root and CHMOD 777
Godaddy has issues with the tmp/ dir for some reason

Related

Joomla 3.10 Error 500 Fatal error: Class 'JHtml' not found cms.php

I have installed and configured Joomla site on one of my domains (in sub folder), and it works great there, so now, I wanted to move it to original domain where it has to be, so in WHM I created new account for new domain, and moved my Joomla files and DB to new account, in config file, I've changed user and DB data, also changed path for log and temp and when I run Joomla on new domain, I get this error:
Fatal error: Class 'JHtml' not found in /home/newsite/public_html/libraries/cms.php on line 12
The line 12 in that file is:
if (!defined('JPATH_PLATFORM'))
but since it works on old domain, that should not be a problem?
Everything stayed on same server and folders and files in root directory have same permissions
I've added this code to index.php, before that I just got blank page
ini_set('display_errors','On'); error_reporting(E_ALL);

WP-Super-Cache activation errors

I have to set up the cache on a WordPress project, which is already on "support mode" in the agency for a while.
The plugin WP Super Cache was already installed so I activated it, to setting up it.
I work locally on dev mode and the project have a preprod and a prod environments.
When I activated it, the following error messages appear in back-office :
Warning:
include(/var/www/xx/xx/xx/xx/xx/xx/wp-content/plugins/wp-super-cache/wp-cache-base.php):
failed to open stream: No such file or directory in
/var/www/wp-content/plugins/wp-super-cache/wp-cache.php on line 65
Warning: include(): Failed opening
‘/var/www/xx/xx/xx/xx/xx/xx/wp-content/plugins/wp-super-cache/wp-cache-base.php’
for inclusion (include_path=’.:/usr/share/php:/usr/share/pear’) in
/var/www/wp-content/plugins/wp-super-cache/wp-cache.php on line 65
Warning:
include_once(/var/www/xx/xx/xx/xx/xx/xx/wp-content/plugins/wp-super-cache/ossdl-cdn.php):
failed to open stream: No such file or directory in
/var/www/wp-content/plugins/wp-super-cache/wp-cache.php on line 82
Warning: include_once(): Failed opening
‘/var/www/xx/xx/xx/xx/xx/xx/wp-content/plugins/wp-super-cache/ossdl-cdn.php’
for inclusion (include_path=’.:/usr/share/php:/usr/share/pear’) in
/var/www/wp-content/plugins/wp-super-cache/wp-cache.php on line 82
Looking in the file wp-cache.php on lines 65 and 82, it says that :
include(WPCACHEHOME . 'wp-cache-base.php');
Path ‘dirname(FILE).’/…wp-cache-base.php’ not found Include
expression is not resolved
include_once( WPCACHEHOME . 'ossdl-cdn.php' );
Path ‘dirname(FILE).’/…ossdl-cdn.php’ not found Include expression
is not resolved
So I was thinking about changing the path. However, this is bothering me because I am afraid that this action will be potentially a troubleshooting cause when the plugin will have to be updated.
I have no ideas how I can fix it.
Uninstall and reinstall the plugin ?
Use an other plugin to manage the cache?
Thank you in advance for your answers. Have a nice day!
WP Super Cache puts the below line in your wp-config.php file. Remove the line from your wp-config.php file and reinstall and reactivate the plugin.
define( ‘WPCACHEHOME’, ‘/home/USERNAME/public_html/wp/wp-content/plugins/wp-super-cache/’ ); //Added by WP-Cache Manager
I encountered the same problem after moving my Wordpress directory to the root of my site. If you get the problem and can't deactivate the erroring plugin, go to your /wp-content/plugins/wp-super-cache and remove or rename the directory. This will manually deactivate this so you can install a fresh instance.

Moving Wordpress website to another server

A friend of mine asked me to move wordpress website from development server to production. I've copied all the files, backed up and restored database. After that I'd changed sitename and home values in database (_options table) to new domain and it started. Though only home page is working fine. When I navigate to any other page it gives me 500 error. In error_log I got following errors:
1423021301: /home1/crankst1/public_html/fish-dev-site/ssv3_payload_extractor-r0Xkqq2xFD.php startup
[24-Feb-2015 19:16:59 UTC] PHP Warning: require_once(/home1/crankst1/public_html/fish-dev-site/wp-content/plugins/js_composer_theme/include/classes/core/class-vc-sort.php): failed to open stream: No such file or directory in /home1/crankst1/public_html/fish-dev-site/wp-content/plugins/js_composer_theme/js_composer.php on line 168
[24-Feb-2015 19:16:59 UTC] PHP Fatal error: require_once(): Failed opening required '/home1/crankst1/public_html/fish-dev-site/wp-content/plugins/js_composer_theme/include/classes/core/class-vc-sort.php' (include_path='.:/usr/php/54/usr/lib64:/usr/php/54/usr/share/pear') in /home1/crankst1/public_html/fish-dev-site/wp-content/plugins/js_composer_theme/js_composer.php on line 168
Paths that cause errors are related to development server and I can't find where to change them. I'm not very good with wordpress, so I suppose that solution should be very simple.
I'm sure there is an issue with a plugin http://codecanyon.net/item/visual-composer-page-builder-for-wordpress/242431/comments?page=149 try to see if there are any hardcoded paths on the plugin dashboard.
Delete your .htaccess file then go to the permalinks page change to another permalink type save page then change back to permalink you had this will force wordpress to recreate the .htaccess file and it will allow all pages you have to show correctly on the site. :-)

Wordpress charset error only happening occasionally

I get the following error on my website, it only happens occasionally.
The host conpany say it is cause dby not using mysql_close in all scripts but I thought PHP did that by default. Either way, I have the standard wordpress installtion so not sure which script could be causing this.
Warning: mysql_set_charset(): Error executing query in /mysite.com/wp-includes/wp-db.php on line 715
Warning: Cannot modify header information - headers already sent by (output started at /mysite.com/wp-includes/wp-db.php:715) in /mysite.com/wp-includes/pluggable.php on line 1121
Why don't you just disable errors / warnings? Put error_reporting(0); in wp config file wp-config.php exactly below call of wp-settings.php and it won't display any errors / warnings.
/** Sets up WordPress vars and included files. */
require_once(ABSPATH . 'wp-settings.php');
error_reporting(0);

ErrorException: Warning: ini_set(): A session is active. You cannot change the session module's ini settings at this time in /../../

I am trying to create my own authentication provider like in http://symfony.com/doc/current/cookbook/security/custom_authentication_provider.html.
But, it keeps saying:
ErrorException: Warning: ini_set(): A session is active. You cannot change the session module's ini settings at this time in /../../vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/NativeFileSessionHandler.php line 56
Symfony2 sessions will not work properly with "session auto start" enabled. So make sure that's disabled.
Make sure your php configuration php.ini has this configured: session.auto_start = 0.
Or you can add php_flag session.auto_start 0 to your .htaccess file if you can not edit the php.ini file.
Additionally, there's one more possibility to get this error, as I found out after a long time of struggling:
For whatever reason, this crucial part was commented out in my config_test.yml, giving me exactly the same error:
framework:
session:
storage_id: session.storage.mock_file
The storage_id setting must be in place to avoid the problem.

Resources