/api/jupload 404 (Not found) (Nginx web server)

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
melcv
User
Posts: 3

/api/jupload 404 (Not found) (Nginx web server)

Post by melcv »

I'm trying to upload a photo (v2023) but I get this error server side:

Slim Application Error Type: RuntimeException Code: 0 Message: Invalid CSRF storage. Use session_start() before instantiating the Guard

And i get this error:
Not Found Type: Slim\Exception\HttpNotFoundException Code: 404 Message: Route 'imagenes/undefined' not found. File: /var/www/torneos/src/routes.php Line: 203

And on client side:
Uncaught TypeError: Cannot read properties of undefined (reading '0') at HTMLInputElement.<anonymous> (ew.js:8843:23)

/api/jupload 404 (Not found) jquery.min.js?v=19.0.4:2

Can someone help me please?


arbei
User
Posts: 9284

Post by arbei »

Are you sure you have set up URL Rewrite properly?


melcv
User
Posts: 3

Post by melcv »

I'm using nginx and this is my configuration:

location /api/{
try_files $uri /api/index.php$is_args$args;
}

  location ~ \.php$ {

fastcgi_split_path_info ^(.+\.php)(/.+)$;
    include snippets/fastcgi-php.conf;
    fastcgi_intercept_errors on;
    fastcgi_pass php_torneo;

  }

server {
  listen 80;
  listen [::]:80;

  server_name torneos.ec www.torneos.ec ;

 return 301 https://torneos.ec$request_uri;
}


server {
  listen 443 ssl http2;
  listen [::]:443 ssl http2;

  server_name www.torneos.ec ;

  return 301 https://torneos.ec$request_uri;
}

location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
    expires max;
    #add_header Access-Control-Allow-Origin *;
    log_not_found off;
  }

arbei
User
Posts: 9284

Post by arbei »

You may refer to the sample Nginx configuration file and adjust yours.


Post Reply