marnslee Posted December 11, 2008 Share Posted December 11, 2008 I have installed a php file that creates a .txt file on demand. this is working locally but not on the server, i am at my wits end to get it working an im sure it is something so simple.. this is on a secure server here are the settings used locally which work just fine: $myfile = "/myob/myob_sale" . date(m) .date(d) . date(y) . ".txt"; $DOCUMENT_ROOT = "/Users/mycomputer/Documents/betties/secureshop"; $salefile = $DOCUMENT_ROOT . $myfile ; here are the settings used remotely: $myfile = "/myob/myob_sale" . date(m) .date(d) . date(y) . ".txt"; $DOCUMENT_ROOT = "/home/betties/public_html/secureshop/"; $salefile = $DOCUMENT_ROOT . $myfile ; any help would be appreciated Quote Link to comment Share on other sites More sharing options...
Mr_J Posted December 11, 2008 Share Posted December 11, 2008 Could it be that you/user will need "access" to write to the ssl? Quote Link to comment Share on other sites More sharing options...
marnslee Posted December 11, 2008 Author Share Posted December 11, 2008 Could it be that you/user will need "access" to write to the ssl? does that not automatically apply to a root user?? if not what is needed to do to rectify this issue? thanks Quote Link to comment Share on other sites More sharing options...
Mr_J Posted December 11, 2008 Share Posted December 11, 2008 It looks like, because it is on ssl, that you have a sort of catalog where you sell something? If people buy, it writes the txt file and do whatever. If so, I would say you need some sort of a login wich give the user access to the server in-effect "PERMISSION" to write to the ssl. Quote Link to comment Share on other sites More sharing options...
redarrow Posted December 11, 2008 Share Posted December 11, 2008 Read this mate http://www.freewebmasterhelp.com/tutorials/ssi Quote Link to comment Share on other sites More sharing options...
marnslee Posted December 11, 2008 Author Share Posted December 11, 2008 It looks like, because it is on ssl, that you have a sort of catalog where you sell something? If people buy, it writes the txt file and do whatever. If so, I would say you need some sort of a login wich give the user access to the server in-effect "PERMISSION" to write to the ssl. yes that is right i have a catalog that sells, and it is used to write data to import into myob accounting. Im guessing that I would need to contact the host to set up the permission side of things? thanks Quote Link to comment Share on other sites More sharing options...
Mr_J Posted December 11, 2008 Share Posted December 11, 2008 It looks like, because it is on ssl, that you have a sort of catalog where you sell something? If people buy, it writes the txt file and do whatever. If so, I would say you need some sort of a login wich give the user access to the server in-effect "PERMISSION" to write to the ssl. yes that is right i have a catalog that sells, and it is used to write data to import into myob accounting. Im guessing that I would need to contact the host to set up the permission side of things? thanks Not sure, do you make use of a db? Quote Link to comment Share on other sites More sharing options...
marnslee Posted December 11, 2008 Author Share Posted December 11, 2008 Not sure, do you make use of a db? yes mysql 5.0.67, this is an oscommerce site Quote Link to comment Share on other sites More sharing options...
Mr_J Posted December 11, 2008 Share Posted December 11, 2008 I`m not that far yet, sorry mate. I can do a login and connect to the mysql server(non ssl) reading the data in each row of the selected db but not sure about a catalog. What if you make a config.php file with the correct user and password to write to the server and just include the file in your site. That's all I can think of. Hey what have you got to loose, like redarrow said - "quote: Looks like everyone wants to prove there programming skills..." http://www.phpfreaks.com/forums/index.php/topic,229485.0.html Quote Link to comment Share on other sites More sharing options...
marnslee Posted December 11, 2008 Author Share Posted December 11, 2008 I`m not that far yet, sorry mate. I can do a login and connect to the mysql server(non ssl) reading the data in each row of the selected db but not sure about a catalog. What if you make a config.php file with the correct user and password to write to the server and just include the file in your site. That's all I can think of. Hey what have you got to loose, like redarrow said - "quote: Looks like everyone wants to prove there programming skills..." http://www.phpfreaks.com/forums/index.php/topic,229485.0.html thanks for your help will try Quote Link to comment Share on other sites More sharing options...
Mr_J Posted December 11, 2008 Share Posted December 11, 2008 thanks for your help will try There`s lots of tutorials available on the net... Quote Link to comment Share on other sites More sharing options...
marnslee Posted December 11, 2008 Author Share Posted December 11, 2008 Hi anybody i have now added this to my file with no avail! does this seem right or should it be include and not require have tried both and neither work require("./includes/configure.php"); $myfile = "/myob/myob_sale" . date(m) .date(d) . date(y) . ".txt"; $DOCUMENT_ROOT = "/home/betties/public_html/secureshop/"; $salefile = $DOCUMENT_ROOT . $myfile ; Quote Link to comment Share on other sites More sharing options...
Mr_J Posted December 11, 2008 Share Posted December 11, 2008 the command is include "filename.php"; or you can do it in HTML in the <head> <SCRIPT LANGUAGE="JavaScript"> function mainpage(){ window.location="index.htm"; } </SCRIPT> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.