Probably a dumb question for those of you who know

Need help with SmartFoxServer? You didn't find an answer in our documentation? Please, post your questions here!

Moderators: Lapo, Bax

capdetrons
Posts: 72
Joined: 24 Aug 2013, 09:15
Location: Barcelona
Contact:

Probably a dumb question for those of you who know

Postby capdetrons » 17 Sep 2013, 09:56

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.
User avatar
rjgtav
Posts: 2813
Joined: 19 Apr 2009, 11:31
Location: Lisbon, Portugal

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

Postby rjgtav » 17 Sep 2013, 23:52

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
Skills: SFS Pro, SFS2X, AS2.0/AS3.0, Java, HTML5/CSS3/JS, C#
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
capdetrons
Posts: 72
Joined: 24 Aug 2013, 09:15
Location: Barcelona
Contact:

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

Postby capdetrons » 18 Sep 2013, 12:30

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();
}
User avatar
rjgtav
Posts: 2813
Joined: 19 Apr 2009, 11:31
Location: Lisbon, Portugal

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

Postby rjgtav » 20 Sep 2013, 23:18

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
Skills: SFS Pro, SFS2X, AS2.0/AS3.0, Java, HTML5/CSS3/JS, C#
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.

Return to “SmartFoxServer 1.x Discussions and Help”

Who is online

Users browsing this forum: No registered users and 8 guests