dingdong1 Posted February 22, 2013 Share Posted February 22, 2013 Hi, i need some help with directory in php, everything works fine when i use wamp with localhost, but when i ftp my files to a webhost i get this error: Warning: include_once(/admin/root.php) [function.include-once]: failed to open stream: No such file or directory in /home/username/public_html/index.php on line 2 I think that I miss something in my config.php file, but Im not really sure how I can fix this since Im very new to PHP, I only need some basic PHP atm to make stuff easier for me. admin/config.php http://pastebin.com/hZWLJJ3D index.php http://pastebin.com/VFRKGNGX Appreciate all the help i get! Link to comment Share on other sites More sharing options...
Jack_mcs Posted February 23, 2013 Share Posted February 23, 2013 Are you sure you have an oscommerce shop because those are not standard oscommerce files. Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
♥kymation Posted February 23, 2013 Share Posted February 23, 2013 Possibly you have copied one or more WAMP files to your server account. Check that the files that you copied are all part of osCommerce. Regards Jim See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
rpdesign Posted February 23, 2013 Share Posted February 23, 2013 You have to go into catalog/includes/configure.php and catalog/admin/includes/configure.php and change settings or an easier way is to backup your database on your home computer and then uninstall / re-install OsCommerce onto your server. When you upload your files in ftp do not upload the above files! These will be recreated for you on your server. If you have modified Os Commerce extensively go with the first option, just make sure you have write access Always backup your files! You will be glad you didMy add-ons :SSPP Seperate Shipping Per Product v2.5| SupportGift vouchers for SPPC 4.22 v2.1 | Support |Catalog Infobox v1.0 | Sorry no support for Catalog Infobox |HTML Mail v2.0 | Support |Upcoming Add ons:Addon Manager | Separate Pricing Per Product Qty |Coupon Populate | EZ-PDF Catalog Link to comment Share on other sites More sharing options...
rpdesign Posted February 23, 2013 Share Posted February 23, 2013 ok looking at your pastebin codes, you must have installed a template. If this is the case, good luck! Always backup your files! You will be glad you didMy add-ons :SSPP Seperate Shipping Per Product v2.5| SupportGift vouchers for SPPC 4.22 v2.1 | Support |Catalog Infobox v1.0 | Sorry no support for Catalog Infobox |HTML Mail v2.0 | Support |Upcoming Add ons:Addon Manager | Separate Pricing Per Product Qty |Coupon Populate | EZ-PDF Catalog Link to comment Share on other sites More sharing options...
MrPhil Posted February 23, 2013 Share Posted February 23, 2013 Is this custom code? You are running on the real server with the site in /home/username/public_html/ (site root), but your file is being requested from /admin/. Was your osC installation on your PC really in the root directory /? Anyway, most likely your configure.php file is picking up the wrong DIR_FS_DOCUMENT_ROOT. You may have to hard code it to the right directory path (/home/username/public_html) if it doesn't pick up the correct path automatically. By the way whether you're in osC 2.2 or 2.3, your Admin directory should be renamed to something unguessable, and the entry in configure.php changed to match. This is for security. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.