Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    PHP


SuperbHosting.net have generously sponsored dedicated servers to ensure a reliable and scalable dedicated hosting solution for BigResource.com.





Redirect Page On Remote Web Host When Local Server Is Offline


Hope some one can help . I have my web site hosted on powweb (my remote web host)and I want a user to be redirected when they access my local server through a link on my remote web site to another page on my remote web site when my local server is offline.




View Complete Forum Thread with Replies

Related Forum Messages:
Date Function On Local Server To Remote Host
This little combo was giving me Sunday, April 30 on my local server and Thursday, April 1 on my remote host, and I can't for the life of me figure out why. I could swear it used to work. PHP Code:

$today = gmmktime(0,0,0,date('m,d,Y',gmmktime()));
echo gmdate('l, F j', $today);

(The first function gives me a "midnight" time stamp, so all dates put into the db, and compared to it, are consistent). When I rewrote it thus, it worked fine on both hosts:
PHP Code:

$m = date('m',gmmktime());
$d = date('d',gmmktime());
$y = date('Y',gmmktime());
$today = gmmktime(0,0,0,$m,$d,$y);

Any idea what the heck is going on?

View Replies !
Scheadule Backup Of Our Database From A Host Server To Our Local Server
I am wanting to scheadule backup of our database from a host server to our local server. How do I do this and is their any software out their that can take care of it for me? Or will I have to write the scripts?


View Replies !
Upload From Local Host To Server Using Ftp Functions
On my website I upload files from local computer to my server using FTP functions in PHP. It all works perfectly when I run the script from my pc, but once it s on the server it can t find the file. ftp_put(): error opening C:Documents and SettingsAlexanderDesktop r1_1.jpg

I guess it happens cos it tries to find it on the server not on my PC. The question is, how can I point it to my pc, not server. Or how can I make it copy files from my local computer to the server while running from the server!

View Replies !
Php MySQL Works On Remote Server, Only Partially On Local Server
code to populate form select fields with data from a MySQL database, so a user
can use those to sort/filter and view the 3,000 records. No inserts --
just selects; very simple.

I originally set this up using URL-based query strings at
http://stjuliana.org/school/ar/BUindex.php but since that only allowed
sorting and not filtering, hence all 3k records load, I made a form
verson at http://stjuliana.org/school/ar/index.php . Everything works
just fine, however, there's still a lot of tweaking I want to do, such
as splitting the form input and output into two pages (_blank), having
a printable version, etc. To that end I just set up the latest builds
of Apache, php and MySQL on my local Windows XP box, lest I blow my
beer budget for the month on bandwidth overage. <g>

I have a very simple page I used to test my localhost setup and
everything's fine. I can connect to MySQL, create, insert and select
from DBs, so I know my config is fine. All my other .php pages on this
site work fine locally as well.

The two abovementioned pages, however, are giving me fits when run
locally...

For the URL-query-string version, it loads up with the default view
(=name_ns), which grabs all records and sorts by name and point asc.
No matter which of the other sort 'views' I might choose, it still
loads up all the records in that default sort. The server's holding on
to something and I don't know how to clear it. The remote version
correctly sorts based on the query string chosen.

The form version is worse. It connects to the DB and populates the
select boxes with the field data -- that part's fine. But no matter
which submit button is selected, no data is retrieved. I get no error,
but no data either. The form's action is set to $_SERVER['PHP_SELF']
and I've tried both GET and POST -- no change.

Since the exact same pages work on the remote server I know it has to
be something on the local setup. But where do I look if there's no
obvious error?

This is probably something incredibly basic but I'm bleary-eyed from
reading tutorials and forums all over the Internet and can't come up
with anything.

View Replies !
Download Files From Remote Server To Local Webserver
I am trying to create a php page whereby people can download files from a remote server to their own server (to update their webdirectory with updated files/images etc). So for example one php page (e.g. update.php) should be able to download files from a remote server to a specific directory on their local webserver. Is this possible?

