Jump to content


Photo

Newbie - for real! Just getting started!


  • Please log in to reply
29 replies to this topic

#21 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 05 July 2006 - 06:31 PM

Your online server has a setting called register_globals turned on however you local server, has this setting turned off, which it should be. By all mean you can enable this setting by opening your php.ini and finding the following line:
register_globals = Off
Change off to On save the php.ini and restart Apache. You shoud now be able to run your script however keep in mind any other scripts you may want to use on your local server may not function correctly due to register_globals being turned on.

But what I recommend you to do instead is to open up notepad and type the following:
php_flag register_globals On
Now got to File > Save As... in the file name field delete what is in there and type in .htaccess exactly

Save this file in your ghani_website_test folder (C:\program files\xampp\htdocs\ghani_website_test)

Now goto http://localhost/gha...bsite_test/shop

You should no be able to run the php script.

#22 ummzee

ummzee
  • Members
  • PipPip
  • Member
  • 17 posts

Posted 05 July 2006 - 10:55 PM

I did what you said and the file saved as .htaccess.txt however, the same error occured.

I then went to the php.ini file and there is no reference in the file to "register..." all after seaching for "*register*"

I don't know if this is import but  if I do a test for: http://localhost/gha...site_test/shop/

I do get:

Index of /ghani_website_test
Name                    Last modified      Size
Description--------------------------------------------------------------------------------
Parent Directory                            - 
shop/                  08-Dec-2005 13:17    - 
--------------------------------------------------------------------------------
Apache/2.2.2 (Win32) DAV/2 mod_ssl/2.2.2 OpenSSL/0.9.8b mod_autoindex_color PHP/5.1.4 Server at localhost Port 80

it is when I click on "shop/" that I get the error message



#23 moberemk

moberemk
  • Members
  • PipPipPip
  • Advanced Member
  • 695 posts

Posted 06 July 2006 - 02:12 AM

NO! The entire filename is .htaccess. The htaccess is the file extension, but there is no file name. No .txt, just the .htaccess. Nothing else. That's an Apache server config file.
Disclaimer: No matter how harsh I may be, I'm always IMO only.

#24 ummzee

ummzee
  • Members
  • PipPip
  • Member
  • 17 posts

Posted 06 July 2006 - 03:31 AM

I can tell progress is being made.

I resaved the file.

Now I get:

Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'ODBC'@'localhost' (using password: NO) in C:\Program Files\xampp\htdocs\ghani_website_test\shop\includes\functions\database.php on line 19
Unable to connect to database server!

I am including a screen shot of the file tree.

When I purchased the template and set it up on my IP's server, I had to delete some of the files after using them to set the site up. I am think I don't need some of the directories here or do I need to set something else up?


[attachment deleted by admin]

#25 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 06 July 2006 - 09:33 AM

By looks of things the script you are using needs to be installed, by running a script which setups the database and defualt configuration settings. As at the mement the script is trying ot login in as ODBC into your mysql server which is incorrect as the user ODBC doesnt exist.

Does the script come with a read me file or some form of documentation. Have a read of the documentation for more info.

#26 ummzee

ummzee
  • Members
  • PipPip
  • Member
  • 17 posts

Posted 07 July 2006 - 03:49 PM

I installed and configured OsCommerce and now I can now see the page both when I test the site using:

http://localhost/gha...site_test/shop/ and in Dreamweaver

I am getting the following error messages at the top of the page:

Warning: session_start() [function.session-start]: open(/tmp\sess_d90cc53ca423e042d8abcece28371db2, O_RDWR) failed: No such file or directory (2) in C:\Program Files\xampp\htdocs\ghani_website_test\shop\includes\functions\sessions.php on line 67

Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at C:\Program Files\xampp\htdocs\ghani_website_test\shop\includes\functions\sessions.php:67) in C:\Program Files\xampp\htdocs\ghani_website_test\shop\includes\functions\sessions.php on line 67

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at C:\Program Files\xampp\htdocs\ghani_website_test\shop\includes\functions\sessions.php:67) in C:\Program Files\xampp\htdocs\ghani_website_test\shop\includes\functions\sessions.php on line 67

  Warning: The sessions directory does not exist: /tmp. Sessions will not work until this directory is created.





Files\xampp\htdocs\ghani_website_test\shop\includes\functions\sessions.php, line 67 is below:

Line 66  function tep_session_start() {
Line 67      return session_start();
Line 68  }



“  Warning: The sessions directory does not exist: /tmp. Sessions will not work until this directory is created.”

I think this is asking for a “tmp” directory. I created one in the:

C:\Program Files\xampp\htdocs\ghani_website_test\tmp
and
C:\Program Files\xampp\htdocs\ghani_website_test\shop\tmp

This must not be where the program is looking for the file because the message is not going away.


#27 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 07 July 2006 - 04:58 PM

Okay. I see whats happening. Goto http://localhost/gha...test/shop/admin

