Post by tarang1906 » Sat Mar 17, 2012 11:39 pm

Hello,

I am using opencart 1.5.1.3 . I recently made few changes to improve site security as mentioned http://opencarthelp.com/a/?q=improve-opencart-security

I did following steps as per above guide:
1) Rename the admin directory
2) Rename the 'admin' user (PCI)
3) Restrict user permissions (PCI)
4) Strong passwords (PCI)

Also, I have done following changes
Deleted the /install/ directory (Before i had only renamed it)
changed the config.php file in both the root and /admin/ directories to 444 permission.

After this suddenly i stopped receiving mails from opencart site. Eg: whenmy customer clicks forgot my password after entering the Email, i get a list of errors as follows:

-------------------------------------------------------------------------------------------------------------------------------------------
Warning: fopen(D:\inetpub\vhosts\storeadda.com\httpdocs\logs/error.txt) [function.fopen]: failed to open stream: No such file or directory in D:\inetpub\vhosts\storeadda.com\httpdocs\system\library\log.php on line 12

Warning: fwrite(): supplied argument is not a valid stream resource in D:\inetpub\vhosts\storeadda.com\httpdocs\system\library\log.php on line 14

Warning: fclose(): supplied argument is not a valid stream resource in D:\inetpub\vhosts\storeadda.com\httpdocs\system\library\log.php on line 16

Warning: fopen(D:\inetpub\vhosts\storeadda.com\httpdocs\logs/error.txt) [function.fopen]: failed to open stream: No such file or directory in D:\inetpub\vhosts\storeadda.com\httpdocs\system\library\log.php on line 12

Warning: fwrite(): supplied argument is not a valid stream resource in D:\inetpub\vhosts\storeadda.com\httpdocs\system\library\log.php on line 14

Warning: fclose(): supplied argument is not a valid stream resource in D:\inetpub\vhosts\storeadda.com\httpdocs\system\library\log.php on line 16

Warning: fopen(D:\inetpub\vhosts\storeadda.com\httpdocs\logs/error.txt) [function.fopen]: failed to open stream: No such file or directory in D:\inetpub\vhosts\storeadda.com\httpdocs\system\library\log.php on line 12

Warning: fwrite(): supplied argument is not a valid stream resource in D:\inetpub\vhosts\storeadda.com\httpdocs\system\library\log.php on line 14

Warning: fclose(): supplied argument is not a valid stream resource in D:\inetpub\vhosts\storeadda.com\httpdocs\system\library\log.php on line 16

----------------------------------------------------------------------------------------------------------------------------------------

Also, If a new customer registers after filling details when he submits the form, he gets the similar list of errors.
But after refreshing page these errors go away and customer is shown as logged in! Also it is reflected in Admin->customers.

For testing, i submited an enquiry from contact us form, i got same list of errors after hitting submit button.

When i click forgot password in Admin panal, after entering email add, it gives confirmation of mail sent, but mail is never sent!! :'( I tried many times.

I have set an alert on customer registration, but i have stopped receiving that mail too.

Although after refresh the errors go away. But mail is never sent OR received!

What has happened to my site??? where did i do wrong?? ??? Somebody plzzzz help me!


