Random image script problems


I just switched to Dreamhost from another service. I am having luck with most of my scripts and web apps, but one little script is giving me some problems.

It is a random image script, rid.php, you call the script with the image tag, the script then randomly selects an image from its location directory and displays it. This was working perfectly at the previous host, but I cannot get it to work here. When it is placed inside a page and called it does not display, see my test page set up here, (as you can see the image is not loading)

But if the script is called directly it does work

You can see the script is here

and here is the site and working example from the developer

I am thinking that there may be some differences in the way php is set up or handled. I am wondering if there is something in php5 that may be hindering this.

Any advice is welcome.


The link you provided seems to be working fine for me. That being said, you may want to check if you are using PHP4 or PHP5. If your domain is set to run as PHP5, you will need to change this line of the script:if (isset($HTTP_GET_VARS["pic"])){header ("Location: $slika");}to this:if (isset($_GET["pic"])){header ("Location: $slika");}
Max discount on any plan with promocode SCJESSEYTOTAL

after I posted the links I realized I put the wrong domain. I have updated the links.

That said, the links that did work were on a php4 setup and the ones that do not are on php5.

I will give your suggestions a try. Post back momentarily.



I changed out the line and it now works perfectly.


That’s awesome. The DreamHost Wiki has more on this issue in case you encounter similar problems later on.

Max discount on any plan with promocode SCJESSEYTOTAL