Unable to open localhost? [closed] - php

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I have been using Lampp on a test machine. OS is Ubuntu 12.1. It was working fine before and running my scripts. Then it began displaying a pop-up asking me if I would like to open or save the file? I have tried changing the ports and restarted the machine and restart Lampp. Nothing has worked so far though.

Your MIME types are wrong and/or mod_php isn't loaded.
What is in the files? If they contain your PHP code, Apache is serving the files out rather than putting them through PHP. Check you are loading mod_php.
If they contain the output of the PHP code (i.e. the HTML) then they aren't being given the correct MIME types. I'm not sure where this is done, I think Apache or PHP adds the headers automatically. Check the Apache MIME types config

Related

Source code appears with apache, why repare? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 7 years ago.
Improve this question
I own a site installed on my linux server but when I put PHP tags at the beginning of page, the source code appears..
How to avoid all the source code displayed ?
thank you in advance
This means that you are being served the file by Apache without it first being seen (processed) by PHP. Here are some troubleshooting tips as to why it isn't being processed by PHP:
Make sure that your file with the PHP tags ends in .php.
Make sure PHP is installed on your server. To install PHP on a debian server run sudo apt-get install php5

PHP files open as text in my browser [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions concerning problems with code you've written must describe the specific problem — and include valid code to reproduce it — in the question itself. See SSCCE.org for guidance.
Closed 9 years ago.
Improve this question
My php files if opened via the localhost (i used httpd-2.2.25-win32-x86-no_ssl.msi and the apache server is running with PhpMyAdmin files placed in apache/htdoc) are shown as text files in my browser:
for example if i wrote a something in my php file, as soon as i open that file either via my local webserver or opening the file directly, it will be shown as text! Please help.
You haven't configured Apache to send PHP files to the parser. As such, the format will remain unrecognized and be displayed as text or be downloaded to the client. Assuming you're using a PC or a Mac, most every guide to setting up Apache with PHP will explain how to do this.

Issues with Apache and PHP [ubuntu] [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I just installed PHP and Apache2 on my laptop (ubuntu 12.04), but I can't get my PHP files to load. I have followed this tutorial: http://www.howtogeek.com/howto/ubuntu/installing-php5-and-apache-on-ubuntu/ , and the index.html file works, but when I try any php, I get a server error.
I looked online for a few hours, and I added "AddType application/x-httpd-php .php" to my httpd.conf (but I don't think I'm supposed to be editing that file for the ubuntu version??) in /etc/apache2/, which somehow let ONE php file load (which just contains phpinfo()). I then tried making a new php file with the same code, but that one won't load (server error). I have no idea why it only loads that specific file. I have tried restarting apache and opening the other one first, but for some reason, it only loads the first file. I also tried to move the file to another directory in /var/www/, but not dice. I hope this makes sense, because I'm a beginner here.
any help would be appreciated!!
I think you didn't install the last version of php, try to install php5
apt-get install php5

How to use my apache/php web hosting for setting up a radio? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
Is there a way to use my Apache / PHP web hosting to setup an internet radio ?
If i got that right, you want to set up a webradio, not a file acces system to stream to single computers.
In that case, i would suggest u have a look into
Linux
http://www.howtoforge.com/linux_webradio_with_icecast2_ices2
Windows
An alternate is http://www.shoutcast.com/ using Winamp, which can be controlled by an webinterface, accessable via internet if running an apache server
Hope that did help you
I dont know wich platform you have, but take a look at these sites:
For Windows:
http://www.ehow.com/how_7637097_stream-audio-apache-server.html
For Linux: (it says its for Free BSD, but you can use it in every type of Linux, just some commands may be diffrent)
http://drewish.com/writeups/radio_station_website_with_freebsd

PHP Wamp doesn't run [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I am trying to run WAMP under my XP. I installed it to C:/wamp, than copied old php files for example like test.php to the www folder in wamp folder, than run it throungh browser from adress file:///C:/wamp/www/test.php. It includes
< ?echo("a");? >
but it still run like html without running code and showing php in source code.
What am I doing wrong?
I was thinking if there exist some browser which will automatically executes php and includes mysql database apache.
Is there something?
And at best run ajax and asp serverside parts
You are showing the file directly by the browser, nothing related to wamp.
What you should do is start wamp (maybe need some config, for example the path, the port .)
Then access your page like : http://localhost/test.php.

Categories