Page 1 of 1

PHP / MYSQL Site Migration - Variable Definition Problem?

Posted: Wed Aug 20, 2008 8:54 am
by DaveG40
Afternoon All - complete noob to the PHP community, having been working in a small development house as the Infrastructure Engineer, my job is mainly focussed around the infrastructure rather than the code within our products...

I recently have been working hard to migrate away from an old server of ours, moving all the .ASP sites over easily, I noticed the PHP sites were not going to be quite as simple!

After moving the sites and setting them up in the default web site as applications I tested the site with the following results shown below when clicking the URL provided:

http://62.204.35.115/rayran/index.php?sitemap_id=1

The version of PHP that is running the site is 4.3.1 and the live site can be seen here:

http://www.ray-ran.com

The new install on the updated server I am attempting to migrate to is 5.2.5.

One of my non-php experienced developers mentioned that it has something to do with the installation requiring or wanting variables to be specifically set, as good practice has led development in this direction.

Unfortunately we don't have any PHP expertise within the organisation, and any help anyone can give to get this working on the new updated infrastructure will certainly be much appreciated and save me no end of nightmares.

Thanks in Advance - any information i have missed that may help - just let me know,

Dave :crazy:

Re: PHP / MYSQL Site Migration - Variable Definition Problem?

Posted: Wed Aug 20, 2008 10:51 am
by DaveG40
If it helps I can get a copy of the info.php code and post that?

Sorry for my lack of experience, I'm just trying to help the dev staff out as they already have a manic workload!

Cheers

Dave

Re: PHP / MYSQL Site Migration - Variable Definition Problem?

Posted: Wed Aug 20, 2008 5:05 pm
by califdon
Your warning message suggests that the PHP script employs a template engine named Smarty, which I have never used, but I'm sure others here have. My first guess is that you are either missing the templates or they are located on a different path than what is specified in the new installation. This might help: http://www.smarty.net/ or perhaps someone who uses Smarty can help you.

Re: PHP / MYSQL Site Migration - Variable Definition Problem?

Posted: Thu Aug 21, 2008 12:08 am
by nowaydown1
Welcome to the forum! Judging by the first link you posted, I would guess you probably have several issues going on. The first hint is all that PHP code that is being output at the top of your page. I would guess that the short_open_tag directive is probably off on your new webhost.

You can check by making a new PHP file on your webhost (name it phpinfo.php or something) and paste the following contents into the file:

Code: Select all

 
<?php
phpinfo();
?>
 
Visit the new page in your web browser. That will show you the current PHP configuration. Look for a directive called 'short_open_tag'. If it's set to Off you'll either need to work with your programmers to get any short tags (<?) switched to the normal opening tag (<?php), or get in touch with your webhost and ask them how you go about enabling that directive.

The second problem looks to be permissions related. Maybe some directories need to be have a chmod done on them. It's sort of hard to tell based on the error messages there.

If you could provide us with a link for the phpinfo page that you make that would help us weed out some other configuration related issues.

Re: PHP / MYSQL Site Migration - Variable Definition Problem?

Posted: Thu Aug 21, 2008 7:37 am
by DaveG40
I've enabled the short open tag directive but there is not much change when testing the site:

http://62.204.35.115/rayran/

Here is a copy of the Info file as mentioned:

http://62.204.35.115//info.php

I'm just investigating the smarty template engine...hopefully that might uncover some more under the rocks!

I've been thinking about trying to import the original PHP version, copying the ini file, and then testing - would that have more benefit than trying to get this current version running the old site?

Thanks Again,

Dave