matleeds
-
Posts
36 -
Joined
-
Last visited
Never
Posts posted by matleeds
-
-
ok thanks for that..i can only find output_buffering = 4096 in my php.ini file though.
-
Hi thanks, I've put in the error settings code and get this back
Warning: Cannot modify header information - headers already sent by (output started at /home/limelite/public_html/limelitesolutions.co.uk/matamos/Epointment/index.php:13) in /home/limelite/public_html/limelitesolutions.co.uk/matamos/Epointment/ot/views/header.php on line 38
-
Hi, I'm not totally sure if this is the right section for this question but...
I have my dev environment (my laptop) - windows vista, apache web server, also using my laptop as a client.
I have my php project on the web server, I go to the login page in my browser (IE8) and login in, if it's valid it reloads the page with the user detail etc..it works.
I've moved it onto a linux server (i think it still uses apache), I go to the login page in my browser (IE8) and login in. A blank page is displayed BUT if i hit refresh the user detail is displayed as expected.
Also if I logout, again a blank page (it should display the login page) but when I hit refresh this time, it stays blank.
I won't post my code just yet as I was wondering if anyone ever had the same issue before?
Windows..works ok, Linux..doesn't work ok till refresh, but even then that doesn't work for the logout.
My other thought is that it may work ok in windows because everythings on my laptop as in c:/php and the web server.
Not much to go on I know but it may ring a bell with someone.
thanks
-
thanks v much...i'll look into this shortly and let you know how i got on.
-
Hi there,
I'm after a bit of clarification. On the project I'm working on I installed/configured php and pear and apache web server all on my laptop and have been developing my project ok..so far so good.
The project involves a scheduled task on the clients pc's which runs a batch file that runs a php script which interrogates an sql server db and sends the data to a web server where it is processed. This works ok on my laptop.
Now it's dawned on me that when this is used in the real world the client pc won't have a web server running on it (as I have on my laptop). So (and this is where my limited experience with PHP comes in) can I just install PHP/PEAR onto a clients pc (by install I mean just copy the relevant folders/files onto their pc) and set the scheduled task to run the batch file...will this work? or does both PHP and PHP require some interaction with a web server.
Also, re. PEAR. When I installed PHP I then ran the go-pear file which did the installing of PEAR. Should I do this for my real world installation or can I just copy my my PHP/PEAR folders/files from my laptop (with a bit of config/ini file tweaking) ...does the PEAR install put anything into the windows registry?
thanks,
-
Hi,
I'm using Windows Vista, I have Apache HTTP server 2.2 running and am using PHP 5.2.17.
I’m having a problem remotely running a php script on the web server. I run this script locally below…
<?php $file = fopen ("http://localhost/Epointment/testphp.php", "r"); if (!$file) { echo "<p>Unable to open remote file.\n"; exit; } while (!feof ($file)) { $line = fgets ($file, 1024); /* This only works if the title and its tags are on one line */ if (preg_match ("@\<title\>(.*)\</title\>@i", $line, $out)) { $title = $out[1]; echo "/n".$title."/n"; break; } } fclose($file); ?>
And after about 30 seconds get back…
PHP Warning: file_get_contents(http://localhost/Epointment/testphp.php): failed to open stream: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host failed to respond.
As this will be used in the real world I can’t really use a Path instead of the URL and I have tested it on a ‘real’ web server (one that’s not on my pc and not localhost) and it works and I have also run the testphp.php script ok directly on the webserver.
Thanks for any help…
-
Hi,
I've tried both those and still get the same problem I'm afraid.
-
Hi, thanks for the speedy response.
How would I check either of those two questions?
-
Hi there,
I'm a .net developer and I've inherited a partially complete php project. I'm trying get part of it running on my pc and am running into some issues due to my fairly limited knowledge with php/apache web server.
I'm using Windows Vista, I have Apache HTTP server 2.2 running and am using PHP 5.2.17.
The aim is to send some data to the web server.
I'm using this function below -
public static function push_data($data)
{
$data = base64_encode(gzdeflate(ot::encrypt(serialize($data), otCRYPT_KEY), 9));
$data = http_build_query(array(otDATA_KEY => $data));
$opts = array (
'http' => array (
'method' => 'POST',
'header'=> "Content-type: application/x-www-form-urlencoded\r\n"
. "Content-Length: " . strlen($data) . "\r\n",
'content' => $data
)
);
$ctx = stream_context_create($opts);
return file_get_contents(otDATA_URL, 0, $ctx);
}
And am getting this message back -
PHP Warning: file_get_contents(http://localhost/Epointment/ot/backend/data.php): failed to open stream: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host failed to respond.
I've echoed $ctx and get Resource ID #15
and echoed otDATA_URL and get http://localhost/Epointment/ot/backend/data.php, which is correct.
I've run a test php script actually on the web server and it works, so at least I know the server is running
and PHP works on it.
I'm not sure if this is an issue with the Apache settings or the PHP script or php.ini settings
thanks for any help,
works on windows not on linux issue..
in PHP Coding Help
Posted
thanks guys...after changing my output_buffering and adding the error reporting I do now get the same error in my dev set up and understand that it is a header related error. I'll mark this as solved and probably post my scripts if I can't track down where the problem specifically is.