0
votes

i can't open one php script on my virtual ubuntu 12.04 lamp server, i tried at an online host and it works fine but at home didn't work.

what i already did: i intall php 5.4 like the online host change permisions on folder change user folder install php 7 (but the scripts tell php 5.4-5.5)

and i get this error page when i try to open: The requested URL /loja/login was not found on this server.

and the log apache tell : [client 192.168.0.10] File does not exist: /var/www/script/login "GET /loja/ HTTP/1.1" 307 769 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36" 192.168.0.10 - - [02/Apr/2017:00:12:23 -0300] "GET /loja/login HTTP/1.1" 404 502 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36""

what is wrong on my lamp server? onlines hosts works very well. the script: https://mega.nz/#!dpskSCDS!vmlxWXVjByV67wv41DO8MqDMPgfjBpxxj_p7uoxmfjQ

1
Possible that you've to adjust owner or access-rights to some files locally. If you upload files by FTP the owner is mostly automatically the FTP-user, therefore you never remark that problem on the server.David
it's virtual ubuntu server on my pcuser2125667
Probably you've some mess with paths in the scripts. I suppose you don't have a folder "/loja/" on root-level of your Ubuntu-Installation.David

1 Answers

0
votes

Hi please add your php files on your htdocs folder it's /opt/lampp/htdocs

also do this

This will change the ownership of the /opt/lampp/htdocs/ to you:

sudo chown username:groupname /opt/lampp/htdocs

Example : (My username is test and my group name is also test)

sudo chown test:test /opt/lampp htdocs

This will change the folder's permissions to be read, write and executed by you:

sudo chmod 777 /opt/lampp/htdocs