Issue with security provider and PHP local server. PHP configuration issue?

Wappler 6.8.0 and 7 Beta 13
Win 11
PHP

This follows on from my previous post below and my last comment in that post.

I clean installed Wappler 6.8.0 and Wappler 7 Beta 12 (now at 13) after the updates to Wappler Local PHP server install in Beta 12.

Initial tests showed php 8.1 was working in Beta 12 although composer error still showed in 6.8.0. I could live with that, soon V6 will be history for me.

HOWEVER there are still issues with the server

I have a simple login page

which uses a basic login API action

On successful login the user is redirected to dashboard.php. The dashboard is an SPA located at "mystagingserver.com/admin"

above the head of the dashboard is a security restrict added via Wappler properties panel




<?php
require('../dmxConnectLib/dmxConnect.php');

$app = new \lib\App();

$app->exec(<<<'JSON'
{
	"steps": [
		"Connections/db",
		"SecurityProviders/login_sec",
		{
			"module": "auth",
			"action": "restrict",
			"options": {"loginUrl":"index.php","forbiddenUrl":"index.php","provider":"login_sec"}
		}
	]
}
JSON
, TRUE);
?>
<!doctype html>
<html>

I will do this in reverse order.

If i publish to my staging server running PHP 8.1 everything works as it should, i can login and i am redirected to the dashboard. This leads me to believe that the issue is not the code but the server configuration.

HOWEVER

In W7 Beta 13 running on Wappler local PHP server and PHP 8.1 (auto installed by Wappler on clean install) , login is successful however the security enforcer on the dashboard page throws an error

Warning: require(../dmxConnectLib/dmxConnect.php): Failed to open stream: No such file or directory in E:\webs\dandgv2\www\admin\dashboard.php on line 2

Fatal error: Uncaught Error: Failed opening required '../dmxConnectLib/dmxConnect.php' (include_path='.;C:\php\pear') in E:\webs\dv2\www\admin\dashboard.php:2 Stack trace: #0 C:\Users\brian\AppData\Local\Wappler Beta\resources\app\Shared\DMXzone\dmxAppCreator\UI\lib\htaccess_router.php(44): require_once() #1 [internal function]: {closure}(Array, 12) #2 C:\Users\brian\AppData\Local\Wappler Beta\resources\app\Shared\DMXzone\dmxAppCreator\UI\lib\htaccess_router.php(47): array_walk(Array, Object(Closure)) #3 {main} thrown in E:\webs\dv2\www\admin\dashboard.php on line 2

I assume this is a PHP configuration issue (path to Pear?)

As an aside if I remove the security provider for testing the dashboard is correctly displayed

With Wappler 6.8.0 i still get a composer error when attempting to login as previously reported

<b>Fatal error</b>
:  Composer detected issues in your platform: Your Composer dependencies require the following PHP extensions to be installed: curl, gd, mbstring, openssl. in <b>E:\webs\dv2\www\vendor\composer\platform_check.php</b>
on line <b>41</b>
<br/>

PHPinfo() with Wappler local and Beta 13 shows path to pear as:

Do you have a webroot folder selected in your target projects settings or is it all in the same folder?

You been on the beer george? :rofl::rofl::rofl::rofl:

A what folder selected?

3 Likes

Sorry damn autocorrect :slight_smile:

Same folder. Main site in www, dashboard in www/admin

I mean is the web root in a subfolder www of your project folder or not? Could you show the general project settings?

Fixed in Wappler 7 beta 14

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.