Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

SiteMonitor


Jack_mcs

Recommended Posts

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

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

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

Link to comment
Share on other sites

  • 3 weeks later...

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

Link to comment
Share on other sites

  • 1 month later...

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.

____________________________________________________________________

____________________________________________________________________

Link to comment
Share on other sites

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 by Harald Ponce de Leon
Edited by request

____________________________________________________________________

____________________________________________________________________

Link to comment
Share on other sites

Okay, cracked it :D

 

I simply didn't update this line correctly

 

/home/*mysite*/public_html/

____________________________________________________________________

____________________________________________________________________

Link to comment
Share on other sites

  • 1 month later...

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

Link to comment
Share on other sites

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

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

  • 3 weeks later...

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.

Link to comment
Share on other sites

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

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

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.

Link to comment
Share on other sites

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

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

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.

Link to comment
Share on other sites

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

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

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?

Link to comment
Share on other sites

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 by Jack_mcs

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

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.

Link to comment
Share on other sites

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

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

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.

Link to comment
Share on other sites

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

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...