Page 1 of 1

Probably a dumb question for those of you who know

Posted: 17 Sep 2013, 09:56
by capdetrons
Good morning,

I have been running smartfox server 1.6.9 and just now I am beginning to try to run some of the examples. Specifically the custom login example. My ISP doesn't offer php, so I thought I'd ask whether the example could be run if my computer handles it instead. I have installed xampp so my PC can handle php. I have been trying but if this could possibly work, I don't know where I need to have my php script. In smartfox or xampps web server folder.

Re: Probably a dumb question for those of you who know

Posted: 17 Sep 2013, 23:52
by rjgtav
Hi there,

SmartFoxServer Pro already comes with a webserver, called Jetty, which you could use for storing your PHP files. The only issue is that the Jetty that comes with SFS is a very light version of it, and so you'll have to install first PHP in there.
XAMPP, on the other hand, already comes with PHP installed on the Apache server, which is another webserver.

If you want to run your PHP file on your Apache server, you have to put the file inside the webserver's root folder.
For more information you can check on Google for basic guides regarding setting up Apache server, using the XAMPP package.

Hope this helps

Re: Probably a dumb question for those of you who know

Posted: 18 Sep 2013, 12:30
by capdetrons
Thanks, rjtav,

I got it running placing my sfslogin.php file in the Xampp's folder. I had to change the port in the swf because my apache php server listens on a different one. It works, but I am quite confused. Does that mean I can test; run it from my website? I thought the website was the place where the php was to be handled. I would like to understand this as to add myself as a moderator in the chat swf. I am following the custom login example and will eventually change the name and password in the login php file, and keep experimenting with it, but could a moderator be added in the client swf without using extensions or other serverside scripts?

Say:

Code: Select all

if(user.getId == whatever){
user.setAsModerator();
}

Re: Probably a dumb question for those of you who know

Posted: 20 Sep 2013, 23:18
by rjgtav
Hi,
It works, but I am quite confused. Does that mean I can test; run it from my website? I thought the website was the place where the php was to be handled.

Well, your website is actually a WebServer, like Apache which comes with XAMPP, so yeah, you can host your php files on either your Apache server of your computer or on a Webhosting's site. Just keep in mind that the server has to have PHP installed (which I believe practically all of them now have that), otherwise it won't work.
but could a moderator be added in the client swf without using extensions or other serverside scripts?

There are only two ways to set an User as a Moderator: by configuring it in your Zone on the config.xml or by using the user.setAsModerator(true) command at the server-side. These server-side commands can only be called by an extension, which is only acessible by the developer.

Hope this helps