I hope someone has an answer for this. Its very urgent for me to fix it as my orders have completely stopped!! :(

Website link: http://www.storeadda.com

Newbie

Posts

Joined
Wed Mar 07, 2012 9:41 pm

Post by Daniel » Sun Mar 18, 2012 12:22 pm

you need to setup the correct permissions on some of the directories.

re-read the install instructions on which directories.

OpenCart®
Project Owner & Developer.


User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm

Post by rph » Sun Mar 18, 2012 12:28 pm

OpenCart is having trouble trying to write to the error log. Make sure the directory /system/logs exists and is writable. Once you have that fixed you'll have some other issues to deal with.

-Ryan


rph
Expert Member

Posts

Joined
Fri Jan 08, 2010 5:05 am
Location - Lincoln, Nebraska

Post by tarang1906 » Mon Mar 19, 2012 3:40 pm

Thank you Daniel & rph for replying! I checked the file permissions as per install instructions and they are all correct.

System/logs dir exists and is writable. I have also changed config.php back to writable. But still getting same errors!! :'(

Warning: fopen(D:\inetpub\vhosts\storeadda.com\httpdocs\logs/error.txt) [function.fopen]: failed to open stream: No such file or directory in D:\inetpub\vhosts\storeadda.com\httpdocs\system\library\log.php on line 12

Warning: fwrite(): supplied argument is not a valid stream resource in D:\inetpub\vhosts\storeadda.com\httpdocs\system\library\log.php on line 14

Warning: fclose(): supplied argument is not a valid stream resource in D:\inetpub\vhosts\storeadda.com\httpdocs\system\library\log.php on line 16

Warning: fopen(D:\inetpub\vhosts\storeadda.com\httpdocs\logs/error.txt) [function.fopen]: failed to open stream: No such file or directory in D:\inetpub\vhosts\storeadda.com\httpdocs\system\library\log.php on line 12

Warning: fwrite(): supplied argument is not a valid stream resource in D:\inetpub\vhosts\storeadda.com\httpdocs\system\library\log.php on line 14

Warning: fclose(): supplied argument is not a valid stream resource in D:\inetpub\vhosts\storeadda.com\httpdocs\system\library\log.php on line 16

Warning: fopen(D:\inetpub\vhosts\storeadda.com\httpdocs\logs/error.txt) [function.fopen]: failed to open stream: No such file or directory in D:\inetpub\vhosts\storeadda.com\httpdocs\system\library\log.php on line 12

Warning: fwrite(): supplied argument is not a valid stream resource in D:\inetpub\vhosts\storeadda.com\httpdocs\system\library\log.php on line 14

Warning: fclose(): supplied argument is not a valid stream resource in D:\inetpub\vhosts\storeadda.com\httpdocs\system\library\log.php on line 16

Warning: fopen(D:\inetpub\vhosts\storeadda.com\httpdocs\logs/error.txt) [function.fopen]: failed to open stream: No such file or directory in D:\inetpub\vhosts\storeadda.com\httpdocs\system\library\log.php on line 12

Warning: fwrite(): supplied argument is not a valid stream resource in D:\inetpub\vhosts\storeadda.com\httpdocs\system\library\log.php on line 14

Warning: fclose(): supplied argument is not a valid stream resource in D:\inetpub\vhosts\storeadda.com\httpdocs\system\library\log.php on line 16

and on refresh these errors go away and customer is shown as logged in also is added in admin panel customer list successfully! But why those errors are coming i have no idea!

Please point me in the right direction...

Newbie

Posts

Joined
Wed Mar 07, 2012 9:41 pm

Post by tarang1906 » Mon Mar 19, 2012 4:07 pm

Also now i am able to receive order email. But my customer is not getting mail after placing an order. Similarly contact form submit is triggering similar errors mentioned in the above post.

Rph, you said i need to fix other things.. which are they?? My cart is live long back and already have many products loaded. I need to fix this mail issue. One thing i am sure of is the errors are all triggered whenever a form is submitted and a mail has to be sent to the customer id and/or to the store admin email id.

i have searched forum but did not come across this situation. Waiting for your response...

Newbie

Posts

Joined
Wed Mar 07, 2012 9:41 pm

Post by rph » Mon Mar 19, 2012 6:25 pm

OpenCart is trying to write an error to the error log but you messed something up with the directory path/permissions so you're getting this error.

-Ryan


rph
Expert Member

Posts

Joined
Fri Jan 08, 2010 5:05 am
Location - Lincoln, Nebraska

Post by tarang1906 » Mon Mar 19, 2012 11:14 pm

Hi Rph,
Thank you for replying.. I have checked all file permissions and below is their list:
‰ /store/image
‰ /store/image/cache
‰ /store/image/data
‰ /store/system/cache
‰ /store/system/logs
‰ /store/download
‰ /store/confg.php
‰ /store/admin/confg.php

All permissions are set correctly & dir paths are all correct. This is miserable. Evrything else except sending a mail via contact us & user registration (All related to mail) are not working and throwing errors as mentioned above.
Orders are placed correctly but i am not getting order received mail like before neither my customer.

Just unable to figure out the issue...

Newbie

Posts

Joined
Wed Mar 07, 2012 9:41 pm

Re:


Post by philiprambo » Tue Mar 20, 2012 5:03 pm

A bug is an error which generates obstacles in the proper functioning of programe.

Women Leather chaps, Leather Pants For Women


Newbie

Posts

Joined
Tue Mar 20, 2012 4:25 pm
Location - USA

Post by tarang1906 » Tue Mar 20, 2012 7:00 pm

Seriously no solution??

Newbie

Posts

Joined
Wed Mar 07, 2012 9:41 pm

Post by Qphoria » Wed Mar 21, 2012 12:04 am

No solution because the problem was answered.

You have folder write issues.. these are not related to email.
You simply set the folder permissions to 775 or 777 and that's it. It is the only solution.

For email issues, that is a bit trickier. Try using just "MAIL" in the system->Settings->Mail tab
that should work for 99% of people.

Try the contact form, try the newsletter send, try placing an order.
check your spam
contact your host and see if they see anything wrong with email on the server

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by richdtt » Wed Mar 21, 2012 9:36 am

I seem to be having that email issue too. I followed the instructions per the forum and other online resources and use the default Mail option. I've used the same php mail function for other php scripts and they work just fine on the same server. I checked with my webhost (Bluehost.com) and the email function is running fine according to them. I left the mail parameters blank as well as filled it in with various emails. I've tried sending the emails to yahoo, gmail, and work accounts and other email accounts. I tried sending it through the Sales>>Mail option, and it says my message is successfully sent, however I'm not getting any emails.

I created fake orders, as well as turned on the "New Order Alert Mail:" and "New Account Alert Mail:" settings, but it didn't work. I've checked my spam folder for on all the accounts, and still no use. I followed the other instructions Ryan left on the posts, and still nothing seems to work for me.

It tried using an SMTP approach too, since I have a google apps account, but that didn't work either.

Newbie

Posts

Joined
Wed Mar 21, 2012 9:26 am

Post by tarang1906 » Wed Mar 21, 2012 2:55 pm

Thank you for responding Qphoria,

As i have mentioned in my previous post i have set the file & folder permissions of all the required files to 777 & also tried with 775.

I have already said before that i have tried sending mail via contact us form. I have tried using newsletter. I have tried placing an order.

Order is placed but no order confirmation mail is sent to customer & the store owner. And contact us form throws the above errors after hitting submit.

I have tried everything what you just said and it is not "host" issue, as everything was working fine before and only on changing the file permissions things got messed up. The main issue is i have reverted all changes and still the errors wont go.

That is why requested someone to help. I think that is the reason these forums are for. May be i was mistaken.

Anyway thanks again for responding.

Newbie

Posts

Joined
Wed Mar 07, 2012 9:41 pm

Post by tarang1906 » Wed Mar 21, 2012 2:57 pm

Qphoria wrote:
For email issues, that is a bit trickier. Try using just "MAIL" in the system->Settings->Mail tab
that should work for 99% of people.

Try the contact form, try the newsletter send, try placing an order.
check your spam
contact your host and see if they see anything wrong with email on the server
Also, i am using and have been using only "MAIL" in the system->Settings->Mail tab. And it was working for me until now.
But suddenly it has stopped.

Newbie

Posts

Joined
Wed Mar 07, 2012 9:41 pm

Post by tarang1906 » Thu Mar 29, 2012 9:31 pm

Hi richdtt,

Did you find any solution to the below issue?

I have done a CLEAN install of Opencart 1.5.1.3 on a demo site for testing this issue, checked mail settings & file permissions, checked with Host. No issues atal. But still not able to receive any kind of mails from website. Tried everything, contact form, fake order, newsletter everything. But no mails!!! ???

What could be the issue? can someone please throw some light on this situation?
richdtt wrote:I seem to be having that email issue too. I followed the instructions per the forum and other online resources and use the default Mail option. I've used the same php mail function for other php scripts and they work just fine on the same server. I checked with my webhost (Bluehost.com) and the email function is running fine according to them. I left the mail parameters blank as well as filled it in with various emails. I've tried sending the emails to yahoo, gmail, and work accounts and other email accounts. I tried sending it through the Sales>>Mail option, and it says my message is successfully sent, however I'm not getting any emails.

I created fake orders, as well as turned on the "New Order Alert Mail:" and "New Account Alert Mail:" settings, but it didn't work. I've checked my spam folder for on all the accounts, and still no use. I followed the other instructions Ryan left on the posts, and still nothing seems to work for me.

It tried using an SMTP approach too, since I have a google apps account, but that didn't work either.

Newbie

Posts

Joined
Wed Mar 07, 2012 9:41 pm

Post by Daniel » Fri Mar 30, 2012 12:31 am

try this:

Protocol: SMTP
SMTP Host: smtp.gmail.com
SMTP Username:sales@domain.com
SMTP Password: (withheld)
SMTP Port: 465
SMTP Timeout: 5

or

Instead of SMTP Host: smtp.gmail.com
You should use SMTP Host : ssl://smtp.gmail.com


if it works with gmail its your host that is the problem.

OpenCart®
Project Owner & Developer.


User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm

Post by tarang1906 » Fri Mar 30, 2012 11:05 pm

Hello Daniel,
Daniel wrote:try this:

Protocol: SMTP
SMTP Host: smtp.gmail.com
SMTP Username:sales@domain.com
SMTP Password: (withheld)
SMTP Port: 465
SMTP Timeout: 5

or

Instead of SMTP Host: smtp.gmail.com
You should use SMTP Host : ssl://smtp.gmail.com


if it works with gmail its your host that is the problem.
Thank you so soooo much!!! You rock! mail is working perfectly fine now!! :)

Thanks alot.

Tarang

Newbie

Posts

Joined
Wed Mar 07, 2012 9:41 pm
Who is online

Users browsing this forum: No registered users and 8 guests