Programming :: Scenario For Call Shell Function From Mysql?

Apr 18, 2011

I am trying a scenario for calling a shell script when ever a trigger is called. Can some one guide me how to achieve this scenario. Also it should passes the value from the table to the shell script. Can some one explain me along with the example.

View 2 Replies


ADVERTISEMENT

Programming :: CGI Shell Scripting : Possible To Call Function From Other Script?

Mar 15, 2011

I got two cgi shell scripting files. Is it possible when i am in file 1, to call a function from file 2?

View 2 Replies View Related

Debian :: Connect To My Mysql Database Using Php - Fatal Error - Call To Undefined Function Mysql_connect()".

Jul 31, 2010

I am trying to connect to my mysql database using php but I am getting the error "Fatal error: Call to undefined function mysql_connect()".

I checked phpinfo() and there is no reference to MySQL. I believe this means that my install of PHP doesn't support MySQL. Do I need to uninstall and reinstall with a version of PHP with MySQL support? If so how should I do this and how do I get a version of PHP that supports MySQL?

View 2 Replies View Related

Programming :: Sendto Function Call In UDP Client Program ?

Jan 5, 2010

The following is the UDP client code I am using.

Code:

Even the server is down, sendto function is not returning -1.

Instead, it is returning the length of the message as if it is success.

View 1 Replies View Related

Red Hat / Fedora :: PHP Error "Call To Undefined Function Mysql_connect()" When Connecting To MySQL

Mar 22, 2011

I am getting this error when I try to connect to my MySQL database from a PHP page. "Fatal error: Call to undefined function mysql_connect() in /usr/local/htdocs/test.php on line 11" I have found instances on the Internet where other people had the same problem but from everything I've read, none of it appears to do anything for me.

I have read that I need the "extension=mysql.so" in my php.ini file and to uncomment it but it's not in there and I don't even have the "mysql.so" file. Many people have said to install the MySQL "devel" package, which I have also done and it is still not adding the file. I have also tried running the PHP ./configure again with the "--with-mysql". After all of these I still can't seem to get any further than I was when I found out I had a problem.

View 4 Replies View Related

Server :: Connect PHP With Mysql - Fatal Error "Call To Undefined Function Mysql_connect()"

Jun 9, 2010

I am trying to connect PHP with Mysql, but coming across the below error: PHP Fatal error: Call to undefined function mysql_connect() in /var/www/html/index.php on line 2

View 1 Replies View Related

Debian Programming :: C++ Function Call For Manual SSD-TRIM Commands

Jul 25, 2015