That should take you to the admin control panel. Now ignore any errors currently on the page. Click the configuration link
Now look on the left and in the grey menu click the sessions link.

Now press the Edit button on the right. It shoud load up the Session Directory setting. Change\tmp to:
C:\Program Files\xampp\htdocs\ghani_website_test\tmp

Make sure you have a folder called tmp in the ghani_website_test folder

Now click the update button. When you press the update button you'll most probably get a page full of errors. Now press the refresh button in your browser. It should refresh the page all errors should now disappear. If you get any more errors then post them here and I'll have a quick look.

#28 ummzee

ummzee
  • Members
  • PipPip
  • Member
  • 17 posts

Posted 08 July 2006 - 12:31 AM



This is what I get in the window when I type in: http://localhost/gha...est/shop/admin/

Warning: session_start() [function.session-start]: open(/tmp\sess_4b2307384c6e000194e93ce6093909d8, O_RDWR) failed: No such file or directory (2) in C:\Program Files\xampp\htdocs\ghani_website_test\shop\admin\includes\functions\sessions.php on line 67

Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at C:\Program Files\xampp\htdocs\ghani_website_test\shop\admin\includes\functions\sessions.php:67) in C:\Program Files\xampp\htdocs\ghani_website_test\shop\admin\includes\functions\sessions.php on line 67

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at C:\Program Files\xampp\htdocs\ghani_website_test\shop\admin\includes\functions\sessions.php:67) in C:\Program Files\xampp\htdocs\ghani_website_test\shop\admin\includes\functions\sessions.php on line 67

Fatal error: Cannot re-assign $this in C:\Program Files\xampp\htdocs\ghani_website_test\shop\admin\includes\classes\upload.php on line 31

Warning: Unknown: open(/tmp\sess_4b2307384c6e000194e93ce6093909d8, O_RDWR) failed: No such file or directory (2) in Unknown on line 0

Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp) in Unknown on line 0


#29 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 08 July 2006 - 11:42 AM

Do you just get a page full of errors when you goto that page? Do you not get anything else? If you dont get anythink dispayed then place the following code:
<?php

echo '<h1>Database Update Wizard</h1>';

if(!isset($_GET['act']) || $_GET['act'] != 'go')
{
    echo 'This wizard will attempt to change a few osCommerce settings stored in the database<br /><br />';
    echo '<a href="?act=go">Click to continue</a>';
}
else
{
    echo 'The wizard will now attempt to change a few database settings';

    include './includes/configure.php';

    $conn = @mysql_connect(DB_SERVER, DB_SERVER_USERNAME, DB_SERVER_PASSWORD) or die("Unable to connect to db: " . mysql_error());
    mysql_select_db(DB_DATABASE) or die("Unable to select db: " . mysql_error());

    $sess_folder = "C:/Program Files/xampp/htdocs/ghani_website_test/tmp";

    $sql = "UPDATE configuration SET configuration_value='$sess_folder' WHERE configuration_key='SESSION_WRITE_DIRECTORY'";
    $result = mysql_query($sql, $conn) or die("Unable to perform query: <i>{$sql}</i><br />" . mysql_error());

    echo "<h2>Update completed!</h2>";
    echo 'Session will be writtent to the following location: <code>' . $sess_folder . '</code><br />';
    echo 'Please now go to the <a href="./admin/">Admin section</a>. The session write dir has now been set';
}

?>
In a new file called oscUpdate.php. Save this file in your shop folder (:\Program Files\xampp\htdocs\ghani_website_test\shop). Now goto the following url:
http://localhost/gha...p/oscUpdate.php

Run the script. It shoud update your oscommerce datatbase settings. You should now get no errors. But make sure you have a folder called tmp in the ghani_website_test folder.

#30 ummzee

ummzee
  • Members
  • PipPip
  • Member
  • 17 posts

Posted 08 July 2006 - 12:12 PM

I see everything now without the error messages after following your instructions. I don't know if this message is import. I received it in the window after the update was complete however, it does not seem to be affecting the viewing of the site:

Fatal error: Cannot re-assign $this in C:\Program Files\xampp\htdocs\ghani_website_test\shop\admin\includes\classes\upload.php on line 31


When I go to dreamweaver, I also see the pages however when I click within the index.php page, it response like it is a protected area and dims. I opened another page and a "live data error" window came up.
Asking for more help takes me to: http://www.adobe.com...cfm?id=tn_14465
which was no help at all since no other error messages appeared.

After checking around a little more, I see there are areas of certain pages that are editable. I have to run out now bout check all the directories completely before reporting back. I am use to seeing the all templates in one area. I will check the admin files when I come back.

I want you to know you have been a great help and I apprciate it much, I have leaned a lot in the pass few days rather painlessly. I have look all around but UI have not found an area for contributions, is there one?

Any futher pointers you can give for editing will also be appreciated.

Ummzee





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users