Title: Apache to ISS
Last modified: August 20, 2016

---

# Apache to ISS

 *  [dtek516](https://wordpress.org/support/users/dtek516/)
 * (@dtek516)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/apache-to-iss/)
 * Hi,
    I designed a WP theme on an Apache server and I’ve now moved it over to 
   an IIS server for my client.
 * [http://www.ellicorp.com](http://www.ellicorp.com)
 * I fixed the permalinks situation, so I think the permissions are fine. But I 
   have a few template files with a php loop:
 *     ```
       <?php
       						for($i=1; $i<7; $i++){               //loop 6 times
       							if(get_field('image_' . $i)){       //check if there is an image on each iteration of the loop
       							echo' <a href="' . get_field('image_' . $i) . '"';?>
       							rel="lightbox[<?php the_title(); ?>]">
       							<?
       							echo' <img src="' . get_field('image_' . $i) . '"/></a>';  //output results
       							}
       						}
       					?>
       ```
   
 * If the loop is there, I get a blank page. Nothing at all.
    If I remove it, everything
   works fine.
 * I have a similar code loop on the homepage and it works fine.
 * Any help would be greatly appreciated.
 * PS:
    The code pulls custom variables from posts (to display images) of a particular
   category.
 * Again, it works fine on Apache.

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Thread Starter [dtek516](https://wordpress.org/support/users/dtek516/)
 * (@dtek516)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/apache-to-iss/#post-2410175)
 * By the way here is a template/template block comparison:
 * WORKS:
 *     ```
       <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
   
       <div class="post" id="post-<?php the_ID(); ?>">
       <div class="entry">
   
       	<?php for($i=1; $i<11; $i++){               //loop 6 times
       							if(get_field('image_' . $i)){       //check if there is an image on each iteration of the loop
       							echo' <img src="' . get_field('image_' . $i) . '"/>';}
       						}
       					?>
   
       			</div>
   
       		</div>
       		</div>
   
       		<?php endwhile; endif; ?>
       ```
   
 * DOES NOT WORK:
 *     ```
       <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
   
       		<div class="post" id="post-<?php the_ID(); ?>">
       		<div class="entry">
       		<div id="image_gallery2" style="float: right;">
       		<?php
       						for($i=1; $i<7; $i++){               //loop 6 times
       							if(get_field('image_' . $i)){       //check if there is an image on each iteration of the loop
       							echo' <a href="' . get_field('image_' . $i) . '"';?>
       							rel="lightbox[<?php the_title(); ?>]">
       							<?
       							echo' <img src="' . get_field('image_' . $i) . '"/></a>';  //output results
       							}
       						}
       					?>
       				</div>
       				<div style="width: 680px;">
       				<?php the_content(); ?>
       				</div>
       		</div>
       		</div>
       		</div>
       		<?php endwhile; endif; ?>
       ```
   
 *  Thread Starter [dtek516](https://wordpress.org/support/users/dtek516/)
 * (@dtek516)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/apache-to-iss/#post-2410178)
 * UPDATE:
 * I removed this line:
 *     ```
       echo' <a href="' . get_field('image_' . $i) . '"';?>
       							rel="lightbox[<?php the_title(); ?>]">
       							<?
       ```
   
 * and it all loads up..but this means I cannot use the LIGHTBOX popups..
 * anybody know of a lightbox issue with IIS?

Viewing 2 replies - 1 through 2 (of 2 total)

 The topic ‘Apache to ISS’ is closed to new replies.

## Tags

 * [apache](https://wordpress.org/support/topic-tag/apache/)
 * [iis](https://wordpress.org/support/topic-tag/iis/)
 * [permissions](https://wordpress.org/support/topic-tag/permissions/)
 * [php](https://wordpress.org/support/topic-tag/php/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 1 participant
 * Last reply from: [dtek516](https://wordpress.org/support/users/dtek516/)
 * Last activity: [14 years, 10 months ago](https://wordpress.org/support/topic/apache-to-iss/#post-2410178)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
