Fatal Error in WordPress functions.php file [closed] - php

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 5 years ago.
Improve this question
I was adding some code to alter the 'cart' option on WordPress and had to add some code into my functions.php.
I followed the instructions, added the code to my functions.php file, and received the following error:
Fatal error: Cannot redeclare enqueue_font_awesome() (previously declared in /home2/xxx/public_html/xxx/wp-content/themes/connection/functions.php:11) in /home2/xxx/public_html/fba-product-designer.com/wp-content/themes/connection/functions.php on line 21
I cannot access the administrative URI, and my website now shows the above message. I can go back and edit the functions.php so I'm hoping there is an easy fix in my code.

I'll edit this if you post your source code in your question, but your error is suggesting that you redeclared enqueue_font_awesome() on line 21 of functions.php. It originally exists on line 11.
Remove one or the other, and test. If one doesn't work, try removing the other and replacing the previously removed one.
This should resolve the error.

Related

How to include database file in controller CODEIGNITER [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 6 years ago.
Improve this question
I want to make a central database file with all the database functions. I've made a libraries file, called Database.php. I've load the file in the __construct function in the controller of one of my modules, on this way:
$this->load->library('Database');
But when i want to try to make in that controller a get function, it will say this:
Fatal error: Call to undefined method Bikes::get()
Can some one help me?
Call your library's method like this..
1.Load library
$this-load->library('library_name');
2.Call to method
$this->library_name->method_name();

How to fix sitemap got Error details: 1 Errors, 0 Warnings.? [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 6 years ago.
Improve this question
I am trying to upload my sitemap to Google webmaster and received 1 error.
How can I fix with this error?
Error details: 1 Errors, 0 Warnings.
Description:
We encountered an error while trying to access your Sitemap. Please ensure your Sitemap follows our guidelines and can be accessed at the location you provided and then resubmit.
Your sitemap is either configured incorrectly or doesn't exist on the link you've specified. The simplest way to add a sitemap is to use a plugin such as:
https://wordpress.org/plugins/google-sitemap-generator/
and then just submit the link to Google http://yoursite.com/sitemap.xml

Fatal error: Hmm - depth calc wrong, hit negatives, in silverstripe [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 7 years ago.
Improve this question
Fatal error: Hmm - depth calc wrong, hit negatives, in silverstripe after doing a dev/build, it also says /htdocs/framework/core/manifest/ConfigStaticManifest.php on line 278?
Check for program structure whenever you see this kind of error in Silverstripe, make sure it's a valid PHP program, for example make sure all parenthesis and curly braces are properly closed.

Parse error: syntax error, unexpected end of file in line 179 (file doesn't have so many lines) [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 7 years ago.
Improve this question
I'm getting the error-message while executing a .php-file which has just 177 lines.
Background: this is a Wordperfect-Install, that same page executes fine for other records, but in the record which causes issues, I'm demo-ing some new shortcodes. It is not unlikely that I made a fault in these developments, but that is all done outside of the "crashing" file, so I wonder why it would appear there (and with such a strange line-no.) and not in the source that I modified...
In wp-config.php, I have set define('WP_DEBUG', true);
P.S: The exact error msg is:
Parse error: syntax error, unexpected end of file in C:\xampp\htdocs\wp-content\themes\mytheme\single-record.php on line 179
Ok, with the help of fellow dev I found the solution: the guy who wrote the original code had used the short opening tags in PHP '<?' and apparently support for these needs to be enabled in the PHP.INI (which I had not done, 'coz I do not like them). So, after updating all tags to "decent PHP", the error is gone!

Cannot get php to work on ubuntu [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 8 years ago.
Improve this question
I recently created a server with a digital ocean and I have been trying to learn their commands and what not so I can create web servers. I have a project that I have uploaded, and when I visited that page, what was meant to show my project, displays as a blank webpage
I have located the problem to this file, see I have wrote a bunch of test 1, test 2 to find my problem because no errors are showing. Go to line 45 and you will see this, and then at line 111 where it is throwing an exception is where it halts.
https://bitbucket.org/benshepherd/ben-mvc/src/79041e868b85aeeacfefac23ce729a0c2a6b949f/Libs/Controller.php?at=master
you can see here http://178.62.26.90/mvc/ the results of what it is echoing out.
Line 97: Either the model class needs to be called pagesModel or this line needs to change to be
$class = ucfirst( $modelName ).'Model';
Also line 94:
$file = __DIR__.'/Models/'.$modelName.'.php';
Should probably be:
$file = __DIR__.'/../Models/'.$modelName.'.php';

Categories