Need php HElp in ubuntu

0 jurgen wolf · January 22, 2015
Hi
t apache up and running and everything works fine

the only thing i have a problem with is following

I created following file out of the terminal

test.php and i saved it in my hml folder  /var/www/html/test.php

if I go to localhost it shows up

now if I create a new file for example
/var/www/html/itsallfun.php

from the terminal, I can only edit and save  the file from within the terminal

if I try to edit this file in Notepad++, or geany it won't allow me to save it

whats going on there

If I try to save it in Notepad++ I get following message
"file is opened somewhere else"

If I try to edit it in geany I receive following
"Error opening file '/var/www/html/itsallfun.php': Permission denied

The file on disk may now be truncated"

What's going on here guys

Please help
thx

Post a Reply

Replies

- page 2
Oldest  Newest  Rating
0 jurgen wolf · January 23, 2015
chmod 777 www

chmod: cannot access ‘www’: No such file or directory

please give me the whole command not just some phrases that aren't working
0 Bernard Pyc0d333 Parah · January 23, 2015
changing ownership requires using the "chown" command which I don't think is neccessary in this case.

execute the commands we gave you as superuser and the file will be rw for everyone and everygroup on the system.

first type "su" , without the quotations of course;

then enter your root password

then run the same commands you just did and it should work perfectly because you are now changing the permissions as root which is the highest level.
try this let's see what you get.
0 jurgen wolf · January 23, 2015
if i type in su 
i get a message saying authentication failure
0 Bernard Pyc0d333 Parah · January 23, 2015


sudo su

will make you superuser after it prompts you for your password and you enter the correct one,
then you can perform the operations.
moreover using just sudo should still do the trick.

and just to add, you can set a password for the root by typing

sudo passwd

and please never you forget this password.
0 jurgen wolf · January 23, 2015
ok got it thanks

still got 1 question do i have to run that
sudu su command now everytime before i want to edit/run my php file

or will the changes made now still work ter i restart my laptop??
0 Bernard Pyc0d333 Parah · January 23, 2015
The changes should remain permanent since you changed it as a superuser.
0 Bernard Pyc0d333 Parah · January 23, 2015
you welcome, wheatley already dropped the right answer too.
  • 1
  • 2

PHP

107,306 followers
About

Server-side, HTML embedded scripting language used to create dynamic Web pages.

Links
Moderators