Fueling Your Coding Mojo

Buckle up, fellow PHP enthusiast! We're loading up the rocket fuel for your coding adventures...

Popular Searches:
77
Q:

web services - Installing php on windows and configuring with expression web 4?

Hi everyone,

I hope you're all doing great! I have recently started using Expression Web 4 for my web development projects and I'm really loving it so far. However, I'm running into a bit of a roadblock when it comes to installing PHP on my Windows machine and configuring it with Expression Web 4.

I have been searching online and reading various tutorials, but I'm still a bit confused about the process. I'm not very familiar with server configurations and all the technical jargon that comes along with it. So, I was wondering if any of you could help me out with a step-by-step guide or some clear instructions on how to install PHP on Windows and then properly configure it with Expression Web 4.

Specifically, I'd like to know things like which version of PHP is compatible with Expression Web 4, what prerequisites or additional software I need to install before setting up PHP, and any configuration changes I might need to make in Expression Web 4 to ensure it works smoothly with PHP.

I would appreciate any assistance or guidance that you can provide. Feel free to share your personal experiences, tips, or any resources that you think would be helpful for a beginner like me. Thank you in advance for your support!

Best regards,
[Your Name]

All Replies

adella.murray

Hey [Your Name],

I completely understand where you're coming from, as I went through the same process not too long ago. Installing PHP on Windows and configuring it with Expression Web 4 can be a bit confusing, but don't worry! I'll share my personal experience and walk you through the steps.

Firstly, regarding the PHP version, I recommend using the latest stable version, which is currently PHP 7.4. You can download it from the official PHP website (https://www.php.net/downloads.php). Make sure to select the appropriate Windows version (x86 or x64) based on your system.

Before installing PHP, ensure that you have a web server installed. I personally use IIS (Internet Information Services), which comes pre-installed with most Windows versions. If you don't have IIS, you can add it through the Control Panel -> Programs -> Turn Windows features on or off -> Internet Information Services.

After installing IIS, follow these steps to configure PHP with IIS:

1. Extract the downloaded PHP files to a directory on your system. For example, "C:\PHP".

2. Rename the "php.ini-development" file in the PHP directory to "php.ini".

3. Open the "php.ini" file with a text editor and configure it according to your needs. For a basic setup, you can leave most settings as default.

4. Open the IIS Manager (Start -> Run -> "inetmgr") and expand the local server node.

5. Right-click on "Sites" and choose "Add Website".

6. Provide a name for your website and set the physical path to your project's root folder.

7. In the binding section, specify a hostname (e.g., localhost) and set the port number to 80.

8. Click on "Test Settings" to ensure there are no errors, then click "OK" to create the website.

9. Select the created website from the IIS Manager and double-click on the "Handler Mappings" feature.

10. Click "Add Module Mapping" on the right-hand side, and in the dialog that appears, enter the following details:
- Request Path: *.php
- Module: FastCgiModule
- Executable: C:\PHP\php-cgi.exe (the path where you extracted PHP)

11. Save the settings and restart IIS.

Now, when you open Expression Web 4, you can create PHP files and test them by accessing your website through the browser (e.g., http://localhost).

I hope this helps you get started with PHP and Expression Web 4. Don't hesitate to ask if you face any issues or need further assistance. Good luck with your web development journey!

Best regards,
User 1

vthompson

Hey there [Your Name],

I totally understand your situation! I had a similar experience when I started using Expression Web 4 and wanted to configure PHP on Windows. Allow me to share my personal experience and offer you some insights.

When it comes to PHP installation, I highly recommend using XAMPP (https://www.apachefriends.org/) rather than setting up PHP and a web server separately. XAMPP provides an all-in-one package that includes Apache, MySQL, PHP, and other useful tools.

Here's a step-by-step guide based on my setup with XAMPP and Expression Web 4:

1. Download the latest version of XAMPP from their official website and run the installer.

2. During the installation, you'll be prompted to select the components to install. Make sure "Apache" and "PHP" are selected; you can leave the other components as default.

3. Choose the installation directory for XAMPP. For instance, "C:\XAMPP".

4. Once the installation completes, launch XAMPP Control Panel from the Start menu.

5. Start the Apache server by clicking the "Start" button next to "Apache". You should see a green indicator confirming that Apache is running.

6. Now, open Expression Web 4 and create a new site or open an existing one.

7. In Expression Web 4, go to "Site" in the menu and select "Site Settings".

8. In the "Advanced" tab, you'll find an option called "Remote Web server type". Choose "Local IIS" from the dropdown.

9. In the "Remote Web server" field, enter "localhost" or "127.0.0.1" (without quotes).

10. Save the settings and close the Site Settings window.

11. To test if PHP is properly configured, create a new PHP file in your site's root directory. For example, "C:\XAMPP\htdocs\your-site\test.php".

12. In the test file, write `<?php phpinfo(); ?>`.

13. Save the file and open your preferred web browser. Type in the address bar: "localhost/your-site/test.php". You should see a PHP information page with details about your PHP installation.

By using XAMPP, you have a ready-to-use Apache web server with PHP support. Expression Web 4 can then leverage this setup for your PHP projects. It simplifies the installation process and provides a complete local development environment.

I hope this approach works well for you. If you have any further questions or face any challenges, feel free to ask. Good luck with your PHP and Expression Web 4 endeavors!

Cheers,
User 2

New to LearnPHP.org Community?

Join the community