View Replies !
Can't Read Remote Web Page From Local Apache/PHP
I'm trying to read the contents of any Web page on another
host. I'm finding that...

echo file_get_contents( 'http://www.php.net' );

.... works fine if I upload the PHP script to my Web host, and run it
there. But if I run it on my PC, which is running Apache 1.3.33
(Win32) and PHP 5.0.5, then it always times out, and gives me the error
message...

[error] PHP Warning: file_get_contents(http://www.php.net) [<a
href='function.file-get-contents'>function.file-get-contents</a>]:
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 has failed to
respond.

I get the exact same results using...

$fh = fopen( 'http://www.php.net', 'r' ) or die( $php_errormsg );
while (! feof($fh)) {
$page .= fread($fh,1048576);
}
fclose($fh);
echo $page;

Anyone know what could cause this to happen?

View Replies !
Connect Page (local) To Remote Database:
I'have Easy PHP in localhost and i need connect php page (local) to remote
database:

$db_host = "62.149.225.23";
$db_user = "gfo";
$db_password = "gfo";
$db_name = "gfonline";
$db = mysql_connect($db_host, $db_user, $db_password);

The browser show this message:

Warning: mysql_connect(): Can't connect to MySQL server on &#3962;.149.225.23'
(10061) in e:phpgfonline.itprovaremoto.php on line 7

View Replies !
Mail() [function.mail]: SMTP Server Response: 550 Not Local Host Gmail.com
I do a mail() and get:

Warning: mail() [function.mail]: SMTP server response: 550 not local host gmail.com, not a gateway in C:xamppxampphtdocs estsitemail.php on line 7


<?php
ini_set("SMTP","rlwatkins.com");
ini_set("sendmail_from","hunter@rlwatkins.com");
mail("huntercjcarroll@gmail.com","hello me","spamtastic","From: hunter@rlwatkins.com");
?>

what is wrong with this, how do i set it so that i can send to something other than localhost?

View Replies !
Copy Remote Page To My Server
I have permission to use some data from a weather site, the page has a table, I strip the data I want and display on my site using php and format it to suit.

I am retrieving about 60 bits of data from that page, this is now taking a few seconds, I was wondering if it is possible to copy the page locally and then I run my script.

Is it possible to copy a page from a server to my site?

View Replies !
Local Host
when i am trying to connect a database with this:

mysql_connect (localhost, username, password);

how do i find my local host?

View Replies !
Local Host Problem
I'm a newbie with php, and I have a simple problem. I have installed apache on WIndows Xp. According to the tutorial I'm following, after installing apache I should be able to type http://localhost into my web browser and see a web page that reads "if you can read this, then apache was installed successfully." Unfortunately, when I type in http://localhost, I get a prompt to enter a username and a password.

View Replies !
Local Host Is Set At Permission 0644
i just checked and the root directory for my whole local host is set at permission 0644. how do i change this? i don't think i have permission to change my permissions, because when i try to put the following code:

chmod ("phppractice/processor.php", 0777);

i get this error message:

Warning: chmod() [function.chmod]: Operation not permitted in /Users/ivey/Sites/permissions.php on line 8

View Replies !
Emailing, 550 Not Local Host , Not A Gateway
Don't know if this is new news, old news or no news. Every time I tried to
email with my php/mysql combo I would receive a email back from the system
administrator with about 5 of the addresses listed with a message like this:

550 not local host <hostname>, not a gateway

Tried all the php fixes, ISP technical support, checked for port 25 blocking
and domain host support no dice. These were/are all good host names. Turned
out that in typing in and/or importing addresses some (Those being rejected)
were typed in capitol letters. As soon as they were converted to all
lowercase the problem went away. I posted this because you have saved my a**
so many times I can't count them. Why it worked I do not know but it worked.

View Replies !
Local And Master Safe_mode And Security At Host
I have the following question:

a hosting provider has turned local safe_mode off and the master
safe_mode is on. This prevents an application/php script to work.

