Jump to content

IPS 4.7.2 Beta 2 (IN_DEV) - Call to undefined function IPS\Application\preq_quote()


Go to solution Solved by Andy Millne,

Recommended Posts

Posted (edited)

@aXenDev

This is likely to be an issue for us who use Windows on our dev machines...cue "Windows isn't supported..."

So, a little playing around and grabbing out all the $skipPatterns & $pathnames involved with my single application allows me to do the following as an isolated PHP file...same issue, and easier to figure out now.

<?php
$patterns[] = '/C\:\\wamp64\\www\\dev\\ips_47_dev_b/applications/neappavrecorder\/(?:hooks|setup|dev)/';
$paths[] = 'C:\wamp64\www\dev\ips_47_dev_b/applications/neappavrecorder\Application.php';
$patterns[] = '/C\:\\wamp64\\www\\dev\\ips_47_dev_b/applications/neappavrecorder\/(?:hooks|setup|dev)/';
$paths[] = 'C:\wamp64\www\dev\ips_47_dev_b/applications/neappavrecorder\dev\jslang.php';
$patterns[] = '/C\:\\wamp64\\www\\dev\\ips_47_dev_b/applications/neappavrecorder\/(?:hooks|setup|dev)/';
$paths[] = 'C:\wamp64\www\dev\ips_47_dev_b/applications/neappavrecorder\dev\lang.php';
$patterns[] = '/C\:\\wamp64\\www\\dev\\ips_47_dev_b/applications/neappavrecorder\/(?:hooks|setup|dev)/';
$paths[] = 'C:\wamp64\www\dev\ips_47_dev_b/applications/neappavrecorder\hooks\code_dispatcher_front.php';
$patterns[] = '/C\:\\wamp64\\www\\dev\\ips_47_dev_b/applications/neappavrecorder\/(?:hooks|setup|dev)/';
$paths[] = 'C:\wamp64\www\dev\ips_47_dev_b/applications/neappavrecorder\hooks\theme_core_global_forms.php';
$patterns[] = '/C\:\\wamp64\\www\\dev\\ips_47_dev_b/applications/neappavrecorder\/(?:hooks|setup|dev)/';
$paths[] = 'C:\wamp64\www\dev\ips_47_dev_b/applications/neappavrecorder\modules\admin\recorder\avsettings.php';
$patterns[] = '/C\:\\wamp64\\www\\dev\\ips_47_dev_b/applications/neappavrecorder\/(?:hooks|setup|dev)/';
$paths[] = 'C:\wamp64\www\dev\ips_47_dev_b/applications/neappavrecorder\sources\NeappAvRecorder.php';

foreach($patterns as $k=>$v){
    preg_match($v,$paths[$k]);
}

Result (snipped for brevity):

( ! ) Warning: preg_match(): Unknown modifier 'a' in C:\wamp64\www\loggedin.php on line 18
Call Stack
#	Time	Memory	Function	Location
1	0.0005	363704	{main}( )	...\loggedin.php:0
2	0.0005	364456	preg_match( $pattern = '/C\\:\\wamp64\\www\\dev\\ips_47_dev_b/applications/neappavrecorder\\/(?:hooks|setup|dev)/', $subject = 'C:\\wamp64\\www\\dev\\ips_47_dev_b/applications/neappavrecorder\\Application.php' )	...\loggedin.php:18

( ! ) Warning: preg_match(): Unknown modifier 'a' in C:\wamp64\www\loggedin.php on line 18
Call Stack
#	Time	Memory	Function	Location
1	0.0005	363704	{main}( )	...\loggedin.php:0
2	0.0016	365328	preg_match( $pattern = '/C\\:\\wamp64\\www\\dev\\ips_47_dev_b/applications/neappavrecorder\\/(?:hooks|setup|dev)/', $subject = 'C:\\wamp64\\www\\dev\\ips_47_dev_b/applications/neappavrecorder\\dev\\jslang.php' )	...\loggedin.php:18

( ! ) Warning: preg_match(): Unknown modifier 'a' in C:\wamp64\www\loggedin.php on line 18
Call Stack
#	Time	Memory	Function	Location
1	0.0005	363704	{main}( )	...\loggedin.php:0
2	0.0027	365328	preg_match( $pattern = '/C\\:\\wamp64\\www\\dev\\ips_47_dev_b/applications/neappavrecorder\\/(?:hooks|setup|dev)/', $subject = 'C:\\wamp64\\www\\dev\\ips_47_dev_b/applications/neappavrecorder\\dev\\lang.php' )	...\loggedin.php:18

The problem is, I believe, as follows:

$dir = ( ( \defined('IPS\CIC2') and \IPS\CIC2 ) ? \IPS\SITE_FILES_PATH : \IPS\ROOT_PATH ) . '/applications/' . $app->directory;

On Windows, that will give you:

C:\wamp64\www\dev\ips_47_dev_b/applications/neappavrecorder

It's the / in there that is causing the later problems.

Manipulate $dir as follows, before the $skipPattern is created, will sort it. Likely going to need to be a manual edit by us if the expected cue comes along...

$dir = str_replace('/','\\',$dir);

 

Edited by Nathan Explosion
Posted
On 9/2/2022 at 7:22 PM, Nathan Explosion said:

This is likely to be an issue for us who use Windows on our dev machines...cue "Windows isn't supported..."

This error is also in my macos (macbook pro with m2/xampp with php 8.1.6/ MariaDB 10.4.21 )
Could contain: File, Menu, Text, Webpage

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...