[RESOLVED] "No Input File Specified" Error upgrading to 5.2.5

windows

Guest
My hosting service just upgraded to php5.2.5 and since then I have been unable to get my posts to work properly.

take this address for example:
<!-- m --><a class="postlink" href="http://blog.darkernemesis.com/archives/2008/03/Tribute-to-My-Grandfather/">http://blog.darkernemesis.com/archives/ ... andfather/</a><!-- m -->

I do the following to break it down and get the entry

$page = explode("/", $_SERVER['ORIG_PATH_INFO']) ;

This is supposed to break it down so that i can break it so that
$page[2] = 2008
$page[3] = 03
$page[4] = Tribute-to-My-Grandfather

Instead I get a "no input file specified error"

(I also tried ['PATH_INFO'], ['PHP_SELF], ['REQUEST_URI']) which if echo'd displayed properly, but once put into explode alone or through a variable caused the "no input specified error")

I'm pretty much at a standstill right now until I get this to work.

I did this manually in a test file just to see what it did, and as soon as I did the explode, it stopped working too.

Did something change in 5.2.5 to make this not work? I was previously hosted with php5.1.4I think we need to see more of the code in order to understand (in particular, the section that is outputting that message). The message displayed on that link is not a built-in error message, so we need to see the logic and data that is causing that message to be displayed.<?php
include("include/sql_connect.php") ;
$temp_page = $_SERVER['ORIG_PATH_NAME'] ;
$page = explode("/", $temp_page, 4) ;
$page_year = $page[2] ;
$page_month = $page[3] ;
if(isset($page[4]))
/* checks to see if there's an entry or if we should query for a month */
{
$page_title = $page[4] ;
$query_title_1 = str_replace("-", " ", $page_title) ;
$query_title = str_replace("'", "\\'", $query_title_1) ;
}

$query_date = $page_year . "-" . $page_month ;

if($page[2] == "")/* archive list */
{
echo "<title>Darker Nemesis - Archives</title>" ;
}
elseif($page_title != "" && (strlen($page_title) > 5))/* individual entry */
{
$entry_query = "SELECT * FROM entry WHERE entry_title='$query_title'" ;
$entry_result = mysql_query($entry_query) ;
$description = mysql_result($entry_result, 0, "entry_description") ;
$keywords = mysql_result($entry_result, 0, "entry_keywords") ;

echo "<title>Darker Nemesis - $query_title_1</title>" ;
echo "<meta name=\"keywords\" content=\"$keywords\" />" ;
echo "<meta name=\"description\" content=\"$description\" />" ;
}
else /* archive month */
{
$archive_query = "SELECT * FROM archive WHERE arch_month='$page_month' AND arch_year='$page_year'" ;
$archive_results = mysql_query($archive_query) ;
$archive_name = mysql_result($archive_results, 0, "arch_name") ;

echo "<title>Darker Nemesis - Archives - $archive_name</title>" ;
}
?>

That alone will cause the issue. It's noteworthy that if I just use the url
<!-- m --><a class="postlink" href="http://blog.darkernemesis.com/archives">http://blog.darkernemesis.com/archives</a><!-- m -->
it works, but if I use
<!-- m --><a class="postlink" href="http://blog.darkernemesis.com/archives/">http://blog.darkernemesis.com/archives/</a><!-- m -->
or anything else, it doesn'tCan you paste the EXACT error that is displayed?

Is the sql_connect.php the only included file?

Can you post the code for that as well just for giggles? // take out any connection credentials.

This doesn't look like a normal error for explode, like nog noted.<?php
$con = mysql_connect("hostname", "dbname", "password") ;

if(!$con)
{
die('Could not connect: ' . mysql_error()) ;
}

mysql_select_db("darknemesis618", $con) ;
?>


I have others included if you want them (just templates), but it gives the error before it even gets to the others so I figure they're not really part of the problem. (they pretty much just output the html for the sidebar and top menu)That message apparently comes from when the web server tries to request a nonexistent PHP file. My guess is you are using something like Apache mod_rewrite to do URL rewriting, and there is some bug in your rewrite code that can cause it to call a non-existent PHP page.I'm not doing a mod_rewrite, I have a .htaccess file with this in it and nothing more.

<files page>
ForceType application/x-httpd-php
</files>

Is there something wrong with that? It was working fine before they upgraded to php 5.2.5Unfortunately, I'm not an Apache guru. It might be interesting to rename the .htaccess file and try a few tests, just to see if you get a different result. (I kind of doubt it, but at least then you would have eliminated one possibility.)It looks like the server running php as cgi is causing the problem so I'm looking into alternative methods
 
Back
Top