Getting fatal error config.php line 14 - php

I am making my forum!
I have sql database and everything that I need to publish to the web (domain etc.)
So after launching my forum to the web I am getting the following error when trying to open my forum:
Fatal error: Uncaught Error: Call to undefined function
mysql_connect() in /storage/ssd5/357/5453357/public_html/config.php:14
Stack trace: #0 /storage/ssd5/357/5453357/public_html/main.php(3):
include() #1 {main} thrown in
/storage/ssd5/357/5453357/public_html/config.php on line 14
I tried everything but nothing worked!
Maybe someone from here can answer my question...
How to fix this?

Try mysqli_connect() instead, ‘mysql’ is deprecated. This is the case for every mysql function, so make sure everything is updated to ‘mysqli’. Hope this helps

Related

Fatal error: Uncaught Error: Call to undefined function wp() in /home/customer/www/monkinsider.com/public_html/wp-blog-header.php:16 Stack trace:

Fatal error: Uncaught Error: Call to undefined function wp() in /home/customer/www/monkinsider.com/public_html/wp-blog-header.php:16 Stack trace: #0 /home/customer/www/monkinsider.com/public_html/index.php(17): require() #1 {main} thrown in /home/customer/www/monkinsider.com/public_html/wp-blog-header.php on line 16
I don't know but since last week I am getting this error. My site is hosted on siteground and there are no updates from my side. Also, when I contacted them they said its Wordpress issue and they cant help. I tried to restore backup but only it works for 5 minutes after that error shows up again. Also, I referred to previous articles and everything seems fine the file wp-config and all. Also,I cannot even open my admin Wordpress panel.
That's a malware.
You should scan your server and restore wp-blog-header.php with a default one.
You can download a fresh version here: https://wordpress.org/download/releases/
You won't be able to restore the account until the malware is deleted
I had the same issue. In my case wp-load.php was empty for some reasons, not sure what caused it. I copied the files content from a different website and it fixed the issue.

Fatal error related to magic_quotes in PHP

So I'm trying to figure out a website error for my friend. Unfortunately, I'm not that good at PHP and unfortunately his website is...ancient. I tried referring to other questions here, but as my code example looks a tad different, I'm worried about messing something up.
Right now, the site is permanently down with the following error:
Fatal error: Uncaught Error: Call to undefined function
set_magic_quotes_runtime() in
/customers/1/f/7/WEBSITEDOMAIN.COM/httpd.www/includes/framework.php:21 Stack
trace: #0 /customers/1/f/7/WEBSITEDOMAIN.COM/httpd.www/index.php(22):
require_once() #1 {main} thrown in
/customers/1/f/7/WEBSITEDOMAIN.COM/httpd.www/includes/framework.php on line 21
So, I referred to the website files, oddly enough, there are four framework.php files but I assume some of them might be irrelevant. All of them contain the following code somewhere around line 21:
#set_magic_quotes_runtime( 0 );
#ini_set('zend.ze1_compatibility_mode', '0');
So, my idea is, remove it all, or just the first line as the error message refers to. This is what the other questions on SO hinted at, as the first line is completely irrelevant with the newest php version. However, as this is a business website I'm also hesitant to mess around, even more so as the owner understands nothing about code.
Any pointers for a complete newbie? (Websitedomain.com is an example address)
Thanks

Can't connect to database error

The site works perfectly on camp but I keep getting this error message
Fatal error: Uncaught Error: Call to undefined function
mysql_connect() in /storage/ssd1/760/4443760/public_html/conn.php:6
Stack trace: #0 /storage/ssd1/760/4443760/public_html/index.php(2):
include() #1 {main} thrown in
/storage/ssd1/760/4443760/public_html/conn.php on line 6
mysql_* functions have been removed in PHP7
You probably have a php7 in XAMPP Please use PDO and... Feel the power of the light side:)
Link to nice wiki page about :)
This link try it
PDO try it
Thanks
mysql_* functions have been removed in PHP7!
PDO

Wordpress - Fatal error: Uncaught Error: Call to undefined function get_currentuserinfo()

