Install Problem

PHP Tools [?] extends Visual Studio with set of advanced features to work more efficiently with PHP code.

Install Problem

Postby mwolski » August 20th, 2014, 5:20 pm

I just installed PHP tools into VS2013 Update 3 and took all the default values. Basically, I followed the video tutorial to the letter (https://www.youtube.com/watch?v=FFUhsVGXbWA), however when i hit F5 to run the project I get a "page not found" every time.

In the project settings I have index,php as the startup page, Use PHP built-in web server checked, and Auto Assign port checked. When I hit F5 I notice the VS Debugger popsup in my system tray, and IE is launched resulting in a url of http://localhost/?XDEBUG_SESSION_START=A03954F9 (and it gives a 404 error).

I checked that XDebug is installed in the php\ext folder under IIS Express and the php.ini file points to that directory.

I even double checked that I am allowing XDebug through the firewall. Seems fine.

However, I can't run and debug the app. (The app is a stock WordPress install).

Any ideas?

EDIT: I notice that actually when I run the app, the URL flashes up properly as http://localhost:33093/index.php?XDEBUG ... T=A03954F9 then immediately reverts back to http://localhost/?XDEBUG_SESSION_START=A03954F9 which produces the 404 page not found error. The index.php file is the stock wordpress index.php and only contains the following...

Code: Select all
<?php
/**
 * Front to the WordPress application. This file doesn't do anything, but loads
 * wp-blog-header.php which does and tells WordPress to load the theme.
 *
 * @package WordPress
 */

/**
 * Tells WordPress to load the WordPress theme and output it.
 *
 * @var bool
 */
define('WP_USE_THEMES', true);

/** Loads the WordPress Environment and Template */
require( dirname( __FILE__ ) . '/wp-blog-header.php' );
mwolski
 
Posts: 3
Joined: August 20th, 2014, 5:10 pm

Re: Install Problem

Postby mwolski » August 20th, 2014, 8:31 pm

It must be a wordpress specific problem. I was able to add a test.php page, set it as the start page, and run/break within it fine.
mwolski
 
Posts: 3
Joined: August 20th, 2014, 5:10 pm

For others in the same boat...

Postby mwolski » August 21st, 2014, 1:47 am

The solution it appears is to make sure you don't set index.php as the default page when running WordPress through visual studio. Just make it blank.
mwolski
 
Posts: 3
Joined: August 20th, 2014, 5:10 pm

Re: Install Problem

Postby Miloslav Beno » August 21st, 2014, 2:53 pm

Hello,

Thanks for your post.

The thing is during WordPress installation administrator chooses it's domain, so when index.php is requested, WordPress itself immediately redirects to the URL setup during it's installation.

You should setup WP in the same URL it's going to be running afterwards. The best would be to use IIS Express, IIS, Apache or other server to setup WP in. Then you'll setup PHP project properties according to this.

Thanks!
Miloslav Beno │ DEVSENSE s.r.o. │ @miloslavbenomiloslav@devsense.com
User avatar
Miloslav Beno
 
Posts: 1252
Joined: January 7th, 2012, 8:36 pm


Return to PHP Tools

Who is online

Users browsing this forum: No registered users and 93 guests

cron

User Control Panel

Login

Who is online

In total there are 93 users online :: 0 registered, 0 hidden and 93 guests (based on users active over the past 5 minutes)
Most users ever online was 434 on April 25th, 2024, 7:58 am

Users browsing this forum: No registered users and 93 guests