View previous topic :: View next topic |
Author |
Message |
andym
Joined: 16 Aug 2004 Posts: 6
|
Posted: Mon Aug 16, 2004 9:57 am Post subject: MMS messages report sending failed to my Peffisaur site |
|
|
Now I'm confused...
I just sent an MMS successfully using a Nokia Observation Camera (based on the 76xx) to the Peffis site and everything worked - but not when I send them to my own site. What is REALLY strange, is that my Peffisaur site works great from my Ericsson K700i, but not with the Nokia.
Has anyone else any experience setting up Peffissaur on a hosted site? What requirements are there? What changes do I need to make in the config to put peffissaur in a subdirectory?
I have changed all the mysql settings, since I only have 1 mysql database, and it works fine.
Ideas please? |
|
Back to top |
|
 |
Peffis Site Admin
Joined: 09 Sep 2003 Posts: 324 Location: Sweden
|
Posted: Mon Aug 16, 2004 1:28 pm Post subject: |
|
|
Hmm...that sounds a bit strange. You say you sent a photo to peffis.com and it worked but not with your site? Are you sure you just didn't make a mistake when switching the MMS url? Because it's the MMSC interface you are using, right? Where you set the site as MMSC? Not the email interface?
I have put up Peffisaur on several sites, both on dedicated servers and on hosted sites. Currently it requires SAFE_MODE=off in PHP and register_globals=on in PHP version > 4.1.
For the email interface to work you will need to be able to direct all incoming emails to one account and be able to process emails using procmail or some other script handler there (and pipe everything to recmail.pl). It's a bit of a hazzle with the database name sometimes as on some hosting systems you cannot select a database on your own and it's not so easy to change in the version of Peffisaur that is released. I mean, not hard, but requires several edits unfortunately.
There are no changes needed in config.php to make it work in a subdirectory. What is needed to change is the .htaccess file. |
|
Back to top |
|
 |
andym
Joined: 16 Aug 2004 Posts: 6
|
Posted: Mon Aug 16, 2004 8:38 pm Post subject: |
|
|
Hi Stefan,
yes, I'm using MMS. I changed the rewrite rules in the .htaccess file to the full path for my hosted directory and success! The site received an image!
Went to have a cup of coffee, and tried again - exactly the same settings - and it failed. Something very strange going on.
My K700i and T610 have a 100% success rate - it's just the Nokia that's having problems.
At the moment I'm completely stumped. |
|
Back to top |
|
 |
Peffis Site Admin
Joined: 09 Sep 2003 Posts: 324 Location: Sweden
|
Posted: Tue Aug 17, 2004 8:00 am Post subject: |
|
|
And it's the same wap gw you are using for all phones? Same operator? It's definitely some sort of communication problem but it's hard to tell what really. |
|
Back to top |
|
 |
andym
Joined: 16 Aug 2004 Posts: 6
|
Posted: Tue Aug 17, 2004 8:05 am Post subject: |
|
|
Yes, same GW and operator for all phones, which is confusing |
|
Back to top |
|
 |
Peffis Site Admin
Joined: 09 Sep 2003 Posts: 324 Location: Sweden
|
Posted: Tue Aug 17, 2004 8:12 am Post subject: |
|
|
Do you see anything in the apache log files when the Nokia posts? Would you be able to snoop using Ethereal or similar to see if any traffic at all arrives? What has always been the case is that when MMS Diary/Peffisaur receives a POST it will handle it and store the message. Sometimes the return of status fails because of communication problems but at least the message arrives. It sounds to me like the post never even arrives at your server any longer for the Nokia. |
|
Back to top |
|
 |
andym
Joined: 16 Aug 2004 Posts: 6
|
Posted: Tue Aug 17, 2004 8:23 am Post subject: |
|
|
Hi Stefan,
this is what I get in the error logs... in apache
file does not exist: /home/peffisaur/public_html/s/9/43c67765 so it seems that the server receives the post, but can't find the directory now.
I've been fiddling around so much trying find the problem that I've lost the K700i and T610 now! |
|
Back to top |
|
 |
Peffis Site Admin
Joined: 09 Sep 2003 Posts: 324 Location: Sweden
|
Posted: Tue Aug 17, 2004 9:06 am Post subject: |
|
|
So you have a URL in your phone that looks something like http://<address>/~peffisaur/s/9/43c67765 ? Well if you get a 404 error there (file not exist) there is something wrong with the .htaccess file there. It should map the /s/9/... part to send.php in that directory.
So you will need to fiddle with the .htaccess some more I think. You don't have to test with the phone all the time though. You can simply access the http://<address>/~peffisaur/s/9/43c67765 URL that you have in your phone in a browser by simply typing it into the address field. The response you should get should not be a 404 error. For some bizarre reason the response you should get in your browser, when you have your .htaccess working correctly, is "Thanks for the fish!".
It's strange though...with that error I doubt you have ever had it working with the other phones if they accessed the same URL. But, as you say, perhaps you have just fiddled a bit too much with it. |
|
Back to top |
|
 |
