Site can't find SHTML Pages

First of all, I know some of y’all get bugged when people come on with zero posts, post for help, and never show up again. Hopefully I don’t come off like that. I’m active all over the web, but it just happened to be my first time registering here.

I have a script & site that I paid a programmer a while back (whom I have no more contact with) to construct.

At that point, everything was working fine. I had to shut down the site for what is now almost two years, and now I’m working on relaunching it.

I’m not sure if it’s due to some PHP or server upgrades by HostGator (Shared Hosting) or what, but a couple things seem to be broken.

The problem
While all or most the links in the server are PHP,the programmer made it so they would appear as HTML/.shtml

Therefore, all the main links in the website are linked to .SHTML, and now that I’m relaunching the site, they come up as 404’s…

I could simply change the hyperlinks to the .PHP extension which is physically in the server, but that will only fix the basic links.

Part of my site is a list of “offers”
One of the functions is to catagorize the way they show up.
i.e.: “Free” and “Not Free” for Catagory
Order By “Name” or “Value”
and Finally, Direction “Ascending” or “Descending”

Default would be Free, Value, Descending. Which is what shows up in the main .php file.

However, If I were to change it to ascending, it would hyperlink to this page: offers-1-2-POINTS-ASC.shtml

Even if I were to not change any of the values, but just switch to Page 2: offers-2-2-POINTS-DESC.shtml

All those .SHTML links bring up a 404 error by HostGator.

The Solution
Has anybody experienced this before? I can’t seem to find a solution to this.

These are the portions of script I found pertaining to this specific function.
[php] function changeOrder()
{
var page = document.getElementById(‘page’).value;
var cat = document.getElementById(‘cat’).value;
var order = document.getElementById(‘odr’).value;
var method = document.getElementById(‘met’).value;

	var url = 'offers-' + page + '-' + cat + '-' + order + '-' + method + '.shtml';
	window.location = url;[/php]

[php] function changeFilter()
{
var cat = document.getElementById(‘cat’).value;
var order = document.getElementById(‘odr’).value;
var method = document.getElementById(‘met’).value;

	var url = 'offers-1-' + cat + '-' + order + '-' + method + '.shtml';
	window.location = url;[/php]

Anyone have any idea, please?
If you need anything else, please let me know.

Thank You,
Kevin

Checking the error log in the server, this one comes up ALOT, and every time it seems to try to go to an SHTML page.

[06-Jan-2011 00:34:49] PHP Warning: PHP Startup: Unable to load dynamic library ‘/usr/local/lib/php/extensions/no-debug-zts-20060613/ixed.5.2ts.lin’ - /usr/local/lib/php/extensions/no-debug-zts-20060613/ixed.5.2ts.lin: undefined symbol: executor_globals_id in Unknown on line 0

Not sure what that means, though.

Sorry for the triple posting.

The error in the error log posted above has been fixed. Just a simple search brought up me needing HostGator to update the php.ini file or whatever and install ixed.5.2ts.lin on my server. Through support, that got done.

The Good? Nothing is showing up in the error log.

The Bad? Hoping it would fix the SHTML error, it did not.

Check to see if you still have the SHTML files with you. Unfortunately if you don’t, you’ll have to redo your site to perform what the missing files were doing. Fortunately, looking at what the SHTML files were doing, you can create PHP scripts that will do the job you wish to do.

Usually people choose a type of coding language and stick to it, sometimes mixing languages up. This includes, but is not limited to: HTML (XHTML, SHTML, JHTML, etc), PHP, PERL, ASP, ASP.NET, and JAVA. Each coding language can be programmed to do the same thing in their own syntax.

If you do not have those SHTML files with you, and you probably don’t, chances are you’ll have to rewrite what you want your site to do in another language (PHP). Don’t worry though, we can always assist you in learning and giving you tips on PHP so don’t be afraid to ask. If I was you, I would just rewrite your site. It’s been a few years and things have changed. We’ll help you along the way if you need it but I’m sorry to say, you are probably going to have to start over. I hope this helps you =D.

I’m not sure if the SHTML pages ever physically existed?

I have a backup of the website on my server from March, 2009. When everything was working correctly.

Looking at it right now, the files are the same exact ones.

Unfortunately, I do not know enough about the script to be able to know exactly how it works, but I do know it was always like this.

It seems to have made temporary SHTML files…

This is pretty much my index.php, which might help in leading toward finding the error.
[php]<?php
require_once (‘inc/root.php’);
require_once (‘class/DataBase.class.php’);
require_once (‘class/Authentication.class.php’);

$dbcon = new DataBase();
$auth = new Authentication(false);

?>

<?php require_once('template/top.tpl'); ?>
<?php require_once('inc/three_box_heading.inc') ?>
<?php require_once('inc/index.inc') ?>
[/php]

For someone who knows as little as I think I know, I’m awfuly good.

I fixed the problem. The .htaccess page needs to include such things like:

RewriteRule offers_process-(.)-(.)-(.)-(.)-(.)-(.)-(.*).shtml$ offers.php?p=$1&c=$2&o=$3&m=$4&action=$5&offer=$6&msg=$7

and a whole list of others – that wasn’t there.

Thankfully, the backup (which you did remind me to take a look at), did have it.

The last problem I’m having before the site is launch-able again, is through the mail server.

Any time it needs to send an email to a user – whether through something like Forgot Password, or through the admin section of the website, it gives me an error…It uses PHPSwift.

Forgot Password error:

The SMTP connection failed to start [localhost:25]: fsockopen returned Error Number 111 and Error String ‘Connection refused’

Admin-Side Error:
Fatal error: Uncaught exception ‘Swift_ConnectionException’ with message ‘The SMTP connection failed to start [localhost:25]: fsockopen returned Error Number 111 and Error String ‘Connection refused’’ in /home/gamingpr/public_html/class/lib/Swift/Connection/SMTP.php:309 Stack trace: #0 /home/gamingpr/public_html/class/lib/Swift.php(216): Swift_Connection_SMTP->start() #1 /home/gamingpr/public_html/class/lib/Swift.php(101): Swift->connect() #2 /home/gamingpr/public_html/class/Mail.class.php(28): Swift->__construct(Object(Swift_Connection_SMTP)) #3 /home/gamingpr/public_html/admin/offer_request.php(64): Mail->sendMessage() #4 {main} thrown in /home/gamingpr/public_html/class/lib/Swift/Connection/SMTP.php on line 309

Error Log:
[04-Jan-2011 11:51:53] PHP Fatal error: Uncaught exception ‘Swift_ConnectionException’ with message ‘The SMTP connection failed to start [localhost:25]: fsockopen returned Error Number 111 and Error String ‘Connection refused’’ in /home/gamingpr/public_html/class/lib/Swift/Connection/SMTP.php:309
Stack trace:
#0 /home/gpr/public_html/class/lib/Swift.php(216): Swift_Connection_SMTP->start()
#1 /home/gpr/public_html/class/lib/Swift.php(101): Swift->connect()
#2 /home/gpr/public_html/class/Mail.class.php(28): Swift->__construct(Object(Swift_Connection_SMTP))
#3 /home/gpr/public_html/my_referrals.php(21): Mail->sendMessage()
#4 {main}
thrown in /home/gpr/public_html/class/lib/Swift/Connection/SMTP.php on line 309

Settings used in the class/lib/settings.class.php file:
[php]public static $domain = “http://www.gpr.com”;

	public static $db_host		= "localhost";			//database server address
	public static $db_username	= "gpr_usr";				//database username
	public static $db_password	= ">na";				//database password
	public static $db_database	= "gpr_db";		//database schema
	
	public static $mail_server	= "localhost";			//mail server address
	public static $mail_smtp	= "25";					//mail server smtp port
	
	public static $mail_sender	= array("[email protected]", "Gpr");	//mail server send mails as	
	public static $mail_support = array("[email protected]", "GamingPrizes");	//mail server send mails as
	
	public static $ref_cms 	= array(0.20, 0.05, 0.05);
	
	public static $lottery 	= 0.15;[/php]

Any ideas? Sorry for all this posting and bothering y’all.

Sponsor our Newsletter | Privacy Policy | Terms of Service