serdas 17 Junior Poster

i dont understand what you meant

You should be able to start the daemon once and it runs and creates additional children as needed

but the reason i needed to do was sometimes red5 stop by itself (actually crashes)if it is not restarted few times a day so that's when i started to look into cron job

thank you

serdas 17 Junior Poster

this should be okay right?

31 02,06,10,14,18,22 * * * /mypath/non-red5stop.sh
31 02,06,10,14,18,22 * * * /sbin/service red5 start
31 02,06,10,14,18,22 * * * /mypath/non-red5start.sh
serdas 17 Junior Poster

I thank you very much, it worked perfectly
many many thanks

serdas 17 Junior Poster

it worked
Thank you than you thank you

serdas 17 Junior Poster

how would i start the service in cron?

serdas 17 Junior Poster

red5.sh should start red5 server
"Red5 Media Server 1.0 delivers a powerful video streaming and multi-user solution to the ©Adobe ©Flash Player and other exciting client technologies"
but somehow even without screen or nohup in the shell simply /home/ramesh/red5.sh this in the shell does not start red5

thank you for trying to help and not giving up yet

serdas 17 Junior Poster

hi again
somehow nohup does not work anymore for me so i found this

screen /home/ramesh/red5.sh

which works in shell but somehow it does not work with cron,i check some other program start-ups and cron does work for them but not for this one, if I run the shell manually it works but somehow not with the cron

any more ideas please?
also how can i check the if there is any error
thank you

serdas 17 Junior Poster

in my case, unfortunately in shell red5 start only with nohup sh red5.sh &
i put the shell where the red5 is, if i put the path in front of nohup sh red5.sh & it does not work
so i was hoping that cron would find the shell file and run that shell automatically the times i specified since that shell would work manually.

if i understand correct what you are saying shell also needs the full path

correct ?

serdas 17 Junior Poster

can please someone help me? please
thank you

serdas 17 Junior Poster

this what i did
i created a file called

test

in the same directory where my red5.sh is

then i added these line into it

/mypath/stop-all-services-file
nohup sh red5.sh &

saved the file and made it exetable

then in the putty
i wanted to try the file if it was doing what i needed to do
i did

> ./test

and it worked, first all service stop then red5 started

but when i try cron to run the "test" , it only stop the services and it did not start red5

is that what you were trying to say?

but then how come it worked when i try to run the "test" right on putty?

thank you

serdas 17 Junior Poster

hi
if i just use the below right on putty and after close it it works, but i cannot put it in a file and run it, it says no nohup. could you please help?

thank you

nohup sh red5.sh &

when i only add the aboive into a shell script and nothing else, it works but when i do /pattomyscript/nohup sh red5.sh &
then it does not work,
i am sorry if i am mixing this things because i have no idea about this

any help is appreciated
thank you

serdas 17 Junior Poster

hi
if i just use the below right on putty and after close it it works, but i cannot put it in a file and run it, it says no nohup. could you please help?

thank you

nohup sh red5.sh &
serdas 17 Junior Poster

i could only do with

nohup sh red5.sh &

and the simply close the putty and everything works

but how would i get that into shell script?

thank you

serdas 17 Junior Poster

Hello,
thank you very much for your response, that's what i needed to do exactly.
but i am running some problems. i don't know if you can help but i wanted to ask.
i have 3 programs, one of them run perfect but other to having problems.
the ones with problems the way i would manually run them is "sh red5.sh &" and after it runs i do ctrl c + d instead of "./red5.sh"
because when I use "./red5.sh" and close the putty then program stops but when i use the "sh red5.sh &" then ctrl c + d putty disappears itself and everything works nice.

any ideas please?

thank you

serdas 17 Junior Poster

hi,
i found below online

00 11,16 * * * /home/ramesh/bin/incremental-backup

i understand that it does

00 – 0th Minute (Top of the hour)
    11,16 – 11 AM and 4 PM
    * – Every day
    * – Every month
    * – Every day of the week

but what i need to do is
first i need to stop the servervices , then restart it and then go to few other locations and start couple of thing too how would i do it?

