Giter VIP home page Giter VIP logo

Comments (22)

vvalentim avatar vvalentim commented on August 20, 2024 11

I was able to deploy the basic examples by setting Node.js version to 18.x on Vercel's project settings, I've tried [email protected], [email protected] and [email protected] with it and it seems fine.

I had the same error PHP Built-In Server HTTP error: Error: connect ECONNREFUSED 127.0.0.1:8000 when using the default version (Node.js 20.x).

from php.

wnsite avatar wnsite commented on August 20, 2024 8

Fixed! Changed the json to:

{
  "functions": {
    "api/index.php": {
      "runtime": "[email protected]"
    }
  },
  "routes": [
    { "src": "/(.*)", "dest": "/api/index.php" }
  ]
}

from php.

rhtm123 avatar rhtm123 commented on August 20, 2024 6

I had the same problem with node 20x. I created package.json file and add this code to use node 18x version.

package.json
{ "engines": { "node": "18.x" } }

The project is running without any issue

from php.

qkqpttgf avatar qkqpttgf commented on August 20, 2024 3

sorry, but where is the different

from php.

oijqws avatar oijqws commented on August 20, 2024 3

got same error but above does not work.

from php.

f3l1x avatar f3l1x commented on August 20, 2024 3

Hi folks. Node 20.x seems to be problem. I need to investigate it.

from php.

imdsamimakhter avatar imdsamimakhter commented on August 20, 2024 2

vercel.json-

{
  "functions": {
    "api/index.php": {
      "runtime": "[email protected]"
    }
  },
  "routes": [
    { "src": "/(.*)", "dest": "/api/index.php" }
  ]
}

package.json-
{ "engines": { "node": "18.x" } }

Works 👍

from php.

taimaiduc avatar taimaiduc commented on August 20, 2024 1

The same just want to write comment.
Node 18 will work.

from php.

taimaiduc avatar taimaiduc commented on August 20, 2024

Same error here

from php.

joesandiroz2 avatar joesandiroz2 commented on August 20, 2024

i get error
my web : https://doodplay.vercel.app/
my vercel id : QuBwX4iGVFwYPpmEJApy8H3L

how to fix it

from php.

chengfeng30121 avatar chengfeng30121 commented on August 20, 2024

I had the same problem.
How can I fix it?

from php.

YNSTakeru avatar YNSTakeru commented on August 20, 2024

I managed to get it working by changing the Node.js Version in the Settings -> General on Vercel web page.

from php.

SrivastavaArjit avatar SrivastavaArjit commented on August 20, 2024

Did anyone find the solution I am facing the same error.

My file structure is as follows
Screenshot 2024-05-16 163147

and my vercel.json file is
Screenshot 2024-05-16 163245

I know I haven't defined the routes for all the api's but the index route is also not working.

from php.

f3l1x avatar f3l1x commented on August 20, 2024

Are you using Node 18.x? Node 20.x is a problem.

from php.

SrivastavaArjit avatar SrivastavaArjit commented on August 20, 2024

Are you using Node 18.x? Node 20.x is a problem.

yeah i have made that change

from php.

SrivastavaArjit avatar SrivastavaArjit commented on August 20, 2024

this solution works! thanks

I had the same problem with node 20x. I created package.json file and add this code to use node 18x version.

package.json { "engines": { "node": "18.x" } }

The project is running without any issue

from php.

SrivastavaArjit avatar SrivastavaArjit commented on August 20, 2024

I know Vercel uses Node.js to build our project and for the creation of Serverless Functions but I didn't quite understand the role of "runtime":"[email protected]"

An explanation would be greatly appreciated.
Thank you

from php.

zengboin avatar zengboin commented on August 20, 2024

The error is:

Spawning: PHP Built-In Server at /var/task/user (document root) and /var/task/user/api/index.php (router)
🐘STDERR: php: error while loading shared libraries: libssl.so.10: cannot open shared object file: No such file or directory

Node 20.x image has no libssl.so.10

from php.

thedoggybrad avatar thedoggybrad commented on August 20, 2024

The error is:

Spawning: PHP Built-In Server at /var/task/user (document root) and /var/task/user/api/index.php (router)
🐘STDERR: php: error while loading shared libraries: libssl.so.10: cannot open shared object file: No such file or directory

Node 20x image has no libssl.so.10

I have seen that the Node.js 18 will be retired on Vercel next year (Early 2025).
By the way, how important is libsssl.so in PHP? (I am just a beginner in PHP)
https://vercel.com/docs/functions/runtimes/node-js#node.js-version
Screenshot 2024-07-02 130534

from php.

zengboin avatar zengboin commented on August 20, 2024

The error is:

Spawning: PHP Built-In Server at /var/task/user (document root) and /var/task/user/api/index.php (router)
🐘STDERR: php: error while loading shared libraries: libssl.so.10: cannot open shared object file: No such file or directory

Node 20x image has no libssl.so.10

I have seen that the Node.js 18 will be retired on Vercel next year (Early 2025). By the way, how important is libsssl.so in PHP? (I am just a beginner in PHP) https://vercel.com/docs/functions/runtimes/node-js#node.js-version Screenshot 2024-07-02 130534

PHP use libssl.so in curl extension and openssl extension.
using curl to request the https website

from php.

sekedus avatar sekedus commented on August 20, 2024

This solution worked for me:

{
  "functions": {
    "api/index.php": {
      "runtime": "[email protected]"
    }
  },
  "rewrites": [
    { "source": "/(.*)", "destination": "/api/index.php" }
  ]
}

And change node.js version to 18.x : #504

from php.

thedoggybrad avatar thedoggybrad commented on August 20, 2024

The error is:

Spawning: PHP Built-In Server at /var/task/user (document root) and /var/task/user/api/index.php (router)
🐘STDERR: php: error while loading shared libraries: libssl.so.10: cannot open shared object file: No such file or directory

Node 20x image has no libssl.so.10

I have seen that the Node.js 18 will be retired on Vercel next year (Early 2025). By the way, how important is libsssl.so in PHP? (I am just a beginner in PHP) https://vercel.com/docs/functions/runtimes/node-js#node.js-version Screenshot 2024-07-02 130534

PHP use libssl.so in curl extension and openssl extension.
using curl to request the https website

So with no libssl.so, basically CURL will be dead right?

from php.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.