PHP Wamp doesn't run [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 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.

Related

How can I access mysql/phpmyadmin locally without xampp/wamp? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
I use php -S localhost:8000 command in git-bash in the path of project for running php.
I need to have a look of my tables. In phpmyadmin for example or any other ways.
Please help me. How can I do that?
thanks
You can access MySQL through Client CLI (command line), or any MySQL client (datagrip (not free), dbforge, heidisql)... PHPMyAdmin is just a web MySQL Client.
If you want to access your database through PHPMyAdmin you need a web server. You can run the command you mentionned php -S localhost:8000 inside the PHPMyAdmin source directory (source location depend on your installation) to run the PHP web server.

Run a web app coded in PHP locally [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I need help with making a webpage from several files and I am not sure how to go about it. I'm not sure how to follow these instructions can someone help me out.
Install:
Copy contents of folder "upload_to_server" to your server.
Open "includes/config.php" and edit $cfg['db_server'], $cfg['db_username'], $cfg['db_password'], $cfg['db_database'] to be your database details, and $cfg['site_url'] to be the URL to the site with a trailing slash e.g. "http://www.example.com/" or "http://www .example.com/example/" (if it has been uploaded to a sub folder named "example".
Import database.sql into your database
![Here is a picture of the files for the site][1]
[1]: http://i.stack.imgur.com/7eHOb.pn g
You need to install a local web stack first. WAMP or XAMPP for Windows, LAMP for Linux, or MAMP for Mac
You are then going to have to locate your web folder, which is usually called www, htdocs, or public_html. This is where your files need to go.
You can import databases from PhpMyAdmin, which should come bundled with your web stack.
Then you use http://localhost/whatever-folder-you-added to access it.

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

Unable to open localhost? [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 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

Error :- php is not recognised as an internal or external command [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
So this is my path I have:
C:\wamp\bin\php\php5.4.3
And my php.exe file is in that folder...
I have tried to put:
C:\wamp\bin\php\php5.4.3;
C:\wamp\bin\php\php5.4.3\php.exe
C:\wamp\bin\php
C:\wamp\bin\php;
But none of is not working.
I have no idea why its not working...
Thanks
PHP is not included in your PATH.
Right click your My Computer, then Properties, Advanced System Settings, Environment Variables and then find PATH variable, add your PHP installation dir there. Close your previously launched CMDs, re-launch it, it should work now.

Categories