Title: Installation errors
Last modified: August 22, 2016

---

# Installation errors

 *  Resolved [scarey1952](https://wordpress.org/support/users/scarey1952/)
 * (@scarey1952)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/installation-errors-7/)
 * I tried installing Ad King Pro 1.9.15 at least 3 times and I got the following
   warnings at line 688 of wp-admin/imcludes/class-wp-upgrader.php:
 * PHP Warning: Invalid argument supplied for foreach() in C:\Inetpub\vhosts\localheadlinenews.
   com\wordpress\wp-admin\includes\class-wp-upgrader.php on line 688
    PHP Warning:
   Invalid argument supplied for foreach() in C:\Inetpub\vhosts\localheadlinenews.
   com\wordpress\wp-admin\includes\class-wp-upgrader.php on line 688
 * But the plugin installs anyway since these are just warnings. Then, I Activate
   the plugin and get 2 database Duplicate entry errors, but this is because I have
   installed Ad King Pro a couple of times already. The plugin is now activated.
   I click on Settings right under Ad King Pro from the Installed Plugins page and
   now I get the following PHP warnings:
 * PHP Warning: scandir(C:\Inetpub\vhosts\localheadlinenews.com\wordpress\wp-content\
   plugins\adkingpro\includes\screens/themes/,C:\Inetpub\vhosts\localheadlinenews.
   com\wordpress\wp-content\plugins\adkingpro\includes\screens/themes/): The system
   cannot find the file specified. (code: 2) in C:\Inetpub\vhosts\localheadlinenews.
   com\wordpress\wp-content\plugins\adkingpro\includes\screens\settings.php on line
   200
    PHP Warning: scandir(C:\Inetpub\vhosts\localheadlinenews.com\wordpress\wp-
   content\plugins\adkingpro\includes\screens/themes/): failed to open dir: No such
   file or directory in C:\Inetpub\vhosts\localheadlinenews.com\wordpress\wp-content\
   plugins\adkingpro\includes\screens\settings.php on line 200 PHP Warning: scandir():(
   errno 2): No such file or directory in C:\Inetpub\vhosts\localheadlinenews.com\
   wordpress\wp-content\plugins\adkingpro\includes\screens\settings.php on line 
   200 PHP Warning: Invalid argument supplied for foreach() in C:\Inetpub\vhosts\
   localheadlinenews.com\wordpress\wp-content\plugins\adkingpro\includes\screens\
   settings.php on line 202
 * These same errors come up when I click on King Pro Plugins->Ad King Pro from 
   the admin dashboard.
 * The Adverts menu item does shows up on the dashboard and I was able to create
   some Advert Types and create a bunch of Adverts. I was also able to add text 
   widgets with the adkingpro shortcode with the type attribute. The banner ads 
   that I defined in the adverts rotated successfully. However, the Settings screen
   seems to be missing from the dashboard because apparently it didn’t get installed
   or something. Shouldn’t there be an Ad King Pro menu item under the dashboard
   Settings? It’s missing in my case.
 * Also, on the dashboard Home page under “Ad King Pro – Banner Stats Summary”, 
   I see a section for each Advert Type that I created with the following text:
 * **clicks ?>**
 * repeated over and over again – 24 times to be exact. It creates a big mess on
   the dashboard Home page and takes up a lot of room. There are other strange symptoms
   going on such as the dashboard Ad King Pro Stats page displaying a bunch of blank
   tabs with no information, but I’ll stop here. Am I doing something wrong? Can
   you help?
 * Thanks, Steve
 * [https://wordpress.org/plugins/adkingpro/](https://wordpress.org/plugins/adkingpro/)

Viewing 1 replies (of 1 total)

 *  Thread Starter [scarey1952](https://wordpress.org/support/users/scarey1952/)
 * (@scarey1952)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/installation-errors-7/#post-5223259)
 * I resolved these problems myself if anyone is interested. First, the Ad King 
   Pro settings page was not coming up because it was expecting there to be a themes
   directory located at wp-content/plugins/adkingpro/includes/screens/themes. So
   I manually created this directory and the settings page magically came up. Why
   was this themes directory missing? Why wasn’t it added as part of the installation?
   Is this a bug? Has anyone else run into this problem?
 * The second problem I ran into was that the php escape short code “<?=” was being
   used in many places in the plugin code. This short code translates to “<?php 
   echo” and requires php ini variable short_open_code to be set on in order to 
   work. On our server, it was set to off so the Ad King Pro stats report was showing
   up as a mess. I was able to set the php ini variable on and this fixed that problem.
 * Steve

Viewing 1 replies (of 1 total)

The topic ‘Installation errors’ is closed to new replies.

 * ![](https://ps.w.org/adkingpro/assets/icon-256x256.png?rev=1060727)
 * [Ad King Pro](https://wordpress.org/plugins/adkingpro/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/adkingpro/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/adkingpro/)
 * [Active Topics](https://wordpress.org/support/plugin/adkingpro/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/adkingpro/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/adkingpro/reviews/)

## Tags

 * [installation](https://wordpress.org/support/topic-tag/installation/)

 * 1 reply
 * 1 participant
 * Last reply from: [scarey1952](https://wordpress.org/support/users/scarey1952/)
 * Last activity: [11 years, 9 months ago](https://wordpress.org/support/topic/installation-errors-7/#post-5223259)
 * Status: resolved