PDA

View Full Version : windows problem


11sven
February 4th, 2004, 10:55 PM
tyring to install on my home computer windows xp, apache server, php4 and mysql. i get these errors

store.php
Warning: Failed opening 'localhost/squirrelcart/cart.php' for inclusion (include_path='.;C:\IBserver\php\includes;C:\IBser ver\php\pear') in c:\ibserver\www\squirrelcart\config.php on line 36

Fatal error: Call to undefined function: stylesheet() in c:\ibserver\www\store.php on line 7

home.php
Fatal error: Call to undefined function: show_best_sellers() in c:\ibserver\www\home.php on line 7
while searching i found a couple of problems, i can't chmod on windows system. i can't change the read only attribute on folders in windows only files. some people say it shouldn't make a difference, windows just ignores it.

i want to set up squirrelcart on my computer so i can modify it before uploading to a webhost server. am i just wasting my time?

11sven
February 6th, 2004, 05:02 PM
sorry, i got rid of that one by reading another post. now i don't recieve any errors when opening store.php, i get a blank page. i created a simple php script to see if i could pull data out of the squirrelcart database using the same username, password and database name as in my config.php and it worked.

this is the source code of my store.php page when i try to open it:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=windows-1252"></HEAD>
<BODY onunload=""></BODY></HTML>
it doesn't match the html code in the file when i open store.php in a text editor.
thank you for any help you can give.

11sven
February 6th, 2004, 09:23 PM
i tried taking out all of the php tags in store.php and running the html. the title tag generated a title in my browser. when i put the first line of php back in
<? include "c:/ibserver/www/squirrelcart/config.php";?>
the page stops working again.
this is my config.php settings...
$site_www_root = "c:/ibserver/www";
$site_isp_root = "c:/ibserver/www";
$site_secure_root = "c:/ibserver/www";
$cart_page = "/store.php";
$img_path = "/images";
$sql_host = "localhost";
$sql_username = "username";
$sql_password = "password";
$db = "squirrelcart";
include "$site_isp_root/squirrelcart/cart.php";

i ran php command print document root and "c:/ibserver/www" is my path root.

Jamie
February 14th, 2004, 01:18 PM
You probably have a problem somewhere, which is causing the script to halt, and not output an error. This could happen if your error reporting is set too low, and can also happen regardless if you have a problem connecting to mysql. The best way to troubleshoot something like this is via a print statement. Try this:

We know that the problem occurs somewhere after including the config.php file. There is not much in that file, so the problem is most likely in cart.php which gets included at the bottom of config.php.

1. remark out the include line at the bottom of config.php:
// include "$site_isp_root/squirrelcart/cart.php";

2. Load the page....if you no longer get a blank page, then we know the problem is in cart.php.

3. Open up cart.php, preferrably in an editor that will show you line numbers. Put this line at the top:
print "blah blah blah<br>";

4. Save, and load the page. If you see the text from the print statement, then you know the file is getting included OK.

5. Move that line to the bottom of the cart.php file, and load the page again. Most likely, if the problem is in cart.php, then you will not see the text in your browser.

6. Now, move that print statement about half way up the file, save, and load the page in your browser. If you see the print statement output in your browser, then you know the script got that far. In this case, remember what line you where at, and then move it half way between there and the end of the file. If you did not see the print output, then the script broke above it. Remember what line number you are at, and move the statement half way between that line, and the top of the file. In shouldn't take you more than 10 moves or so to find the exact line that is causing the problem.

Thanks,
Jamie