inc files.

 
Post new topic   Reply to topic    Aprelium Forum Index -> General Questions
View previous topic :: View next topic  
Author Message
jolupa
-


Joined: 08 May 2003
Posts: 6
Location: Spain

PostPosted: Tue Sep 23, 2003 10:58 pm    Post subject: inc files. Reply with quote

Hi.
How can i configure Abyss to process the inc files with php?.
I try to make a new file entry in the server configuration exactly as the .php entry, but when i save and restart abyss, the php extension is changed by the .inc file.
HELP!
Back to top View user's profile Send private message Yahoo Messenger
divaone
-


Joined: 16 Apr 2003
Posts: 16

PostPosted: Wed Sep 24, 2003 8:46 pm    Post subject: Re: inc files. Reply with quote

jolupa wrote:
Hi.
How can i configure Abyss to process the inc files with php?.
I try to make a new file entry in the server configuration exactly as the .php entry, but when i save and restart abyss, the php extension is changed by the .inc file.
HELP!


are any of your simple php scripts working? php includes inc files just the same as ssi include text, html and other files. ive not had to do any configurations for inc files (which can hold anything including plain html). call your inc file like a php file:

<?php include('yourpage.inc'); ?>
<?php include('yourpage.php'); ?>

or from within a script:

include('yourpage.inc');

is this the answer you need?
d1
Back to top View user's profile Send private message
jolupa
-


Joined: 08 May 2003
Posts: 6
Location: Spain

PostPosted: Wed Sep 24, 2003 11:04 pm    Post subject: Re: inc files. Reply with quote

divaone wrote:

are any of your simple php scripts working? php includes inc files just the same as ssi include text, html and other files. ive not had to do any configurations for inc files (which can hold anything including plain html). call your inc file like a php file:

<?php include('yourpage.inc'); ?>
<?php include('yourpage.php'); ?>

or from within a script:

include('yourpage.inc');

is this the answer you need?
d1


I was reding if someone can access to the .inc files and the server is not set to process this files as PHP, the code is showed like HTML, exposing all the code in it.

And if i can set abyss to process the .inc files like PHP scripts the code is no showed.
Back to top View user's profile Send private message Yahoo Messenger
yalrighty
-


Joined: 24 Jun 2003
Posts: 99

PostPosted: Thu Sep 25, 2003 12:57 am    Post subject: Reply with quote

if you want it to process those files like a php page, just go into your admin console and add .inc to the extentions for php.
Back to top View user's profile Send private message Visit poster's website
jolupa
-


Joined: 08 May 2003
Posts: 6
Location: Spain

PostPosted: Thu Sep 25, 2003 12:24 pm    Post subject: Reply with quote

yalrighty wrote:
if you want it to process those files like a php page, just go into your admin console and add .inc to the extentions for php.


I do that but the extensions for PHP files is deleted and changed for the .inc files, is anyway to implement both files extensions?.

Thanks
Back to top View user's profile Send private message Yahoo Messenger
divaone
-


Joined: 16 Apr 2003
Posts: 16

PostPosted: Thu Sep 25, 2003 3:17 pm    Post subject: Re: inc files. Reply with quote

1: try this first. i think this is more what you mean...
jolupa wrote:
I do that but the extensions for PHP files is deleted and changed for the .inc files, is anyway to implement both files extensions?.


did you do this under mime types or cgi interpreters? go to cgi interpreters and add all of the following extensions for php: php php3 phtml inc (single spaces in between each).

2:
jolupa wrote:
I was reding if someone can access to the .inc files and the server is not set to process this files as PHP, the code is showed like HTML, exposing all the code in it.

And if i can set abyss to process the .inc files like PHP scripts the code is no showed.


trying to understand the question better :)

you are able to include inc files inside your php pages and scripts. but if a visitor were to pull up http://localhost/yourpage.inc directly, they would be shown a basic html page (assuming html is what you've put in the inc file) or shown php coding (functions and all). if that visitor right-clicked on the page they would see all the html (or other) coding. you want the inc file to be processed as a php script. is this correct? what parts are incorrect?

if your inc file contains html or similar, place a javascript at the top to redirect if its called alone, just as if a page were called outside its parent frame. if your inc file contains functions, 1) place it in a folder with limited access (?) or 2) change the extension to php so it will run as a script instead.

not sure if this solves your problem but good luck! :D
Back to top View user's profile Send private message
jolupa
-


Joined: 08 May 2003
Posts: 6
Location: Spain

PostPosted: Thu Sep 25, 2003 10:11 pm    Post subject: Re: inc files. Reply with quote

divaone wrote:
1: try this first. i think this is more what you mean...
did you do this under mime types or cgi interpreters? go to cgi interpreters and add all of the following extensions for php: php php3 phtml inc (single spaces in between each).

2:
trying to understand the question better :)

you are able to include inc files inside your php pages and scripts. but if a visitor were to pull up http://localhost/yourpage.inc directly, they would be shown a basic html page (assuming html is what you've put in the inc file) or shown php coding (functions and all). if that visitor right-clicked on the page they would see all the html (or other) coding. you want the inc file to be processed as a php script. is this correct? what parts are incorrect?

if your inc file contains html or similar, place a javascript at the top to redirect if its called alone, just as if a page were called outside its parent frame. if your inc file contains functions, 1) place it in a folder with limited access (?) or 2) change the extension to php so it will run as a script instead.

not sure if this solves your problem but good luck! :D


Thank u thats right, i think is more simple to write all the functions and included pages in php.

Thanks for your help :lol:
Back to top View user's profile Send private message Yahoo Messenger
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> General Questions All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group