+3  A: 

That's an error your webserver (or a frontend or module) is giving. It's checking permssions on the file /home/netatwor/public_html/cms/media/related.php and it doesn't let it run because it is group writable.

To fix that, do chmod gw-w /home/netatwor/public_html/cms/media/related.php, or the equivalent in what you use to handle permissions on your site.

Vinko Vrsalovic
Googling a bit, it seems like SoftException in Application.cpp is suPHP.
Vinko Vrsalovic
yes, i found suPHP too, but i found the issue, Cyberduck was setting permissions to 666 while uploading to server. So it was group writable. I tried to change it in 755 and fixed the 666 of cyberduck and now the script is running. Thanks for answer.
Shaps
A: 

I have no idea what Application.cpp is, but the error about being writable by group sounds like a security warning that your php file has the wrong permissions. Google for chmod or uni file persissions.

DGM
A: 

Unrelated to your error, but I do believe your code is flawed on many levels, and wont be doing what you think it's doing. Let me show you:

$videos = mysql_fetch_assoc($videos);
foreach($videos as $video){         
        echo '<div class="video">';
        echo '<a href="video.php?v="'.$video['video_id'].'">         <h3>"'.$video['title'].'"</h3></a>';
        echo '</div>';
}

You may think that code is going to run for each video that is returned by the query, but it's not. You're actually foreach'ing over a single video, and that's it. The value of $video inside the foreach loop won't be an array. It will be the individual values within a single video array.

But there's more:

if($videos){

The value of mysql_query is either false, which means there was an error, or a resource pointing towards zero or more rows. It does not tell you if there were rows returned or not.

This is how your code should be written:

$query = "SELECT video_id,title FROM video_id";
$videos = mysql_query($query);

/**
 * There was an error if $videos is false. Use mysql_error()
 * to get a message explaining the error.
 */
if (!$videos) {
    die(mysql_error());
}

/**
 * You use the function mysql_num_rows() to find out how many
 * rows were returned by the query.
 */
if(mysql_num_rows($videos) > 0) {

    /**
     * You need to keep calling mysql_fetch_assoc() until there are
     * no more rows to return.
     */
    while($video = mysql_fetch_assoc($videos)) {      
            echo '<div class="video">';
            echo '<a href="video.php?v="'.$video['video_id'].'">         <h3>"'.$video['title'].'"</h3></a>';
            echo '</div>';
    }
} else {
    echo "<p>No new videos actually</p>";
}
mysql_close();
mellowsoon
Yes, thanks for helping me. I haven't had time to test the code, (cause 500 error). But now that i tested it i found those issues. Thanks for answering, Andrea.
Shaps