Guest
|
Posted: Tue Aug 17, 2004 11:30 am Post subject: |
|
|
Stefan,
it's definately a problem with the .htaccess file. When a new user signs up, they get the info in an email as follows.....
Your personal details
---------------------
Your nickname: user
Your password to the web page: password
Your MMScam page location: http://domain.com/~user
and the url comes up as http://domain.com/s/10/8ec3a244
Peffisaur isn't installed in the root of the site - it's in /peffisaur directory. In that directory is the .htaccess file as follows:
#
# Turn on RewriteEngine
#
RewriteEngine On
# let the server know that we were reached via /peffisaur and not
# via the physical path prefix /home/stefan/../peffisaur
# If you are installing Peffisaur in the root on your webserver
# then leave it as /. If you say for instance install it in
# /peffis_is_the_coolest then write that path here instead and also
# in the rules below (put /peffis_is_the_coolest/send.php and
# /peffis_is_the_coolest/home.php there
RewriteBase /peffisaur
# now the rewriting rule
# This rule makes it possible to access send.php as
# http://<server>/<uid>/<pwd>
#
RewriteRule ^s/([^/]+)/([^/]+) /home/boathop/public_html/peffisaur/send.php [E=uid:$1,E=pwd:$2]
RewriteRule ^~(.*) /home/boathop/public_html/peffisaur/home.php?user=$1
the .htaccess file at the root of the site is blank, so when I enter the url that came through on the email, I get a 404 error. If I manually insert peffisaur I get "thanks for the fish".
So far so good - but neither url in the phones work, which is confusing me.
Any ideas?
Much appreciated if you can help me. |
|
Back to top |
|
 |
Peffis Site Admin
Joined: 09 Sep 2003 Posts: 324 Location: Sweden
|
Posted: Tue Aug 17, 2004 11:46 am Post subject: |
|
|
Ok, try this:
As it says in the comment in .htaccess:
"# then leave it as /. If you say for instance install it in
# /peffis_is_the_coolest then write that path here instead and also
# in the rules below (put /peffis_is_the_coolest/send.php and
# /peffis_is_the_coolest/home.php there"
So...if you have installed it in /peffisaur as you say you have you should first put
Code: |
RewriteBase /peffisaur
|
...as you have already done BUT ALSO put
Code: | RewriteRule ^s/([^/]+)/([^/]+) /peffisaur/send.php [E=uid:$1,E=pwd:$2]
RewriteRule ^~(.*) /peffisaur/home.php?user=$1
|
Try this and tell me if it's working.
Then you also need to manually change the message that the user receives when he signs up because that is not changed dynamically to the subdir you install it in. So go in and change it so that it adds the /peffisaur subdirectory to the welcome email in the URL the users add in their phones. As I understand it you should hand out URL:s such as http://domain.com/peffisaur/s/10/8ec3a244 (so as you can see, you will need to edit the sendWelcomeMsg function in createuser.php so that it fits your installation. But first try if it works with the .htaccess changes above.
You could also tell me where you have the site installed and I can check for myself. |
|
Back to top |
|
 |
Guest
|
Posted: Tue Aug 17, 2004 1:28 pm Post subject: |
|
|
Stefan,
great! That worked - I have edited the various files so users can now get the correct information.
Strangely, I got an error when using your code:
RewriteRule: bad flag delimiters
with the code you posted above...
Code: | RewriteRule ^s/([^/]+)/([^/]+) /peffisaur/send.php [E=uid:$1,E=pwd:$2]
RewriteRule ^~(.*) /peffisaur/home.php?user=$1 |
but when I added a few extra white spaces as in below, it worked fine. No idea why.
Code: |
RewriteRule ^s/([^/]+)/([^/]+) /peffisaur/send.php [E=uid:$1,E=pwd:$2]
RewriteRule ^~(.*) /peffisaur/home.php?user=$1
|
My next task is to work out the email thingy!
Many thanks for your help and many thanks for your great app! |
|
Back to top |
|
 |
Peffis Site Admin
Joined: 09 Sep 2003 Posts: 324 Location: Sweden
|
Posted: Tue Aug 17, 2004 1:41 pm Post subject: |
|
|
Don't know about the delimeter thing. Sometimes strange things happen when you copy and paste from a web page. Good that it works now anyway...
As for getting the email to work. Have a look in the thread here: http://hellkvist.org/forum/viewtopic.php?t=96
(the latest version of recmail.pl is posted there)
Good luck! |
|
Back to top |
|
 |
|