Newbe, move old site into xampp 1.7.2

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Re: Newbe, move old site into xampp 1.7.2

Postby Brabax » 23. November 2009 23:46

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
User avatar
Brabax
 
Posts: 30
Joined: 04. April 2003 18:37
Location: Espelkam*

Re: Newbe, move old site into xampp 1.7.2

Postby Izzy » 24. November 2009 00:09

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.
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Re: Newbe, move old site into xampp 1.7.2

Postby jackb123 » 24. November 2009 00:40

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!
jackb123
 
Posts: 13
Joined: 21. November 2009 21:06

Re: Newbe, move old site into xampp 1.7.2

Postby jackb123 » 24. November 2009 00:58

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" ) ?
jackb123
 
Posts: 13
Joined: 21. November 2009 21:06

Re: Newbe, move old site into xampp 1.7.2

Postby Izzy » 24. November 2009 01:10

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.
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Re: Newbe, move old site into xampp 1.7.2

Postby jackb123 » 26. November 2009 19:22

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");
?>
jackb123
 
Posts: 13
Joined: 21. November 2009 21:06

Re: Newbe, move old site into xampp 1.7.2

Postby Wiedmann » 26. November 2009 19:42

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?
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Re: Newbe, move old site into xampp 1.7.2

Postby jackb123 » 26. November 2009 20:18

ConText editor , it allows php, html, perl etc
jackb123
 
Posts: 13
Joined: 21. November 2009 21:06

Re: Newbe, move old site into xampp 1.7.2

Postby Wiedmann » 26. November 2009 20:21

What does "unreadable" exactly means?
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Re: Newbe, move old site into xampp 1.7.2

Postby jackb123 » 26. November 2009 20:37

I'm Sorry, jumbled code was from cgi-bin .php ,

I've only copied a couple just to show.

y
Mè‰M



fƒú

¸T
jackb123
 
Posts: 13
Joined: 21. November 2009 21:06

Re: Newbe, move old site into xampp 1.7.2

Postby Wiedmann » 26. November 2009 20:59

Well, maybe the file is corrupt, or an PHP encoder is in use.
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Re: Newbe, move old site into xampp 1.7.2

Postby jackb123 » 26. November 2009 21:09

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.
jackb123
 
Posts: 13
Joined: 21. November 2009 21:06

Re: Newbe, move old site into xampp 1.7.2

Postby Brabax » 29. November 2009 21:29

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
We've already reached tomorrow's yesterday but we're still far away from yesterday's tomorrow.
User avatar
Brabax
 
Posts: 30
Joined: 04. April 2003 18:37
Location: Espelkam*

Previous

Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 190 guests