i'm using apache , php. webroot directory /home/name/public_html
i want include file /home/name/abc.php
include_one "/home/name/abc.php";
i got failed open stream: permission denied warning.
if move same file inside webroot /home/name/public_html/abc.php
there no error.
apache user , group has permission access file /home/name/abc.php
i have server similar configuration, working. want know possible reason.
i tried run php script directly in linux console, there no permission issue. guess problem in apache configuration.
you should verify php executed apache user. depending on configuration might possible php running under different user, e.g. if apache set use php-fpm.
if server linux system, putting this
<?php echo "<pre>"; var_dump(posix_getpwuid());
into file , accessing via web browser should show user informations.
Comments
Post a Comment