Xampp error

Got something cool to share with AppGini users? Feel free to post it here!
Post Reply
User avatar
RonP
Veteran Member
Posts:319
Joined: 2013-08-27 13:36
Location: Heiloo, The Netherlands
Contact:

Xampp error

Post by RonP » 2025-12-05 15:33

Hi,
I've had to install a whole new Windows 11 environment and now after installing Xampp AND restored the "AppGini" project file into the httdocs folder I get an error message form Xampp
Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 262144 bytes) in D:\Xampp\htdocs\qse\admin\incFunctions.php on line 412
I use, and have used before new Windows 11, Xampp V3.3.0
I use AppGini Version 25.15 revision 2234

Anyone a clue to solve this?
Ron

User avatar
RonP
Veteran Member
Posts:319
Joined: 2013-08-27 13:36
Location: Heiloo, The Netherlands
Contact:

Re: Xampp error

Post by RonP » 2025-12-07 13:10

Hi,
Can I please some advice?
It doesn't matter which browser I use
The exact same project is running live!

I've regenerated the project totally, same error.

D Oliveira
AppGini Super Hero
AppGini Super Hero
Posts:359
Joined: 2018-03-04 09:30
Location: David

Re: Xampp error

Post by D Oliveira » 2025-12-07 17:57

Increasing memory limit probably isn't the right call here, I would check file permissions for the app directory and database health

User avatar
onoehring
AppGini Super Hero
AppGini Super Hero
Posts:1464
Joined: 2019-05-21 22:42
Location: Germany
Contact:

Re: Xampp error

Post by onoehring » 2025-12-08 06:30

Hi,
also look at line 412 in the specified file... what is happening there?

Did you try a xampp alternative? Maybe this helps locating the issue.
Olaf

User avatar
RonP
Veteran Member
Posts:319
Joined: 2013-08-27 13:36
Location: Heiloo, The Netherlands
Contact:

Re: Xampp error

Post by RonP » 2025-12-15 22:45

Hi,
Sorry for the late reaction, I didn’t got a mail.
I’ve usedd Xampp for my 3 of my Appgini projects and until now nothing strange happens.

However…. One project runs fine.
I’ve already downloaded the live version to my local environment and the 2 projects still run into errors.
Ron

ppfoong
Veteran Member
Posts:94
Joined: 2021-07-13 16:46

Re: Xampp error

Post by ppfoong » 2025-12-16 08:43

If the file incFunctions.php is not changed, the line 412 should be the declaration of $cached as static variable:

===
function makeSafe($string, $is_gpc = true) {
static $cached = []; /* str => escaped_str */

if($string === null) return '';
if(!strlen($string)) return '';
if(is_numeric($string)) return db_escape($string); // don't cache numbers to avoid cases like '3.5' being equivelant to '3' in array indexes
===

and its content is:

$cached[$string] = db_escape($string);

Probably this is due to $string pass to makeSafe is very large size.

Try edit php.ini and change memory_limit parameter to a larger amount, then restart your XAMPP.

pbottcher
AppGini Super Hero
AppGini Super Hero
Posts:1757
Joined: 2018-04-01 10:12

Re: Xampp error

Post by pbottcher » 2025-12-16 18:54

Hi Ron,

did you actually regenerate your app into the new installation?
Maybe you can try that.
Which versions are you using?
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.

User avatar
RonP
Veteran Member
Posts:319
Joined: 2013-08-27 13:36
Location: Heiloo, The Netherlands
Contact:

Re: Xampp error

Post by RonP » 2025-12-17 15:31

Hi all,
In spite of marking to have a notification of your replies .... I still don’t get mail.
I have 3 projects running, different AppGini Versions
- V24.19, after regeneration with V25.15 it won’t run local
- V25.12 and V25.13 runs fine local
- V25.15 runs on a stage.domain, however after reinstall Windows 11 and Xampp I run into errors, local

After change memory form 512 tot 1024 (php.ini) I get:
Fatal error: Allowed memory size of 1073741824 bytes exhausted (tried to allocate 4096 bytes) in D:\Xampp\htdocs\qse-oud\settings-manager.php on line 63
Ron

ppfoong
Veteran Member
Posts:94
Joined: 2021-07-13 16:46

Re: Xampp error

Post by ppfoong » 2025-12-19 05:06

It seems to be a memory leak in the script.

What is the code around line 63 of D:\Xampp\htdocs\qse-oud\settings-manager.php ?

User avatar
RonP
Veteran Member
Posts:319
Joined: 2013-08-27 13:36
Location: Heiloo, The Netherlands
Contact:

Re: Xampp error

Post by RonP » 2025-12-21 16:09

Sorry for the late response :mrgreen:

Code: Select all

/************************************************/

	function configFileName() {
		$tenantId = Authentication::tenantIdPadded();
		return __DIR__ . "/config{$tenantId}.php";
	}

	function default_config() {
		return [
			'dbServer' => '',
			'dbUsername' => '',
			'dbPassword' => '',
			'dbDatabase' => '',
			'dbPort' => '',
			'appURI' => '',
			'host' => (isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : $_SERVER['SERVER_NAME'] . ($_SERVER['SERVER_PORT'] == '80' || $_SERVER['SERVER_PORT'] == '443' ? '' : ":{$_SERVER['SERVER_PORT']}")),

			'adminConfig' => [
				'adminUsername' => '',
				'adminPassword' => '',
				'notifyAdminNewMembers' => false,
				'defaultSignUp' => 1,
				'anonymousGroup' => 'anonymous',
				'anonymousMember' => 'guest',
				'groupsPerPage' => 10,
				'membersPerPage' => 10,
				'recordsPerPage' => 10,
				'custom1' => 'Full Name',
				'custom2' => 'Address',
				'custom3' => 'City',
				'custom4' => 'State',
				'MySQLDateFormat' => '%d-%m-%Y',
				'PHPDateFormat' => 'j-n-Y',
				'PHPDateTimeFormat' => 'd-m-Y, h:i a',
				'senderName' => 'Membership management',
				'senderEmail' => '',
				'approvalSubject' => 'Your membership is now approved',
				'approvalMessage' => "Dear member,\n\nYour membership is now approved by the admin. You can log in to your account here:\nhttp://{$_SERVER['HTTP_HOST']}" . rtrim(dirname($_SERVER['PHP_SELF']), '/\\') . "\n\nRegards,\nAdmin",
				'hide_twitter_feed' => false,
				'maintenance_mode_message' => '<b>Our website is currently down for maintenance</b><br>\r\nWe expect to be back in a couple hours. Thanks for your patience.',
				'mail_function' => 'mail',
				'smtp_server' => '',
				'smtp_encryption' => '',
				'smtp_port' => 25,
				'smtp_user' => '',
				'smtp_pass' => '',
				'googleAPIKey' => '',
				'baseUploadPath' => 'images',
				'dbBackupCommand' => DB_BACKUP_COMMAND,
				'dbRestoreCommand' => DB_RESTORE_COMMAND,
			]
		];
	}
Ron

ppfoong
Veteran Member
Posts:94
Joined: 2021-07-13 16:46

Re: Xampp error

Post by ppfoong » 2025-12-22 15:29

That's another array.

You can try changing PHP to a newer version.

Here is a guide to change PHP version in XAMPP:
https://dev.to/kansoldev/how-to-change- ... ndows-4klb

User avatar
RonP
Veteran Member
Posts:319
Joined: 2013-08-27 13:36
Location: Heiloo, The Netherlands
Contact:

Re: Xampp error

Post by RonP » 2025-12-23 10:13

Thank you.
I’ll give it a try.
To be continued

Is there a minimum PHP version for Appgini?
Ron

ppfoong
Veteran Member
Posts:94
Joined: 2021-07-13 16:46

Re: Xampp error

Post by ppfoong » 2025-12-23 15:14

Applications created with AppGini require a web server with PHP 8.0 or later, and MySQL 5.6+ or MariaDB 10+.

User avatar
RonP
Veteran Member
Posts:319
Joined: 2013-08-27 13:36
Location: Heiloo, The Netherlands
Contact:

Re: Xampp error

Post by RonP » 2025-12-25 11:51

Well,
I’ve seen that the PHP and Database Version are all right, so any more "tips" ?
php-version Xampp.png
php-version Xampp.png (90.24 KiB) Viewed 8251 times
Databaseversion - Xampp.png
Databaseversion - Xampp.png (74.63 KiB) Viewed 8251 times
Ron

ppfoong
Veteran Member
Posts:94
Joined: 2021-07-13 16:46

Re: Xampp error

Post by ppfoong » 2025-12-25 13:45

For PHP 8.2, you can update to version 8.2.30, which is the latest version.

You can also change to 8.3.29, which is the latest version for PHP 8.3.

User avatar
RonP
Veteran Member
Posts:319
Joined: 2013-08-27 13:36
Location: Heiloo, The Netherlands
Contact:

Re: Xampp error

Post by RonP » 2025-12-26 11:03

All,

For one reason the back-up folder (D:\Xampp\mysql\data\<project>) is corrupted.
Within MySql I see the tables however.... there are NO fields defined.
So AppGini doesn't cope with this situation.
(obviously the tables won’t be defined again, in spite of adding new fields / tables within the project self)

I've made a SQL dump from my staging area; it works fine now.

Many thanks for your help and time, great ! :D

Ron

User avatar
onoehring
AppGini Super Hero
AppGini Super Hero
Posts:1464
Joined: 2019-05-21 22:42
Location: Germany
Contact:

Re: Xampp error

Post by onoehring » 2025-12-29 10:49

Hi Ron,

is it actually possible to use xampp to send emails? Maybe the mails are blocked by the smtp server as they come from a "local" sender (like spam often comes).

I am using laragon which has employed mailpit to test mail sending ( https://mailpit.axllent.org )

Olaf

User avatar
RonP
Veteran Member
Posts:319
Joined: 2013-08-27 13:36
Location: Heiloo, The Netherlands
Contact:

Re: Xampp error

Post by RonP » 2025-12-29 12:59

Hi onoehring

The mail problem was not because of Xampp however I didn't receive "Notification mails" from the forum.
That is fixed now.

Thank you

I'll look for mailpit, could be something

Ron

Post Reply