The provider refuses to turn safe_mode off due to security reasons. They
work with some kind of virtual hosting I had a quick look at the system
and saw a /etc /bin etcetera, in the /etc there was a php.ini where
safe_mode was Off.

a few questions:
a) is turning (local) safe_mode off a real big security risk as the
provider tells us?
b) if so why is the master safe_mode turned on?

On my own system both local and master safe_mode are turned off, and I
did not modify anything when php was installed.

another question arises: where are the local and master values set?

Is there a good page on safe_mode? Google only points me a hosting
provider that allows safe_mode to be on.

View Replies !
Include(ing) From Remote Host
I have been trying to include() a file from an external host. This file contains some arrays such as; module_name, module_version, module_filename.

I need to be able to include() this file and use this data on the 'local' server. If I use a readfile(), the information is displayed in my page, so url, dns, etc are all correct. To use an include however, I get nothing. A simple sample (only module name array) follows;

<?php
global $modules;
echo "I am on the remote server";
$modules = array(0 => 'module 1',
1 => 'module 2',
2 => 'module 3'
);
?>

View Replies !
Readir() With Remote Host
I have an issues with image and opendir or readir and i was hoping if you can help me.
I have 2 domain names one of it I run image hosting script, and I want to display the latest uploaded image a the second domain I have, and I only know how to do it locally with opendir and readir but when it comes to do it with remote servers i'm completelt n00b.

View Replies !
ODBC >> DBF On A Remote Host
I'm running apache+php+winXP, and can connect easily to a dbf on my
local system, but when I try to connect to the same dbf on a mapped
NetWare drive I get this error:

Warning: odbc_connect(): SQL error: [Microsoft][ODBC dBase Driver]
'(unknown)' is not a valid path. Make sure that the path name is
spelled correctly and that you are connected to the server on which
the file resides., SQL state S1009 in SQLConnect in C:Program
FilesApache GroupApache2htdocslahblah.php

Both DSNs are configured the same in the ODBC manager, one is mapped
to the local file on C:, and the other on my mapped G: drive.

View Replies !
Login Problems - Re-built My Site On My Local Host Using Xampp
I have recently re-built my site on my local host using xampp. I am running MKPortal M1.1 and phpBB 2.0.21 upon a basic completion without any mods added i decided to upload to my hosting server. upon upload i ran this: Code:

View Replies !
Online Or Offline Server Report
I am going to be making a script that reports whether or not a server is online or offline. I have a download page, and the page has six different hosts for a file. I wanted to make a small script that would report whether the server is online or offline, so you know which one to chose.

I am unsure as to what will check and see if its on or off. Is there a boolean statement that will connect to a page and tell if you if it is there or not? DNS is not enough, it has to actually make a connection with the server.

View Replies !
Sending Post Data With Php To Remote Host
how one might send post data with php to remote host? i'm not after of getting such apps, just about the ways of doing it...php sockets?

View Replies !
How To Execute A Perl Script On Remote Host
Now i have 2 servers A and B, A is a production server (the running web
app is writen with php) and B is a CVS server.

When i click a button in the running web app, i need to execute a perl
script on CVS server.

View Replies !
Printing Form My Host To A Remote Location
Just wondering if anyone knows if it is possible to print direct from a php script on my host to a remote location ie at my house. Also if this is possible is it possible to hold a que until my computer is on.

View Replies !
Do People Develop Live On The Server Or Offline?
I have been developing on our server in a 'spare' domain up to now which makes for a <B>lot</B> of time spent uploading/testing changes as I go along. I was wondering do the majority of PHP/MySQL folks do this or do do you set everything up on your own machines?
I have seen the downloads available and was wondering is it straightforward to get going offline. As soon as I had everything runnung on our server, I stuck to that.

View Replies !
Remote To Local DB Sync
help me with regards to an efficient way in which to synchronize a localhost MySQL DB with a remote MySQL DB? I cannot use any 3rd party software as my host does not allow external access to the remote DB.

