I've recently created a website front and back end for a client using HTML, CSS, JavaScript/jQuery front end and PHP + MySQL back end. My experience in back end is limited.
I created everything locally and it works great, however now I've uploaded it all to an Apache server - which I have limited access to as it's being hosted by someone else so the client saves a bit of cash - and when loading index.php
it returns a blank page with an http error 500 on the file request in the network tab on chrome Dev tools, or simply just shows the error on the page.
After some messing around noting out bits of the php to see if I can figure out what's causing it I've noticed the error occurs when defining variables (specifically $houseGal = [];
but presumably any variable defined). After some extensive googling and logic I figured this had something to do with permissions on the server. Unfortunately the admin of the server hasn't used php in years and has no idea.
Through searching the web I've seen to change the file permission to 755 (originally set at 644), that didn't work. I also tried all permissions (777?) And it still didn't work. I've read a lot about needing to change bits of the .htaccess
file, however I've looked through everywhere I have access to and it doesn't seem to exist (even after forcing hidden files to show up). I don't seem to have access to any other configuration files except php.ini
- if that's even one.
As I've said everything worked locally with no issues so I don't think it's my code. I've also tried to turn on error reporting to get more detailed info but it doesn't seem to do anything.