Can anyone help me out on this error. I am setup my existing website on my localdisk using xampp but i m getting this error.
Fatal error: Uncaught Error: Call to undefined function
get_currentuserinfo() in
C:\xampp\htdocs\wordpress\wp-content\plugins\google-analytics-for-wordpress\frontend\abstract-class-tracking.php:286
Stack trace: #0
C:\xampp\htdocs\wordpress\wp-content\plugins\google-analytics-for-wordpress\frontend\abstract-class-tracking.php(51):
Yoast_GA_Tracking->do_tracking() #1
C:\xampp\htdocs\wordpress\wp-content\plugins\google-analytics-for-wordpress\frontend\class-frontend.php(27):
Yoast_GA_Tracking->__construct() #2
C:\xampp\htdocs\wordpress\wp-content\plugins\google-analytics-for-wordpress\googleanalytics.php(52):
Yoast_GA_Frontend->__construct() #3
C:\xampp\htdocs\wordpress\wp-settings.php(305)
Probably an outdated plugin, Update your plugin or you can try wp_get_current_user() function instead.
Its not a good idea to change the plugin code, but you can check that function whether it fixes things up or not, better option is to update your plugin.

Wordpress database connectivity error on update

Hi guys I updated my WordPress (by mistake) to 4.7 and all the pages which were fetching data from db are messed up.
I can revert back to my original version but I want to continue working on wp 4.7 and fix this error....
upon googling this term p3pnexwpnas i found out that this happens
Kindly take a look at some of the errors Fatal error: Uncaught exception 'Exception' with message 'fetch - <b></b><br>---<br> Query: select * from wp_22v51hy4p7_revslider_settings' in /home/content/p3pnexwpnas09_data01/09/2724709/html/wp-content/plugins/revslider/inc_php/framework/functions.class.php:7 Stack trace: #0 /home/content/p3pnexwpnas09_data01/09/2724709/html/wp-content/plugins/revslider/inc_php/framework/db.class.php(22): UniteFunctionsRev::throwError('fetch - <b></b>...', -1) #1 /home/content/p3pnexwpnas09_data01/09/2724709/html/wp-content/plugins/revslider/inc_php/framework/db.class.php(36): UniteDBRev->throwError('fetch - <b></b>...') #2 /home/content/p3pnexwpnas09_data01/09/2724709/html/wp-content/plugins/revslider/inc_php/framework/db.class.php(127): UniteDBRev->checkForErrors('fetch') #3 /home/content/p3pnexwpnas09_data01/09/2724709/html/wp-content/plugins/revslider/inc_php/revslider_params.class.php(42): UniteDBRev->fetch('wp_22v51hy4p7_r...') #4 /home/content/p3pnexwpnas09_data01/09/2724709/html/wp-content/plugins/revslider/inc_php/revslider_op in /home/content/p3pnexwpnas09_data01/09/2724709/html/wp-content/plugins/revslider/inc_php/framework/functions.class.php on line 7
also this is an error on a different page:-
Notice: Constant DB_NAME already defined in /home/content/p3pnexwpnas09_data01/09/2724709/html/wp-config.php on line 23
Notice: Constant DB_USER already defined in /home/content/p3pnexwpnas09_data01/09/2724709/html/wp-config.php on line 26
Notice: Constant DB_PASSWORD already defined in /home/content/p3pnexwpnas09_data01/09/2724709/html/wp-config.php on line 29
Notice: Constant DB_HOST already defined in /home/content/p3pnexwpnas09_data01/09/2724709/html/wp-config.php on line 32
Notice: Constant DB_CHARSET already defined in /home/content/p3pnexwpnas09_data01/09/2724709/html/wp-config.php on line 35
any hint to solve this problem will be appreciated thanks.....
There is no error in Wordpress installation and database.
The problem is that there are some plugins which are not compatible with wordpress 4.7.
have a look at first error.
Fatal error: Uncaught exception 'Exception' with message 'fetch -
Query: select * from wp_22v51hy4p7_revslider_settings' in
/home/content/p3pnexwpnas09_data01/09/2724709/html/wp-content/plugins/revslider/inc_php/framework/functions.class.php:7
Stack trace: #0
It's because revslider plugin which is not compatible with your current version of wordpress that's why it's throwing fatal error. So if want to continue work on wordpress remove all the plugin which are not compatible with your wordpress version otherwise update it.
Finally found the answer....
So there were 2 problems
deprecated plugin error
Used include so it was loading the wp-config file twice
The old dev used include for including the wp-config that is the reason constant already defined was coming. I used require_once and this problem was solved.
Thanks for the plugin help guys....

Categories