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 Link to comment https://forums.phpfreaks.com/topic/136480-my-php-file-works-locally-but-not-on-the-ssl-server-what-am-i-missing-please/ 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? Link to comment https://forums.phpfreaks.com/topic/136480-my-php-file-works-locally-but-not-on-the-ssl-server-what-am-i-missing-please/#findComment-712356 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 Link to comment https://forums.phpfreaks.com/topic/136480-my-php-file-works-locally-but-not-on-the-ssl-server-what-am-i-missing-please/#findComment-712359 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. Link to comment https://forums.phpfreaks.com/topic/136480-my-php-file-works-locally-but-not-on-the-ssl-server-what-am-i-missing-please/#findComment-712364 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 Link to comment https://forums.phpfreaks.com/topic/136480-my-php-file-works-locally-but-not-on-the-ssl-server-what-am-i-missing-please/#findComment-712366 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 Link to comment https://forums.phpfreaks.com/topic/136480-my-php-file-works-locally-but-not-on-the-ssl-server-what-am-i-missing-please/#findComment-712374 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? Link to comment https://forums.phpfreaks.com/topic/136480-my-php-file-works-locally-but-not-on-the-ssl-server-what-am-i-missing-please/#findComment-712376 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 Link to comment https://forums.phpfreaks.com/topic/136480-my-php-file-works-locally-but-not-on-the-ssl-server-what-am-i-missing-please/#findComment-712380 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 Link to comment https://forums.phpfreaks.com/topic/136480-my-php-file-works-locally-but-not-on-the-ssl-server-what-am-i-missing-please/#findComment-712386 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 Link to comment https://forums.phpfreaks.com/topic/136480-my-php-file-works-locally-but-not-on-the-ssl-server-what-am-i-missing-please/#findComment-712390 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... Link to comment https://forums.phpfreaks.com/topic/136480-my-php-file-works-locally-but-not-on-the-ssl-server-what-am-i-missing-please/#findComment-712394 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 ; Link to comment https://forums.phpfreaks.com/topic/136480-my-php-file-works-locally-but-not-on-the-ssl-server-what-am-i-missing-please/#findComment-712425 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> Link to comment https://forums.phpfreaks.com/topic/136480-my-php-file-works-locally-but-not-on-the-ssl-server-what-am-i-missing-please/#findComment-712449 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.