TS4 - PHP and Mapping - Assistance Requested

Post here if your topic is about TopStyle but doesn't fit in another TopStyle forum.

Moderator: TopStyle Support

TS4 - PHP and Mapping - Assistance Requested

Postby jft » Sat May 01, 2010 11:25 pm

Top Style is a very nice product - I have been enjoying using it for testing & developing.
Yesterday I tried to set it up to execute PHP commands embedded within the HTML code, but unfortunately I could not get the mapping feature to work. Could anyone give me further guidance please?
The environment & testing done are detailed below.
Environment:
- Win2K SP4
- Internet Explorer 6.0.2800.1106
- Firefox 3.6.3
- TopStyle 4.0.0.76
- Apache 1.3.39
- PHP 5.2.5
WebStructure:
- Apache is configured with 9 VirtualHosts (on ports 8000-8008) & these have been working successfully for several years now
- WebRoot: C:\http\webServers\8002_yii\8002\wwwRoot
TopStyleConfiguration:
- TopStyleWorkDirectory: D:\SandBox\ProtectaCar
- TS4 Mapping - MapFrom: C:\http\webServers\8002_yii\8002\wwwRoot\
- TS4 Mapping - MapTo: http://localhost:8002/
- TS4 Mapping - 'Use mappings when previewing' option: Checked
HTML_File:
- FileName: mappingTest.php
- Contents:
Code: Select all
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
  <meta http-equiv="content-type" content="text/html;charset=utf-8">
  <title>Testing Mapping</title>
</head>
<body>
<p>Line1: Hello World 0123!</p>
<?php echo("Line2: Hi Universe 9876!"); ?>
<p>Line3:Bibi World!</p>
</body>
</html>

Testing:
- The file mappingTest.php above was copied to both directories ( WebRoot: C:\http\webServers\8002_yii\8002\wwwRoot and TopStyleWorkDirectory: D:\SandBox\ProtectaCar)
- The TopStyleWorkDirectory file was then run from within TopStyle using the internal browser (IE6) and again from within TopStyle using the two external browsers above (IE & Firefox)
- The WebRoot file was then run directly from the address bar of each of IE & Firefox
- The tests above were then repeated using the IP address (10.0.0.5:8002) in place of "localhost:8002" in both TopStyle's mapping & when running the two browsers directly from their address bars.

Results:
In all cases TopStyle output the first and third lines only (not the second) and when the file
was run directly from the address bar of each of the browsers all three
lines were output.

Thanks in advance,
Regards,
John (jft@worrigee.net)
jft
Rank 0 - Newcomer
Rank 0 - Newcomer
 
Posts: 4
Joined: Sat Jan 02, 2010 8:37 pm

Re: TS4 - PHP and Mapping - Assistance Requested

Postby TopStyle Support » Mon May 03, 2010 1:58 am

Are you sure the document in your web root is identical to the one in your working directory?

When you map something from a certain directory to a certain URL, my advice is edit from that actual directory (not some other working directory).

Thanks, Stefan.
User avatar
TopStyle Support
Rank VI - Professional
Rank VI - Professional
 
Posts: 470
Joined: Sat Jun 13, 2009 12:38 pm


Return to General TopStyle

Who is online

Users browsing this forum: No registered users and 3 guests