PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 



Go Back   Dev Articles Community ForumsProgrammingPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old January 16th, 2004, 07:15 PM
Alicia Alicia is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 122 Alicia User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 29 m 24 sec
Reputation Power: 15
.php3 prob ??

Hi guys,

i wanna ask a question,, my case is like this.. i got a lot of php3 files in my server,, i dun have any problem viewing all the php3 files except the files in one folder (template)

i have reported this to the host administrator and he said it is due to .php3 and got nothing to do with their server or config.,.

i am wondering why other php3 files in the server can be view but not the php3 files in template folder..
*sometimes the php3 files inside this folder can be view but most of the time it couldn't.. when i load the php3 file in this folder, the browser shows page can not be displayed..

i wish to know is it due to my php coding, the php3 extension or the server config prob ?? i should review the code or i need to report this to the host administrator once again (but they dun seem to bother and they just keep on saying this is php3 scripting prob)???

please advise

p.s: the folder is in 777 mode

Reply With Quote
  #2  
Old January 16th, 2004, 10:44 PM
MadCowDzz's Avatar
MadCowDzz MadCowDzz is offline
I'm Internet Famous
Dev Articles Frequenter (2500 - 2999 posts)
 
Join Date: Jan 2003
Location: Toronto, Canada
Posts: 2,886 MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 1 Week 16 h 19 m 35 sec
Reputation Power: 18
although this in no way answers your question, setting 777 to a folder is strongly un-advisable (sorry, bad grammar).... any malicious hacker can then write and execute any code he/she feels like on your server...

Reply With Quote
  #3  
Old January 18th, 2004, 10:53 PM
aboyousif aboyousif is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Location: Tanta, Egypt
Posts: 21 aboyousif User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 29 m 23 sec
Reputation Power: 0
Send a message via AIM to aboyousif Send a message via MSN to aboyousif Send a message via Yahoo to aboyousif
Dear Alicia ..

Like MadCowDzz Said .. it is hard to ansewr this quetsion . but try first to upload any .php file with simple-checked code like ( phpinfo() ) file .. and try to call it from your browser ... if it worked then the proplem is from the php3 files .. else the directory is the proplem .. try to ask the host again if the proplem from the dir ..

the main difference between .php and .php3 is

apache server settings. Look in the

apache folder for the conf folder and then open up the httpd.conf file.

Look for the lines like this:



AddType application/x-httpd-php4 .phtml .pwml

AddType application/x-httpd-php4 .php4 .php .php3 .php2



whatever extensions are on those lines are the ones that apache will run

the php engine on. In other words, the files with those extensions will

be parsed by php. So, for my

configuration .phtml .pwml .php4 .php .php3 .php2 are all extensions that

will be parsed by php.


May Allah help you ...

Reply With Quote
  #4  
Old January 19th, 2004, 07:45 PM
Alicia Alicia is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 122 Alicia User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 29 m 24 sec
Reputation Power: 15
the problem is i am not the host administrator,, so i dun think i can view the config..

i have tried to shift the file to another folder but it stilll can not be displayed..

is there any other possibility ?

Reply With Quote
  #5  
Old January 19th, 2004, 07:56 PM
MadCowDzz's Avatar
MadCowDzz MadCowDzz is offline
I'm Internet Famous
Dev Articles Frequenter (2500 - 2999 posts)
 
Join Date: Jan 2003
Location: Toronto, Canada
Posts: 2,886 MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 1 Week 16 h 19 m 35 sec
Reputation Power: 18
is the problem a php problem?
perhaps its not a server problem... what exactly happens?

the fact that you said php3 files work, except the ones in that one template folder... and these same files don't work in any other folder either...

Reply With Quote
  #6  
Old January 19th, 2004, 08:30 PM
aboyousif aboyousif is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Location: Tanta, Egypt
Posts: 21 aboyousif User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 29 m 23 sec
Reputation Power: 0
Send a message via AIM to aboyousif Send a message via MSN to aboyousif Send a message via Yahoo to aboyousif
Alicia .. could you put the link of the site here if it possible ??

put the two links of working files and not working ones ... and i think the proplem will not be big as you think ..

have a nice day ..

Reply With Quote
  #7  
Old January 19th, 2004, 09:10 PM
MadCowDzz's Avatar
MadCowDzz MadCowDzz is offline
I'm Internet Famous
Dev Articles Frequenter (2500 - 2999 posts)
 
Join Date: Jan 2003
Location: Toronto, Canada
Posts: 2,886 MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 1 Week 16 h 19 m 35 sec
Reputation Power: 18
I strongly advise, if you haven't already, take the write and execute permissions off them, and the respective directory, before you advertise the files/folders

*edit*
well, the directory needs execute permissions...
and it helps for the user to have write permission

Reply With Quote
  #8  
Old January 19th, 2004, 09:19 PM
aboyousif aboyousif is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Location: Tanta, Egypt
Posts: 21 aboyousif User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 29 m 23 sec
Reputation Power: 0
Send a message via AIM to aboyousif Send a message via MSN to aboyousif Send a message via Yahoo to aboyousif
MadCowDzz ... Sorry but i didn't get this point .. could you expalin this and why you need to do that ??

Reply With Quote
  #9  
Old January 19th, 2004, 09:26 PM
MadCowDzz's Avatar
MadCowDzz MadCowDzz is offline
I'm Internet Famous
Dev Articles Frequenter (2500 - 2999 posts)
 
Join Date: Jan 2003
Location: Toronto, Canada
Posts: 2,886 MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 1 Week 16 h 19 m 35 sec
Reputation Power: 18
Unix Filesystem Permissions...

PHP files don't require the execute permission since they are interpreted by the web server... Setting it isn't necessary, and could leave you open to a big attack

It isn't necessary and ALWAYS avoided for someone who doesn't have an account on the server to be able to write to files on the system.

Conclusion: Combining execute and write permision for a user determined as "other" (someone who isn't logged into the system) is dangerous!

You wouldn't want an anonymous user to write to files which they can execute... what would stop someone from, for example, writing a batch script which formats the system? If they have execute permission, they can then read and run the script...

ALWAYS use caution when setting 777 permission to a file/folder.

For a basic explanation of unix file permissions, I google'd and this was the first result: http://www.dartmouth.edu/~rc/help/faq/permissions.html



Alicia, this doesn't at all answer your php question... but let it serve as a caution for you in the future =) Your security's only as strong as the weakest link.

Reply With Quote
  #10  
Old January 19th, 2004, 09:54 PM
aboyousif aboyousif is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Location: Tanta, Egypt
Posts: 21 aboyousif User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 29 m 23 sec
Reputation Power: 0
Send a message via AIM to aboyousif Send a message via MSN to aboyousif Send a message via Yahoo to aboyousif
hahaha .. MadCowDzz escaped from the questions that i wanted to ask him on the private .. it was about if this solve the proplem .. but now .. thanks MadCowDzz .. it is great that you noticed " i will ask you about the purpose of this ?? "

just joke with you ..
sorry for my bad english ( if it really bad )
i'm from the other side of the world ... the good one

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingPHP Development > .php3 prob ??


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.

© 2003-2018 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap