Recent Posts

Pages: 1 ... 5 6 [7] 8
61
Java SMF Backup / Re: Login failed error
« Last post by viulian on March 09, 2007, 02:36:42 pm »
What the application does is the same as the browser will do.. I mean it just clicks and follows the redirects. What happens is that the redirect it was expecting did not arrive - and when I coded the program this happened when the password was bad (There was a redirect but to a page containing an error message such as cookie error, session error, or bad password - but NOT to the admin page).

This can also happen if the forum is integrated with other CMS and the SMF login flow is changed.. Do you have the forum running standalone on the domain - or is it integrated with other CMS/etc ?

I will update the code in the weekend so it would write down (to the logs) the .html page where it got redirect (and maybe containing some error which will actually tell what the forum thinks about the login).
In fact I'll rewrite the logging part - as it seems that its difficult to figure out what doesn't work when it should.

I'll keep the thread updated - thanks for the message :)
62
Java SMF Backup / Login failed error
« Last post by achapman on March 09, 2007, 12:44:38 pm »
I'm getting the following error in the error log:

09-Mar-2007 10:31:30 smfbackup.http.SMFConnection doJob
SEVERE: smfbackup.http.SMFException: Login failed (no redirect received to the forum's admin page).

Everything seems to be fine.  JavaSMFBackup connects (using a proxy connection) but it then fails with this error.
The SMF installation is running correctly without any obvious problems.

The SMFBackup.conf seems to contain a forum.0.password entry presumably controlling this login process.
63
Macromedia Flash XML Tutorial / Re: save.php source code not available for download.
« Last post by viulian on February 26, 2007, 10:45:17 pm »
Well :) "a" means append..
I don't think it will be a well formed XML what you get, because you will have something like:

Code: [Select]
<root>
  <value>
    10
  </value>
</root>
<root>
  <value>
    10
  </value>
</root>

Which is not a good XML as it doesn't have a root node - a single node that embeds everything else..

But if you can parse this structure which is not a well formed XML, then it's ok I guess.

For more reading: http://en.wikipedia.org/wiki/XML where it says:

Every XML document must have exactly one top-level root element (alternatively called the document element), so the following would also be a malformed XML document: it has two top-level thing elements, with no overall parent element encasing them both.

<?xml version="1.0" encoding="UTF-8"?>
<!-- WRONG! NOT WELL-FORMED XML! -->
<thing>Thing one</thing>
<thing>Thing two</thing>

64
its working very well... i figured something out.
if you just replace your "w" with "a" in fopen, it will append onto the xml file instead of overwriting.

Peace.
65
Macromedia Flash XML Tutorial / Re: save.php source code not available for download.
« Last post by viulian on February 26, 2007, 09:29:54 pm »
Thank you too :) and good luck!
66
Again thank you.  I think by the end of this I might know PHP.  Thank you for the tip about >10 users although it is for a website customer's testimonials - i doubt it will become very popular.  You have been great.
67
Macromedia Flash XML Tutorial / Re: save.php source code not available for download.
« Last post by viulian on February 25, 2007, 10:59:54 am »
Thanks :)

About appending nodes to an XML file instead of writing it down from zero... there are a couple of solutions.
If you run PHP 5, you can use http://php.net/simplexml to read the XML sent from flash [pick up the nodes that is] and then read update the XML on disk with the new nodes.

For older PHPs, you can search the web for something like PHP XML class, or PHP xml simple.. and pick up the one best suited for your goal.

But there is a problem: what would happen if two users would click 'Save' and then the web server will try to update the XML on disk with two changes simultaneously ? One of the changes will be lost when the script that runs last will update the file on disk.
If you want to save data on disk and plan on offering the flash to >10 users which might click Save at the same time, I guess it's better if you save each request separately. Then, when you want to access the data saved as XML, you will just read all the files and create a big XML and then use that..

---

About the redirect ...
I think it will try to do the redirect anyway (if you press on Save because it does a POST) so the choice would be to redirect to the same page containing the flash which lets the user enter the data (basically a reload).
Or maybe you can change the 'Save' button properties and make it not to be a submit button, but a simple button (which won't trigger a redirect but just make a background call to the save.php script - AJAX like behaviour, for example).

I don't have Macromedia anymore - did this tutorial a year ago or so, so that as far as I can help..
68
also... how difficult is it to make the new nodes add onto value.xml as apposed to wiping the xml file clean each time?
69
Thank you again, The HTTP_RAW_POST_DATA was what I needed.

I was wondering if you could tell me what can be done to the PHP code above to make is so the window does not pop open upon completion of the xml save.  I commented out:

if ($ok)
        header('Location:http://hex.ro/files/flashxml/Display.html');
else
        echo "writing=Error&";


And that made is so display.html does not open (I am only interested in the XML creation), however, a blank window still open and has the path and filename of the .php file.

Again, I thank you so much. You have been very helpful.
70
thank you.  This is exactly what I needed. You rock.
Pages: 1 ... 5 6 [7] 8