Web Hosting Forum | Lunarpages
News: July 14, 2008 - New Contest! - Submit Your WordPress Theme Designs, Win BIG!
June 30, 2008 - Submit Your Site for the July 08 Site of the Month Award!
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
July 25, 2008, 06:21:54 PM


Login with username, password and session length


Pages: [1]   Go Down
  Print  
Author Topic: php not working  (Read 480 times)
geolev
Intergalactic Cowboy
*****
Offline Offline

Posts: 71


WWW
« on: February 18, 2008, 07:26:37 PM »

Hi,

Can somebody help?

I tried to put a php file in the httdocs\sandbox folder and expected to be able to execute that page via www.mydomain.com/sandbox/test.php but the browser tries to download the page instead.

PHP is installed. If I connect via SSH, I can type php -v and it returns the version.

Any clues why this happens?
Logged

perestrelka
Administrator
Jedi
*****
Offline Offline

Posts: 980



« Reply #1 on: February 19, 2008, 11:05:12 PM »

Hi,

Do PHP scripts work in other folders of the same site? Do you have the .htaccess file in the sandbox folder? If yes, did you try to rename it in order to check if it affects PHP functionality?
Logged

Kind Regards,
Vlad Artamonov
geolev
Intergalactic Cowboy
*****
Offline Offline

Posts: 71


WWW
« Reply #2 on: February 21, 2008, 05:22:32 AM »

Hi Vlad,

I tried removing the .htaccess file and that made no difference. In fact, it only contained SSI directives and when I removed it SSI still works for the pages in this directory.

I tried to copy my test.php to the httpdocs directory and it still doesn't work. It still tries to download the php file rather than execute it.

This is a linux box. Does the file owner or group need to be anything special?

Thanks,
Logged

perestrelka
Administrator
Jedi
*****
Offline Offline

Posts: 980



« Reply #3 on: February 21, 2008, 08:47:52 PM »

Hello,

Is PHP enabled for the domain under domain's Setup? Are there any errors in the domain's error log appearing when you access php files. The path to the log is /var/www/vhosts/[domain name]/statistics/logs/error_log.
Logged

Kind Regards,
Vlad Artamonov
geolev
Intergalactic Cowboy
*****
Offline Offline

Posts: 71


WWW
« Reply #4 on: February 22, 2008, 08:58:28 PM »

I take back my earlier statement. There was a .htaccess file in the httpdocs directory. When I renamed that one, the scripts started working. But now, how to I enable SSI?

The .htaccess file contains the following:
Code:
AddType text/html .shtml
AddHandler server-parsed .shtml
Options +Includes
XBitHack on
RewriteEngine On
Options +FollowSymlinks

And yes PHP is enabled.

So is it possible to support both SSI and cgi?

Thanks,
George

« Last Edit: February 22, 2008, 09:00:55 PM by geolev » Logged

perestrelka
Administrator
Jedi
*****
Offline Offline

Posts: 980



« Reply #5 on: February 23, 2008, 09:25:02 PM »

Hi George,

Do you have SSI active for your domain under Domain Setup in Plesk? This is the best place where it should be enabled. SSI and CGI are not related so they work (or don't work for unrelated reasons).

I hope this helps.
Logged

Kind Regards,
Vlad Artamonov
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.3 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks


Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM