Comments problem
-
seem like comments-ajax cant find the wp-config.php
find on line 2 (comments-ajax.php)
require_once '../../../wp-config.php';replace with
$wp_root = dirname(dirname(dirname(dirname(__FILE__)))); $config_file = ( file_exists($wp_root.DIRECTORY_SEPARATOR.'wp-load.php') ? 'wp-load.php' : 'wp-config.php' ); if ($config_file) require_once($wp_root.DIRECTORY_SEPARATOR.$config_file);Thanks chaoskaizer! I replace
require_once ‘../../../wp-config.php’;
with
$wp_root = dirname(dirname(dirname(dirname(__FILE__))));
$config_file = ( file_exists($wp_root.DIRECTORY_SEPARATOR.’wp-load.php’) ? ‘wp-load.php’ : ‘wp-config.php’ );
if ($config_file) require_once($wp_root.DIRECTORY_SEPARATOR.$config_file);But now when I send a comment appear this mex:
Warning: require_once(/web/htdocs/www.omniablog.net/home/wp-content/wp-config.php) [function.require-once]: failed to open stream: No such file or directory in /web/htdocs/www.omniablog.net/home/wp-content/themes/super-adsense-music/super-adsense-music/comments-ajax.php on line 4
Fatal error: require_once() [function.require]: Failed opening required ‘/web/htdocs/www.omniablog.net/home/wp-content/wp-config.php’ (include_path=’.:/php/lib/php/’) in /web/htdocs/www.omniablog.net/home/wp-content/themes/super-adsense-music/super-adsense-music/comments-ajax.php on line 4
What do I do?
Sorry bout that, on second thought I think its better to used your absolute path.
replace all the previous code with
require_once '/web/htdocs/www.omniablog.net/home/wp-config.php';On another notes,
Your “super-adsense-music” theme structure is kind of wrongwp-content/themes/super-adsense-music/super-adsense-musicThe theme’s files should be install at ↓
wp-content/themes/super-adsense-musicnot inside another sub-directory. just my 2¢
The topic ‘Comments problem’ is closed to new replies.
(@immort4l)
17 years, 10 months ago
Hi all.
I’m the founder of the site |Omnia Blog|. I have installed wordpress 2.6 and the theme Super Adsense Music Theme 2.1 but now i have the problem that when a user sends comments, appear this mex:
How I can fix this error? Please help me! Thanks.