After moving PHP files to /var/www they no longer are seen as hosted php files
1 Attachment(s)
I hope I have the right forum. I also did some googling beforehand, but I didn't find anything that helped me.
I am setting up a Demo website that I am hosting in a Debian Lenny VM, I have installed Apache, mySQL, and PHP5 I know the php server is working because if I place an info php file I can see it in the browser. However, I downloaded phpfusion, as well as phpmyadmin and they are on my desktop, I open a superuser file browser (also added write access to /var/www to everybody and copied the files over as me) and copied over the files. Once in the www folder they are no longer seen as "valid" php files, if I try to access them with iceweasel, IE, Konquerer it asks me if I want to download the file. If I look at the files on my desktop they have different icons. I have attached a screenshot. I can't tell what the difference is, but obviously there is one otherwise the icons wouldn't be different. Does anyone have any idea what's going on here or a way to rectify it? I have done things like this before without issue, I've never seen this problem. Thanks in advance for the help. |
Screen shots of file browsers don't provide very useful information.
Please post the output of: Code:
ls -l /var/www Also, please check your apache logs. Evo2. |
What does your apache configuration look like?
|
Here is the ls -l /var/www output. I understand different themes and different DE will use different icons, however, notice that in the left windows all the files have the php icon, in the second with a different theme, one of the documents has the same icon but all the others have gone into like a text document preview mode. I will take a look at my apache config and post it as well in a proceeding post. I have never had an issue like this before.
Code:
MIS-002-Debian:/home/scheidel21# ls -l /var/www |
oops also here is ls -l output for the php directory.
Code:
MIS-002-Debian:/home/scheidel21# ls -l /var/www/files |
here is the apache2.conf file (I have added nothing in the httpd.conf file)
Code:
ServerRoot "/etc/apache2" Code:
<IfModule mod_php5.c> Scratching my head... |
The icons are irrelevant, perl scripts looks like that on my system. Or bash scripts.
What's in /etc/apache2/conf.d/ and in /etc/apache2/httpd.conf If the directory isn't set up correctly it won't serve php from it. is this in httpd.conf too ? Code:
AddType text/html php Code:
AddType application/x-httpd-php .php .phtml .php3 If you're worried about that _config file, delete it and copy a new one over. |
Those configuration lines are in files in the conf.d directory. But now the plot thickens. I haven't done anything to the system but now I can't even access anything, I get a 403 forbidden trying to access anything in a browser.
|
you need to make a config for your php site and put it in /etc/apache2/sites-available/
then symlink it to /etc/apache2/sites-enabled an example of a config would be /etc/apache2/sites-available/default you can take that site and modify it then rename it to whatever then symlink it from /etc/apache2/sites-available/newsite to /etc/apache2/sites-enabled/newsite |
It wasn't a new site it was part of the demo site I was putting together. But after I played with permissions and they all seemed to be ok, but I still got a 403 forbidden access error on every page I tried to access I just reinstalled the VM and none of these problems are occuring now. Thank you all for the help you provided though.
|
All times are GMT -5. The time now is 08:01 AM. |