Fatal error with WordPress theme - wordpress

I just did a fresh install of WP 3.5, trying to use the Uraniumoid theme by Padd Solutions and boom, getting the fatal error
Call to undefined method Padd_Twitter::SimplePie() in on line in /home/fxmypics/public_html/wp-includes/class-simplepie.php on line 3042
I investigated and see that "Padd_Twitter" is called in class-twitter.php, defaults.php, functions.php inside Uraniumoid\includes folder but I don't know how to fix it, some help?

For those that couldn't find the solution, this has worked for me:
In the file class-twitter.php:
Replace "$this->SimplePie();" on line 56 approximately with: "parent::__construct();"
In line 59 approximately, replace:
$this->set_feed_url('http://twitter.com/statuses/user_timeline/' . $username . '.rss');
with: $this->set_feed_url('http://api.twitter.com/1/statuses/user_timeline.rss?screen_name=' . $username . '');
It worked for me

Related

Warning: Cannot modify header information . misc.php

Warning: Cannot modify header information - headers already sent by (output started at /home/tomproje/site/sgaotw.com/wp-config.php:1) in /home/tomproje/site/sgaotw.com/wp-admin/includes/misc.php on line 1115
what is the problem online 1115 ? I try to solve this problem , i read every topic about this problem , but not found an answer .
line 1115
It sounds like there could be some blank space in a PHP file somewhere. Try checking your wp-config.php file and seeing if there's a character before the opening <?php tag.

Trouble for newbie with header code

I'm a newbie to code and pretty well illiterate. I have inserted some code into my customized header file only to realize it was the wrong place.
I since received this error message when i try to get onto my website
Parse error: syntax error, unexpected '$', expecting variable (T_VARIABLE) in /home2/seth1/public_html/wp-content/themes/TESSERACT/inc/custom-header.php on line 151
After seeing this i downloaded filezilla and removed the code I had previously inserted. This code wasn't on or near line 151 where the error was.
The website is sethslawnandgarden
and here is a link to my code pastebin.com/s7ePRE6Q
This error says than your js code incude before jquery library.
try add parameter array('jquery') in
wp_enqueue_script( 'theme-js', get_template_directory_uri() . '/js/main.js', array('jquery') ); or in file (or in tags) transfer all code to
jQuery.noConflict();
(function( $ ) {
//your code
})(jQuery);
You should take your backup and simply replace your ../TESSERACT/inc/custom-header.php file with the original or backup one.

Wordpress newbie, keeping getters the following errors when installing themes and plugins

