Apache Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsSystem AdministrationApache Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old May 19th, 2001, 12:44 AM
whollyboss whollyboss is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2001
Posts: 1 whollyboss User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Apache downloading the source code

Hello;

I have a strange problem,

I already installed Apache/MySQL/PHP4.0.3pl1 on my server and every thing is working well which does not have a domain name.
the Apache was installed using prefix=/www

I decided to change the configuration of my Apache from the main server to virtual host configuration, then I went to place where the source files I
used for installing apache and followed the steps for another static compilation for the php module as follow:
cd apache/source/dir
./configure --prefix=/www1 --activate-module=src/modules/php4/libphp4.a
make
make install

then I uncommented the two AddType lines in the httpd.conf file
AddType application/x-httpd-php .php
AddType application/x-httpd-php .php3

and copied the whole directory of my site to a new directory /www1/htdocs/testdir directory and configured my virtual host to be
NameVirtualHost *
VirtualHost *
ServerAdmin URL
DocumetnRoot /www1/htdocs/testdir
ServerName *.mydomain.com
ErrorLog /www1/htdocs/testdir/admin/logs/error_log
CustomLog /www1/htdocs/testdir/admin/logs/access_log
Options -Indexes FollowSymLinks MultiViews
/VirtualHost

and I changed the port to 8080 and added the files index.php index.php3 to the DirectoryIndex directive


In short this file is the same of the file used in the already working configuration except what I mentioned above.

The problem is when I point my browser to myip:8080 the page named index.html is displayed, and when I point to myip:8080/index.php3 the page is parsed correctly and displayed but when I point to the file myip:8080/index.php (not php3) then my browser is prompting me for downloading the file and the source code of my program will be displayed which is a big security problem

Then I tried to add the extentions on one line like this:
AddType application/x-httpd-php .php .php4 .php3

But the problem does exists.

Then I searched my httpd.conf for any other instances but I did find no additional references
then I Created .php3 with phpinfo(); for the both servers but the apache configuration is the same except what ever related to pathes www1 instead www and port 8080 instead of 80
and except the following line: in the default port server:
PATH=/usr/kerberos/sbin:/usr/kerberos/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/home/myusername/bin

in the 8080 port server:
/usr/kerberos/sbin:/usr/kerberos/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/usr/X11R6/bin
while there is no /home/myusername/bin at all.
Then I copied my index.php file to another file name, SURPRISED it worked.
Then I tried to add another extention which is foo and php4 and the result is: All other extention tried and was working but still index.php not working and displaying the download prompt.
A very strange/may be useful notice is that: when I browse for my index.php at the port 8080 the download prompt will apear and if I downloaded the file, SURPRISE the file is not the index.php under the tree of the server working at port 8080 but it is the index.php file in the tree of the server running on the default port !!!!!!!!!!!!!!!!!!!!!!!!!
Then I supposed the problem is coming from the Directoryindex directive, then I tried to remove index.php and index.php3 from both configurations, and after restarting both the servers the same problem is still existing ??!!!??!!!!!!!!!!
Then I supposed the problem was in the virtualhost directive then I corrected to be like this:
VirtualHost *:8080
and restarted but the problem does exists.
Then I tried to change it to be
VirtualHost myip:8080
and restarted, but the problem does exists
I feel this is a back door or other kind of bugs existing in the whole apache/mod_php4

Another note I found that all other files with php extention in any other directory other than DocumentRoot is working

Please any comments?

Reply With Quote
  #2  
Old May 19th, 2001, 11:50 AM
rycamor rycamor is offline
Gödelian monster
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Jul 1999
Location: Pembroke Pines, Florida, USA
Posts: 2,298 rycamor User rank is Sergeant Major (2000 - 5000 Reputation Level)rycamor User rank is Sergeant Major (2000 - 5000 Reputation Level)rycamor User rank is Sergeant Major (2000 - 5000 Reputation Level)rycamor User rank is Sergeant Major (2000 - 5000 Reputation Level)rycamor User rank is Sergeant Major (2000 - 5000 Reputation Level)rycamor User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 3 Days 1 h 54 m 21 sec
Reputation Power: 41
Have you tried looking at the Apache error log and access log?
__________________
The real n-tier system:

FreeBSD -> PostgreSQL -> [any_language] -> Apache -> Mozilla/XUL

Amazon wishlist -- rycamor (at) gmail.com

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationApache Development > Apache downloading the source code


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

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five "checkpoints" for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

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





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway