Newbie - .php files downloading not running [Solved]

Problems with the Linux version of XAMPP, questions, comments, and anything related.

Newbie - .php files downloading not running [Solved]

Postby Yan » 14. February 2013 22:45

Hi there,

I installed lampp 1.8.1 so I could learn php. When I try and run scripts on xampp my .php files download instead of running.

I think I may need to change something in opt/lampp/etc/httpd.conf but I am not too knowledgeable about linux or servers or anything, so I will really appreciate your help, but please go step by step, as if to an idiot :D

Here is my error log for today, when I have tried to run the scripts. /lampp/logs/php_error_log is empty

[Thu Feb 14 17:46:29.139707 2013] [ssl:warn] [pid 10416] AH01906: RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Thu Feb 14 17:46:29.166510 2013] [ssl:warn] [pid 10416] AH01909: RSA certificate configured for www.example.com:443 does NOT include an ID which matches the server name
[Thu Feb 14 17:46:29.166610 2013] [suexec:notice] [pid 10416] AH01232: suEXEC mechanism enabled (wrapper: /opt/lampp/bin/suexec)
[Thu Feb 14 17:46:29.569814 2013] [auth_digest:notice] [pid 10417] AH01757: generating secret for digest authentication ...
[Thu Feb 14 17:46:30.060514 2013] [ssl:warn] [pid 10417] AH01906: RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Thu Feb 14 17:46:30.063099 2013] [ssl:warn] [pid 10417] AH01909: RSA certificate configured for www.example.com:443 does NOT include an ID which matches the server name
[Thu Feb 14 17:46:30.063233 2013] [lbmethod_heartbeat:notice] [pid 10417] AH02282: No slotmem from mod_heartmonitor
[Thu Feb 14 17:46:30.083604 2013] [mpm_prefork:notice] [pid 10417] AH00163: Apache/2.4.3 (Unix) OpenSSL/1.0.1c PHP/5.4.7 configured -- resuming normal operations
[Thu Feb 14 17:46:30.083725 2013] [core:notice] [pid 10417] AH00094: Command line: '/opt/lampp/bin/httpd -D SSL -D PHP5 -E /opt/lampp/logs/error_log'
[Thu Feb 14 21:13:36.694087 2013] [mpm_prefork:notice] [pid 10417] AH00169: caught SIGTERM, shutting down

Thanks in advance for any time you spend helping me out,
Yan
 
Posts: 12
Joined: 22. November 2012 22:38
XAMPP Version: 5.6.3
Operating System: Ubuntu 12.04 + xampp-linux

Re: Newbie - .php files downloading not running

Postby Yan » 15. February 2013 01:38

OK, just checked php.info and mod_php5 is loaded. Which was something to check.
Yan
 
Posts: 12
Joined: 22. November 2012 22:38
XAMPP Version: 5.6.3
Operating System: Ubuntu 12.04 + xampp-linux

Re: Newbie - .php files downloading not running

Postby JonB » 20. February 2013 18:09

Question one;

What happens when you try to go to http://localhost??? :shock:

Do you get the XAMPP Welcome Page?

8)
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
XAMPP Version: 1.8.3-2
Operating System: Windows XP/7 - Fedora 15 1.7.7

Re: Newbie - .php files downloading not running

Postby Yan » 20. February 2013 23:18

Yes, I get the xampp welcome page. Xampp is running fine, and I have joomla installed.
Yan
 
Posts: 12
Joined: 22. November 2012 22:38
XAMPP Version: 5.6.3
Operating System: Ubuntu 12.04 + xampp-linux

Re: Newbie - .php files downloading not running

Postby JonB » 21. February 2013 18:23

Well - if the XAMPP page loads and works - that means Apache and PHP are working basically correctly.

Thus - most likely a permissions or ownership issue

8)
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
XAMPP Version: 1.8.3-2
Operating System: Windows XP/7 - Fedora 15 1.7.7

Re: Newbie - .php files downloading not running

Postby Yan » 21. February 2013 20:59

Thanks a lot for your help by the way!

So I CHMODed /opt/lampp recurively to 777, but I still have the same problem? :?
Yan
 
Posts: 12
Joined: 22. November 2012 22:38
XAMPP Version: 5.6.3
Operating System: Ubuntu 12.04 + xampp-linux

Re: Newbie - .php files downloading not running

Postby JonB » 22. February 2013 15:04

Did you check the ownership?
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
XAMPP Version: 1.8.3-2
Operating System: Windows XP/7 - Fedora 15 1.7.7

Re: Newbie - .php files downloading not running

Postby Nobbie » 22. February 2013 15:16

What do enter in the browser URL line in order to start your own PHP scripts?
Nobbie
 
Posts: 6765
Joined: 09. March 2008 13:04

Re: Newbie - .php files downloading not running

Postby Yan » 22. February 2013 21:50

OK! Now I CHOWNed everything in /opt/lampp to me (user). But I still have the same problem! Does it all need to be owned by root?
Yan
 
Posts: 12
Joined: 22. November 2012 22:38
XAMPP Version: 5.6.3
Operating System: Ubuntu 12.04 + xampp-linux

Re: Newbie - .php files downloading not running

Postby Yan » 22. February 2013 22:03

OK, guess I busted up my installation with the previous CHMOD command. MYSQL was not starting after I CHMODed /opt/lampp/etc/my.cnf to 777. I put it back too 751.
Yan
 
Posts: 12
Joined: 22. November 2012 22:38
XAMPP Version: 5.6.3
Operating System: Ubuntu 12.04 + xampp-linux

Re: Newbie - .php files downloading not running

Postby Yan » 22. February 2013 22:04

But (and I thank you for sticking with me so far) I still have the same problem! ;D
Yan
 
Posts: 12
Joined: 22. November 2012 22:38
XAMPP Version: 5.6.3
Operating System: Ubuntu 12.04 + xampp-linux

Re: Newbie - .php files downloading not running

Postby Yan » 22. February 2013 22:15

@ Nobbie - scripts are running from a webform submit button
Yan
 
Posts: 12
Joined: 22. November 2012 22:38
XAMPP Version: 5.6.3
Operating System: Ubuntu 12.04 + xampp-linux

Re: Newbie - .php files downloading not running

Postby Nobbie » 22. February 2013 23:26

Yan wrote:@ Nobbie - scripts are running from a webform submit button


And what do you enter in the Browser URL to load the file which contains the webform?
Nobbie
 
Posts: 6765
Joined: 09. March 2008 13:04

Re: Newbie - .php files downloading not running

Postby Yan » 23. February 2013 09:39

Thanks Nobbie, it is this: file:///opt/lampp/htdocs/webform.html
Yan
 
Posts: 12
Joined: 22. November 2012 22:38
XAMPP Version: 5.6.3
Operating System: Ubuntu 12.04 + xampp-linux

Re: Newbie - .php files downloading not running

Postby Altrea » 23. February 2013 09:45

Hi Yan,

Yan wrote:it is this: file:///opt/lampp/htdocs/webform.html

php is a serverside programming language. That means it will not get processed with the file:// protocol (this is true even if the php file is adressed by an html form). It needs to be requested.
Instead of file:///opt/lampp/htdocs/webform.html please try this url: http://localhost/webform.html

best wishes,
Altrea
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 6670
Joined: 17. August 2009 13:05
XAMPP Version: 5.5.19
Operating System: W7Ux64

Next

Return to XAMPP for Linux

Who is online

Users browsing this forum: No registered users and 3 guests