I'm currently developing 2 sites using Wordpress and hosted by a shared host who was recommended to me by a couple different WP fanatics.
Site 1 will be a medium-high volume blog. With my shared host's 1-click install, it came with the plugin W3 Total Cache, which by everything I read, is the best out there.
2 problems. For one, every time I upload a theme, I get the following error in admin:
Any time I try to change the settings in W3 Total Cache, I get about 15 to 20 of the following errors in admin:
Notice: get_theme is deprecated since version 3.4! Use wp_get_theme( $stylesheet )
instead. in /home/jpweber/public_html/wp-includes/functions.php on line 2824
Notice: get_themes is deprecated since version 3.4! Use wp_get_themes() instead. in
/home/jpweber/public_html/wp-includes/functions.php on line 2824
And no matter what theme I install, I get the following 3 errors at the top of every page on the website:
Notice: add_custom_background is deprecated since version 3.4! Use add_theme_support(
'custom-background', $args ) instead. in /home/jpweber/public_html/wp-includes
/functions.php on line 2824
Notice: get_theme_data is deprecated since version 3.4! Use wp_get_theme() instead. in
/home/jpweber/public_html/wp-includes/functions.php on line 2824
Notice: Undefined variable: output in /home/jpweber/public_html/wp-content/themes/respo
/functions/theme-actions.php on line 138
I've made no changes to functions.php, and I've downloaded fresh copies of functions.php, and I've checked the functions.php file to see if any of the answers on the author's homepage applied, but I've came up with no answers.
UPDATE:
For reference, here are my lines 2821-2828 in functions.php:
// Allow plugin to filter the output error trigger
if ( WP_DEBUG && apply_filters( 'deprecated_function_trigger_error', true ) ) {
if ( ! is_null($replacement) )
trigger_error( sprintf( __('%1$s is <strong>deprecated</strong>
since version %2$s! Use %3$s instead.'), $function, $version, $replacement ) );
else
trigger_error( sprintf( __('%1$s is <strong>deprecated</strong>
since version %2$s with no alternative available.'), $function, $version ) );
}
}
And in my theme_actions.php file, this is line 138:
$output .= ' {font:'.$font_nav["style"].' '.$font_nav["size"].'px/1.5em
'.stripslashes($font_nav["face"]).';color:'.$font_nav["color"].'}' . "\n";
The notices kind of tell you what to do, they are pretty descriptive.
Either you follow up on the notices, or set your error level lower than notice, so the messages won't show up anymore (not recommendedd though)

getting fatel error when trying to apply featured-posts-slideshow wp-plugin

Error occured while trying to apply this plugin in my template page
like this:-
Fatal error: Call to undefined function get_bloginfo() in
/wp-content/plugins/featured-posts-slideshow/featured-posts.php on
line 2
Please help its urgent.Thanks in advance
Try using this code instead of your include function:
include (ABSPATH . '/wp-content/plugins/featured-posts-slideshow/featured-posts.php');

Solution for "Fatal error: Maximum function nesting level of '100' reached, aborting!" in PHP

I have made a function that finds all the URLs within an html file and repeats the same process for each html content linked to the discovered URLs. The function is recursive and can go on endlessly. However, I have put a limit on the recursion by setting a global variable which causes the recursion to stop after 100 recursions.
However, php returns this error:
Fatal error: Maximum function nesting level of '100' reached,
aborting! in
D:\wamp\www\crawler1\simplehtmldom_1_5\simple_html_dom.php on line
1355
I found a solution here: Increasing nesting function calls limit but this is not working in my case.
I am quoting one of the answers from the link mentioned above. Please do consider it.
"Do you have Zend, IonCube, or xDebug installed? If so, that is probably where you are getting this error from.
I ran into this a few years ago, and it ended up being Zend putting that limit there, not PHP. Of course removing it will let >you go past the 100 iterations, but you will eventually hit the memory limits."
Is there a way to increase the maximum function nesting level in PHP
Increase the value of xdebug.max_nesting_level in your php.ini
A simple solution solved my problem. I just commented this line:
zend_extension = "d:/wamp/bin/php/php5.3.8/zend_ext/php_xdebug-2.1.2-5.3-vc9.dll
in my php.ini file. This extension was limiting the stack to 100 so I disabled it. The recursive function is now working as anticipated.
Another solution is to add xdebug.max_nesting_level = 200 in your php.ini
Rather than going for a recursive function calls, work with a queue model to flatten the structure.
$queue = array('http://example.com/first/url');
while (count($queue)) {
$url = array_shift($queue);
$queue = array_merge($queue, find_urls($url));
}
function find_urls($url)
{
$urls = array();
// Some logic filling the variable
return $urls;
}
There are different ways to handle it. You can keep track of more information if you need some insight about the origin or paths traversed. There are also distributed queues that can work off a similar model.
Rather than disabling the xdebug, you can set the higher limit like
xdebug.max_nesting_level=500
It's also possible to fix this directly in php, for example in the config file of your project.
ini_set('xdebug.max_nesting_level', 200);
Go into your php.ini configuration file and change the following line:
xdebug.max_nesting_level=100
to something like:
xdebug.max_nesting_level=200
on Ubuntu using PHP 5.59 :
got to `:
/etc/php5/cli/conf.d
and find your xdebug.ini in that dir, in my case is 20-xdebug.ini
and add this line `
xdebug.max_nesting_level = 200
or this
xdebug.max_nesting_level = -1
set it to -1 and you dont have to worry change the value of the nesting level.
`
probably happened because of xdebug.
Try commenting the following line in your "php.ini" and restart your server to reload PHP.
  ";xdebug.max_nesting_level"
Try looking in /etc/php5/conf.d/ to see if there is a file called xdebug.ini
max_nesting_level is 100 by default
If it is not set in that file add:
xdebug.max_nesting_level=300
to the end of the list so it looks like this
xdebug.remote_enable=on
xdebug.remote_handler=dbgp
xdebug.remote_host=localhost
xdebug.remote_port=9000
xdebug.profiler_enable=0
xdebug.profiler_enable_trigger=1
xdebug.profiler_output_dir=/home/drupalpro/websites/logs/profiler
xdebug.max_nesting_level=300
you can then use #Andrey's test before and after making this change to see if worked.
php -r 'function foo() { static $x = 1; echo "foo ", $x++, "\n"; foo(); } foo();'
php.ini:
xdebug.max_nesting_level = -1
I'm not entirely sure if the value will ever overflow and reach -1, but it'll either never reach -1, or it'll set the max_nesting_level pretty high.
You could convert your recursive code into an iterative code, which simulates the recursion. This means that you have to push the current status (url, document, position in document etc.) into an array, when you reach a link, and pop it out of the array, when this link has finished.
Check recursion from command line:
php -r 'function foo() { static $x = 1; echo "foo ", $x++, "\n"; foo(); } foo();'
if result > 100 THEN check memory limit;
You could try to wiggle down the nesting by implementing parallel workers (like in cluster computing) instead of increasing the number of nesting function calls.
For example: you define a limited number of slots (eg. 100) and monitor the number of "workers" assigned to each/some of them. If any slots become free, you put the waiting workers "in them".
<?php
ini_set('xdebug.max_nesting_level', 9999);
... your code ...
P.S. Change 9999 to any number you want.
Stumbled upon this bug as well during development.
However, in my case it was caused by an underlying loop of functions calling eachother - as a result of continuous iterations during development.
For future reference by search engines - the exact error my logs provided me with was:
Exception: Maximum function nesting level of '256' reached, aborting!
If, like in my case, the given answers do not solve your problem, make sure you're not accidentally doing something along the lines of the following simplified situation:
function foo(){
// Do something
bar();
}
function bar(){
// Do something else
foo();
}
In this case, even if you set ini_set('xdebug.max_nesting_level', 9999); it will still print out the same error message in your logs.
If you're using Laravel, do
composer update
This should be work.
In your case it's definitely the crawler instance is having more Xdebug limit to trace error and debug info.
But, in other cases also errors like on PHP or core files like CodeIgniter libraries will create such a case and if you even increase the x-debug level setting it would not vanish.
So, look into your code carefully :) .
Here was the issue in my case.
I had a service class which is library in CodeIgniter. Having a function inside like this.
class PaymentService {
private $CI;
public function __construct() {
$this->CI =& get_instance();
}
public function process(){
//lots of Ci referencing here...
}
My controller as follow:
$this->load->library('PaymentService');
$this->process_(); // see I got this wrong instead it shoud be like
Function call on last line was wrong because of the typo, instead it should have been like below:
$this->Payment_service->process(); //the library class name
Then I was keeping getting the exceed error message. But I disabled XDebug but non helped. Any way please check you class name or your code for proper function calling.
I had a error when i was installing many plugins So the error 100 showed including the location of the last plugin that i installed C:\wamp\www\mysite\wp-content\plugins\"..." so i deleted this plugin folder on the C: drive then everything was back to normal.I think i have to limit the amount of plug-in i install or have activated .good luck i hope it helps
I had this issue with WordPress on cloud9. It turns out it was the W3 Caching plugin. I disabled the plugin and it worked fine.
Another solution if you are running php script in CLI(cmd)
The php.ini file that needs edit is different in this case. In my WAMP installation the php.ini file that is loaded in command line is:
\wamp\bin\php\php5.5.12\php.ini
instead of \wamp\bin\apache\apache2.4.9\bin\php.ini which loads when php is run from browser
You can also modify the {debug} function in modifier.debug_print_var.php, in order to limit its recursion into objects.
Around line 45, before :
$results .= '<br>' . str_repeat(' ', $depth * 2)
. '<b> ->' . strtr($curr_key, $_replace) . '</b> = '
. smarty_modifier_debug_print_var($curr_val, ++$depth, $length);
After :
$max_depth = 10;
$results .= '<br>' . str_repeat(' ', $depth * 2)
. '<b> ->' . strtr($curr_key, $_replace) . '</b> = '
. ($depth > $max_depth ? 'Max recursion depth:'.(++$depth) : smarty_modifier_debug_print_var($curr_val, ++$depth, $length));
This way, Xdebug will still behave normally: limit recursion depth in var_dump and so on.
As this is a smarty problem, not a Xdebug one!
I had the same problem and I resolved it like this:
Open MySQL my.ini file
In [mysqld] section, add the following line: innodb_force_recovery =
1
Save the file and try starting MySQL
Remove that line which you just added and Save

Resources