00 11,16 * * * /opt/somefolder1/./stop.sh
00 11,16 * * * /opt/somefolder1/./start.sh 
00 11,16 * * * /opt/somefolder2/./start.sh
00 11,16 * * * /opt/somefolder3/start.sh  

would that work "stop.sh" files stop the service "start.sh" start the service
can you please help?

serdas 17 Junior Poster

and this, any of it could help me?

function activateMember($username, $activation_code) {
		$ret = array("status"=>false, "err_msg"=>"", "msg"=>"");
		$q = sprintf("UPDATE member SET member_status_code='A' WHERE username='%s' AND activation_code='%s' AND member_status_code='P' LIMIT 1",
		mysql_real_escape_string($username),
		mysql_real_escape_string($activation_code)
		);
		//echo $q;
		$rs = $this->db->query($q);
		if ($rs) {
			$ret["status"] = true;
			$ret["msg"] = "<br><br>done. <br><a href=\"Login\">Login</a>";
		} else {
			$ret["err_msg"] = "problem!";
		}
		return $ret;
	}
serdas 17 Junior Poster

i understand but i could not find it, i found these too
i will look more

function setMemberStatusCode($val) {
		$this->member_status_code = $val;
	}

	/**
	 * Status Desc set
	 * @param String $val
	 * @return Void
	 */
	function setMemberStatusDesc($val) {
		$this->member_status_desc = $val;
	}
serdas 17 Junior Poster

this is what i get

Chain INPUT (policy ACCEPT)
target     prot opt source               destination

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
serdas 17 Junior Poster

i tried that before and i did % as well to accept it from any server but it did not work

and on client side i get this error

Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

$config["db_host"] = "204.11.1.111";
$config["db_user"] = "myuser";
$config["db_pass"] = "mypassword";
$config["db_name"] = "mydatabase";

i must be doing something wrong

i will try again
thank you

serdas 17 Junior Poster

what would this mean? this happens on client side when i put either as an ip
thank you Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

its your localhost. Either 127.0.0.1 or your computer IP address

serdas 17 Junior Poster

client side is on one host A and server side code is on host B and the running application is in the host B, it is a gaming server on host B.
i am having that issue when i am trying to run the gaming server which is in the same host.

does that answer your question?

Thank you

serdas 17 Junior Poster

hi,
i can connect thru ssh or phpMyAdmin
but when my website or the application is trying to access to my database i get the below error (part of the error)
i googled but i could not really understand how i need to fix this. (i dont know much about linux or coding)

i am assuming it is ignoring network connections but how to fix it though?

thank you java.sql.SQLException: Access denied for user 'myuser'@'204.11.1.111' (using password: YES)

serdas 17 Junior Poster

i can get into the database and the user thru ssh but not thru the myphpadmin

why could that be?

thank you

serdas 17 Junior Poster

ok but i think i might have some other issue first

thru ssh how can i find how many users and databases i have and the passwords other then the root?
i cannot seem to login anymore with the user i created maybe that's why i am getting below error?

JavaScriptException occured while calling pluginInit: org.apache.commons.dbcp.DbcpException: java.sql.SQLException: null,  message from server: "Host 'serveripadress' is not allowed to connect to this MySQL server"
serdas 17 Junior Poster

hi,
i finally learned how to install mysql and phpmyadmin
but now i need to find out the ip adress for the specific datebese

i can login IP/phpMyAdmin

but i need an ip adress instead of "IP/phpMyAdmin"
can you please help me?

$dbH = "ip";
$dbU = "user";
$dbP = "password";
$dbD = "database";

serdas 17 Junior Poster

Thank you very much not giving up on me
after "yum install glibc.i686 glibc-devel.i686"
i did what you originally told me how to install it and it worked

thank you very very much

~s.o.s~ commented: Good luck with your project :) +17
serdas 17 Junior Poster

would you know where i could get that from?

serdas 17 Junior Poster

i did not do the steps from the link yet but i did this

[root@44911 jvm]# yum install glibc.i586 glibc-devel.i586
Loaded plugins: fastestmirror, priorities
Loading mirror speeds from cached hostfile
 * base: mirrors.loosefoot.com
 * extras: mirrors.loosefoot.com
 * updates: centos.mirror.lstn.net
