How do I utilize PHP on my Windows 7 computer? [closed] - php

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 7 years ago.
Improve this question
I'm trying to create a website with Dreamweaver CS6, which I am doing just fine. On one of my pages, I want the visitor to be able to send me an email. I'm under the impression that I need a web server and PHP installed. Here's what I have tried:
Installed WAMP but couldn't get it to send the email. The errors indicated it didn't recognize PHP
Installed XAMPP. I got a little closer with this one but no luck
Installed Apache web server separately and got it configured. Installed PHP separately and seem to have it configured properly as I can see the PHPInfo page
I am running Windows 7 Ultimate 64bit / Apache 2.2.4 / PHP 5.2.6 (I have these older versions of Apache and PHP because I was following a tutorial and wanted to make sure I could get through it. I've tried downloading several free PHP mail forms to incorporate into this one page, contact.html but I can't get any of them to work. If there is some other way to achieve this I haven't been able to find it and everything I have read indicates you cannot do it with just HTML.
If there is anyone willing to take me through this step-by-step, it would be greatly appreciated.

Php needs to use smtp to send mail on windows. See a previous question here
Apologies as I realise this should be a comment but my rep does not allow me to.

Related

PHP SQL - not working code after upload on server [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 6 years ago.
Improve this question
Issue: I made an application without problems working on localhost where I debuged it. But when I uploaded it on server in internet (my school server) few SQL didnt work, there were no PHP error messages and i tested SQL code in phpMyAdmin(on server) and there it worked.
Guys,can you help me solve this please?
The main problem is that you cannot provide any useful information about whats wrong. In this case, we need to tell PHP that for any and every problem please send it down to the client on page load. Normally in production this is precisely what you do not want to do but in this case- we need it.
Put the code below at the beginning of your index.php file, or whatever file your web server is configured to send requests to:
ini_set('display_startup_errors',1);
ini_set('display_errors',1);
error_reporting(E_ALL);
So long as your web server is successfully sending requests there, something should come up on page load that will help us determine the issue.

Migrating a PHP 5.2 Website [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 7 years ago.
Improve this question
I'm currently working on a website for a client, but this website is running PHP version 5.2.17.
Can anyone recommend the best way to tackle this? I've experience in HTML/CSS/JS/JAVA with a basic understanding of PHP.
I'm thinking of rebuilding the website with a HTML5 framework and basically dumping this on top of the old PHP pages, integrating the MySQL database and passing through the links to not lose SEO, but ultimately do worry it may affect the site...
I've tried running a WAMP server but as it only goes as low as version 5.3 I get constant errors and the page displays without the CSS and has words overlapping etc.
Images attached.
The errors you are encountering are to do with files which are being included not being found. Check through the code and identify the files that are being requested, then locate those files and correct the file paths, if the files can not be restored then remove the include statements entirely or comment them out, make sure they have been removed from evrrywhere.

PHP Upgradation issue [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 8 years ago.
Improve this question
Recently we have upgraded our PHP version in C-panel to PHP Version 5.4.36. After updation we have run the Easy Apache successfully. After that Some of the websites are getting errors in website. I am giving you some sample examples. Can you please let us know the possibilities and the solutions.
http://www.kopanaacreations.com/bollywood-replica.html
http://supremelaptopservices.com/
Prompt response will be highly appreciated.
Regards,
Subbareddy
The first one is actually an out of memory error, which means that either the images you have uploaded are too big to be processed by the GD module with your current memory settings or there is another error going on there.
The second site has errors because you have strict errors enabled (they are enabled by default on newer version of PHP)
Disabling Strict Errors
See the link above on how to rectify this!

Can PHP pages be run locally? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Closed 8 years ago.
Improve this question
Can PHP pages be run locally?
I am trying several demos on creating a contact form, at the moment I am trying this one:
http://www.html-form-guide.com/contact-form/php-email-contact-form.html
I have downloaded the source files and put my own email address in, but when I click submit I get directed to the PHP page. The form's action attribute is set to that PHP page, so I was wondering if it is because PHP is not able to run locally? If I want the form to submit and send to my email would I need to put the downloaded source pages online to make them work?
This is not the only tutorial I've used where this happens.
Sorry if this is a silly question - newbie web developer :).
Thanks.
PHP, in this context, is a server side language. It must be run by a webserver.
The webserver can be installed and run locally.
PHP needs to be executed server-side, which means you will need to set up a local webserver.
The best way to go would be taking a look at WAMP or MAMP or LAMP, depending on your operating system.
You need to be running a PHP server locally, and have the file "hosted" by the server (in the same folder, but usually /var/www/). There are a verity of free programs for this. I like WAMP ( http://sourceforge.net/projects/wampserver/)
You should simple install WAMP server. If you use Windows I recommend this one: http://www.easyphp.org/
When you install it you should copy php file to projects directory and then you can run in your browser http://localhost/projects/ to see your file and to execute it

Php code giving no results in firefox? [closed]

Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 10 months ago.
Improve this question
Just started learning Php on my own, and got stuck at the beginning. This is the code I was compiling:
<?php
echo "Hello world!";
echo 6+2;
?>
The problem is that the Php portion isn't displayed in Firefox. Why? Firefox ver. 7.0.1., I am using NetBeans 7, with cygwin.
You said you're accessing the file directly like file:///C:/xampp/htdocs/PhpVjezba1/test1.php
Don't do that, access it via http://localhost/PhpVjexba1/test1.php, provided you have a server installed.
Click Here
Most likely, you haven't installed php on the server yet. Unlike JavaScript and HTML, php is interpreted at the server, and that requires
a webserver (like apache)
a php runtime
php to be configured
The documentation's installation chapter explains how to install php. There are also third-party distributions like XAMPP that try to simplify the installation process.
In the comment you have the problem. You cannot access the file directly.
Start the webserver and run the file "http://localhost/file.php" then the file should work.
Probably a stupid question, but are you running PHP from web server or actually trying to run the file directly in browser?
PHP is never displayed in any web browser, it is executed on a web server, and is used (somewhat) to produce html that is displayed to you're web browser.
Do you have a local browser such as wamp?
Does the output display in other browsers?
Does your page have the .php extension and is your server set to handle php?

Categories