Title: Comments problem
Last modified: August 19, 2016

---

# Comments problem

 *  [Omnia](https://wordpress.org/support/users/immort4l/)
 * (@immort4l)
 * [17 years, 10 months ago](https://wordpress.org/support/topic/comments-problem-6/)
 * Hi all.
 * I’m the founder of the site [|Omnia Blog|](http://www.omniablog.net). 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:
 * > Warning: require_once(../../../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 2
   > Fatal error: require_once() [function.require]: Failed opening required ‘../../../
   > 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 2
 * How I can fix this error? Please help me! Thanks.

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [chaoskaizer](https://wordpress.org/support/users/chaoskaizer/)
 * (@chaoskaizer)
 * [17 years, 10 months ago](https://wordpress.org/support/topic/comments-problem-6/#post-831993)
 * 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);
       ```
   
 *  Thread Starter [Omnia](https://wordpress.org/support/users/immort4l/)
 * (@immort4l)
 * [17 years, 10 months ago](https://wordpress.org/support/topic/comments-problem-6/#post-831998)
 * 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?
 *  [chaoskaizer](https://wordpress.org/support/users/chaoskaizer/)
 * (@chaoskaizer)
 * [17 years, 10 months ago](https://wordpress.org/support/topic/comments-problem-6/#post-832029)
 * 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 wrong
 *     ```
       wp-content/themes/super-adsense-music/super-adsense-music
       ```
   
 * The theme’s files **should** be install at ↓
 *     ```
       wp-content/themes/super-adsense-music
       ```
   
 * not inside another sub-directory. just my 2¢

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Comments problem’ is closed to new replies.

## Tags

 * [comment](https://wordpress.org/support/topic-tag/comment/)

 * 3 replies
 * 2 participants
 * Last reply from: [chaoskaizer](https://wordpress.org/support/users/chaoskaizer/)
 * Last activity: [17 years, 10 months ago](https://wordpress.org/support/topic/comments-problem-6/#post-832029)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
