Page 2 of 2

Re: Newbe, move old site into xampp 1.7.2

PostPosted: 23. November 2009 23:46
by Brabax
jackb123 wrote:<?
include './config/config.php';
include './libraries/output.php';
include './libraries/siteDB.php';
include './libraries/session.php';

$dbConn = new siteDB;

print_header("Home");
?>

Looks like old PHP, try to change "<?" to "<?php" and maybe do it for the included files as well.
I guess the dirs "config" and "libraries" are existing, correct?

<?
print_footer();

?>

Same thing as above.


Brabax

Re: Newbe, move old site into xampp 1.7.2

PostPosted: 24. November 2009 00:09
by Izzy
You are using the short_open_tag which has been turned Off in 1.7.2 version.

Either use the correct tag <?php or turn On the short_open_tag in \xampp\php\php.ini file - but first read the comment in the php.ini file.

Save the php.ini file after editing and then restart Apache.

Re: Newbe, move old site into xampp 1.7.2

PostPosted: 24. November 2009 00:40
by jackb123
I would like to use correct tags on everything, which is why I under took this project.
I figure if I can get my xampp working, with my db, I should be able to correct all this old code to current standards.
then up date the site itself. Thanks

Changed all: <? that i could find (see below ) to <?php

www
Admin\all end in .php: blank, cat_items, categories, header, index,
item_edit, login, logout, membershome, sidenav
cgi-bin\ php,php.org both files when opened, shows coding ( of aprox. 1470kb) like this v j èö, etc
config\ config.php
images\ as stated, images
libraries\ all end in .php: output, session,sitedb,

Thank you!

Re: Newbe, move old site into xampp 1.7.2

PostPosted: 24. November 2009 00:58
by jackb123
Well it did not help. unless I missed something, somewhere. I think I got them all.
( site built in 2002 or 03, so I'm sure a lot, is out of date, ie; all of html code all uppercase.

include 'libraries/siteDB.php' ;
( this is calling up the data base, where does it normally point to mysql DB "name" ) ?

Re: Newbe, move old site into xampp 1.7.2

PostPosted: 24. November 2009 01:10
by Izzy
Did you create your database, database user and database user password etc. to be able to connect to your db?

Are there any \xampp\apache\logs\error.log file errors?

You must try and include as much information as possible about your issues or we can only guess - we can't see your PC screen nor know what you are doing or what you have done unless you tell us in great detail.

Re: Newbe, move old site into xampp 1.7.2

PostPosted: 26. November 2009 19:22
by jackb123
Yes, config and libraries folders are there.
I have changed all that I can find to <?php. as shown below to any files with <? in their sub folders.

However, the only file I was unable to change or even view,
was under config/config.php';

When I open this in context editor as .php
It just shows a bunch of code that is unreadable to me.
( On my web site, I recall that it stated something about unable to edit binary.
I wonder if this is the root of my problem, and if so how do I convert so I can edit.


<?php
include './config/config.php';
include './libraries/output.php';
include './libraries/siteDB.php';
include './libraries/session.php';

$dbConn = new siteDB;

print_header("Home");
?>

Re: Newbe, move old site into xampp 1.7.2

PostPosted: 26. November 2009 19:42
by Wiedmann
When I open this in context editor as .php
It just shows a bunch of code that is unreadable to me.

Which editor are you using?

Re: Newbe, move old site into xampp 1.7.2

PostPosted: 26. November 2009 20:18
by jackb123
ConText editor , it allows php, html, perl etc

Re: Newbe, move old site into xampp 1.7.2

PostPosted: 26. November 2009 20:21
by Wiedmann
What does "unreadable" exactly means?

Re: Newbe, move old site into xampp 1.7.2

PostPosted: 26. November 2009 20:37
by jackb123
I'm Sorry, jumbled code was from cgi-bin .php ,

I've only copied a couple just to show.

y
Mè‰M



fƒú

¸T

Re: Newbe, move old site into xampp 1.7.2

PostPosted: 26. November 2009 20:59
by Wiedmann
Well, maybe the file is corrupt, or an PHP encoder is in use.

Re: Newbe, move old site into xampp 1.7.2

PostPosted: 26. November 2009 21:09
by jackb123
As mentioned, site created in 03 or 04, person who made the site is long gone.
Don't know if he encoded or if that was an option way back then.
Which is why I've loaded all files and mysql db into xampp so I can start working on
retooling and updating the site, off line so I don't trash the existing site.

Re: Newbe, move old site into xampp 1.7.2

PostPosted: 29. November 2009 21:29
by Brabax
You can't edit a binary File.
Binary Files are files like *.exe, that have been precompiled.
You can run some of those files, when they are compiled for use in a cgi environment.

How about your database connection? I can't seem to find an answer in your posts to Izzy's question if you have created the databases + database user?
It's important that the database either matches your site-configuration or that the site-config matches your db configuration.

But since it seems to be such an immense script and because of the few information you (are able to) provide it is really hard to tell, what is going on on you server.
Do you maybe have anyone near by who has any knowledge in this area and could maby help you directly?

Regards

Brabax