LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 07-16-2004, 03:23 PM   #1
cpanelskindepot
Member
 
Registered: Jun 2004
Posts: 43

Rep: Reputation: 15
how do I chown a PHP file on /usr/ to allow EVERYONE to include it?


Hi fellow programmers,

Is there any way that I can allow a file on a server to be included by every user?

For example if I have a /usr/helloworld.php , php files in /home/user/public_html will not be able to include that.

So in layman's term I am looking for a chown everyone:everyone /usr/helloworld.php command
 
Old 07-16-2004, 03:36 PM   #2
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
1. choose a directory in your system where to put the include files (try one other than system's directories for that; like /opt/myPHP/includes)

2. edit your php.ini file and scroll until the line :
include_path = ".:/php/includes"
change it to :
include_path = ".:/php/includes:/opt/myPHP/includes"

Then, if you put a file, say my_include.php in /opt/myPHP/includes, all you have to do to include this file on any user PHP script is :

include( "my_include.php" );
 
Old 07-16-2004, 03:36 PM   #3
korozion
Member
 
Registered: Apr 2004
Location: Canada
Distribution: Debian
Posts: 124

Rep: Reputation: 15
Could you not just use chown to allow everyone to Read and eXecute it? asin chown +rx helloworld.php.

*Nevermind, I read the question wrong*

Last edited by korozion; 07-16-2004 at 03:38 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP include() file paths in Apache virtual hosts tawalker Linux - Software 0 09-23-2004 02:16 PM
no php.ini file under /usr/local/lib/ !! jogurt666 Linux - Software 1 12-16-2003 12:06 AM
/usr/include/netdb.h on RH 8.0 nxny Red Hat 2 12-09-2003 05:16 PM
Clarifiacation on header file "/usr/include/a.out.h" swathisat Linux - Software 0 09-05-2003 12:12 AM
chown -R $USER /usr/src/redhat illtbagu Linux - Newbie 8 01-21-2003 01:36 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 04:16 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration