Web Hosting Talk

Web Hosting Talk (http://www.webhostingtalk.com/index.php)
-   Hosting Security and Technology (http://www.webhostingtalk.com/forumdisplay.php?f=5)
-   -   Incorrect URLs/paths in error logs (http://www.webhostingtalk.com/showthread.php?t=1128083)


discxpress 02-19-2012 01:33 PM

Incorrect URLs/paths in error logs
 
Hello,

I just moved my site to a new server. i used the same files and db backup from the old server. They both are Apache. As a result, my product pages and categories aren't being found and I get 404 errors.

Here's an example of the errors from the error log:
HTML Code:

[Sun Feb 19 09:53:07 2012] [error] [client 66.249.71.44] File does not exist: /var/www/html/panda-antivirus-2012-p-5090.html
[Sun Feb 19 09:54:37 2012] [error] [client 66.249.66.149] File does not exist: /var/www/html/christmas-bonus-pack-p-4135.html
[Sun Feb 19 09:55:13 2012] [error] [client 66.249.66.149] File does not exist: /var/www/html/mission-combat-force-p-4158.html

What should I check on the server?

T-Junk 02-19-2012 02:30 PM

Do you have those pages on your site? Are they in a sub folder named "html", and are they working? If your renamed the folder, possibly even to upper case "HTML", then it could cause that error. Also, if you moved those pages, same result.

discxpress 02-19-2012 02:52 PM

Quote:

Originally Posted by T-Junk (Post 7964438)
Do you have those pages on your site? Are they in a sub folder named "html", and are they working? If your renamed the folder, possibly even to upper case "HTML", then it could cause that error. Also, if you moved those pages, same result.

Thanks for your reply.

Yes those pages are on my site which is built with PHP. They are located in the "html" folder with all lower case. Since I used the db backup from the previous server, I didn't move the pages.

discxpress 02-19-2012 04:45 PM

What would cause the php files to be downloaded instead of displaying in the browser?

T-Junk 02-19-2012 04:55 PM

Did you recently change your domain name?? It's a possibility that if you did, peolple are clicking those links (old bookmarks and search engine finds, or such). If you're running this site in a virtual directory on your webserver, those links could be defaulting to var/www.

So, are you running a virtual directory for this site, or are your files all located in var/www ??

discxpress 02-19-2012 05:11 PM

Quote:

Originally Posted by T-Junk (Post 7964572)
Did you recently change your domain name?? It's a possibility that if you did, peolple are clicking those links (old bookmarks and search engine finds, or such). If you're running this site in a virtual directory on your webserver, those links could be defaulting to var/www.

So, are you running a virtual directory for this site, or are your files all located in var/www ??

All files are in /var/www/html. Also, I didn't change the domain name. The only difference is the hosting company. Do you think that the 2 different servers are configured to handle php files differently? I'm running apache server in linux/centos. Php5 The previous server was an apache also.

Thanks

T-Junk 02-19-2012 05:22 PM

Are you sure PHP is installed? When I've seen browsers ask to download a PHP page instead of display it, that has been the cause.

You can write this code in notepad (or related) and save it as checking.php:

PHP Code:

<?php
phpinfo
():
?>

Put that in your root directory and navigate a browser to http://yourdomain/checking.php and it should bring up a PHP information page.

So, you're SURE those files exsist? You can go to http://yourdomain/html/mission-combat-force-p-4158.html and it will display that certain page??

Edit: In the php.ini file (I do believe), you can define what pages the server will look for PHP on, such as .html and .htm files. That might be some of your problem.

T-Junk 02-19-2012 06:29 PM

Sorry!! I typoed that code:
PHP Code:

<?php
phpinfo
();
?>

Also, are you using a CMS (Wordpress, Joomla!, etc.)?

discxpress 02-19-2012 08:59 PM

I was wondering why the page was blank. I'll try the new code later.

discxpress 02-19-2012 09:18 PM

I do have wordpress but I must upgrade php to 5.2.6. My website is powered by oscommerce.

T-Junk 02-20-2012 02:10 AM

Quote:

Originally Posted by discxpress (Post 7964820)
I do have wordpress but I must upgrade php to 5.2.6. My website is powered by oscommerce.

Are you using a WP plugin that changes your page names, because that could be an issue if not set up right or disabled in the change over. Also, I do believe that Wordpress pages do not end with ".html", but rather a number such as "?page_id=86", or even just words and a slash like "panda-antivirus-2012-p-5090/" (although I could be wrong). There might be other issues here.

discxpress 02-20-2012 04:18 AM

On my php coded site, I use mod that changes the extensions from .php to .html. On wp I have no such plugin.

Thanks

discxpress 02-20-2012 04:45 AM

I corrected the checking.php file and loaded it in my browser. if you want to view the results go here: http://www.discxpress.com/checking.php

discxpress 02-20-2012 09:38 AM

I found the solution! zlib wasn't enabled. I need to upgrade php. Any easy way to do that?

Thanks

T-Junk 02-20-2012 10:06 AM

Good work man!! Glad you got that sorted out. You should remove that checking.php file (or rename it).

As for upgrading PHP, I'm not as familiar with Centos as other linux distros, and never used a control panel, but it shouldn't be anything a yum install can't fix.

Try this link here.

foobic 02-20-2012 11:20 AM

If you prefer to stick with standard CentOS the package is php53.
Code:

yum install php53
Bear in mind that some older code may need a bit of tweaking to work properly under PHP 5.3.x. CentOS has no standard 5.2.x package.

discxpress 02-21-2012 04:05 AM

Thanks. I get this error when I tried your suggestion:
Quote:

Retrieving http://repo.webtatic.com/yum/centos/5/latest.rpm
warning: /var/tmp/rpm-xfer.A0OQ2R: Header V3 DSA signature: NOKEY, key ID cf4c4ff9
error: can't create transaction lock on /var/lib/rpm/__db.000

discxpress 02-21-2012 04:34 AM

Quote:

Originally Posted by foobic (Post 7965720)
If you prefer to stick with standard CentOS the package is php53.
Code:

yum install php53
Bear in mind that some older code may need a bit of tweaking to work properly under PHP 5.3.x. CentOS has no standard 5.2.x package.

Hello and thanks for your suggestion. I tried it and it says "You need to be root to perform this command."

Your help is appreciated

foobic 02-21-2012 04:55 AM

Quote:

Originally Posted by discxpress (Post 7967251)
it says "You need to be root to perform this command."

I'm sorry but if you need to ask the meaning of that you really should get a competent admin to manage this server for you.

discxpress 02-21-2012 06:06 AM

Quote:

Originally Posted by foobic (Post 7967275)
I'm sorry but if you need to ask the meaning of that you really should get a competent admin to manage this server for you.

I have solved that issue :). I've gotten php53 installed. Now I need to check if mysql is supported. My site is giving a 500 error involving mysql_connect. How can I Check for mysql support?

My goal is to learn how to manage most functions of the server myself. Please believe me when I say that I've thought about getting someone to manage the server a thousand times.

Thanks.

T-Junk 02-21-2012 10:47 AM

Quote:

Originally Posted by discxpress (Post 7967347)

My goal is to learn how to manage most functions of the server myself. Please believe me when I say that I've thought about getting someone to manage the server a thousand times.

I'm right there with you man!!

Once again, I run a debian based server, so I'm not great with Centos, but I've tinkered with it. Usually, you can "apt-get install" a pre-made package of some sort and your server will be for the most part set up.

You're going to want to do a search for a LAMP setup on Centos, such as this one here, that has instructions for integrating MySQL functionality.

If you have full access to this server, or if you're testing it on an old computer at your house, it might be worth loading a fresh Centos install and looking into a free control panel, such as Ispconfig 3 or Koloxo, as I think all of it can be done from that.

Quote:

I'm sorry but if you need to ask the meaning of that you really should get a competent admin to manage this server for you.
We're all noobs at some point (I still am :blush:). Go easy man!!

discxpress 02-21-2012 04:08 PM

Quote:

Originally Posted by foobic (Post 7967275)
I'm sorry but if you need to ask the meaning of that you really should get a competent admin to manage this server for you.

I was able to login as root. Then I had issues with php-common. So I did "yum erase php" to delete the currently installed package. Then I used "yum install php53".

Another issue I ran into was my sitewebsite was experiencing "500-Internal server error", because php53 doesn't come with php-mysql support. So to resolve that I ran "yum install php53-mysql".

Everything seems to be ok.

HTH

hiweb 02-25-2012 09:31 PM

check ur php libraries
check db versions
and .htaccess files

sam9 02-27-2012 10:09 PM

Quote:

Originally Posted by discxpress (Post 7965552)
I found the solution! zlib wasn't enabled. I need to upgrade php. Any easy way to do that?

Thanks

yum install zlib-devel
?
academic, I suppose as you have reinstalled php.
cheers!

discxpress 02-28-2012 12:09 AM

Quote:

Originally Posted by sam9 (Post 7980694)
yum install zlib-devel
?
academic, I suppose as you have reinstalled php.
cheers!

I guess that would be easier. I manually turned on zlib in php.ini. yes i uninstalled the old php package and then installed php53 as i explained in the post above.

Thanks


All times are GMT -4. The time now is 07:04 PM.

Powered by vBulletin
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2014 DragonByte Technologies Ltd.
© WebHostingTalk, 1998 - 2014. All Rights Reserved.