PHP Calling Programs On AS/400
I have a website (running on a linux machine) that currently makes use
of JSP to access data on an AS/400.
I've found information telling me that after setting up ODBC drivers on
the linux server I'll be able to access the databases on the AS/400
however I've not found any information about executing programs on the
AS/400.
I've looked at the docs for exec, passthru, etc. and it appears those
will only work on the local operating system.
Is it possible for a PHP page to execute a program on a remote machine?
If so, how does PHP handle the ASCII <--> EBCDIC conversion for
parameters passed and returned?
View Complete Forum Thread with Replies
Sponsored Links:
Related Messages:
PHP Programs ?
Im after a php program which is of the likes of textpad but designed for PHP so it checks curly braces and other simple errors in PHP code to us PHP novices out ?? Is there anything on the internet like this, download links (the best few)?
View Replies !
View Related
Test The Same Programs
I'm building my php scripts in one computer and i don't have any problem, but when I test the same programs in other (win xp ie) don't work at all, specially whe you do submit. I tried testing with this simple script: <?php if($_POST["test"]){ print "test ok"; print $testa; } ?> <HTML> <HEAD> </HEAD> <BODY> <form action="<?$_SERVER['PHP_SELF']?>" method="post" name="forma" enctype="multipart/form-data"> <input type="submit" name="test" value="submit"> <input type="text" name="texta" size="20"> </form> </BODY> </HTML> When you submit the form, print "test ok", but no the value of $testa variable. I use this way to send data and always works. (wamp5). I checked the services wampapache and wampmysqld and both are working then i tried printing phpinfo() and it works too.
View Replies !
View Related
Compiled Php Programs
Is it possible to compile php source to create a binary? I am thinking along the lines of building an application for folks, but do not want them to have access to the source code. I like php and perl, but am not sure if there is a way to "secure" my programs if I use them.
View Replies !
View Related
External Programs
I have just installed my first Linux distribution (SUSE 10.0). Everything is compiled as far as Apache, Mysql & PHP is concerned. But, I have this problem: I call system commands through PHP using system, shell_exec etc The thing is that PHP responds OK when it comes to 'ls' or 'grep' or 'wget', but, in another program, not UNIX-native, there is no response. I am sure that the program is set up in the PATH, because, if I open a terminal, I can call it from everywhere and it works fine.
View Replies !
View Related
Auditing Programs?
I'm trying to perform an audit on a PHP script and am curious what kind of software there already exists to do such things. I think the ideal solution would be something that, for each variable, provided a list of the functions that variable was passed through. Code:
View Replies !
View Related
Running Programs
I've just installed apache and php. Both installations passed the test (I get that chart of info that PHP displays if your installation is OK). Here's the problem: whatever I save with a .php simply does not work I'm talking about the World" programs that I simply paste and save, not something I wrote. I've been saving in c:/program files/apache software fundation/apache2.2/htdocs.
View Replies !
View Related
Executing Programs On A Server
i've written a c++ program that converts one file type to another via two arguments (the input and output filenames). i want to execute this on my server, using something like exec("myprogram.exe $arg1 $arg2"); but then I realized my server is linux, and my program was compiled for windows. so I uploaded the .cpp instead, and now i'm trying to compile it doing something like exec("gccp hello.cpp"); which returns an exit code 127... not really sure what that means. I'm guessing I probably don't have permission to be creating files on my server...is there anyway I can change this permissions or anything?
View Replies !
View Related
Executing External Programs
I know all the different functions that allow me to execute an external progam, however I have come across and interesting problem that I need to fix if it is at all possible. Is there a way that I can use the php functions and execute an external program by some other user other then who ever owns the apache process?
View Replies !
View Related
POST Variables From Programs
we are trying to make a program in C++ that will comminicate with a PHP script. But we dont know how to get the variables from the program. We got it figured out with perl/CGI, but PHP seems to be a better way to connect to SQL server. On PHP the GET works, its easy, but it's not secure enough. I need informtion on what headers does the PHP require to get the POSTed data from a program.
View Replies !
View Related
Different PHP Programs - 1 Registered User Possible For All?
I am new to php and I have three php softwares that I want to install on one website. I'm wondering if a person registers for one, is it possible that he can access the other softwares also? Otherwise that person will have to register three different times for the same website to access all the resources. If it is possible, will I have to change anything?
View Replies !
View Related
Running Console Programs
Does console programs free memory during the execution ? Until now i thought that a script never releases memory until the end is reached. But now i found the term GC a few times while reading about Zend Engine 2. Also the PHP-GTK page mentions that there is no memory deallocation. But how can one write a GUI program without memory control?
View Replies !
View Related
How To Make Programs Run Fast
I made a PHP Program that generates report. my only problem is it generates report for more than 30 mins when I try to access 150 employees and calculate its DTR. Can anyone of you recommend me how too make my program run fast? Is there any code / program that I must use?
View Replies !
View Related
Submit Standalone Programs With Php
I'm building an application which submits scheduled php jobs. The way I would like it to work is to have one php program to submit the other php programs on a scheduled basis. This control program shouldn't have to wait until one job finishes before it can start the next one; instead, it should be able to submit all the jobs in one go, but it also needs to be able to be informed of the return codes of the submitted programs so dependent programs can be submitted too. I've looked at the exec() and system() commands, but they either don't seem to allow return codes to be returned from a submitted program to the submitter program or they unconditionally print anything the submitted programs produce.
View Replies !
View Related
Multiple External Programs
I have a php script which when executed calls an external program. The external program goes off and figures some things out and the output of the program is returned as as an array to the calling PHP program. Next a second external program is called and the process is repeated. This goes on for 4 external program calls. The arrays are then analyzed and the results are outputted. Since the 4 external programs are independent of each other but each takes 3 5 minutes to run, I would like to run them all at the same time and then, when they are all done, proceed with the rest of the analysis.
View Replies !
View Related
Blocking 3rd Party Programs
a script in php or another language which lets you block any illegal 3rd party scripts/programs? Such as rsclient.exe is a auto-clicker which clicks a button automaticly for how ever long you want it to do it in seconds. Of course it usually comes with a virus anyways but people use it. I need a script that stops any program or script to access the website scripts.
View Replies !
View Related
ImageMagick And Executing External Programs
I have installed ImageMagick and GhostScript (Windows/IIS) and IM is working from the command line (specifically the convert command) so now I need to get it working in php. To that end I have the following code: <?php system("c:Program FilesImageMagick-6.3.4-Q16convert.exe c:InetpubwwwrootexpgraphicsimgMagick est_file.ai c:InetpubwwwrootexpgraphicsimgMagickAIC.png",$retvar); echo $retvar; // Now you can check the $retvar for errors ?> c:Program FilesImageMagick-6.3.4-Q16convert.exe - the root folder for IM, location of convert.exe c:InetpubwwwrootexpgraphicsimgMagick est_file.ai - the location of the target image to use for conversion c:InetpubwwwrootexpgraphicsimgMagickAIC.png - the location, name, and format for the converted image Using the above code, it does not create a new png image. Before I set the permissions for the Internet Guest Account user to "read & execute" for the cmd.exe file located at C:WINDOWSsystem32, $retvar was echoing a value of -1. Once I set the permissions on C:WINDOWSsystem32cmd.exe, $retvar is echoing a value of 1. In either case, the new graphic is NOT generated. Is there something wrong with my syntax?
View Replies !
View Related
Sparse - New Framework For MySQL Programs
I believe I posted this once before, but enough has changed that I'm doing it again. 8-) I have been working on a project called Sparse, a framework specifically for creating PHP/MySQL programs. It is designed with usability in mind - it is meant to be as easy to use as possible. Essentially, the majority of the backend is already done for you, and you can design and configure your website using a few extra HTML tags. It's also very flexible - you can easily integrate it with regular PHP code right in the file. The new version also prints out every form in degradable Ajax, meaning that those users without Javascript ability will use the regular functionality. The end result is far less code, meaning less development and maintenance time, fewer errors, and more ease in changing things around.
View Replies !
View Related
Coding A Page To Allow Running/restarting Of Programs?
WOuld it be possible to code a php page to allow running/restarting of programs? Im trying to find a way toallow users with access tot he page the ability to START or RESTART crashed programs. These program present NULL security risk So this is why im asking. With this I wouldlike th epage to First ask for authentication before proceeding to the start/restart page. WHich I'd like to be *NIX based instead of usual php password stuff.
View Replies !
View Related
Scalability Of Perl Cgi Programs That Load Text Files
Suppose you have a perl program that is called by a web page to generate another web page. The program is written to load data from a text file on the server and make certain substitutions in the loaded text prior to the output of html. If one user is on the site, it should not be a problem. If many users try to access it nearly simultaneously, will it be a problem? example:
View Replies !
View Related
Executing External Programs From PHP4 On Windows98 With Apache 1.3.14 For Win32
I did a search, and did not find anything specific on this topic, so here goes: Trying to create a webpage button or link that when pressed executes Win98's "dialer.exe" with a phonenumber as a passed parameter. From my understanding, the exec function in PHP seems to work best with Linux (correct me if I am wrong please!). Are there alternatives? The other bit of knowledge I have not been able to find (and really is outside this forum), is that dialer.exe is supposed to accept control from external programs, but I have yet to find docs or examples of such.
View Replies !
View Related
Calling Url.
Is it possible, with php, to figure out what the "calling url" is ? Let's say I have a track.html (with some php code) and if someone clicks on a link to track.html I want to see the url where that visitor came from.
View Replies !
View Related
Calling CVS In PHP
Howdy does have any PHP fuctions that allow me to run CVS? Here's what I've tried so far: <?php system('cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/izicontents login; cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/izicontents co -P iziContents1 .');
View Replies !
View Related
Calling PHP Within PHP
I have a script that is on serveral sites. It changes constantly, so updating 10 sites is a hassle. What I wanted to know if there is a way to call PHP within PHP, using php itself, or javascript, etc. Simply because I'll place the file that is going to be called on a seperate location where all sites can call from it. Can it be called in a .js file? Using <?php at start ?> at end? or is there a easier way?
View Replies !
View Related
Calling Php 4 From Within Php 5
My hosting company offers both php 5 and 4. I use php 5. I want to know how to access a php 4 program (or class). It's ffmpeg-php and I want to access this code in php 4 $ffmpegObj = new ffmpeg_movie($filetmp); $duration = $ffmpegObj->getDuration(); ffmpeg-php is only available on php 4 so basically I need to call this function from within php 5. I was guessing something like: $test = exec("/usr/bin/php -r '$ffmpegObj = new ffmpeg_movie($filetmp);$duration = $ffmpegObj->getDuration();'"); echo $test; but that doesn't work - any ideas anyone?
View Replies !
View Related
Calling Php
I have to call some php function. I have arguments for it stored in an array. How to call that function using these arguments? The number of arguments changes with each call.
View Replies !
View Related
Calling Perl From Php?
I have a site all in PHP, for login, auth, session management, etc. I have to interface it with a banks perl scripts to do credit card transactions. Their wrapper perl script expects a few arguments, including a hash with all the data. What would be easiest way to get the data entered into my adduser.php form to the perl script?
View Replies !
View Related
Calling Cgi As SSI Inside PHP??
Hello, i wanted to know if it is possible to execute perl scripts from inside PHP-scripted pages... i have tried adding php to the SSI section of my apache server config file... SSI will work fine once i do that... however that will prevent any of the PHP from functioning inside the page. Is there any way i can go about having both execute, and work in the same file? Currently the page has around 2 small PHP scripts, and a cgi poll with the SSI inserted in it. I have tried changing to a PHP include, but that only works for PHP produced files... can i include a cgi file from PHP in a different format, and have it execute?
View Replies !
View Related
Name Of The Calling Method
I'd like to get the name of the calling method. I can't find the solution. For example : function MyFct() { return TheOtherFct(); } function TheOtherFct() { echo "Hi, the calling method is ..."; return true ; } MyFct();
View Replies !
View Related
Calling TCL Function From PHP 4.3
I'm just picking up PHP, and am really appreciating the transition, however, I'm running into somewhat of a loggerhead. I'm trying to find a way to utilize our existing code infrastructure (primarily written in TCL), while providing an outlet for new technology (aka PHP). It seems that Tcl isn't really well suited for integration with HTML pages (Rivet is fine, but not as fleshed out as PHP seems to be). I was wondering if there is any mechanism in which I can make embedded calls from PHP to TCL libraries? My first priority would be for these processes to be somewhat embedded (ie: avoid using a cgi-approach to invoke a new instance of Tcl each time the particular page is requested via Apache).
View Replies !
View Related
Calling Functions
Can I call function like they are called in JavaScript, in events like Onclick and so on. for examle like this: <input type='submit' value='remove' onclick='remove($current)'>
View Replies !
View Related
Calling Application (.exe) From PHP On XP
I am trying to call an application from php. I have tried exec() and system() and even popen() all to no avail. Can an application be called if it brings up a window? The app I am calling has a command line interface, but it insists on bringing up it's standard window also. At the moment the .exe file displays in Windows Task Manager in the Processes tab. The PHP script hangs (until timeout) and the .exe doesn't do the job it should. I am probably being daft :o)
View Replies !
View Related
Calling Imagecreatefromjpeg()
I am running my webpage from my PC at home. Relevant specs are WinXP Pro, IIS 5.1, MySQL server and clients 4.0.12 ,PHP 4.3.1. This is more of a toy for me right now other wise I would migrate over to Linux. I Dled and instaled Coppermine Photo Gallery v1.1 Beta 2 (I couldn't get the 1.0 release to work so i went with the beta and had no trouble instaling it) It is instaled and I can brouse it ok. The problem comes when I try to upload any thing to it. Even if I am sitting at my PC and try to batch add a file from the admin menu. Code:
View Replies !
View Related
Calling An FTP Location In PHP
This (im hoping) is an easy problem to solve! Quite simply, i have a HTML login form, where users can type their usernames and passwords for an FTP server of mine. The code im using is; <? //set variables for form values of previous page to make next code easier. $user = $_POST['user']; $pass = $_POST['pass']; $login = "Location: ftp://{$user}:{$pass}@12.34.5.67/"; header( "$login" ); ?> User and Pass are boxes on the form before hand, and all works fine- however, the page this opens is a list of files that are inside that ftp location- instead of a 'folder view' that you usually get with most modern versions of windows. You can easily get to the folder view by hitting refresh when the file list shows up, but this ideally isnt what i want. So is there another method of calling that page so that it goes straight to folder view? Maybe opening it up in another window would work, but how would i do that?
View Replies !
View Related
Calling A C Program From Php.
I need to call a c program from a php. I also need to pass a string to it and have it return an array or string. I was thinking about calling it like its cgi script, but I'm not to sure how to do that. I haven't figured the variable passing because I'm just trying to get it to run first. These are allthe things I tried. Code:
View Replies !
View Related
Calling Php From A Cgi Script
As a shell script, the following program works as expected. --------------------------------------- #! /usr/bin/sh echo '<html><? print 1 ?></html>' | php --------------------------------------- However, when run as a CGI script, invoking php causes the php interpreter to load the current file (ie, the sh script), which obviously is ga ga. How can I supress this behavior of interpreting the current file when invoking PHP in a CGI script?
View Replies !
View Related
Calling Javascript Within Php
I'm using the Google Maps API on a dynamic detail page. I want to serve one block of js based upon a database value, else serve a different block of javascript: $foo=$row_table['col_name']; if ($foo == 'blue') { echo '<script type="text/javascript"> <!-- //--> </script>' } else echo '<script type="text/javascript"> <!-- //--> </script>' ?> What's the best way to do this with a boatload of advanced API code that needs the database?
View Replies !
View Related
Calling A Script With Php
I am currently writing a web interface for a software build. on the final page, it calls a bash script at the moment, the script takes a good 1/2 hour to work, so my final page is taking ages to be displayed. is there any way i can run the script in the background, without having to wait for the page to load? shell_exec('location/of/script');
View Replies !
View Related
Calling A Function From A Url?
I've got a function which echos the html for a page. the function is written asfunction sampleview($category,$imagepth){so it takes the two variables when called. This function is in a file called functions.php which is included on all of my pages. On one page I'm using Javascript to open up a new window which contains the same html as the php function.. I'm trying to transfer it all to php. The problem I've got is, I'm not sure how to use php to create a link that will open a new window at a preset size.. I can easily do echo "<a href="mypage.php" target="_blank">click here</a>but that will just open a new window. I need to specify the height and width of the window.. I also need the link to somehow call the function, instead of loading a page like; <a href="sampleview(mycategory,myimage)">click here</a>Is this possible?
View Replies !
View Related
|