Skip to content

Commit

Permalink
PHP: Resolve "localhost" to "127.0.0.1"
Browse files Browse the repository at this point in the history
  • Loading branch information
adamziel committed May 9, 2023
1 parent f2af39c commit 4c40c55
Show file tree
Hide file tree
Showing 19 changed files with 63 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/**
* Emscripten resolves `localhost` to a random IP address. Let's
* make it always resolve to 127.0.0.1.
*/
DNS.address_map.addrs.localhost = '127.0.0.1';

/**
* Debugging Asyncify errors is tricky because the stack trace is lost when the
* error is thrown. This code saves the stack trace in a global variable
Expand Down
8 changes: 7 additions & 1 deletion packages/php-wasm/node/public/php_5_6.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export const dependenciesTotalSize = 10176137;
export const dependenciesTotalSize = 10176138;
const dependencyFilename = __dirname + '/php_5_6.wasm';
export { dependencyFilename }; export function init(RuntimeName, PHPLoader) {
var Module = typeof PHPLoader != "undefined" ? PHPLoader : {};
Expand Down Expand Up @@ -7029,6 +7029,12 @@ if (Module["preInit"]) {
}

run();
/**
* Emscripten resolves `localhost` to a random IP address. Let's
* make it always resolve to 127.0.0.1.
*/
DNS.address_map.addrs.localhost = '127.0.0.1';

/**
* Debugging Asyncify errors is tricky because the stack trace is lost when the
* error is thrown. This code saves the stack trace in a global variable
Expand Down
Binary file modified packages/php-wasm/node/public/php_5_6.wasm
Binary file not shown.
6 changes: 6 additions & 0 deletions packages/php-wasm/node/public/php_7_0.js
Original file line number Diff line number Diff line change
Expand Up @@ -7010,6 +7010,12 @@ if (Module["preInit"]) {
}

run();
/**
* Emscripten resolves `localhost` to a random IP address. Let's
* make it always resolve to 127.0.0.1.
*/
DNS.address_map.addrs.localhost = '127.0.0.1';

/**
* Debugging Asyncify errors is tricky because the stack trace is lost when the
* error is thrown. This code saves the stack trace in a global variable
Expand Down
Binary file modified packages/php-wasm/node/public/php_7_0.wasm
Binary file not shown.
6 changes: 6 additions & 0 deletions packages/php-wasm/node/public/php_7_1.js
Original file line number Diff line number Diff line change
Expand Up @@ -6995,6 +6995,12 @@ if (Module["preInit"]) {
}

run();
/**
* Emscripten resolves `localhost` to a random IP address. Let's
* make it always resolve to 127.0.0.1.
*/
DNS.address_map.addrs.localhost = '127.0.0.1';

/**
* Debugging Asyncify errors is tricky because the stack trace is lost when the
* error is thrown. This code saves the stack trace in a global variable
Expand Down
Binary file modified packages/php-wasm/node/public/php_7_1.wasm
Binary file not shown.
6 changes: 6 additions & 0 deletions packages/php-wasm/node/public/php_7_2.js
Original file line number Diff line number Diff line change
Expand Up @@ -7011,6 +7011,12 @@ if (Module["preInit"]) {
}

run();
/**
* Emscripten resolves `localhost` to a random IP address. Let's
* make it always resolve to 127.0.0.1.
*/
DNS.address_map.addrs.localhost = '127.0.0.1';

/**
* Debugging Asyncify errors is tricky because the stack trace is lost when the
* error is thrown. This code saves the stack trace in a global variable
Expand Down
Binary file modified packages/php-wasm/node/public/php_7_2.wasm
Binary file not shown.
8 changes: 7 additions & 1 deletion packages/php-wasm/node/public/php_7_3.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export const dependenciesTotalSize = 10915927;
export const dependenciesTotalSize = 10915930;
const dependencyFilename = __dirname + '/php_7_3.wasm';
export { dependencyFilename }; export function init(RuntimeName, PHPLoader) {
var Module = typeof PHPLoader != "undefined" ? PHPLoader : {};
Expand Down Expand Up @@ -7148,6 +7148,12 @@ if (Module["preInit"]) {
}

run();
/**
* Emscripten resolves `localhost` to a random IP address. Let's
* make it always resolve to 127.0.0.1.
*/
DNS.address_map.addrs.localhost = '127.0.0.1';

/**
* Debugging Asyncify errors is tricky because the stack trace is lost when the
* error is thrown. This code saves the stack trace in a global variable
Expand Down
Binary file modified packages/php-wasm/node/public/php_7_3.wasm
Binary file not shown.
6 changes: 6 additions & 0 deletions packages/php-wasm/node/public/php_7_4.js
Original file line number Diff line number Diff line change
Expand Up @@ -7154,6 +7154,12 @@ if (Module["preInit"]) {
}

run();
/**
* Emscripten resolves `localhost` to a random IP address. Let's
* make it always resolve to 127.0.0.1.
*/
DNS.address_map.addrs.localhost = '127.0.0.1';

/**
* Debugging Asyncify errors is tricky because the stack trace is lost when the
* error is thrown. This code saves the stack trace in a global variable
Expand Down
Binary file modified packages/php-wasm/node/public/php_7_4.wasm
Binary file not shown.
6 changes: 6 additions & 0 deletions packages/php-wasm/node/public/php_8_0.js
Original file line number Diff line number Diff line change
Expand Up @@ -7170,6 +7170,12 @@ if (Module["preInit"]) {
}

run();
/**
* Emscripten resolves `localhost` to a random IP address. Let's
* make it always resolve to 127.0.0.1.
*/
DNS.address_map.addrs.localhost = '127.0.0.1';

/**
* Debugging Asyncify errors is tricky because the stack trace is lost when the
* error is thrown. This code saves the stack trace in a global variable
Expand Down
Binary file modified packages/php-wasm/node/public/php_8_0.wasm
Binary file not shown.
6 changes: 6 additions & 0 deletions packages/php-wasm/node/public/php_8_1.js
Original file line number Diff line number Diff line change
Expand Up @@ -7199,6 +7199,12 @@ if (Module["preInit"]) {
}

run();
/**
* Emscripten resolves `localhost` to a random IP address. Let's
* make it always resolve to 127.0.0.1.
*/
DNS.address_map.addrs.localhost = '127.0.0.1';

/**
* Debugging Asyncify errors is tricky because the stack trace is lost when the
* error is thrown. This code saves the stack trace in a global variable
Expand Down
Binary file modified packages/php-wasm/node/public/php_8_1.wasm
Binary file not shown.
8 changes: 7 additions & 1 deletion packages/php-wasm/node/public/php_8_2.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export const dependenciesTotalSize = 10302567;
export const dependenciesTotalSize = 10302568;
const dependencyFilename = __dirname + '/php_8_2.wasm';
export { dependencyFilename }; export function init(RuntimeName, PHPLoader) {
var Module = typeof PHPLoader != "undefined" ? PHPLoader : {};
Expand Down Expand Up @@ -7205,6 +7205,12 @@ if (Module["preInit"]) {
}

run();
/**
* Emscripten resolves `localhost` to a random IP address. Let's
* make it always resolve to 127.0.0.1.
*/
DNS.address_map.addrs.localhost = '127.0.0.1';

/**
* Debugging Asyncify errors is tricky because the stack trace is lost when the
* error is thrown. This code saves the stack trace in a global variable
Expand Down
Binary file modified packages/php-wasm/node/public/php_8_2.wasm
Binary file not shown.

0 comments on commit 4c40c55

Please sign in to comment.