WordPress is giving 500 error

Danienllxxox

I am trying to update a table in WordPress that I created myself through a plug-in that I created. However I keep getting this error:

The website encountered an error while retrieving /add-van-process.php. 
It may be down for maintenance or configured incorrectly.
Error code: 500

This is the PHP that I am using:

<?php 
    global $wpdb;
    $data = array("model"=>"Ford")
    $wpdb->insert("van_table", $data); 
?>

The file name and table name are correct and exist. Anyone got any ideas how to fix this?

much appreciated

edit: I am using WordPress Version Version 3.5.2 if that is needed.

edit: after changing this code to:

$wpdb->get_row("SELECT * FROM van_table");

I get this error: PHP Fatal error: Call to a member function get_results() on a non-object

Any clues?

Nikolay Yordanov

You're missing a semi-colon on this row:

$data = array("model"=>"Ford")

Also, you might want to enable WP_DEBUG - this way you'll see the actual error and not a standard Error 500 message: http://codex.wordpress.org/WP_DEBUG

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

htaccess FilterProvider giving error 500

From Dev

Wordpress - frequent 500 error

From Dev

php form keeps giving me 500 error

From Dev

Codeanywhere DevBox - Laravel giving 500 error

From Dev

.htaccess getting wrong giving 500 internal error

From Dev

.htaccess mod_rewrite giving 500 error

From Dev

RewriteRule giving 500 Internal Server Error

From Dev

PHP code giving 500 internal server error

From Dev

OpenShift PHP Image Asset Giving 500 Error

From Dev

post request by axios to laravel giving 500 error

From Dev

Wordpress Database importing giving strange error

From Dev

Error 500 End While Wordpress Error

From Dev

Heroku giving 500 error with little information + asset files are empty [Rails]

From Dev

Non-www .htaccess redirect to www giving 500 error

From Dev

Why is npm giving 500 and 503 errors: "registry error parsing json"?

From Dev

IIS Giving a 500 Internal Server Error When Serving a PHP file

From Dev

How to fix an unknown internal server error (500) Nginx is giving me?

From Dev

Cascading dropdowns In MVC5 On demand load is giving 500 Error

From Dev

Yoast post_tag-sitemap giving error 500

From Dev

JQUERY PHP on Chrome giving a 500 error for GET Request

From Dev

Perl "lwp-request" giving error 500 using TLS 1.2

From Dev

500 error with Nginx and WordPress pretty permalinks

From Dev

Wordpress 500 (URL Rewrite Module Error.)

From Dev

Wordpress Permalinks on IIS causes Error 500

From Dev

Wordpress admin gives me 500 error

From Dev

Getting a 500 internal server error for wordpress site?

From Dev

Nginx giving 404 error for WordPress' /wp-admin/ root

From Dev

wordpress .htaccess rule for folder structure giving 404 error

From Dev

android rest client giving error of internal server error 500 (using retrofit okhttp and gson)

Related Related

  1. 1

    htaccess FilterProvider giving error 500

  2. 2

    Wordpress - frequent 500 error

  3. 3

    php form keeps giving me 500 error

  4. 4

    Codeanywhere DevBox - Laravel giving 500 error

  5. 5

    .htaccess getting wrong giving 500 internal error

  6. 6

    .htaccess mod_rewrite giving 500 error

  7. 7

    RewriteRule giving 500 Internal Server Error

  8. 8

    PHP code giving 500 internal server error

  9. 9

    OpenShift PHP Image Asset Giving 500 Error

  10. 10

    post request by axios to laravel giving 500 error

  11. 11

    Wordpress Database importing giving strange error

  12. 12

    Error 500 End While Wordpress Error

  13. 13

    Heroku giving 500 error with little information + asset files are empty [Rails]

  14. 14

    Non-www .htaccess redirect to www giving 500 error

  15. 15

    Why is npm giving 500 and 503 errors: "registry error parsing json"?

  16. 16

    IIS Giving a 500 Internal Server Error When Serving a PHP file

  17. 17

    How to fix an unknown internal server error (500) Nginx is giving me?

  18. 18

    Cascading dropdowns In MVC5 On demand load is giving 500 Error

  19. 19

    Yoast post_tag-sitemap giving error 500

  20. 20

    JQUERY PHP on Chrome giving a 500 error for GET Request

  21. 21

    Perl "lwp-request" giving error 500 using TLS 1.2

  22. 22

    500 error with Nginx and WordPress pretty permalinks

  23. 23

    Wordpress 500 (URL Rewrite Module Error.)

  24. 24

    Wordpress Permalinks on IIS causes Error 500

  25. 25

    Wordpress admin gives me 500 error

  26. 26

    Getting a 500 internal server error for wordpress site?

  27. 27

    Nginx giving 404 error for WordPress' /wp-admin/ root

  28. 28

    wordpress .htaccess rule for folder structure giving 404 error

  29. 29

    android rest client giving error of internal server error 500 (using retrofit okhttp and gson)

HotTag

Archive