View Replies !
Printing To Local Machine For The A Remote Site
I would like to find out if I can get a page to print on a printer physically next to the server when a user of my site clicks the submit button. I'm sure that there's a way, but being new and slightly slow I'm not sure where to even begin looking.

View Replies !
Copying File From Hosted Remote Sever To Local Machine
I am trying to use php to automate the copying of a file from my remotely
hosted directory to my computer. I have put together the following but it
will only do the copying from one directory to another on the remote server.
Reading the postings on these functions they suggest that it can be done but
it appears to be the case if your are hosting your site on the same machine
you want to copy the files to. Does anyone know if there are functions in
php to do the transfer from remote server to my machine or if the code below
will acheive this with modification?

<?php
$ftp_server = "xxxxxxxx";
$ftp_user = "xxxxxxx";
$ftp_pass = "xxxxxx";
$local_file = 'myfile.txt'
$server_file = 'myfile.txt'

// set up a connection or die
$conn_id = ftp_connect($ftp_server) or die("Couldn't connect to
$ftp_server");

$login_result = ftp_login($conn_id, $ftp_user, $ftp_pass);

// check connection
if ((!$conn_id) || (!$login_result)) {
die("FTP connection has failed !");
}

// try to change the directory to myfilesdirectory
if (ftp_chdir($conn_id, "myfilesdirectory")) {
echo "Current directory is now: " . ftp_pwd($conn_id) . "";
} else {
echo "Couldn't change directory";
}

if (ftp_get($conn_id, $local_file, $server_file, FTP_BINARY)) {
echo "Successfully written to $local_file";
} else {
echo "There was a problem";
}

// close the connection
ftp_close($conn_id);

View Replies !
Script That Uploads A File To A Server And Then FTPs It To A Remote Ftp Server.
Basically I've developed a script that uploads a file to a server and then FTPs it to a remote ftp server. It was (as still does) work fine on my local testing server but since moving it across to IIS, when i run the script, now all I get is a blank page for anything but tiny files. I've tried increasing the values in php.ini that are associated with file uploads, yes I still get the blank screen.

View Replies !
Remote Redirect Under CURL, Proxy
Currently the situation is that there is a page redirect.php which accepts the post data and starts a login session. In past I access this page (redirect.asp) via cURL by posting username and password. It works fine and creates the session for tht cURL object. That's after this via that cURL object I can access all the private pages of that user. The cURL code to connect was:   

curl_setopt ($this->cur, CURLOPT_USERAGENT, $user_agent);
curl_setopt ($this->cur, CURLOPT_COOKIEJAR, "cookie.txt");
curl_setopt ($this->cur, CURLOPT_HEADER, 1);
curl_setopt ($this->cur, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($this->cur, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt ($this->cur, CURLOPT_TIMEOUT, 5000);
curl_setopt ($this->cur, CURLOPT_POST, 1);
curl_setopt ($this->cur, CURLOPT_POSTFIELDS, "user_ID=".$user."&passwd=".$pass);

But Now I am accessing this page redirect.asp by posting username and password and also via a proxy server. that's my any request to this page via cURL tunnels through a proxy server with the code shown below, I couldnot get logged in and when I print the html returned by cURL is as show below:  

View Replies !
Server Host
any free hosting sites with cPanel?

View Replies !
PHP/MySql On A Host Server
I'm very new to PHP/MySql and this is probably a complex question with a very simple answer.  I have two hosts, godaddy and hostican and have the identical problem on both.  I've successfully set up a database with tables.  I've inserted data into the table.  But I've done this all through cPanels.  When I try to do it through PHP the script seems to work but the results (new tables, inserted data) doesn't show up when I go back to cPanels and look for them. Code:

View Replies !
Getting Ip Or Host Name Of Requesting Server.
I have a web server with a bunch of web services.  I have another server calling these web services.  I need to get the ip of the 2 server(the server calling the web services) within the actual web service method(the files stored on the first server hosting the web services).

i tried $_SERVER['REMOTE_ADDR'] but that give me the ip of the user using the 2nd server, not the ip of the second server.

View Replies !
Web Host Says I Crashed The Server
My site was running fine until a week ago when the server seemed to be down a lot. When I contacted my web host, they said they would transfer my site to a seconday, "more" stable server. That's when my nightmare began.

After moving to the new server, they asked me to change my scripts to accomodate the register globals. Last night, my site got suspended. Web host says that one particular page is maxing out their CPU's 3GHz processing. This never happened before (my site has been up 2 years).

One possible explanation (I thought of) was that web owners were leaving them and due to shortage of funds, they have had to downgrade their servers package. Is this logical?

If not, Why would or could such a thing suddenly happen supposedly caused by a page that has hardly been updated? Virus?

View Replies !
My Host Has NO PHP, Pull This Data From Another Server
I'm wondering if anyone here can point me in the right direction. My host
does not provide php, and so I need to pull this data from another server
that does support such scripting.

View Replies !
Decent PHP Virtual Server Host
I'm currently using startlogic.com for my PHP/MySQL virtual server. At
$20, it's hard to beat the price. Unfortunately, I'm getting more and
more dissatisfied with their uptime.

I need PHP, MySQL, and the ability to host multiple domains.

Are there any other hosts y'all have had good or bad experiences with?

View Replies !
Host Address For Mysql Server
My mysql database resides on the server. I have to connect it by navicat or other conversion tool. But there is some problem of host address. It shows the incorrect host address or port no. It seems that host address is wrong. What may be the host address of mysql server.

View Replies !
Unknown MySQL Server Host
I have some PHP code, running on my machine which connects with a remote MySQL database. Before deploying the code I test is locally. When deployed it then sits on a hosted server and accesses the same database.

There is no conditional code and this was all working well until recently. I needed to enhance the appliation and made the changes but now it fails to connect giving error
Quote: Code:

View Replies !
Uploading A File To A Web Host Server?
In the email they sent regarding the account information, they asked me to put all the html files in the 'public_html' folder. So I thought it should be same for php too.

I put some .php files and also a .html file in the 'public_html' folder and when I tried to view the .php file, nothing comes up. But the htlml comes ok in the browser. I used ftp to put the files in their server. Does .php files have some other way to put in the server?

View Replies !
Unknown MySQL Server Host 'localhost '
I'm rather new to both MySQL and PHP. I've been trying to use PHP to
write to a MySQL database. I call mysql_pconnect to get a database
connection, but then when I call mysql_db_select, I get the following
error :

Unknown MySQL Server Host 'localhost '

I can connect to the database via the command line ok. Where can I
look to find the source of this problem?

View Replies !
Host Switched Web Server.. Sessions Not Working
our web host switched us to cPanel and now all of our logins on our website are not working at all here is the error message we get.

Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /homedirs/sonotek/public_html/sono-tek.com/pdf_download/pdflogin.php:2) in /homedirs/sonotek/public_html/sono-tek.com/pdf_download/pdflogin.php on line 3

I am using session_start(); at the beginning of each script here is a sample: ....

View Replies !
Web Server In Local
I work actually in local and when I put my php (and html) files on the local directory configured as localhost, an error message (which says that no files are on the server) appear. The server is Apache on Windows XP, and I see on the server only the Apache manual (and the message that says "Apache is correctly running!"). I had been just pass to Apache and I don't know what I do.

View Replies !
Host 'localhost' Is Not Allowed To Connect To This MySQL Server
Installation to mysql-5.0.37-win32.zip failed at Apply security settings

Error I get
The security settings could not be applied.
Error Number 1130.
Host 'localhost' is not allowed to connect to this MySQL server

how to solve this problem. Where can i download older version of mysql 5.0

View Replies !
Using The GET Function And Passing The Variables From The Remote Location To The Local Location.
I have an local and remote database and i need to update the local one with some of the details obtained by the remote one, I have tried to do this using the GET function and passing the variables from the remote location to the local location. I am finding that this is not a very relible way of doing this, does anyone have any idea about how i can do this in a better way.

View Replies !
Export Local DB To Server DB
can anybody refer me to a tool so that i can upload data from my local
mysql DB to server DB without phpmyadmin. I have FTP and other access
to server. my DB is like 100 MB.

View Replies !
Local IMAP Server
I've installed EasyPHP on my Windows machine, which does the job really
fine. Apache, PHP and MySQL easy going.

What are the possibilities for installing a local IMAP and POP server for
the same test/develop purposes?

View Replies !
Local Apache Web Server
At the moment I am using "easyphp" on my computer to test my php code. However, I would like to get a little more advanced and replicate an apache server on my home computer. Such that I can build a website using .htaccess on my home computer.

I can build it at home, then upload it all nice and finished to an apache server. Does anyone know where I can get an apache server for my home computer? A kind of local host for apache?

Also, I would like an IMAP email client on my server and to have some PHP code that is able to "read"/parse my incoming emails. Open them up - "read" them by looking for keywords - then delete them etc. Code:

View Replies !
Local IMAP/POP And FTP Server
I've installed EasyPHP on my Windows machine, which does the job really fine. Apache, PHP and MySQL easy going.

What are the possibilities for installing a local IMAP and POP server and a FTP server for
the same test/develop purposes?

View Replies !
Mail To Local Server
I have a question, May be i am wrong but i have doubt, If some body explain it either i can or not. Can i sent email to my local pc server then i read it. Explanation: For example i have a form where i put email, click on send button ,page executes and send mail. But is it possible to send this mail to local server on my pc,I mean offline internet. Without internet connection. I have apache with php,mysql And Windows server 2003. Then a script or software through which i read that mail. I want this only to check my scripts without uploading it to the internet server.

View Replies !
Local Apache Server
My php script uploads my files fine. I did a chmod 777 to the directory I want uploaded files to go, but when I upload to that directory (with php) none of the files have permissions, but the files are there. What's going on.

View Replies !
#1130 - Host 'localhost' Is Not Allowed To Connect To This MySQL Server.
I got PHPMyAdmin to work and while I was configuring privileges I accidentally deleted the ROOT user. When I tried to go the main PHPMyAdmin screen it keeps giving me an error saying.

#1130 - Host 'localhost' is not allowed to connect to this MySQL server.

View Replies !
Reading Local File Not On Server
I am trying to parse a file which is located on the users local drive and then take this data and put it into the mySQL DB. However, I get errors when I pass in a file path such as C:Documents and SettingsAdministratorDesktopfooSLInfo.txt.

View Replies !
Upload To Local Server Problem
Can anyone see where i am going wrong? I'm testing an upload facility. Here's the code for displaying the upload form:

View Replies !
Local Apache Web Server Revisited
I would like to replicate an apache server on my home computer. Conclusions of a previous thread on this topic:

1) Use the same operating system for your local apache server as your host uses.

Any comments on just how important this is would be very welcome because i am thinking of cutting a corner and running my local apache server on windows XP. My prospective host uses Linux.

2) There are some nice "neat, easy, tidy" installs of apache (with PHP and MySQL) available.

easyphp
AppServ
XAMPP

Any comments on which one is best would be highly appreciated. As would further suggestions.

3) Things that I want to do which are a bit special:

) Use the PHP IMAP functions. These are a PHP extension.

http://uk2.php.net/imap

So, I will have to add this extension. How easy is this with these local apache servers?

) Does anyone know an IMAP email client that I can put on my local host apache server?

courier-imap or CyrusIMAPD are apparantly possibilities. Can anyone point me to any reseources that would guide me through setting up these clients so that they are integrated with the apache web server - so that PHP code on the apache server could have access to emails in the IMAP email inbox. PHP code on the server can send emails from the IMAP email inbox.

View Replies !

Copyright © 2005-08 www.BigResource.com, All rights reserved