failed to open stream

musta

My problem is that when I send my php file as root to the htdocs directory it appears as this.

root mustafa # sudo cp programa.php /opt/lampp/htdocs/archivos

The php file appears with a big X on top, and when I try to execute it from XAMPP it says:

Warning: Unknown: failed to open stream: Permiso denegado in Unknown on line 0

Fatal error: Unknown: Failed opening required '/opt/lampp/htdocs/Examen/registro.php' (include_path='.:/opt/lampp/lib/php') in Unknown on line 0

v010dya

I bet that it is the issue with permissions. Since you are using sudo to copy, i will assume that it is your home directory that you are copying it from and you've created the file with your user.

There are several ways to resolve this, the quickest would be to make the file world readable. You can do that by running

chmod a+r progma.php

A better way would be to find out what group does the server run under, often that would be group 'web', and then you would do:

chgrp web progma.php && chmod g+r progma.php

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Java

PHP - Failed to open stream : No such file or directory

From Java

failed to open stream: No such file or directory (Laravel)

From Dev

Failed to Open Stream using laravel install

From Dev

Laravel setup failed to open stream

From Dev

wamp + wordpress: failed to open stream: Permission denied in

From Dev

PHP error failed to open stream/failed opening

From Dev

SplFileObject error failed to open stream: No such file or directory

From Dev

Something.php failed to open stream - yii

From Dev

failed to open stream on magento module

From Dev

PHP - readfile() failed to open stream: Permission denied

From Dev

PHP: failed to open stream: Invalid argument

From Dev

PHP: "failed to open stream: Permission denied"

From Dev

ZipArchive: `failed to open stream: Is a directory`

From Dev

Blank page due to error "failed to open stream"

From Dev

PHP - fopen(): Failed to Open Stream on uploaded file

From Dev

PHP - fopen: failed to open stream: Permission denied

From Dev

Failed to open stream when uploading image to server

From Dev

simple html dom failed to open stream for a site

From Dev

failed to open stream: File name too long

From Dev

PHPUnit error "Failed to open stream: No such file or directory"

From Dev

failed to open stream

From Dev

failed to open stream - XAMPP

From Dev

PHP, WAMP - failed to open stream: HTTP wrapper

From Dev

failed to open stream and permission denied - PHP

From Dev

Zend/Loader failed to open stream

From Dev

PHP error failed to open stream/failed opening

From Dev

ZipArchive: `failed to open stream: Is a directory`

From Dev

Failed to open stream: No such file or directory

From Dev

failed to open stream: No such file or directory

Related Related

HotTag

Archive