Unable to execute PHP scripts

:warning: IMPORTANT, please fill the questions

We assume you are using Bitnami to deploy your application.

  • Which version of the application are you using?:
    Not sure.

  • Please choose how you got the application: Installer (Windows, Linux, macOS), cloud image (AWS, GCE, Azure, …) or VM (VMDK, VBOX):
    AWS LAMP

  • Have you installed any plugin or modified any configuration file?:
    Just the LAMP

  • Describe here your question/suggestion/issue (expected and actual results):
    Unable to execute any php files or scripts. After months I still do not unerstand why a simple installation of PHP and MySQL (LAMP) is insufficient to run PHP files. These file all work perfectly on various ISPs including InMotionHosting and LunarPges. They do not work on AWS. The Bitnami LAMP does not solve the problem. Major disappointment. And the documentation is very disorganized.

A simple ctrl-u shows the entire file with php coding. In an enabled PHP environment all php scripting should be invisible.

I don’t know if this is simply enabling one more PHP modules. I have tried AWS elastic beanstalk also without success.

  • Steps to reproduce the issue (if relevant):
    No reponse php file is displayed. None.

  • Copy the apache log (if relevant):

PASTE HERE

Hi,

We are sorry for your frustration. Could you confirm that you placed the php files where this guide states?

https://docs.bitnami.com/aws/components/php/#how-can-i-deploy-my-php-application

Could you confirm that you did not modify any Apache configuration file?
Could you confirm that all the server services are running?

/opt/bitnami/ctlscript.sh status

Best regards,

Javier J. Salmerón


Was my answer helpful? Click on :heart:

Hi. I’ve just installed LAMP in Lightsail and I’m not able to execute php scripts placed into /opt/bitnami/apache2/htdocs

Hi @delarocha,

Could you check you followed the step of this guide https://docs.bitnami.com/aws/infrastructure/lamp/get-started/get-started/? If the answer is yes, please check your configuration of PHP, you can follow this documentation https://docs.bitnami.com/aws/infrastructure/lamp/administration/phpinfo/

I hope that helps you

Thanks. Some scripts did not have <?php and only <?
Solved that and now it is working.

@delarocha had the same issue and it took me a while to figure out there is a short_open_tag configuration for PHP: https://www.php.net/manual/en/ini.core.php#ini.short-open-tag. Thats solved it for me

Hi @l4mp1.

Thanks for sharing your solutions!!I’m sure someone who has the same problem will help him.

1 Like

A post was merged into an existing topic: Executing a php that runs a python script from webpage