Exec Stopped Working?
I wonder if anyone has experienced something like this, as it seems
truly bizarre and is causing me to tear out my hair (what little there
is left of it)....
The exec() function just suddenly stopped working, for no discernable
reason. Here is the code:
View Complete Forum Thread with Replies
Sponsored Links:
Related Messages:
Stopped Working
I have installed LAMP on my computer, and until yesterday, everything was working fine, and then PHP stopped producing any output. It doesn't matter if there is any PHP code in the file or not. For example, if I simply rename a .html file to .php all output stops. When I run either <?php phpinfo();?> or <? phpinfo();?> I get no output. php -r "phpinfo();"
View Replies !
View Related
Ereg_replace Stopped Working
This works fine on one server, but not on another server (both use 4.1.3). The pattern does not appear to be being identified on the new server, so the replacement text is not being added to the output. $pattern = "href=""; $replacement = "href="http://mylink.com/click.php?id=$_POST[id]&url="; $entry = eregi_replace($pattern,$replacement,$entry); echo "$entry"; Basically it should replace <a href="http://mysite.com">My link</a> with <a href="http://mylink.com/click.php?id=$_POST[id]&url=http://mysite.com">My link</a>
View Replies !
View Related
Mysql_fetch_array() Stopped Working.
suddendly my code stopped working on 2 separate servers. did something in the new version of php change how this works or something? $result = mysql_query("SELECT * FROM list WHERE email='$email'",$db); $myrow = mysql_fetch_array($result); Am i missing something?
View Replies !
View Related
Some Php Includes Stopped Working
The morning of October 5th some of our php includes stopped working. One example being includes with "www" in the path. include("http://www.x.com/a.php"); //no longer works include("http://x.com/a.php"); //works but not across subdomains anymore Here's some of our php.ini settings: include_path .:/usr/lib/php:/usr/local/lib/php .:/usr/lib/php:/usr/local/lib/php allow_url_fopen On On Our host says they didn't change anything.
View Replies !
View Related
Forms All Stopped Working
My site was working fine when from one minute to another all of the forms stopped working. I emailed the server host who said that they restarted the mysql server (for updates apparently). Ever since that, the login form does not work, the upload form does not work, my websites' admin panel does not work. I have no clue what to do, i restored all of the databases and the files that were previously there. Everything stopped working all of a sudden so I do not understand the cause of it and how to fix it.
View Replies !
View Related
Links Stopped Working
A few weeks ago the links on those websites just decided to stop working. I didn't change anything. Not the code, not the server, nothing. The links just stopped working all by themselves. Both websites are set up with template.php/index.php as the structure and plain html pages for the content. Code:
View Replies !
View Related
Form Stopped Working
The email form worked fine at one point, but after a PC format and reinstall, I cant for the life of my get it to work again. The process seems to work fine, tells me it’s sent the email etc and I get no parse errors. However I never get the email I’m sending from the form.. Code:
View Replies !
View Related
Cookies Stopped Working (HTTP_COOKIE Not Set)
My site, written in PHP, is working fine on my hosting service, but it has suddenly stopped working on my home server. Both servers are running 4.2.3 on apache.I narrowed down the problem to cookies not being set on my home server. When I try to access cookies on my home server, scripts fail with undefined variables. The same code works just dandy on the hosting server. When I do a php_info on my hosting service, the APACHE ENVIRONMENT section has an entry for HTTP_COOKIE. However, php_info for my home server is almost the same except that HTTP_COOKIE is missing. PHP Code:
View Replies !
View Related
Ftp_connect() Stopped Working (PHP4.4.2/FC2)
I run puppyfiles.us, and I've been using php on the site for some time. Today, I noticed that my coding isn't working any more. Specifically, I'm getting the following error: Fatal error: Call to undefined function: ftp_connect() in /var/www/vhosts/puppyfiles.us/httpdocs/.VERSIONS on line 25 The offending code in .VERSIONS (an included file) is: $ftp_server = "puppyfiles.us"; $conn_id = ftp_connect($ftp_server); $login_result = ftp_login($conn_id, "anonymous", "puppyfiles"); if ((!$conn_id) || (!$login_result)) { die("FTP connection has failed !"); }
View Replies !
View Related
PHP Mail Function Stopped Working
Yesterday before 2:30, we were receiving email from the servers just fine. The same code today doesn't work. We haven't received an email for almost 24 hours now from the server. I've looked at every different way we send email: Newsletter program: works with SMTP send, but not PHP mail send (it has the option) CGI Forms: work PHP Mail pages - nothing. I've gone through everything I did yesterday, and I can't find anything that I could have changed that could possibly be making this type of problem occur. After 2:30, I picked up my kids from school, created two new pages on the domain that had nothing to do with mail, and got a CSR for a new SSL cert. Our server admin doesn't remember doing anything either. What could possibly be causing this?
View Replies !
View Related
Parse .html As Stopped Working
I recently upgraded an old 4.2.2 PHP to 4.3.11 One change I made after was to get my .html files to parse thru PHP. Yes, I've read for years not to do this, but I do anyway. I accomplish this by changing: AddType application/x-httpd-php .php to AddType application/x-httpd-php .php .html But now, all my apache redirects don't work, and the apache error pages want to download. The .html parse thru PHP, and ofcourse .php is fine. I've covered everything I know, and would like to know if anyone else has come across before.
View Replies !
View Related
Connection To MSSQL Server Has Stopped Working
I made all the necessary changes to my server (windows 2k3 r2) in order to get my php page to read from my MS SQL (v6.5) server (on another machine). I was able to pull data down last night with no problem. Today, however, I get nothing. The server I'm pulling from is up and has no errors. If I change the login/password for the connection string to something wrong, I don't get an error message. In fact, the page is blank as if there was an error within the code (this is regardless of whether I use a correct or incorrect login). Yesterday when it was working, if I used the wrong login, I got the usual error message back. If I comment out all the lines regarding the connection, it builds the table just fine. I've attached my code below (stripped out some table columns and data manipulation code). I have copied ntwlibd.dll to my windowssystem32 directory and enabled the "extension=php_mssql.dll" line in my php.ini file. If anyone has seen this before or has any suggestions, please let me know... this is quite frustrating. <?php $con = mssql_connect('server', 'login', 'password'); if (!$con) { die('Could not connect: ' . mssql_error()); } mssql_select_db("CM", $con); $sql="SELECT *FROM Private_Build"; $result = mssql_query($sql); echo "<table border=Ƈ'> <tr> <COL width=ï`'> <th bgcolor='black' style ='color:white'>Patch ID</th> </tr>"; while($row = mysql_fetch_array($result)) { echo "<tr>"; echo "<td>" . $row['Packages'] . "</td>"; echo "</tr>"; } echo "</table>"; mssql_close($con); ?>
View Replies !
View Related
Mail() Function Randomly Stopped Working
The problem that I am having is that I have a page that uses the mail() function. The page is on admin panel of a store and is called from another page that lists all of the orders. Basically, the script updates the status of the order to indicate that the payment has been received and sends an email to the customer to notify them of the payment receipt. The script was working fine for months, but recently stopped working completely. (Although no error is thrown.) The only thing that I can think that could have affected this is that the host recently upgraded from PHP 4 to PHP 5; however, I have another site on the same account where the mail function works just fine. Any ideas? Code:
View Replies !
View Related
Process Of Migrating Hosts And Its Stopped Working..
Thing is i get no SQL errors, no php errors and therfore dont have much to go on, globals are on in my php ini and i can view things in my website fine, but when i try and log into my user area it just refreshes the log in page. During the process of migration the account was restored on the following and ive noticed that it now includes collation in MYSQL which appears to have defaulted to ' latin1_swedish_ci ', Ive checked the tables and the user_passwords etc encrypted all looks the same. Code:
View Replies !
View Related
Mogrify -draw Text Stopped Working After Upgrade
If anyone can recommend a more appropriate newsgroup for this question? We recently upgraded from php 4.1.2 to php 4.3.9 and ImageMagick 5.5.7 to version 6.2.5. I have a script that creates a random number image as a Turing Test, and without changing that, it's stopped working right after the upgrade. But, only part of the mogrify command. Here's the line I'm using: $imagick = '/usr/local/bin/mogrify -pointsize 26 -draw 'text '.$txRand.','.$tyRand.' "'.$rand.'"' -rotate '.$rRand.' -swirl '.$sRand.' -charcoal 2 /var/www/html/verimgs/'.$mrand.'.gif' exec("$imagick"); PHP is executing the command OK, because it creates the image and does the swirl and charcoal and the rotate, but it's not doing the -draw part. If I echo $imagick it's perfectly formatted: /usr/local/bin/mogrify -pointsize 26 -draw 'text 17,23 "659"' -rotate 2 -swirl 25 -charcoal 2 /var/www/html/home/verimgs/97531.gif I can run that line in a command shell and it will perform perfectly. According to the ImageMagick site: http://www.imagemagick.org/script/c...ptions.php#draw I'm formatting the -draw switch just right. But still, it won't print the numbers onto the image. I don't get it. What may have changed in the upgrade to prevent this script from working the way it did before?
View Replies !
View Related
Form Action = <?=$_SERVER['PHP_SELF']?> - Stopped Working
My form action code to submit values to itself have stopped working using the code form action = <?=$_SERVER['PHP_SELF']?> This code used to work My web host recently told me they enabled phpsuexec option in apache which apparently needs me to CHMOD my PHP page to 750 and the directory to 755. (I don't know what this means but know how to CHMOD files). I have CHMODed the files this but my PHP page doesn't work with those settings, so I set them back.
View Replies !
View Related
Links Stopped Working - Use PATH/index.php?p=PAGE In My URL
i have just moved my website from one server to another, on the first my pages worked perfect (not considering markup) but now my links just won't work anymore... i use PATH/index.php?p=PAGE in my URL, it worked well on the other server, but after i switched it just stopped working... and i have no clue where to find the error... it just keeps showing the first page...
View Replies !
View Related
$_SESSION :: Phpmyedit Pages Stopped Working After Novell Update
Our network Administrator applied an update to our web server recently. After this update was applied (Novell update), my phpMyEdit pages stopped responding. Everything else works fine. After doing some debugging, I found that if I placed all of my pages in the same directory, everything worked. My $_SESSION vars will not transfer to other pages unless that page is in the same directory as the session was started in. I hope this is enough of an explaination. I am clueless as to why thus far. I am going to look at the php.ini file today.
View Replies !
View Related
Exec Is Not Working Right
I'm trying to convert a video with exec i have just installed php 5.0.5 on my server and every thing seems to work except exec can you help i have tried <? runExternal( "ffmpeg -i video.mov -s 320x240 -r 30 video.flv", &$code ); if( $code ) echo "bad transcoding"; else echo "looks good"; function runExternal( $cmd, &$code ) { $descriptorspec = array( 0 => array("pipe", "r"), // stdin is a pipe that the child will read from 1 => array("pipe", "w"), // stdout is a pipe that the child will write to 2 => array("pipe", "w") // stderr is a file to write to ); $pipes= array(); $process = proc_open($cmd, $descriptorspec, $pipes); $output= ""; if (!is_resource($process)) return false; #close child's input imidiately fclose($pipes[0]); stream_set_blocking($pipes,false); stream_set_blocking($pipes[2],false); $todo= array($pipes[1],$pipes[2]); while( true ) { $read= array(); if(!feof($pipes[1]) ) $read[]= $pipes[1]; if(!feof($pipes[2]) ) $read[]= $pipes[2]; if (!$read) break; $ready= stream_select($read, $write=NULL, $ex= NULL, 2); if ($ready === false) { break; #should never happen - something died } foreach ($read as $r) { $s= fread($r,1024); $output.= $s; } } fclose($pipes[1]); fclose($pipes[2]); $code= proc_close($process); return $output; } ?> and <? exec("ffmpeg -i video.mov -s 320x240 -r 30 video.flv"); ?> and <? system("ffmpeg -i video.mov -s 320x240 -r 30 video.flv"); ?> None worked ....
View Replies !
View Related
Php Exec() Function Is Not Working
I am trying to execute linux command with php. I am try to log on as super user, so I have used the following code: exec("su root"); exec("<password>"); But I dont think its working, becuase if I want to change my directory and view the list, I find myself in the same directory. I have used the following code: exec("cd /"); Passthru("ls -l");
View Replies !
View Related
System/exec Not Working In Browser
In two files, and I serve foo.php then I notice If I use commandline execution i.e. php foo.php then foo.txt is touched/created all right. i.e. system command is executed as expectedBut If I use browser then I notice that the shell command in config.php is *not* executedAny ideas as to why this might be happening? Code:
View Replies !
View Related
Warning: Ftp_exec() [function.ftp-exec]: SITE EXEC Is An Unknown Extension
This is kind of a part II to a question a posted earlier about exec and shell_exec not working. I'm trying to use ftp_exec to execute some simple command: $conn_id = ftp_connect("$server") or die ("Cannot initiate connection to host"); ftp_login($conn_id, "$username", "$userpass") or die("Cannot login"); $command = 'cd..' if (ftp_exec($conn_id, $command)) { echo "$command executed successfully"; } else { echo "could not execute $command"; } ftp_close($conn_id); I'm getting the following error: Warning: ftp_exec() [function.ftp-exec]: SITE EXEC is an unknown extension in /home/urieilam/public_html/work/video/test1.1.php on line 21 could not execute cd.. Have tried other commands as well, get the same. Could this be a security issue or something to do with p Safe Mode? I don't know much about commands, shell, etc..
View Replies !
View Related
Warning: Exec() [function.exec]:
I'm using PHP Version 5.0.4 in IIS5, Window 2003. When I execute my script, it prompt me the following error : Warning: exec() [function.exec]: Unable to fork [ping 10.8.1.70] in c:Inetpubwwwrootswitch.php on line 62 Below is my script : <?php $line1 = exec("ping 10.8.1.70", $output); exit; ?>
View Replies !
View Related
Mailing System I Am Using Gets Stopped By AOL
I have a website where members can request a new password to be sent to them if they should forget their password. Problem is that the members of my site with email addresses from AOL are not getting their mail. For some reason the mailing system I am using gets stopped by AOL and my members are not getting their messages. Is there anything I can do about this? This is what I am using--- mail($email, $subject, $message, "From: mysite.com Webmaster<staff@mysite.com> X-Mailer: PHP/" . phpversion());
View Replies !
View Related
My Count Stopped Adding
Here's my code: $now = time(); $count = 0; while($count < 90){ $count++; $Dnow = date("F j, Y",$now); $now = strtotime($Dnow); $startdate.="<option value="$now">$Dnow</option>"; $now = $now + 86400; } // while
View Replies !
View Related
Script Stopped Sending Emails
PHP Code: Function SendMail($to,$subject,&$body,&$headers) { Â Â $return_path=""; Â Â if(IsSet($this->delivery["Headers"])) Â Â { Â Â Â $headers_values=$this->delivery["Headers"]; Â Â Â for($header=0,Reset($headers_values);$header<count($headers_values);$header++,Next($headers_values)) Â Â Â { Â Â Â Â if(strtolower(Key($headers_values))=="return-path") Â Â Â Â { Â Â Â Â Â $return_path=$headers_values[Key($headers_values)];
View Replies !
View Related
Working Connection... Not Working? (Advanced)
It has tons of modules, and obviously a config file which opens the db connection. But there is one, and only one, module having strange troubles. $query is just a simple INSERT INTO command. But it does not inserts anything. I only obtain... nothing. Neither an error from the server! Code:
View Replies !
View Related
Exec();
well i know that exec("ndc reload"); would perform that command.. but i want too print out on the page what the command tells when i do like this: [root@xermin cryzeck]# ndc reload Reload initiated. [root@xermin cryzeck]# i want to print that Reload initiated. on the page.. how? not just echo("reload initiated"); but the stuff the command tells.
View Replies !
View Related
Using Exec()
I'm trying to use the exec() function to call shell scripts that in turn startup various programs under linux.. for example, when someone clicks on a link to restart a particular daemon, the daemon will then simply executed, either through the standalone command of /location/daemon or through the calling of a shell script that essentially performs an identical task. My problem is that exec() seems to only work through the user "nobody," which the Apache web server is running under. The scripts and programs I'd like to execute are under a user account named "admin." I've even tried chmod'ing all pertinent files w/ permissions that "nobody" could use to successfully access all necessary commands, without success, as the programs seem to crash whenever I do this.
View Replies !
View Related
PHP And Exec(dir)
I have been using opendir and scandir, but I want to try something else. Idea: using dir, and a) getting the result b) saving it as a file. As I have problems with executing files directly, it create a bat file and executes that. I can execute command, but by some reason I dont get any response (it should return something, and I get "") The missing response is why I create a file. I create the file on the network ( serversomewhere ) like this dir "serversomewherefilesdir" >"serversomewhere esult.txt" Here is the odd thing: dir cannot read from the network - the bat file is created there, it creates the result.txt file, but emtpy as it cannot read from the network. Reading from c: and it works.
View Replies !
View Related
Php Exec();
i've been trying to create a php script that writes some text to a file, then runs the perl interpreter on the file and shows the output. it works ok when valid perl is written to the file, so if i use 'print "hello world";' then it outputs 'hello world'. the problem is, if i enter invalid perl code, such as 'blahblahblah;', it outputs nothing. i'd like the php script to be able to get the error/output. does anyone know of a way to do this?
View Replies !
View Related
Exec(); & Php As CGI...
I have had to do some work on a RAQ server with php as cgi. The script I have written uses the exec(); function to run pgp to encrypt a file. Weird thing is this: The script does everything it's supposed to but I get the RAQ internal server error message. Should I be using passthru of something else in this environment? Forgive me I am a relative virgin as far as RAQs and php as cgi goes.
View Replies !
View Related
Exec Php
I have a php site. Some page needs to call an external program. The programs are home made c# applications. It uses to work without problem. For a while. Maybe it work for some hour. Or for a day. Or even for a week. At a certain point, when a php script calls the exe file, the application freezes. The following happens:...
View Replies !
View Related
Exec()
I am making a simple php script using exec() to execute commands in my linux host. When i execute 'ls' it shows the right content on that directory, but what i want to know if there is a way i can distinguish between folders and files. In this way i can lets say make folders show in black and files in grey. Also when i execute a wrong command i wanna get any system error message. Code:
View Replies !
View Related
Exec A .exe
I want to exec dos then within dos exec another.exe then write to that program with database varables or session's but how? how do you write to the last.exe program to give it it's command? <?php exec("C:/WINDOWS/system32/cmd.exe/program.exe"); ?>
View Replies !
View Related
Use Of The Exec()
<?php f($_POST['startup']){ if(!$online){ //$A1 = array(); //exec($servpath."khyller-server.exe") or die("<BR>Server Startup MSG - <Font color=red>Cannot find Server</font>"); //proc_open("call C:Serverlanked eleasekhyller-server.exe", $A1,$A2,$A3); } } ?> I'm first trying to get them to work at all just do something first. but with no success. I even sued or die and all I get is die D: Is it impossible or am I just dumb? I know I did this one, But I don't know how. Edit to add php color. my eyes were hurting in blackness.
View Replies !
View Related
Using EXEC
I've got a page on an application form that runs an executable. I don't return anything from the executable, and I don't want to the script to wait for it before continuing. I just want it to call the executable and forget about it. The executable is self contained, in doesn't return anything back to the script. I'm currently executing with EXEC like so: Code: exec("c:filename.exe " . $_SESSION['memberId']);
View Replies !
View Related
Exec() And Zip
I have zip.exe in my PATH on a windows XP box. Additionally, I have a script which, if I execute locally with php myfile.php. it runs fine. However, when I call myfile.php remotely with a web browser, it canot seem to find zip.exe. Below are the releveant code snippets. exec( "zip -mj ackups empcookbook.zip ackups empcookbook.sql 2>&1", $output, $res ); if( $res 0 ) { error( true,"COMPRESSION FAILED ".implode( " ", $output)); COMPRESSION FAILED The system cannot execute the specified program.
View Replies !
View Related
SU And Exec
I have a PHP CLI script setup in crom which runs as a specific user each night so that it has the correct security level. I want to also be able to execute this script "on demand" via a webpage. Is there a simple way to get PHP to execute this command as another user? How could I "SU script_user >>> runme.php" ?
View Replies !
View Related
About Exec()
I have a small custom 404 page in PHP. When this page is triggered I'd like some information about the requesting client, including its reverse IP. I would like the 404 page to be returned to the client's browser immediately, after invoking another function or script that takes care of the lookup & email duties. The 404 page doesn't care about the return value of the second script at all, it's fine if it fails. It looked to me like exec() is appropriate here, is that correct? Am I thinking about it wrong?
View Replies !
View Related
Exec ()
i want to add new Linux user in my system: exec ("useradd ........"); is not working . there is no error . but user is not getting added. Am i using the command in wrong way. is ther any alternative.
View Replies !
View Related
Exec() Fails...help!
I'm very new to php, running apache 1.3.20 with php 4 on a 98 box just for home test development purposes there's probably an easier way/better alternative to do what i'm trying to do, but i'd be greatful for solutions not alternatives i'm trying to add a user to an .htpasswd file so need to exec("c:/apache/htdocs/htpasswd.exe -b .htpasswd user password) It would also be useful to run a mail server remotely with exec("c:mymailserver.exe") but neither will work, i tend to hear the standard windows error sound, but with no message. Apache error logs reveal nothing. What i'm trying to do may be impossible?, i'm new to the language so i don't know...or it may be a permissions problem? Or perhaps something totally seperate? If anyone has any ideas which may help i'd be very greatful for any advice you could give.
View Replies !
View Related
Exec & IIS Problem
I have an exe that I want to run with php. In the console, it works perfectly fine. There is a problem with security and it doesn't seem to run. I have tried the following after reading various newsgroups and websites and no luck. 1) Put the Exe file in the wwwroot and set permissions to the IUSER, giving Read&Execute, even gave Full Control. 2) I also added Everyone too and still no luck 3) Moved the exe file to system32 folder and did the same above and still no luck
View Replies !
View Related
PHP Locking Up With EXEC?
I have been using EXEC and or SHELL_EXEC to call several command line functions. I use it mostly for Image Magick on my web servers. I run a WinXP machine with Sambar Server 5.3, PHP verison 4.3.0 ISAPI. Until lately the server, php and image magick have functioned like a dream. I have been lately having some very serious crashes where the DOS window that appears then disappears with a command call from PHP does not leave the screen, it simply freezes. The web server continues to function but any addiional EXEC (or realted) commands do not process, the DOS window remains on the screen. I run my server as a service and not an applicaiton though I experimented both ways. I have not changed my config lately other than to add maybe another dozen domains to my server's vhosts.ini file. Other than that, nothing has changed. The ONLY way to terminate the problem is to KILL THE PROCESS for the server (for sambar folks that is ntserver.exe) then restart the service. One should not ever need to do this but this is the only way to get the bubble out of the way, so to speak. The service itself will not stop, it must have the process killed. Does this sound strange. Is there a bug with PHP ... maybe it is there but it just seems so odd that it is intermitant, most times the EXEC goes of with out a hitch, but with significantly increased frequency it freezes up. Now I went into the list of processes to see if it was tying up system resoureces, it does NOT.
View Replies !
View Related
PHP System() And Exec()
Background: I am trying to execute a binary on the server located in the current directory where the php script is being run. The server is a linux (debian based). I am having trouble getting php to execute the binary properly, below is my code. Code:
View Replies !
View Related
|