I'm looking for a way to launch "TRIM" commands to a SSD drive myself, from a c++ code I'm going to write, for flash erasing an SSD drive (and not to wait for others things that "should do it automatically in some circumstances if this or this, this and this have been enabled and [..]" but will never tell me if it worked or not

I know there is thousands of complicated ways to test and check if it worked, and also software that needs money to do so, that's why I just want to call myself the TRIM functions and read the return value (like true or false) in order to know if it worked !

Where I can find the c++ call that could permit me to do so ? I heard about the GLibC that gives a way to access every user space function related to Linux Kernel (poll, select and others) as standard c++ functions, I suppose that, if there is a way, it will be on the GLibC but how to find it ?

View 3 Replies View Related

Programming :: PHP Fatal Error - Call To Undefined Function Mysql_connect()

Nov 5, 2010

Am getting errors about "mysql_connect()" for the following code:

Have compiled PHP with MySQL support using the following:

Thought PHP 5.3 has a built-in replacement called mysqlnd, and there's no need to install "php-mysql" RPM.

However, according to the following site this is still required: [url]

Give me an idea whether I really have to install php-mysql RPM in order to use mysql_connect() for PHP?

View 4 Replies View Related

Programming :: Python - Call Function From The Command Line After Compile The Program?

Dec 28, 2010

If i have a python file with a function call_me(a,b),how can I call this function from the command line ,after i compile the program?

View 5 Replies View Related

Programming :: Memory Allocate In Function And Call It By Reference For Array Structure?

Jul 2, 2011

I am writing a function(in C language in Linux) to initialize an array of a structure from a mysql table by calling a function by reference but I have a problem with call this function by reference . this is my program:PHP Code:

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

[code]...

View 4 Replies View Related

General :: Fail Over Scenario In MySQL Replication?

Sep 12, 2010

i had configured a MySQl Replication Server with 2 DB Servers.Now we are planning to implement a failover Scenario.If Master fails The slave should act as a Master and we have a addition server.It will be going to act as slve.i had mentioned the points below..

Replication
(Master Server)----->----(Slave Server)-----------(Additional Server)
DBS 1 DBS 2 DBS 3

1.Replication is made between Master (DBS 1) and Slave (DBS 2) (successfully done)

2.If Master (DBS 1) failed Slave (DBS 2) should act as a Master and Additional Server (DBS 3) needs to be Slave

3.Whenever Orginal Master (DBS 1) became online the current Master ie ..Slave (DBS 2) should go back to Slave position and all lost data will be replicated to Master DBS 1.

View 5 Replies View Related

Programming :: Call Shell Script In Perl Pm

Sep 4, 2010

i used ldap for authentication.now i have a perl script that users use it for login(contact.pl),then this script calls a shell script(ip.sh) for create iptables chain.

when i call that into contact.pl ,it just prints: usr/sbin/iptables but ip chains didn't change.what is problem? whenever run ip.sh in bash it works correctly

View 10 Replies View Related

Programming :: QNX Checksum Call In Cgi Shell Scripting Not Working?

Mar 11, 2011

I have a QNX machine with a slinger webserver running on it. With a cgi script i'm trying to do the QNX cksum call and compare it's output value with a fixed output. When i execute the script at the command line it works perfect, but when execute this script by by the webserver in my browser it doesn't work. Here's my code:

#!/bin/sh
FILE="/home/checkfile"
ORIGCHECK="1712885500"

[code].....

Could it be possible that i'm not allowed to do the cksum call in combination with the slinger webserver?

View 4 Replies View Related

Programming :: How To Use A Function Inside A Shell

Apr 28, 2011

I am very new to shell script, and my requirement is --

1. open the apache access log, use "cut" and "grep" to find the numbers.
2.put the result in a file
3.then compare the same result with day before result
4. send the result via e-mail.

so how can i do that , using some functions..

View 1 Replies View Related

Programming :: Write A Function In A Shell Script?

Sep 22, 2010

I need a help regarding writing a function in a shell, what exactly a function does!!

View 3 Replies View Related

Programming :: Creating Script For Mysql Connection From Shell?

Jul 8, 2011

I'm creating script to connect to mysql and perform function. I'm into process in querying mysql from shell. Here is the content of a sample script:

Code:
#!/bin/bash
USER=scripter
PASS=test123
DB=test_scripts

View 2 Replies View Related

Programming :: Shell Script To Get Count Of Records In A Mysql Table?

Oct 23, 2010

I'm using MYTHTV with AT&T's U-Verse system. AT&T apparently turns off the set-top box if the box doesn't receive any commands after some number of hours. When this happens the box takes so long to turn on that it doesn't process the lirc IR channel change command. I've rewritten my channel changer to add a lockfile, and added a cron entry to kick off an entry to just "ping" the set-top box once an hour. But, OK, I'd like to play the bandwidth saving game and not do this if there isn't anything in the "record" table.

So, how would I write a script that will check the number of rows in the "record" table in the "mythconverg" database and exit if there are zero rows? I'm afraid I don't know how to even start this. Here is my "keepalive.sh" script that does the pinging:

Code:
#!/bin/sh
#if there are no rows in the record table, just exit this script
# lock the lockfile - MUST be same one as channel lock
while [ `lockfile "/tmp/mythchanlock.lck"` ]

[Code]....

View 3 Replies View Related

Server :: Call A C Function Or To Execute A C Pgm O/p From Php?

Apr 6, 2011

how to call a c function or to execute a c pgm o/p from php file and this output should be displayed in the html page ? I have tried with system() and exec()but its not working.

View 2 Replies View Related

General :: Write A Shell Script Instead Of Shell Function?

Apr 27, 2011

I would like know when it is necessary or advisable to write a shell script instead of shell function ?

View 3 Replies View Related

General :: How To Determin Function Call When Application Run On System

Sep 6, 2010

How can it be determined whether a function defined in some file of an application source-code(meant for multiple operating systems e.g., Linux, AmigaOS) is actually called when the application run on Linux?

View 9 Replies View Related

General :: Access Driver Function Using System Call ?

Apr 13, 2010

As per my knowledge, one can use systemcall to call the driver functions for example using open, close... Now is there any way to call driver functions directly from application without using system call?

View 4 Replies View Related

Server :: Fatal Error: Call To Undefined Function

May 7, 2010

I had created a database in mysql called guestbook and created tables also in mysql and also granted remote connections privileges from below command

mysql> grant all privileges on *.* to root@192.168.1.222 identified by "rrcrrc";

i had accessed from my pc(192.168.1.222) and used phprunner to create php web pages and copied the phprunner output folder to use with apache. when i accessed from my pc the below error is coming

Fatal error: Call to undefined function: mysql_connect() in /home/administrator/useridall/include/dbconnection.php on line 9

i can't understand what is going on so i put this question in the forum, below is i am giving the dbconnection.php details.

dbconection.php
<?php
function db_connect()
{

[code]....

View 3 Replies View Related

General :: How To Call Read Directory From Fill SuperBlock Function

Oct 12, 2010

I want to populate an array of string by files exists in directory on mounting of file system. I got an entry point for file system mount. I can use either do_mount function or fill_superblock function. But I am not clear about how to call readdir from there itself. I need inputs for calling readdir from fill_superblock function.

View 2 Replies View Related

Software :: Fatal Error - Call To Undefined Function Mysql_connect()

Jun 14, 2011

I know that you already had some cases of this error on this forum, and i wouldn't like to open up old topics, but none of the solutions mentioned before, helped.

I am trying to run a local php script on a Debian based server, but every time i run it, i get this error message:

Code:

Code:

And the php mysql_connect() function works as tested in this .php file

Code:

Using the script

Code:

The php script i am trying to run is a php irc bot from

Code:

And the mysql.php file which issues the error is like this:

Code:

I have also tried editing the mysql_connect function to be something like the test script i mentioned above, but still get the same error.

I have installed LAMP server using the apt-get (installed following packages: apache2 php5 libapache2-mod-php5 mysql-server mysql-client php5-mysql phpmyadmin) everything so far works great.

What i have noticed, that even though mysql shows up in phpinfo, it doesn't show up as a module listed in 'php -m'

View 10 Replies View Related

Slackware :: Fatal Error - Call To Undefined Function Imagecreatefromjpeg()

May 17, 2011

I am having a problem with my slackware version 12 server. I tried installing a new joomla theme from the rockettheme and its giving me the following error while loading the site.

Fatal error: Call to undefined function imagecreatefromjpeg()in /home/www/verticaltest/modules/mod_rokstories/thumbnail.inc.php on line 167

Thought it was a problem with gd library modules, but in info.php, its showing that gd is installed in the server. Pasting the result form info.php below..

If gd is installed, what should be the problem?

View 3 Replies View Related

CentOS 5 :: PHP Fatal Error: Call To Undefined Function Timezone_open()

Sep 16, 2010

I'm newbie with Centos. I have got a server with Centos 5.2 and I need to use PHP 5 >= 5.1.0 function as timezone_open. So that, I follow this guide to update php. Now, I have got PHP 5.1.6 (cli) (built: Mar 31 2010 02:44:37). I create a simple test.php: Quote:<?php $var = timezone_open('UTC');print_r($var);?>

View 3 Replies View Related

Ubuntu Installation :: Postgresql Works From Cli - Error Call To Undefined Function

Aug 4, 2011

I have weird problem with postgresql + nginx + php5 0 ubuntu 11.04. Postgresql works just fine, when I run "php test.php" from shell. I assume php runs from shell are called cgi runs? When I open page from browser [URL]... I get following error. I assume php runs from browser are called cgi runs? Fatal error: Call to undefined function pg_connect() in /var/www/mydomain/htdocs/test.php on line 7 When you print php info, only reference to postgresql is pgsql.ini and pdo_pgsql.ini files that are parsed.

[code]....

I did install postgresql by running following commands:

sudo -s
aptitude install postgresql
aptitude install php5-pgsql

View 2 Replies View Related

Fedora :: Error: Call To Undefined Function: Curl_init() In /root/test.php On Line 142

Nov 22, 2009

curl: try 'curl --help' or 'curl --manual' for more information so here curl is working when I'm trying php test.php I got: PHP Fatal error: Call to undefined function: curl_init() in /root/test.php on line 142

Also in php.ini is missing extension=php_curl.dll but I added and the same problem

View 4 Replies View Related

General :: Create A New Mysql User And A Mysql Database At The Shell Prompt?

Aug 7, 2010

How do I create a new mysql user and a mysql database at the shell prompt?

View 1 Replies View Related

Programming :: How Can A Friend Function Access A Public Function From A Base Class

Nov 16, 2010

Code:
#include <iostream>
using namespace std;

[code]...

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved