Cannot open Concrete5 just downloading a file

Permalink
Hi

Can anyone help me to figure out what is the solution to my problem, I downloade our concrete5 site to put a dummy on my localhost but I cannot access it and it will just download a file contains this "<?php
require('/concrete/dispatcher.php');" and I already change the site.php for my DB connection.
My Concrete5 version is 5.6.0.2

Thanks :)

 
typoman76 replied on at Permalink Reply
typoman76
Hi
Have you checked your .htaccess file? Perhaps you should change the rewriting to a subfolder or you have activated another php-version?

You can uncomment lines in .htaccess by placing a # sign in front of each line.

Please provide more informations. Because there could be several issues... But my first intention is to check .htaccess.
jomdacillo replied on at Permalink Reply
Hi Typoman76,

This is the content of my htaccess:

#####phpversion#####
AddHandler x-httpd-php5.3 .php .phps
#####end:phpversion#####

# -- concrete5 urls start --
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>
# -- concrete5 urls end --
#####errorpage#####
#ErrorDocument 404 /error/404.html
ErrorDocument 403 /error/403.html
#####end:errorpage#####


In my localhost i put it in the subfolder named "tec" and the php version on our live server is 5.3.3 while In my localhost I use 5.6.

Thanks! :)
typoman76 replied on at Permalink Reply
typoman76
Hi jomdacillo

I would change the following to test if it works (clear browser cache before trying):

Uncomment the PHP Version - if you have not installed this locally…
# AddHandler x-httpd-php5.3 .php .phps


Change the rewrite base to the subfolder /tec/
RewriteBase /tec/
Gondwana replied on at Permalink Reply
Gondwana
Do you have php installed and running? Can you execute php code in a file in the directory you're trying to use?
jomdacillo replied on at Permalink Reply
Hi Gondwana, yes I can execute my other php files but the my concrete5 file directory can't open instead it is downloading my index.php.

Thanks!
typoman76 replied on at Permalink Reply
typoman76
To precise the question:
Can you run a php-file that is *inside* the /tec/ folder?

You can create a new file in your editor and add the code below. Now call it from your local machine from within the /tec folder.

<?php
    phpinfo();
?>
ConcreteOwl replied on at Permalink Reply
ConcreteOwl
If you are using Mamp or Wamp, you may need to add a Virtual Host for the 'tec' folder.
jomdacillo replied on at Permalink Reply
Hi guys,

Thanks for all the suggestions, I make it work now.

This is what I do:
1. I reinstall my XAMPP
2. in .htaccess of my Concrete5
- RewriteBase /mysubfolder/ from RewriteBase /
- comment this -> AddHandler x-httpd-php5.3 .php .phps

Thank you very much :)