Php 8.2 Google App Engine(Flexible Environment)--JS and CSS file inclusion Not Working

GM,
 
   I deployed my application in GAE with php 8.2.My deployment successfully finished.My index page also came. But I included some jquery files and other css,bootstrap and all in my application.. That and all not working.
 
Pls give me the solution for php 8.2 deployment
 
My app.yaml
 
runtime: php
env: flex
service: uat

runtime_config:
operating_system: "ubuntu22"
document_root: .





manual_scaling:
instances: 1




handlers:

- url: .*
script: index.php
# login: required

My Index.php

<?php

echo phpinfo();

?>
<html>

<head>
<script src="JS/jquery-3.6.4.min.js"></script>

<script>

$(document).ready(function(){


alert('inside');

})


</script>
</head>
In my sample I included JS file and in document ready i put alert for checking.
This is my file structure.
phpsample.png
Am waiting for your valuable response.


1 55 4,472
55 REPLIES 55

Hello Google Community,

Thanks to Google Support Team there is a workaround to this issue.

First you need to update the web source to /workspace/web, second you need to create a custom configuration files in the same directory where the app.yaml is placed, these files are  “gzip_params, mime.types, nginx.conf, fastcgi_params”  and finally add ‘ include workspace/nginx-app.conf; ’ in the server section in the nginx.conf file.

here you can find an example of the configuration files https://github.com/mprieto01/GAE-Flex-8  , please used it at your own risk.

 

Hi mprieto,

Thanks for your reply.I will try this and tell.

But I have one doubt,If we change nginx.conf file means , it will affect deploying service only or entire project.

 

 

 

Hello safiyullah, It will affect new deployments on your project that use this configuration.

Hi,

I checked your solution, sample working in php 8.2.But I have one question,Nginx conf files they need to update for php 8.2(whatever version they released), why can we update , is there any security issue will come, if we update that conf files .Community Staff only will clear this one.

HI,

Without NGINX config Change, how to workout PHP 8.2 Flexible Environment in GAE.

 Hi ,

I want to see nginx files for my google cloud project I deployed.How to donwload and see.

 

 

HI, 

Can we update NGINX config file for php 8.2 deployment(Flexible Environment).Then how can I download my current NGINX config files .. Pls reply.

Hello Community Members,

I have Posted my queries about PHP 8.2 Flexible Envirnment Deployment last month,Still I didn't get any reply.

It is affecting my production process.Google App Enginesaid till July only Php 7.3 will work like that ,So before that we have to prepare and check our Application in PHP 8.2.

Pls consider our issue seriously and response.

Waiting for your valuable reply.

Hi,

I am waiting for your valuable solution. Pls check and reply my queries

Hi Community Member,

For php 8.2 GAE felixible evnironment, If I change nginx-app.config only ,my application is working otherwise not working.

Is there any issue will come if this config files changed means ..

Because we have  to upgrade our application to php 82 ASAP.

 

Hi,

I am facing the static file serving in php 8.2 (GAE Flexible Evnvironment).

Please Provide solution for us.

Some workaround solution asked to change nginx-app.confg file. But I am not sure about Security . Goolge community memeber only have to clear this one.

Php 7.3 deployment going to close soon. We have to migrate our Application.

 

Hello Community Member,

For PHP 8.2 GAE Flexible Environment only work ,if I change nginx-app.config file only.

Can you please tell is there any issue will come if we change that config file.

We need to migrate our application to php 82 ASAP.

Hey, I found a way to get it working without nginx conf file edits. Can you look into a project in GitHub called firevel ?

 

Hi,

This one Laravel, But my application is in CodeIgniter and PHP.I want to use in that without change nginx-app.config file

 

I worked around it by replacing the whole nginx.conf file. 

  nginx_conf_override: nginx.conf # Instead of nginx_conf_include: nginx-app.conf

More:
https://www.googlecloudcommunity.com/gc/Serverless/Troubleshooting-Nginx-in-Google-Cloud-Flexible-En...

Can you please share me ngnix.conf sources code?