Jack_mcs Posted July 9, 2007 Author Share Posted July 9, 2007 It looks like you didn't set up the confiugre file correctly since the error says, "Warning: opendir(/home/username/public_html)..." You need to change username to your username. Jack Quote 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...
dca Posted July 10, 2007 Share Posted July 10, 2007 Jack, Thanks. You are right. Initially I had made the right settings to the configuration, then I went back and reloaded the PHP files again from the contribution to have the English files insted of the Portuguese files that I initially setup....... Looks OK now. Many thanks again for your help and for this wonderful contrib. dca Quote Link to comment Share on other sites More sharing options...
tostrinj Posted July 31, 2007 Share Posted July 31, 2007 got this errors after installing: Warning: filesize() [function.filesize]: Stat failed for sitemonitor_log.txt (errno=2 - No such file or directory) in /home/xxx/public_html/admin/includes/functions/sitemonitor_functions.php on line 59 Warning: opendir() [function.opendir]: open_basedir restriction in effect. File(/home/username/public_html) is not within the allowed path(s): (/home/xxx:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/xxx/public_html/admin/includes/functions/sitemonitor_functions.php on line 71 Warning: opendir(/home/username/public_html) [function.opendir]: failed to open dir: Operation not permitted in /home/xxx/public_html/admin/includes/functions/sitemonitor_functions.php on line 71 Warning: readdir(): supplied argument is not a valid Directory resource in /home/xxx/public_html/admin/includes/functions/sitemonitor_functions.php on line 73 Reference file creation failed. where does this sitemonitor_log.txt has to be created? When I first went into Admin -> Site Monitor the message was that the file was already there. Any advise would be greatly appreciated Paul Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted August 1, 2007 Author Share Posted August 1, 2007 Try creating an empty file with that name in admin. Jack Quote 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...
tostrinj Posted August 1, 2007 Share Posted August 1, 2007 Hi Jack, no, that did not solve the issue Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted August 1, 2007 Author Share Posted August 1, 2007 Try reading through this thread. I seem to recall that problem and a fix being posted. Jack Quote 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...
UncleSteve Posted September 7, 2007 Share Posted September 7, 2007 Hi Guys. I have error messages :blink: First I had this set of errors Warning: filesize() [function.filesize]: Stat failed for sitemonitor_log.txt (errno=2 - No such file or directory) in /home/mysite/public_html/store/admin/includes/functions/sitemonitor_functions.php on line 59 Warning: opendir(/home/username/public_html) [function.opendir]: failed to open dir: No such file or directory in /home/mysite/public_html/store/admin/includes/functions/sitemonitor_functions.php on line 71 Warning: readdir(): supplied argument is not a valid Directory resource in /home/mysite/public_html/store/admin/includes/functions/sitemonitor_functions.php on line 73 Reference file creation failed. Reading through the above, followed the suggestion of adding an empty file called sitemonitor_log.txt Ran the SiteMonitor again, and got fresh set of error messages as below Warning: opendir(/home/username/public_html) [function.opendir]: failed to open dir: No such file or directory in /home/mysite/public_html/store/admin/includes/functions/sitemonitor_functions.php on line 71 Warning: readdir(): supplied argument is not a valid Directory resource in /home/mysite/public_html/store/admin/includes/functions/sitemonitor_functions.php on line 73 Reference file creation failed. But hey, I've reduced it to 2 errors, rather than the initial 3 :) So that's positive :) Can anyone give any further guidance please? Thanks in advance for any help. Quote ____________________________________________________________________ ____________________________________________________________________ Link to comment Share on other sites More sharing options...
UncleSteve Posted September 7, 2007 Share Posted September 7, 2007 (edited) I've just tried running sitemonitor.php and get a blank page apart from these error messages Warning: opendir(/home/username/public_html) [function.opendir]: failed to open dir: No such file or directory in /home/username/public_html/store/admin/includes/functions/sitemonitor_functions.php on line 71 Warning: readdir(): supplied argument is not a valid Directory resource in /home/username/public_html/store/admin/includes/functions/sitemonitor_functions.php on line 73 Reference file creation failed. Just thought I'd post the above as it may help someone help me. Edited September 10, 2007 by Harald Ponce de Leon Edited by request Quote ____________________________________________________________________ ____________________________________________________________________ Link to comment Share on other sites More sharing options...
UncleSteve Posted September 7, 2007 Share Posted September 7, 2007 Okay, cracked it :D I simply didn't update this line correctly /home/*mysite*/public_html/ Quote ____________________________________________________________________ ____________________________________________________________________ Link to comment Share on other sites More sharing options...
ReBeL Tech Posted October 15, 2007 Share Posted October 15, 2007 Hi Jack Thanks for this contribution. Works like a charm. Had a bit of troubles setting it up (shared server). Good thing for the forums. Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted October 15, 2007 Author Share Posted October 15, 2007 Thanks for the feedback. :) Jack Quote 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...
yuttorich Posted October 16, 2007 Share Posted October 16, 2007 when I set up step 6 it show error Warning: filesize(): Stat failed for sitemonitor_log.txt (errno=2 - No such file or directory) in /usr/local/psa/home/vhosts/mp4-ynltd.com/httpdocs/catalog/admin/includes/functions/sitemonitor_functions.php on line 59 Warning: opendir(): open_basedir restriction in effect. File(/home/username/public_html) is not within the allowed path(s): (/usr/local/psa/home/vhosts/mp4-ynltd.com/httpdocs:/tmp) in /usr/local/psa/home/vhosts/mp4-ynltd.com/httpdocs/catalog/admin/includes/functions/sitemonitor_functions.php on line 71 Warning: opendir(/home/username/public_html): failed to open dir: Operation not permitted in /usr/local/psa/home/vhosts/mp4-ynltd.com/httpdocs/catalog/admin/includes/functions/sitemonitor_functions.php on line 71 Warning: readdir(): supplied argument is not a valid Directory resource in /usr/local/psa/home/vhosts/mp4-ynltd.com/httpdocs/catalog/admin/includes/functions/sitemonitor_functions.php on line 73 Reference file creation failed. how to complate Quote รับทำเว็บไซต์ ทำเว็บ กล้องวงจรปิด กล้องติดรถยนต์ รับทำ seo ทำการตลาดออนไลน์... กีฟฟารีน Link to comment Share on other sites More sharing options...
Jack_mcs Posted October 16, 2007 Author Share Posted October 16, 2007 when I set up step 6 it show error Warning: filesize(): Stat failed for sitemonitor_log.txt (errno=2 - No such file or directory) in /usr/local/psa/home/vhosts/mp4-ynltd.com/httpdocs/catalog/admin/includes/functions/sitemonitor_functions.php on line 59 Warning: opendir(): open_basedir restriction in effect. File(/home/username/public_html) is not within the allowed path(s): (/usr/local/psa/home/vhosts/mp4-ynltd.com/httpdocs:/tmp) in /usr/local/psa/home/vhosts/mp4-ynltd.com/httpdocs/catalog/admin/includes/functions/sitemonitor_functions.php on line 71 Warning: opendir(/home/username/public_html): failed to open dir: Operation not permitted in /usr/local/psa/home/vhosts/mp4-ynltd.com/httpdocs/catalog/admin/includes/functions/sitemonitor_functions.php on line 71 Warning: readdir(): supplied argument is not a valid Directory resource in /usr/local/psa/home/vhosts/mp4-ynltd.com/httpdocs/catalog/admin/includes/functions/sitemonitor_functions.php on line 73 Reference file creation failed. how to complate Please read a few posts above yours for the solution. Jack Quote 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...
discxpress Posted November 2, 2007 Share Posted November 2, 2007 Hello, Can anyone help me with this? I uploaded the latest version of the contrib and get these error messages: Warning: file(/public_html/admin/sitemonitor_configure.php) [function.file]: failed to open stream: No such file or directory in /home/discxpre/public_html/admin/sitemonitor_configure_setup.php on line 160 Warning: chmod() [function.chmod]: No such file or directory in /home/discxpre/public_html/admin/includes/functions/sitemonitor_functions.php on line 211 Cannot change the mode of file (/public_html/admin/sitemonitor_configure.php) It seems to me that a path is incorrect. What code to look at? Many thanks. Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted November 2, 2007 Author Share Posted November 2, 2007 Some host won't allow the permissions to be set by code. Try changing the permissions on the sitemonitor_configure.php file to 666. Jack Quote 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...
discxpress Posted November 3, 2007 Share Posted November 3, 2007 Some host won't allow the permissions to be set by code. Try changing the permissions on the sitemonitor_configure.php file to 666. Jack Hi Jack, I tried chmoding the file to 0666, but get the same errors. Here's the line of code relating to the errors First error-Line 160 of sitemonitor_configure_setup: $fp = file($filenameConfigure); Second error-Line 211 of sitemonitor_functions: if (!chmod($filename, 0666)) { Everything seems to be working fine except those 2 errors. The admin section of sitemonitor works and I receive the email. To get off topic, just a bit. What you think about creating a logo for this mod just as hackersafe and comodo to display on our Osc stores. This mod serves the same purpose as their product and may be more effective. The only major drawback is the shop owner not checking emails everday. Or better yet, this mod sending a SMS text message. Just a couple of small ideas I needed to run by you before I forget them.. Thanks for your help. Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted November 3, 2007 Author Share Posted November 3, 2007 You could try removing this section of code. But if you do, be sure to test the mod to make sure it is working properly. if (!is_writable($filename)) { if (!chmod($filename, 0666)) { echo "Cannot change the mode of file ($filename)"; exit; } } As for the suggestions, both might be useful to some shops. Jack Quote 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...
discxpress Posted November 4, 2007 Share Posted November 4, 2007 You could try removing this section of code. But if you do, be sure to test the mod to make sure it is working properly. if (!is_writable($filename)) { if (!chmod($filename, 0666)) { echo "Cannot change the mode of file ($filename)"; exit; } } As for the suggestions, both might be useful to some shops. Jack Thanks for the prompt response. When I removed that section of code, I get these errors: Warning: file(/admin/sitemonitor_configure.php) [function.file]: failed to open stream: No such file or directory in /home/discxpre/public_html/admin/sitemonitor_configure_setup.php on line 160 Warning: fopen(/admin/sitemonitor_configure.php) [function.fopen]: failed to open stream: No such file or directory in /home/discxpre/public_html/admin/includes/functions/sitemonitor_functions.php on line 210 Warning: fwrite(): supplied argument is not a valid stream resource in /home/discxpre/public_html/admin/includes/functions/sitemonitor_functions.php on line 220 Cannot write to file (/admin/sitemonitor_configure.php) I believe it's something in the code that comes before the error codes. I'll replace the code for now until the situation is resolved. Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted November 4, 2007 Author Share Posted November 4, 2007 If the file is actually there, then your host is preventing the operation. You would need to ask them. Although they will probably ell you they don't support third-party applications. Jack Quote 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...
discxpress Posted November 6, 2007 Share Posted November 6, 2007 If the file is actually there, then your host is preventing the operation. You would need to ask them. Although they will probably ell you they don't support third-party applications. Jack Jack, I contacted the host. The only conclusion they come up with is to put in a support ticket. I temporarily disabled the password protection to see if that caused the confusion, no luck. What permissions do i need to set and on which files? Or do I need to correct the first problem first? Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted November 6, 2007 Author Share Posted November 6, 2007 (edited) It shouldn't require any special permissions though that would depend on the server. You need to be able to write to a file on the server and that is what's failing, as best as I can tell from here. Jack Edited November 6, 2007 by Jack_mcs Quote 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...
discxpress Posted November 7, 2007 Share Posted November 7, 2007 It shouldn't require any special permissions though that would depend on the server. You need to be able to write to a file on the server and that is what's failing, as best as I can tell from here. Jack Jack, Thanks for all your help. I've tried all the chmoding options that I know of 444, 666, 755, 777. Still no luck. I did change how the path is called in admin/includes/configure.php to get rid of double slashes in the file path. I may have disturbed something there that I should have not tampered with. What code should I look at in admin/includes/configure.php and possible changes to be made? Everything seems to be in working order. I've performed all tasks as prescribed in the instructions except the cron job. It told me that alterations that were made to certain files that I made changes to and to the google sitemap files (Googlebot may have crawled my site). So, it's working fine. I just hope those errors hasn't caused any vunerability to the scanned files. Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted November 7, 2007 Author Share Posted November 7, 2007 Try this. Make a copy of your sitemonitor_configure.php file and name it testfile.php. Then create a new file, copy the following into it and save it as test.php <?php require('includes/application_top.php'); require('includes/functions/sitemonitor_functions.php'); $filenameConfigure = DIR_FS_ADMIN . 'testfile.php'; $fp_out = array(); $fp_out[] = 'test'; WriteConfigureFile($filenameConfigure, $fp_out); ?> Upload both file into your admin section and go to http://yoursite.com/admin/test.php. If it fails, it is something on your server. Jack Quote 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...
discxpress Posted November 9, 2007 Share Posted November 9, 2007 Try this. Make a copy of your sitemonitor_configure.php file and name it testfile.php. Then create a new file, copy the following into it and save it as test.php<?php require('includes/application_top.php'); require('includes/functions/sitemonitor_functions.php'); $filenameConfigure = DIR_FS_ADMIN . 'testfile.php'; $fp_out = array(); $fp_out[] = 'test'; WriteConfigureFile($filenameConfigure, $fp_out); ?> Upload both file into your admin section and go to http://yoursite.com/admin/test.php. If it fails, it is something on your server. Jack Jack, After trying that, I only get this error: Warning: chmod() [function.chmod]: No such file or directory in /home/discxpre/public_html/admin/includes/functions/sitemonitor_functions.php on line 211 Cannot change the mode of file (/public_html//admin/testfile.php) Notice the double slashes after public_html in the above line. So how do I approach this problem with my host? Or what changes within admin/includes/configure.php should I make? Thanks. Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted November 9, 2007 Author Share Posted November 9, 2007 The double slash is most likely a configure file problem. It shouldn't make a difference but given that the code doesn't work, it has to be fixed first. If the script still fails, there is a problem on your server since all that does is tries to write a file to disk. Jack Quote 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...
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.