base                                                     | 3.7 kB     00:00
c5-testing                                               | 3.0 kB     00:00
extras                                                   | 3.5 kB     00:00
updates                                                  | 3.5 kB     00:00
updates/primary_db                                       | 120 kB     00:00
Setting up Install Process
No package glibc.i586 available.
No package glibc-devel.i586 available.
Error: Nothing to do
serdas 17 Junior Poster

this is what i got now

-rwxr-xr-x 1 root root 36387084 Dec 22 04:39 j2sdk-1_4_2_19-linux-i586.bin
y
Unpacking...
Checksumming...
0
0
Extracting...
./j2sdk-1_4_2_19-linux-i586.bin: ./install.sfx.1871: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory
Done.
serdas 17 Junior Poster

maybe is the issue below?

[root@44911 jvm]# uname -m
x86_64

serdas 17 Junior Poster

i tried 2 more different ones but same problem

serdas 17 Junior Poster

should i just type 'ls-ltr' when i am at /usr/lib/jvm/
would that be ok?
i tried few other version but similar problem


[root@44911 jvm]# ls -ltr j2sdk-1_4_2_18-linux-i586.bin
-rwxr-xr-x 1 root root 36379527 Dec 21 22:32 j2sdk-1_4_2_18-linux-i586.bin

serdas 17 Junior Poster

below is the final result i get, it does not seem to be working
what else could i do?

"Unpacking...
Checksumming...
1
The download file appears to be corrupted. Please refer
to the Troubleshooting section of the Installation
Instructions on the download page for more information.
Please do not attempt to install this archive file.
"

serdas 17 Junior Poster

what about centos5 on linux

serdas 17 Junior Poster

hi,
is it possible to have two different version of java on linux centos5
currently it is running 1.6.0 - which i would like to keep it that way sinse i have red5

but
i also need 1.4 for a gaming server ES
gaming server is asking to use at least and at most 1.4

"No suitable Java Virtual Machine could be found on your system.
The version of the JVM must be at least 1.4 and at most 1.4.
Please define INSTALL4J_JAVA_HOME to point to a suitable JVM."

can you please help me how could i do this if possible?

thank you

serdas 17 Junior Poster
function updateStatusViaJavascriptAPICalling(){
                var status  =   document.getElementById('status').value;
                    FB.api('/me/feed', 'post', { message: status }, function(response) {
                        if (!response || response.error) {
                             alert('Error occured');
                        } else {
                             alert('Status updated Successfully');
                        }
                   });
            }

hi this is what i understand
in the above code if there is an error it shows "Error occured" if not "Status updated Successfully"

in the below there is nothing set either error or no error nothing shows

there is a popup comes when user comes to the page
either they can publish or close the dialog box or/and click on skip

for them to be able to use this page i want them to publish, if they dont publish i dont want them to use the page
so if they dont publish i want the pop up to keep coming
or kill the process and say to use this page you need to publish or something like that

can that be done?

thank you

function streamPublish(name, description, hrefTitle, hrefLink, userPrompt){
                FB.ui(
                {
                    method: 'stream.publish',
                    message: '',
                    attachment: {
                        name: name,
                        caption: '',
                        description: (description),
                        href: hrefLink
                    },
                    action_links: [
                        { text: hrefTitle, href: hrefLink }
                    ],
                    user_prompt_message: userPrompt
                },
                function(response) {

                });
            }
serdas 17 Junior Poster

i have no idea about coding, could you please show me how "You could also just write a query there instead and throw that at mysql_query"

thank you

serdas 17 Junior Poster

Hello all! I'm pretty much clueless as to how to write code. I saw the following script from http://thinkdiff.net/facebook/users-demographic-data-from-facebook/ so I decided to play around with it but I just can't get it to work. I created the table shown and also a file bd.php where it has the info for database connection, I'm pretty much stuck. what do I write to insert that information into the database? I have no idea what the '$this' part is supposed to do. Thanks for any input!

<?php
    include_once "fbmain.php";
    $config['baseurl']  =   "http://thinkdiff.net/demo/newfbconnect1/demographicdata/index.php";
 
    //if user is logged in and session is valid.
    if ($fbme){
        //collect some data using legacy api
        $param  =   array(
            'method'     => 'users.getinfo',
            'uids'       => $fbme['id'],
            'fields'     => 'birthday_date, interests, locale, political, relationship_status, affiliations',
            'callback'   => ''
        );
 
        try{
            $info           =   $facebook->api($param);
        }
        catch(Exception $o){
            error_log("Legacy Api Calling Error!");
        }
        //using graph api
        //array data
        $workInfo       =   getWorkInfoAsString($fbme);
        $education      =   getEducationAsString($fbme);
 
        $moviesArr      =   $facebook->api("/me/movies");
        $musicArr       =   $facebook->api("/me/music");
        $televisionArr  =   $facebook->api("/me/television");
 
        //format some api data
        $movies         =   getArrayDataAsString($moviesArr['data']);
        $music          =   getArrayDataAsString($musicArr['data']);
        $television     =   getArrayDataAsString($televisionArr['data']);
 
        //data from legacy api
        $networks       =   '';
        if (!empty($info[0]['affiliations'])){
            $flag       =   true;
            foreach ($info[0]['affiliations'] as $item){
                if (!$flag)  $networks.= ' # ';
                $networks   .=  $item['name'];
                $flag   =   false;
            }
        }
 
        $now            =   date("Y-m-d G:i:s");
        $insData        =   array(
            'uid'                   =>  $fbme['id'],
            'first_name'            =>  $fbme['first_name'],
            'last_name'             =>  $fbme['last_name'],
            'email'                 =>  isset($fbme['email']) ? $fbme['email'] : '',
            'link'                  =>  $fbme['link'],
            'affiliations'          =>  $networks,
            'birthday'              =>  $info[0]['birthday_date'],
            'current_location'      =>  isset($fbme['location']['name']) ? $fbme['location']['name'] : '',
            'education_history'     =>  $education,
            'work' …
serdas 17 Junior Poster

how do i do that?

thank you

serdas 17 Junior Poster

thank you very very much
it works great
many thanks

serdas 17 Junior Poster

ok i will try that
i was not really asking for javascript but
i was trying to find out how to run the code with the page load similar way how the javascript does like onload finction
doesn't php needs some kind of triger for the fnction?
either onclick or onload?

Thank you for your help

serdas 17 Junior Poster

i will try it but i am trying to understand
don't i need something like this, so it will automaticly do the posting when users get to this page?

<body onload = "updating()" >
<script type="text/javascript" language="JavaScript">
function updating()
{ 
CODE
           
      }

</script><body onload = "updating()" >
<script type="text/javascript" language="JavaScript">
function updating(){


                 }
</script>

Thank you very much

serdas 17 Junior Poster

hi
will it run when the page is load?

thnank you

serdas 17 Junior Poster

hi, i am not a coder and trying to make this work

var body = 'Reading Connect JS documentation'; 
FB.api('/me/feed', 'post', { message: body }, function(response) { 
if (!response || response.error) { 
alert('Error occured'); 
} else { 
alert('Post ID: ' + response.id); 
} 
});

to make it work above code
I added this to make it work and it did

<body onload = "updating()" >
<script type="text/javascript" language="JavaScript">
function updating(){

I added the code here

                 }
</script>

so what would i do or add tho make the below code work when the page loads?
Thank you

$args = array( 
'message' => 'Hello from my App!', 
'link' => 'http://www.mysite.com/', 
'caption' => 'Visit Ma.....I.com For Facebook API Tutorials!'
); 
$post_id = $facebook->api("/me/feed", "post", $args);
serdas 17 Junior Poster

what is that mean?

thank you

serdas 17 Junior Poster

i just tried
FF works but IE still does not work

thank you

serdas 17 Junior Poster

isn't it same?

serdas 17 Junior Poster

this works perfectly wit FF but not with IE
<body onLoad="Calling();">

do you have any ideas why please?

Thank you

serdas 17 Junior Poster

that's why i am here

serdas 17 Junior Poster

unfortunatly i have no understanding of coding and i need to create some fake users on server and also create a stream for them with videos
would that be okay if i post my whole code here? maybe tat could be a good start?

thank you