My host doesn't support php 5 so i have to directly point my index.php file to the image file. If this is the code within the index.php file that I need to edit what do I do?

<?php $values = get_post_custom_values("Headline");?>
 	<a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>">
<img src="<?php echo bloginfo('template_url'); ?>/scripts/timthumb.php?src=<?php echo get_option('home'); ?>/<?php
$values = get_post_custom_values("Image"); echo $values[0]; ?>&w=300&h=300&zc=1&q=100"
alt="<?php the_title(); ?>" class="left" width="300px" height="300px"  /></a>
	<?php the_excerpt(); ?>

The timthumb.php uses the php 5 thing but since i don't have it i have to directly point it to the image file. the images on my server are kept in wp-content/themes/arthemia/images and that script is under wp-content/themes/arthemia/scripts

This is what the guy told me to do but I don't understand it. "Your webhost doesn't support PHP 5. this means you can't use the timthumb.php script. you have to edit every php file and rip off any timthumb.php line and modify it to directly point to the image file."
My website is www.yourworldwired.com and the whole point is to get pictures onto my headline and featured articles.

[ Mod Edit - bpat1434 ] Please use [noparse]

[/noparse] tags when posting PHP code.

    He probably means that you have to take out the script portion of the img source. Next should work:

    <?php $values = get_post_custom_values("Headline");?>
    <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>">
    <img src="<?php echo get_option('home'); ?>/<?php
    $values = get_post_custom_values("Image"); echo $values[0]; ?>"
    alt="<?php the_title(); ?>" class="left" width="300px" height="300px" /></a>
    <?php the_excerpt(); ?>
    

    BTW, your host SHOULD support PHP 5 because support and development of PHP 4 has ended(or near end). And if the timthumb.php script is just a script to resize the image, I dont see why it couldnt or made to work with PHP 4.

      well alot of clients he said use php 4 so it would mess up their website. the guy who made the theme said it won't be able to work with php 4. I'm going to implement the code you just put there. Hopefully it'll work

        Okay i've implemented your code in both of the parts where timthumb.php used to be but the pictures still don't show up. I've added the picture in the custom fields section as well

          Well if you changed it, it doesnt show at the front page. Did you change it back?

            no i didnt..this is exactly what my whole index.php file looks like now.

            <?php get_header(); ?>
            
            <?php if(!is_paged()) { ?>
            
            <div id="top" class="clearfloat">
            
            	<div id="headline">
            	<img src="<?php echo get_option('home'); ?>/wp-content/themes/arthemia/images/headline.png" 
            
            width="75px" height="21px" class="clearfloat" alt="" />
            		<?php query_posts("showposts=1&category_name=Headline"); ?>
            		<?php while (have_posts()) : the_post(); ?>	
            
            <div class="title"><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></div>
            <div class="meta">[<?php the_time('j M Y') ?> | <?php comments_popup_link('No Comment', 'One Comment', '% 
            
            Comments');?> | <?php if(function_exists('the_views')) { the_views(); } ?>]</div>	
            	<?php $values = get_post_custom_values("Headline");?>
            <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>">
            <img src="<?php echo get_option('home'); ?>/<?php
            $values = get_post_custom_values("Image"); echo $values[0]; ?>"
            alt="<?php the_title(); ?>" class="left" width="300px" height="300px" /></a>
            <?php the_excerpt(); ?> 
            	<a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>">Read the 
            
            full story &raquo;</a>
            	<?php endwhile; ?>
            		</div>
            
            <div id="featured">
            
            <img src="<?php echo get_option('home'); ?>/wp-content/themes/arthemia/images/featured.png" width="72px" 
            
            height="17px" alt="" />
            	<?php query_posts("showposts=4&category_name=Featured"); $i = 1; ?>
            
              <?php while (have_posts()) : the_post(); ?>
            <div class="clearfloat">
            <?php	$values = get_post_custom_values("Image");
            if (isset($values[0])) { ?>
              <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>">
            <img src="<?php echo get_option('home'); ?>/<?php 
            $values = get_post_custom_values("Image"); echo $values[0]; ?>&w=100&h=65&zc=1&q=100"
            alt="<?php the_title(); ?>" class="left" width="100px" height="65px"  /></a>
                  <?php } ?>
            	<div class="info"><a href="<?php the_permalink() ?>" rel="bookmark" class="title"><?php the_title(); ?></a>
            <?php the_excerpt(); ?>
            </div>
                	</div>
            
            <?php if ($i<4) { ?><div class="divider"><img src="<?php echo get_option('home'); ?>/wp-
            
            content/themes/arthemia/images/divider.png" width="128px" height="5px" alt="" /></div>
            	<?php } ; ?>
            
              <?php $i++; endwhile; ?>
            
            </div>
            
            </div>	
            
            <div id="middle" class="clearfloat">
            <img src="<?php echo get_option('home'); ?>/wp-content/themes/arthemia/images/category.png" 
            
            class="clearfloat" alt="" />
            	<?php $display_categories = array(5,6,7,1,71); $i = 1;
            	foreach ($display_categories as $category) { ?>
            
            <div id="cat-<?php echo $i; ?>" class="category">
            	<?php query_posts("showposts=1&cat=$category")?>
            	<span class="cat_title"><a href="<?php echo get_category_link($category);?>"><?php 
            
            single_cat_title(); ?></a></span>
            		<a href="<?php echo get_category_link($category);?>"><?php echo category_description($category); ?
            
            </a>
            	</div>
            
            <?php $i++; ?>
            	<?php } ?>
            
            </div>
            
            <?php } ?>
            
            <div id="bottom" class="clearfloat">
            
            <div id="front-list">	
            
            <?php
              $page = (get_query_var('paged')) ? get_query_var('paged') : 1;
              query_posts("cat=-95,-96&paged=$page&posts_per_page=2"); ?>
            
            <?php while (have_posts()) : the_post(); ?>		
            
            <div class="clearfloat">
            <h3 class=cat_title><?php the_category(', '); ?> &raquo</h3>
            <span class="title"><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></span>
            <br/><span class="meta">[<?php the_time('j M Y') ?> | <?php comments_popup_link('No Comment', 'One 
            
            Comment', '% Comments');?> | <?php if(function_exists('the_views')) { the_views(); } ?>]</span>	
            	<?php the_content('Read the full story &raquo;'); ?>
            	</div>
            
            <div class="divider"><img src="<?php echo get_option('home'); ?>/wp-
            
            content/themes/arthemia/images/divider.png" /></div>
            
              <?php endwhile; ?>
            
            <div class="navigation">
            		<div class="left"><?php next_posts_link('&laquo; Older Entries') ?></div>
            		<div class="right"><?php previous_posts_link('Newer Entries &raquo;') ?></div>
            </div>
            
            
            </div>
            
            
            <?php get_sidebar(); ?>
            
            </div>	
            
            <?php get_footer(); ?>

            [ Mod Edit - bpat1434 ] Please use [noparse]

            [/noparse] tags when posting PHP code.

              well alot of clients he said use php 4 so it would mess up their website.

              I suggest that you switch to a better host, or inform them that they better get an upgrade plan going now or in nine weeks time their server will be vulnerable to security flaws exposed in PHP 4, with no hope of an official fix.

                19 days later

                Twigz, I reflect Laserlight's sentiments exactly.

                I think by this time, if your hosting service provider isn't using PHP5, then perhaps getting one that is would be a better bet. PHP 5 has been out for a while now.. otherwise, tell your host to get with the times 🙂 In either case, you really ought to migrate to PHP 5.

                Cheers,

                NRG

                  Many hosts now support both, by running one as an Apache module and the other in CGI mode. Typically, .php pages will be processed as PHP4 while .php5 pages will be processed as PHP5 (or vice versa as to which needs the special suffix). My personal site is hosted that way (on an ipower.com linux host), and I configured my site to have all .php pages run as PHP5 (and I have no .php4 pages).

                    Write a Reply...