Can’t Create New Ad

Home Forums AdRotate for WordPress Adverts and Banners Can’t Create New Ad

  • #136532

    scottk
    Badges:

    In the Manage Adverts page, if I click “New Advert” I see an error that says:

    “There was an error loading the page. Please try again by reloading the page via the menu on the left.
    If the issue persists please seek help at ajdg.solutions/forums/forum/adrotate-for-wordpress/”

    Any ideas?

    #136541

    Arnan de Gans
    Badges:

    Usually that error indicates a database issue.

    Please check your servers error_log file for errors.
    The error_log file can usually be found in your hosting dashboard.
    Anything mentioning AdRotate is interesting.

    #136563

    scottk
    Badges:

    Thanks. Here are a couple from the last month:

    [07-Aug-2021 03:38:15 UTC] WordPress database error File ‘./dnacanno_wrdp1/wp_adrotate_groups.MYD’ not found (Errcode: 23 – Too many open files in system) for query SELECT id , adspeed FROM wp_adrotate_groups WHERE name != ” AND modus = 1 ORDER BY id ASC; made by require(‘wp-blog-header.php’), require_once(‘wp-includes/template-loader.php’), include(‘/themes/ultimatube/tag.php’), get_footer, locate_template, load_template, require_once(‘/themes/ultimatube/footer.php’), wp_footer, do_action(‘wp_footer’), WP_Hook->do_action, WP_Hook->apply_filters, adrotate_custom_javascript

    [02-Jul-2021 05:36:54 UTC] PHP Warning: include_once(/home/dnacannon/public_html/wp-content/plugins/adrotate/adrotate-statistics.php): failed to open stream: Too many open files in system in /home/dnacannon/public_html/wp-content/plugins/adrotate/adrotate.php on line 34

    [02-Jul-2021 05:36:54 UTC] PHP Warning: include_once(): Failed opening ‘/home/dnacannon/public_html/wp-content/plugins/adrotate//adrotate-statistics.php’ for inclusion (include_path=’.:/opt/cpanel/ea-php73/root/usr/share/pear’) in /home/dnacannon/public_html/wp-content/plugins/adrotate/adrotate.php on line 34

    Anything stick out to you?

    #136564

    Arnan de Gans
    Badges:

    Not necessarily but the too many files open error indicates you need better hosting that doesn’t do silly things like throttle i/o. If that also happens when creating adverts it may be related though.

    Your hosting provider can tell you more about why that error shows up and what to do about it.

    #136566

    scottk
    Badges:

    Ok. I’ll check in with them. Thanks.

    #137013

    scottk
    Badges:

    Update: I’ve been going back and forth with my host support. They say things look fine from their end. They told me to ask you for the following:

    1) What are the sever requirements for the plugin?
    2) Are there any specific values that need to be set on the server end to correct the “too many files” error?
    3) What PHP limits need to be set on the server to make the plugin compatible?

    Cheers

    #137044

    Arnan de Gans
    Badges:

    Hi, I don’t know. I’ve never seen this error before in relation to AdRotate (Pro).

    1. PHP5.6 or newer.
    2. I don’t know, it’s not my server or set up, your hosting provider should know.
    3. Same things to make WordPress work, so nothing special or anything at all.

    As far as I can tell it’s a server configuration error. Not something AdRotate does or causes.
    A quick search – https://serverfault.com/questions/300272/how-to-deal-with-error-too-many-open-files-in-system

    #137047

    scottk
    Badges:

    Thanks. I’ll relay.

    #137170

    scottk
    Badges:

    So my host support says that the server is compatible with the plugin requirements. They found the following in the error_log and suggested I run it by you. Does this mean anything to you or trigger any ideas?

    [25-Aug-2021 12:41:08 UTC] WordPress database error Unknown column ‘os_ios’ in ‘field list’ for query INSERT INTO wp_adrotate ( title , bannercode , thetime , updated , author , imagetype , image , tracker , show_everyone , desktop , mobile , tablet , os_ios , os_android , os_other , type , weight , autodelete , budget , crate , irate , state_req , cities , states , countries ) VALUES (”, ”, ‘1629895268’, ‘1629895268’, ‘hostgator’, ‘dropdown’, ”, ‘N’, ‘Y’, ‘Y’, ‘Y’, ‘Y’, ‘Y’, ‘Y’, ‘Y’, ’empty’, ‘6’, ‘N’, ‘0’, ‘0’, ‘0’, ‘N’, ‘a:0:{}’, ‘a:0:{}’, ‘a:0:{}’) made by do_action(‘adrotate_page_adrotate-ads’), WP_Hook->do_action, WP_Hook->apply_filters, adrotate_manage, include(‘/plugins/adrotate/dashboard/publisher/adverts-edit.php’)

    Thanks

    #137176

    Arnan de Gans
    Badges:

    That’s unrelated to the earlier issue. But yes, that’ll prevent you from creating adverts.
    That column got added to AdRotate (Pro) several years ago though. So no idea why it would be missing for you.

    If you’ve upgraded from a very old version recently, that may be related. But the upgrade script should take care of any missing things during the upgrade.

    If you look in Settings > Maintenance, near the bottom there should be a bunch of version numbers. What does that say? Any mismatches should show up in RED.
    If still possible, a button (‘Run Updater’) should also show there to upgrade the database.

    #137253

    scottk
    Badges:

    Looks like I was running 395 until a couple weeks ago when I upgraded to 399. I’m getting the error with both versions (I upgraded in the hopes that it would fix it.) Current database is 66, previous was 65. No red to be found. The plugin version and DB version are in green.

    Tried the “Run Updater” function, but no dice. Any other ideas?

    #137269

    Arnan de Gans
    Badges:

    You can try to add the column manually via something like PHPMyAdmin –
    Run this query in their SQL field/dashboard and it should work, provided no other columns are missing.

    ALTER TABLE wp_adrotate ADD os_ios char(1) NOT NULL default 'Y' AFTER tablet;

    #137278

    scottk
    Badges:

    Yikes, I have no idea what that means lol. Is that something my host will understand and be able to accomplish? Or will I need to hire a developer for this?

    #137280

    Arnan de Gans
    Badges:

    Yep, they’ll know. Running a query should take no more than a few seconds.

    #137667

    scottk
    Badges:

    They ran the query for me, but no dice. Still getting the error when I select New Advert. Any other ideas?

    Thanks

    #137681

    Arnan de Gans
    Badges:

    Yes, same as before, check the error_log for errors.
    There are bound to be a bunch more…

    #138263

    scottk
    Badges:

    Here are all the adrotate errors (did not include duplicates.) Brace yourself…

    PHP Warning: include_once(/home/dnacannon/public_html/wp-content/plugins/adrotate/adrotate-widget.php): failed to open stream: Too many open files in system in /home/dnacannon/public_html/wp-content/plugins/adrotate/adrotate.php on line 37

    PHP Warning: include_once(): Failed opening ‘/home/dnacannon/public_html/wp-content/plugins/adrotate//adrotate-widget.php’ for inclusion (include_path=’.:/opt/cpanel/ea-php73/root/usr/share/pear’) in /home/dnacannon/public_html/wp-content/plugins/adrotate/adrotate.php on line 37

    PHP Warning: call_user_func_array() expects parameter 1 to be a valid callback, function ‘adrotate_widget’ not found or invalid function name in /home/dnacannon/public_html/wp-includes/class-wp-hook.php on line 292
    PHP Warning: mysqli_query(): (HY000/29): File ‘./dnacanno_wrdp1/wp_adrotate_stats.MYD’ not found (Errcode: 23 – Too many open files in system) in /home/dnacannon/public_html/wp-includes/wp-db.php on line 2056

    WordPress database error File ‘./dnacanno_wrdp1/wp_adrotate_groups.MYD’ not found (Errcode: 23 – Too many open files in system) for query SELECT id , adspeed FROM wp_adrotate_groups WHERE name != ” AND modus = 1 ORDER BY id ASC; made by require(‘wp-blog-header.php’), require_once(‘wp-includes/template-loader.php’), include(‘/themes/ultimatube/tag.php’), get_footer, locate_template, load_template, require_once(‘/themes/ultimatube/footer.php’), wp_footer, do_action(‘wp_footer’), WP_Hook->do_action, WP_Hook->apply_filters, adrotate_custom_javascript

    WordPress database error File ‘./dnacanno_wrdp1/wp_adrotate_stats.MYD’ not found (Errcode: 23 – Too many open files in system) for query SELECT id FROM wp_adrotate_stats WHERE ad = 49 AND group = 1 AND thetime = 1620604800; made by require(‘wp-blog-header.php’), require_once(‘wp-includes/template-loader.php’), include(‘/themes/ultimatube/index.php’), wpst_render_shortcodes, do_shortcode, preg_replace_callback, do_shortcode_tag, adrotate_shortcode, adrotate_group, adrotate_count_impression

    PHP Fatal error: Uncaught Error: Call to undefined function adrotate_now() in /home/dnacannon/public_html/wp-content/plugins/adrotate/adrotate-output.php:63
    Stack trace:
    #0 /home/dnacannon/public_html/wp-content/plugins/adrotate/adrotate-output.php(240): adrotate_group(‘1’)
    #1 /home/dnacannon/public_html/wp-includes/shortcodes.php(343): adrotate_shortcode(Array, ”, ‘adrotate’)
    #2 [internal function]: do_shortcode_tag(Array)
    #3 /home/dnacannon/public_html/wp-includes/shortcodes.php(218): preg_replace_callback(‘/\\[(\\[?)(adrota…’, ‘do_shortcode_ta…’, ‘[adrotate group…’)
    #4 /home/dnacannon/public_html/wp-content/themes/ultimatube/functions.php(363): do_shortcode(‘[adrotate group…’)
    #5 /home/dnacannon/public_html/wp-content/themes/ultimatube/category.php(17): wpst_render_shortcodes(‘[adrotate group…’)
    #6 /home/dnacannon/public_html/wp-includes/template-loader.php(106): include(‘/home/dnacannon…’)
    #7 /home/dnacannon/public_html/wp-blog-header.php(19): require_once(‘/home/dnacannon…’)
    #8 /home/dnacannon/public_html/ in /home/dnacannon/public_html/wp-content/plugins/adrotate/adrotate-output.php on line 63

    #138271

    Arnan de Gans
    Badges:

    You’re still having the ‘too many open files’ issue, which causes the other errors.
    Please talk to your hosting provider on how to fix this. It’s a server problem.

    #138456

    scottk
    Badges:

    Response from support:

    Upon further review and testing for this error and the Advert plugin, I ran into a similar error that was provided before:

    [05-Sep-2021 22:31:15 UTC] WordPress database error Unknown column ‘os_android’ in ‘field list’ for query INSERT INTO wp_adrotate
    ( title , bannercode , thetime , updated , author , imagetype , image , tracker , show_everyone , desktop , mobile , tablet , os_ios , os_android , os_other , type , weight , autodelete , budget , crate , irate , state_req , cities , states , countries ) VALUES (”, ”, ‘1630881075’, ‘1630881075’, ‘hostgator’, ‘dropdown’, ”, ‘N’, ‘Y’, ‘Y’, ‘Y’, ‘Y’, ‘Y’, ‘Y’, ‘Y’, ’empty’, ‘6’, ‘N’, ‘0’, ‘0’, ‘0’, ‘N’, ‘a:0:{}’, ‘a:0:{}’, ‘a:0:{}’) made by do_action(‘adrotate_page_adrotate-ads’), WP_Hook->do_action, WP_Hook->apply_filters, adrotate_manage, include(‘/plugins/adrotate/dashboard/publisher/adverts-edit.php’)

    This however, is for a different column than the previous error. The previous column that was missing was os_ios and now it is referencing os_android. It appears that the query referenced in the script adverts-edit.php is attempting to insert data in to columns that do not exist. You can see the columns below that exist in your database table wp_adrotate below:

    +—————+
    | COLUMN_NAME |
    +—————+
    | id |
    | title |
    | bannercode |
    | thetime |
    | updated |
    | author |
    | imagetype |
    | image |
    | tracker |
    | show_everyone |
    | desktop |
    | mobile |
    | tablet |
    | os_ios |
    | type |
    | weight |
    | autodelete |
    | sortorder |
    | budget |
    | crate |
    | irate |
    | state_req |
    | cities |
    | states |
    | countries |
    +—————+

    As you can see, os_android does not exist, and the same goes for os_other. Thus the error will likely persist until these columns are added.

    It appears the core of the issue is with the database and the information in the table not having been updated properly or data having been removed.

    I did attempt to address the “too many files” error by increasing the ulimit for your server, but regardless of value it did not resolve the Advert issue, so I do not believe that in particular is the cause.

    The missing information in the database will likely need to be restored. If possible, you can send this information to the developer to see if they have any further recommendations as to a resolution and we’ll be happy to assist as much as we are able.

    #138563

    Arnan de Gans
    Badges:

    Indeed, neither does os_other . And your table still has sortorder . Things that got added and removed years ago.
    This suggests that other parts of your database are not updated either – Like missing indexes, data types set in a different format/type.

    In most cases it’s faster to just start over with a new database. But that will loose all adverts and related data of-course.
    The other way is to nitpick through the database and update whatever needs updating.
    To do so you can ‘simply’ match up the database with the installation script in adrotate-setup.php.

    Not a hard task to do, but it is time consuming and fairly technical.
    I can do this for you, usually it’ll take about 2 hours to check and fix a database like this.
    Assuming 2 hours that’d cost €90 (no vat). More on pricing can be read here – https://ajdg.solutions/pricing/

    Raising the ulimit would fix the too many files issue, but the database problem remains of-course. They are 2 separate issues.

Viewing 20 posts - 1 through 20 (of 23 total)

You must be logged in to reply to this topic.

You may be interested in