Fsockopen Won't Timeout...
Hi,
i am using the following code to check a few ports on a few servers to see if they are up or down. But they never seem to time out, can someone tell me what to do pls?
View Complete Forum Thread with Replies
Related Forum Messages:
Fsockopen Command - Timeout
Does the timeout option in the fsockopen command refer to the time allowed for a socket to be made availabe by the OS, or does it refer to the time allowed for reading or writing to the socket once created?
View Replies !
Can't Get Timeout To Work With Fsockopen
I'm trying to get a script to timeout if the server is under heavy load or otherwise unavailable. Eventually, this will try different mirrored domains as each one times out. But at the moment I can't even get a single domain to timeout: Code:
View Replies !
Warning: Fsockopen() [function.fsockopen]: SSL: Connection Reset By Peer In
I keep gettin this error when i submit on the form hosts say its all ok for them but isnt for me Warning: fsockopen() [function.fsockopen]: SSL: Connection reset by peer in /home/jaynbhav/public_html/msn/msnpauth.php on line 67 Warning: fsockopen() [function.fsockopen]: php_stream_sock_ssl_activate_with_method: SSL handshake/connection failed in /home/jaynbhav/public_html/msn/msnpauth.php on line 67 Warning: fsockopen() [function.fsockopen]: failed to activate SSL mode 1 in /home/jaynbhav/public_html/msn/msnpauth.php on line 67
View Replies !
Curl Timeout Vs Socket Timeout
We have two versions of client code, one using curl, and other one using raw sockets via fsockopen(), and we use the following code to set the i/o timeouts: 1) curl: . . curl_setopt( $handle, CURLOPT_TIMEOUT, 1 ); . . $resp = curl_exec($handle) 2) sockets: stream_set_timeout( $sock, 1); Here we use frwrite() and fread() to send the request and read the...
View Replies !
Xml Wont Write Right
i'm trying to use php (4.06) to write to an xml document usind data and fieldnames from a psql database. the php script is generating xml, its writing the whole document in fact but the structure is wrong. It prints a record for correct number of fields but it repeats the details twice and then appears to get stuck in a loop after it reaches the second field. the other problem is that i still cannot get the fieldnames inside the xml tags. PHP Code:
View Replies !
Strtolower Wont Do His Job
in the following insert the strtolower wont put the chars in lowercase. the code: $qryInsRel = "INSERT INTO "tblrelations" (rid, vcfirstname, vclastname, vccompany, vcfunction, nlangid, ngenderid, nuserid, ntitleid, dtbirthdate, vcbankaccount, vcvatnr, vctraderegisternr) VALUES(" . $relNextVal .", '" . $_POST["txtFirstName"] . "', '" . strtolower($_POST["txtLastName"]) .. "', '" . $_POST["txtCompany"] . "', '" . $_POST["txtFunction"] . "', '" . $_POST["txtLanguage"] . "', '" . $_POST["txtGender"] . "', '" . $_COOKIE["cUserID"] . "', '" . $_POST["txtTitle"] . "', '" . $bday . "', '" . $_POST["txtBankaccount"] . "', '" . $_POST["txtVATNr"] . "', '" . $_POST["txtTradeRegNr"] . "')"; (btw i moved a bit from the layout of the code but the rest is exactly what i have)
View Replies !
PHP Wont Run From Subdirs On IIS?
Just installed the latest version of PHP. My problem is that only PHP scripts in the root web server dir D:/inetpub/wwwroot in my case will run. If I try to run them from a sub dir, e.g. D:/inetpub/wwwroot/signup ala http://localhost/signup, the brower just displays the source of the script instead of running it. Has anyone seen this sort of thing before, and if so what must I do to get .php to running from any dir on the web server?
View Replies !
Wont Work With AOL?
Everyone who uses AOL is unable to log into my site. My site uses a mysql backend , login via form, basic user auth check. Start session cookie.
View Replies !
Mysql Insert Just Wont Have It!!
i have the following query to insert data into a table with 7 fields... one of the fields only need the default value to start with and the other is and auto increasement field. PHP Code:
View Replies !
File Wont Upload
I have a script that i have used in the past to succesfully upload a file to the server. for some reason it will not work for a new site i am building, i think it may have something to do with the paths but have tried everything i can think of. Code:
View Replies !
DreamWeaver Wont Show Php
When I am makeing a simple html site is works, but when i try to add some php it wont show up? Even when I open a new project under php document?It just shows up as a blank page. <html> <head> <title>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body> <?php $thisis = "hey heyyye heyyylloooo"; $money yeah = "yeah"; ?> </body> </html> but when I go to Design i get this little symbol that says php?
View Replies !
Php Page Wont Load
I uploaded it to a server and what the goal for this basic class is to have the form submit to the php page. once i click submit on the form page (<form name="form0" method="post" action="formpost.php"> ) Code:
View Replies !
Wont Add Records To My Database
can u check my codes and tell me whats wrong because for some reason it wont add records to my database, im using phpadmin v4.23 here are my codes <htmL> <body> <form action="insert.php" method="post"> First Name: <input type="text" name="first"><br> <input type="Submit"> </form> </body> </html> here are my php codes <? $username="root"; $password=""; $database="trial"; $first=$_POST['first']; mysql_connect(localhost,$username,$password); @mysql_select_db($database) or die( "Unable to select database"); ....
View Replies !
Exec Wont Run A Cpp Program
I'm trying to get Zonminder up and running on FC4 One of the asso programs is zmu.cpp - compiles fine. And runs from the command line IE. /u/l/b/zmu -help returns Usage. zmu -m 2 -z (real cmd) from cmd line does what it should do. However (in xx.php) exec ("/usr/local/bin/zmu -m 2 -z", $ret); doesn't. From what I can tell it doesn't even enter the program. Permissions are 755. If I change the exec to ("ls") - works, date - works. I've compared "env" - nada. SafeMode = Off. Is there ?anything? else that might cause my problem?
View Replies !
Session Wont Create
I am just getting started adding a user system to my site. I do have SSL activated on my site, but when I try to create or read a session I get errors. Here is what happend when I try to create: Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /hsphere/local/home/nicholas/braddanick.com/makesession.php:6) in /hsphere/local/home/nicholas/braddanick.com/makesession.php on line 13 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /hsphere/local/home/nicholas/braddanick.com/makesession.php:6) in /hsphere/local/home/nicholas/braddanick.com/makesession.php on line 13 Do any of you know what the problem could be?
View Replies !
PHP.INI File Wont Seem To Read?
trouble getting my PHP extensions to work, since in phpinfo() I can see my extension path is set to "C:php5" which should be "C:phpext". in php.ini I´ve changed to "c:phpext" but it still dont do nothing..? phpinfo() shows that php.ini should be in C:WINDOWS which it is!
View Replies !
Redirect Wont Work
Alright, this is a login validation thing. When leaves the field empty, things redirect to right page. But when the login is a success, the page would not budge. Its like a blank page with nothing in it. i even tried to echo something outside of the if/else, and still nothing. why wont it redirect? Code:
View Replies !
Query Wont Run In Page
i need page that updates a mysql database but when it runs i get no errors and it looks like it ran but it never does. also the query is right because if i take it from the page it runs fine. Code:
View Replies !
Cron Job Wont Run Imagecreatefrompng
So i have a script on my server that creates a set of images from one. When the script is called in the browser the script runs fine. When it runs as a cron job it fails. now to see if i am getting an error i ran the script from the command prompt as the same user that is running the cron job. and i get this error call to undefined function: imagecreatefrompng() but this works in the browser!!! any ideas?
View Replies !
Cookies Wont Work
I set my cookie to a value, then a form reloads my page. The cookie's value is still the same as before it was changed. When I reload the page the cookie is changed. It's like I had to reload the page twice to get the cookies to work.
View Replies !
Mail() - Wont Work?
I have Win2003 webserver. PHP. IIS6. I have some forms that use PHP mail(). My php.ini is correctly configured to point to my SMTP server. However, it for some reason DOES NOT WORK! No emails are generated from the forms. The scripts in the forms are CORRECT. Please do bother replying if you're going to tell me to check my coding on the scripts, as this is NOT the problem (they have been tested on numerous other machines and looked at by contract programmers). Is there anything else I need to do? Have I missed something with my system config?
View Replies !
Code Wont Allow Login
I have a script that wont let members (or admins) log in. I have checked the database to see if the e-mails and passwords were right and they are but I still cannot log in. Here's the index.php code for the members area: Code:
View Replies !
Mail Wont Send
PHP Code: $toaddress = 'ff20946@pfpc.ie' $subject = 'Hello' $mailcontent = 'none' $fromaddress = 'me' error_reporting(E_ALL ^ E_NOTICE); $headers  = "MIME-Version: 1.0"; $headers .= "Content-type: text/plain; charset=iso-8859-1"; $headers .= "From: Training Department"; $send = mail($toaddress, $subject, $mailcontent, $fromaddress); ...
View Replies !
Include File Wont Get Processed By Php?
I have a bunch of includes that are includes of includes included includicly... so they must be linked to the site root. Heres an example... require_once("http://localhost/includes/dbConnect.php"); If I name the include file with an .inc extension or even an .asp extension the code gets processed, but not with a .php extension.
View Replies !
I-frame Wont Properly Load
im making a personal site with 3 sections. home (news), design, and code. in the main design i setup an iframe which includes page.php. page.php contains this code PHP Code:
View Replies !
Webservers Wont Send The Cookie
I have some problem wit a part of my login script. On some webservers it wont send the cookie 2 the user and login. (SO NO login wil happen). DId i do something wrong in my script? PHP Code:
View Replies !
Fopen() Wont Work From Crontab
I have a script that calls an fopen() on an external URL. I can run the script from the server as an url fine. When however the script should be run from crontab, it does not work. I get Warning: fopen(): URL file-access is disabled in the server configuration in [php-file] Warning: fopen(http://[url].xml): failed to open stream: no suitable wrapper could be found in [php-file] on line 66 I have set allow_url_fopen On, but it still wont work. Any Idea what could cause that?
View Replies !
Code Wont Continue After While Loop
Im using the following code to describe a database table. It works perfectly fine when echo() is used to display field titles, but no code after the loop is running: $result = mysql_query ( "DESCRIBE `test`" ); while ( $r = mysql_fetch_array ( $result ) ) { extract ( $r ); echo "$Field<br>";} echo "bla bla"; <---- this code doesn't run! Ideas?
View Replies !
Emailing Sav Files, Wont Work?
Mailing sav files wont work but when I change the extension of the file to .txt it does work. See Below Script: //Attachment version of message $extension=explode (".", file.sav); $countdot=count($extension)-1; $extension=$extension[$countdot]; $headers .= "--{$boundary} " . "Content-Type: application/octet-stream " . "Content-Transfer-Encoding: base64 " . "Content-Disposition: attachment; filename="file.sav""; $headers .= chunk_split(base64_encode(file_get_contents('backup/file.sav))); $headers .= " --{$boundary}--";} if (!mail("geoff@googlemail.com", "Test", "", $headers)) { $erreur++; $erreurmsg.='There was a problem sending your email please try again.<br>'; }(As part of bigger script that deals with all the headers etc...) The above script sends a email to the email address, I can pick it up. Gmail shows the clip logo (attachment), but when I view the actual email no attached files are shown. However if I change this line: "Content-Disposition: attachment; filename="file.sav" "; to this: "Content-Disposition: attachment; filename="file.txt" "; the entire script works and I recieve the file but as a txt. Does anyone have any idea how I can get sav files to be mailed. I have tried sending them using gmail (it works fine) and reading the mime but it is exactly the same as mine.
View Replies !
Echo Wont Work On Second Query
I have two queries searching for UserID on two tables... but it wont echo my second query.. the first one works how ever even though they are structured the same. This is what i have: Code:
View Replies !
Trying To Add A % To A Total In Dreamweaver Wont Work.
I have a MySQL database and have made several search and results pages with Dreamweaver, but I am stuck with a problem. I have a table called materials, In this table I have the following fields, Title (A description of a location where the item is for), Job_No (A filed that is common through out the database and a material item is attached to the Job_No), Quantity (SPeaks for itself, but is the amount of items used), Unit_Price (A cost per item), Additional_Cost (Is the selling cost per item as a percentage i.e. 20% 10% and so on). In Dreamweaver, I have created a recordset from the table required (material) and if I go to the advanced setting I cna enter the following Code:
View Replies !
Sendmail Script Wont Run On Fasthosts
Im trying to setup a sendmail script to email the contents of a form but never receive the email! The script appears to run correctly as it runs the redirect and no errors come up but the mail never arrives. Ive followed all the so called advice in the fasthosts FAQ but that hasnt seemed to do anything. Code:
View Replies !
Submit Wont Link To Next Page
I have written this as an answer to some other major issues I had with another form I was trying... The problem now is, If a required field left empty...it links to this page..."ALL GOOD" But when the 'Submit' button is clicked, the page goes white and doesn't show the page reqested... Code:
View Replies !
Fresh Install Wont Load
I am getting the following error after adding the php module into the apache.conf. I verified the files are pointed to the right locations but still no luck. Can't locate API module structure `php_ini4' in file /etc/httpd/modules/libphp4.so: /etc/httpd/modules/libphp4.so: undefined symbol: php_ini4
View Replies !
Why Wont The Mail() Function Work
even when i use the script of the faq pages and change the $to to my email address the if statment says the mail is sent but it dose not arrive in my inbox. I am using php version 4.4.4 on a remote server so I am pritty sure it is not a config problem. Is they some thing obvious I am missing
View Replies !
Mail Form Wont Work
I've been working on a form where the customer can fill out some information and then click the "submit" button and the php will send an e-mail using the mail() function. However, I have run into an interesting problem. When the submit button is clicked, the page seems to refresh itself and maybe re-load the page to a completely blank form; it will not go to the thank you page or send the e-mail. This worked on my test environment but I am running into these problems on my website.
View Replies !
DB Will Update But File Wont Upload
I have this script below that is suppose to upload a file and update the database. well it works with the database fine but it wont upload files to the webserver. I have my own webserver on my pc I use to test the scripts and it works fine but when I upload it to the live server the uploading doesnt work Code:
View Replies !
Enter Key Wont Submit Form
I have a simple login form .. if i type my password and CLICK submit it will work if i type my password and press the enter key it goes back to the script URL .. no invalid password, nothing .. i have errors setup for this. I dont understand how if i click the submit button it works, but if i press enter on the keyboard it doesnt .
View Replies !
Eval And Array - It Wont Show The Value
I can get the following to work: eval("return $subnav_array;") However if I do PHP Code: echo '<strong>' . eval("return $subnav_array[0][0];") . '</strong>' all I get is: HTML Code: <strong></strong> This isnt working and I dont know why.
View Replies !
Set A Cookie But For Some Reason It Wont Work.
Im trying to set a cookie but for some reason it wont work. The code is inside a Submit button and happens after I have read the MySQL database and succesfully retrieved the record. For some reason the cookie is not created. Here is the code setcookie("firstname",$firstname,time() + (7 * 86400)); $firstname contains a string value. It is not empty.
View Replies !
Includes Wont Read Stylesheet
I have added the navigation my pages as an include, Now this appears fine and works well, However I also have a stylesheet to change the color of the links on mouseover, but the includes file does nothing when rolled over, I know the the rest of the page reads the stylesheet ok as a couple of links not connected with the incude file work as they should.
View Replies !
Dbase Search Wont Return Error
i have the following php search a database, and everything works fine except if no records are are found i just end up with a blank page. i want an error to be written to the page saying that no records were found or something. PHP Code:
View Replies !
Wont Recognise POST From HTML Page
I've been having a ball over the last few days trying to configure IIS, PHP5 and MySQL... Finally got it all working then tried a simple form script and discovered that PHP wouldn't print the variables from the form to the screen! Code:
View Replies !
HT://dig And Other Search Engines Wont Look At Query String In Links
I realize that this is no the HT://dig support forum but I haven't been able to get htdig to index my site properly: It will only show one file: index.php when every other files is linked off the main page (i.e. index.php?content=page2.html ) I believe that this search engine is not looking at the QUERY_STRING properly or following the links off the main page. Does anyone know how to get htdig to work on a dynamically generated site - or can you recommend another search engine that would help index and search such a site.
View Replies !
|