Support Forum

Importer says "Sorry, you are not allowed to access this page."

57 Answers

New Answer

YS Yellow Swordfish
Yellow Swordfish
Member

The 500 status is because it is trying to make calls to functions it is no longer tied to so it actually ends quite quickly in a php fatal error. You will see that if you look in your servers error log.

I do have one other thought.

You said you set file/folder permissions to 777. Somer servers are set – in our experience – to fail at 777 because it is just too open. But – I also note you did that after it failed to load the first time around.

However – there are two more security permissions that are set on Unix based files and folders called GUID and UID. These control ownership. I.e., does a file belong to the system (like the root user) so can not be called and opened by a simple user. It is rare but we have encountered users whose servers have coughed at the wrong time and set either the UID/GUID or both incorrectly. If this has happened then WP would not be able to open them.

It is not recommended to change these if you do not know what you are doing but you should be able to look at them. A decent ftp client will usually allow you to view the full permissions. GUID and UID should basically be the same as the parent wp-content folder.

If in any doubt I would ask your host to take a look.

CA Chris_Andrews
Chris_Andrews
Member

I thought the wp debugger would tell me this, but apparently not. In the php error log I find: 

 

[Sat Mar 11 11:38:39.935078 2017] [fcgid:warn] [pid 24542] [client 2601:347:100:a340:3d63:6a93:b554:dc47:22282] mod_fcgid: stderr: PHP Notice: Use of undefined constant SPI_DIR – assumed ‘SPI_DIR’ in /home/(mysite)/public_html/wp-content/plugins/sp-import/admin/spimport-setup.php on line 9

[Sat Mar 11 11:38:39.935131 2017] [fcgid:warn] [pid 24542] [client 2601:347:100:a340:3d63:6a93:b554:dc47:22282] mod_fcgid: stderr: PHP Warning: include_once(SPI_DIRadmin/spimport-support.php): failed to open stream: No such file or directory in /home/(mysite)/public_html/wp-content/plugins/sp-import/admin/spimport-setup.php on line 9

[Sat Mar 11 11:38:39.935135 2017] [fcgid:warn] [pid 24542] [client 2601:347:100:a340:3d63:6a93:b554:dc47:22282] mod_fcgid: stderr: PHP Warning: include_once(): Failed opening ‘SPI_DIRadmin/spimport-support.php’ for inclusion (include_path=’.:/usr/share/pear:/usr/share/php’) in /home/(mysite)/public_html/wp-content/plugins/sp-import/admin/spimport-setup.php on line 9

[Sat Mar 11 11:38:39.935152 2017] [fcgid:warn] [pid 24542] [client 2601:347:100:a340:3d63:6a93:b554:dc47:22282] mod_fcgid: stderr: PHP Fatal error: Call to undefined function spi_header() in /home/(mysite)/public_html/wp-content/plugins/sp-import/admin/spimport-setup.php on line 15

YS Yellow Swordfish
Yellow Swordfish
Member

Like I said in post #16. Ends in a php fatal error…

CA Chris_Andrews
Chris_Andrews
Member

I checked ownership and it’s consistent with other plugins. 

I changed: 

include_once(SPI_DIR.’admin/spimport-support.php’);

to: 

include_once(“spimport-support.php”);

and now it finds the spimport-support.php file. 

Still get a fatal-error here though: 

PHP Fatal error: Call to a member function get_var() on a non-object in /home/(mysite)/public_html/wp-content/plugins/sp-import/admin/spimport-support.php on line 45 

I wonder if it’s not connecting to wpdb for some reason?

CA Chris_Andrews
Chris_Andrews
Member

Y’all are going to be sick of me before I even get started here 🙂  This has confounded me though! 

YS Yellow Swordfish
Yellow Swordfish
Member

Another quick question.. which version of WordPress and which version of php are you running?

YS Yellow Swordfish
Yellow Swordfish
Member

Ah no help. The version of the importer you have does not use the mysqli php library which is the only supported php7 lib. But 5.4.16 and the latest WP still support it so that is not causing you any problems. Thought I might be on the right track there briefly…

CA Chris_Andrews
Chris_Andrews
Member

Still picking through this… my php knowledge is limited…

In  spimport-support.php, I find:

$c = $wpdb->get_var(“SELECT COUNT(*) FROM “.SFGROUPS);

In my database, this table is named: wp_sfgroups. 

Is SFGROUPS a variable that translates into wp_sfgroups ? 

Just checking,

Chris

MP Mr Papa
Mr Papa
Member

technically, its defined as:

            define(‘SPGROUPS’, SP_PREFIX.’sfgroups’);

where  the SP_PREFIX constant is defined as your wpdb prefix, in this case wp_

is this standard wp?  that is, not multisite?  and its stock wp – you havent hand modified any core files?

CA Chris_Andrews
Chris_Andrews
Member

So that should be ok.

Yep, standard WP. I used to mess with core files years ago but learned my lesson on that. No messin’ w/core files 🙂 

CA Chris_Andrews
Chris_Andrews
Member

Finally got this 🙂 🙂  

Just took about a month (not continuously, I gave up several times and then would come back to it).

Ok, one of the things I did early on was deactivate all my plugins and even with SimplePress and the importer being the only things activated, the importer wouldn’t work. 

After trying everything else in the world, I finally set up a test site and just kept messing with it and messing with it. Suddenly it started working.

Backing up and retracing my steps several times, then several more times to make sure I really had the fix, I found that deactivating all other plugins wasn’t enough by itself.

What I had to do is deactivate everything except SimplePress, including the importer, and then restart the importer. Restarting the importer when all the other plugins were deactivated proved to be the key.

After further testing, I found the plugin it was conflicting with is the Plugin Organizer ( https://wordpress.org/plugins/plugin-organizer/ ). But again, turning it off wasn’t enough. It has to be turned off, then the importer has to be turned off and back on again. 

Yikes… do I remember seeing something saying I had 30 days to get my free plugins with my membership? Can be extended since I’m just now getting started with getting this going? Not sure which plugins I’ll be using yet. 

Chris

MP Mr Papa
Mr Papa
Member

odd… we have many users that use plugin organizer.. maybe just related to import?

looks like your free plugins are still active…

CA Chris_Andrews
Chris_Andrews
Member

Thank you. It was just the importer affected by the plugin organizer, it didn’t seem to affect any of the other forum admin panels. 

Oh… thought I was home free when I got the importer panel working…. but…

I’m importing from the bbpress plugin. Everything looks like it’s working, I get the “finished” from the importer. 

But it doesn’t look like anything is imported. I don’t have any groups nor a default group. 

Suggestions? 

MP Mr Papa
Mr Papa
Member

did you use the right bbpress verison? 1 vs 2, I think…

anything in your error log?