Skip to content
loading...

re: Building deploy ready PHP apps VIEW POST

TOP OF THREAD FULL DISCUSSION
re: I dislike this approach as it is vulnerable for following situations: when your application requires CLI commands (such as some CRON-related clea...
 

You are correct on

  1. When your application requires CLI commands (such as some CRON-related cleanups) the .htaccess file is unavailable, so the variables will not be correct

You can run those cli commands if your are not on a shared hosting environment. In the post i have stated that .htaccess is for those with a shared hosting plan (like the godaddy ones).

You wouldn't use .htaccess if you owned the server where the app is deployed. You would go with the second option i have provided. Set the evironnment variables on the system level. That way if your application requires CLI commands the variables would still be correct.

code of conduct - report abuse