Php file write through terminal but not from browser -


on centos machine have installed php. when log onto machine machine(fedora) through ssh , run php script writing file, works perfectly.

but when open browser fedora machine , open same php script, fails open file writing. browser works read , other echo commands.

i don't reason why happening. quick solution problem?

when use cli, execute script user logged in through ssh. on other hand, when execute script through web browser , have php installed apache module, running apache user on centos (source).

these 2 users may have different permissions, 1 has permissions write file , other not.

long story short: change file permissions apache user can write it.


Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -