Has anyone here experience of CURLing .asp pages which use session
cookies as I am having difficulty doing so on two different sites, both asp.
Thanks,
John
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
I am on a cPanel type shared server, they don't have a way of converting
an Excel spreadsheet to xml (to read it into the database). This is a
pity because xls files are smaller for the purpose of uploading them.
Is there anyway to do this otherwise on a server, perhaps a different
flavour
I was looking at this page:
http://www-128.ibm.com/developerworks/opensource/library/os-phpexcel/#N10181
Hope this helps. Do you have a link on the pear solution as the pear
example seems wrong on the above link?
John
santosh wrote:
Hi All,
I am using subquery to fetch data from
in the file and lines starting with ';' or '#' are ignored. If
FILE is -, the list will be read from standard input.
So, from a PhpScript, you manage the contents of FILE and then launch
rsync with the appropriate additional options.
-Original Message-
From: ioannes [mailto:[EMAIL
OK but I could execute the script on the target server, which is also
mine. So the jpg on the source is actually the remote server, I would
be reading a remote file and writing it to the server which is executing
the script.
Chris wrote:
ioannes wrote:
This is too advanced for me
to include
in the sync.
Have you read the man page for rsync?
-Original Message-
From: ioannes [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 05, 2008 9:48 AM
To: php-db@lists.php.net
Subject: Re: [PHP-DB] Copying an image from one server to another
I was unsure what was meant by FILE
OK, so how would I hand over the list of files from php to the script?
And am I right that I would write the rsynch code in a text file called
anything.txt and the
rsync
at the start of the line is what calls up the rsynch program, unlike php
where you need to call it something.php -
Am I right in thinking that exec() executes a string as a call to a
program which executes in a shell? So am I to write:
$callthis=the contents of my rsynch file;
exec($callthis);
?
John
ioannes wrote:
OK, so how would I hand over the list of files from php to the
script? And am I right
? (it would be a much more safer to
transfer files)
-Aleksander
Chris wrote:
ioannes wrote:
I am trying to:
- check whether an image file exists on a server,
- check whether it does not exist on another server, and if not exists
- to copy from the first location to the second.
I am using cURL
in a shared or dedicated
environment).
Chris wrote:
ioannes wrote:
I am trying to:
- check whether an image file exists on a server,
- check whether it does not exist on another server, and if not exists
- to copy from the first location to the second.
I am using cURL. First step to capture the image
I am trying to:
- check whether an image file exists on a server,
- check whether it does not exist on another server, and if not exists
- to copy from the first location to the second.
I am using cURL. First step to capture the image from the first
server. When I return this image to the
I use:
if(ISSET($select_sql_two)$select_sql_two!is_null($select_sql_two)) {
or
if($select_sql_two==submit) {
if submit is the button value. I am not sure which is best.
John
Ben Stones wrote:
Hello,
I am having another problem with PHP, and I have tried rectifying the
problem with each
:
http://code.google.com/apis/documents/overview.html
-TG
- Original Message -
From: ioannes [EMAIL PROTECTED]
To: php-db@lists.php.net
Date: Wed, 26 Dec 2007 23:59:12 +
Subject: [PHP-DB] Download google spreadsheet
I would like to get the information in a google spreadsheet
I would like to get the information in a google spreadsheet (of a
client) programatically into my database. I was thinking of using cURL,
downloading the file into Excel, then uploading it into my database
using a scheduled task, then cronjob some code to make it useful.
However, the google
It appears the dns message (including page not found and blank page) was
a symptom of trying the email test page too often resulting in more than
the allowed number of simultaneous processes (20 are allowed on the
shared server).
However, then I got a further solution:
The apache timeout on
I am trying to solve this. My server support made this test script:
?php
if (mail([EMAIL PROTECTED],test php mail(),test php
mail(),From: Bluehost Test [EMAIL PROTECTED]))
{
print Working.;
}
else
{
print Failed.;
}
?
I tried this many time and had the following experience (it will be the
Further testing shows that the script fails just before the mail() line,
though after a variable number of refreshes it goes through and
downloads all OK. Can anyone think why there should be this occasional
interaction between the mail() command line and the php script.
John
ioannes wrote
I am now pretty sure that it fails after the mail() function sends email
(since I receive the email) but before it reaches the next line of the
script. I might try something like 'mail(...) or die(...)' and see if
it prints out the die('') bit. But I am looking to find out why it
dies,
Thanks to all who replied. There is a lot of undefined index and
undefined variables when I turn on error reporting.
The error logs show 'file not found' errors in the last 24 hours for
files that I am sure were never called from any script on my site. I do
not understand 'mod_rewrite:
The problem occurs without session data in the page also. Buffering is
off on my php.ini file.
Language Options
output_buffering= Off
I have been told that the MAIN error_log below also shows errors for
other users on the server, so that does not help particularly.
John
ioannes wrote
I also get this in my error log, I am not sure what to do with this
(what side effect?):
PHP Warning: Unknown(): Your script possibly relies on a session
side-effect which existed until PHP 4.2.3. Please be advised that the
session extension does not consider global variables as a source of
I am stumped and so is my hosting help desk (shared server) on this
one. My site is on a php4 server, with database. Recently I have had
pages not fully load, and it seems to be a symptom that is spreading to
other pages in the site. I have considered the following causes and
dismissed
I am trying to send POST values from one page to another, they are too
long to be handled by GET.
page1.php
page2.php
I've tried in page1
$str=?;
foreach($_POST as $name=$value) {
$str.=$name.=.$value.;
}
header(Location: http://host/path/page2.php$str;);
gives:
http://dev.mysql.com/doc/internals/en/select-union.html
Does anyone know what this means? Can it be implemented in the flow of
php code without explicitly creating temp tables in the database?
My query is like:
$query =
(SELECT
Table.field, [other fields]
FROM Table
I ask this as I do not have two web sites on different servers to test
at the moment.
Does it work to use an include function in the php code on one site that
calls a function on the other site? If you include a file on a remote
server that runs a function, where does the function run - on
I have a particular business application so just returning html is OK,
the output is the useful bit in this case. I understand from the
discussion that I can still run my code on my server in response to a
remote server requesting the result of a function in that file and that
result gets
It is on a shared server, max_exec_time is 3000, ie 30 seconds, which yes is
probably being exceeded. However, having set the CURL_CONNECTION_TIMEOUT
thingy it worked a lot better, and the page kept working long after 30
seconds had expired, leaving me with the question: what does
I have a web site and google likes to count the inbound links. I have set
up a way for people to add links from my site to theirs, however I would
like to check whether they have linked back to my site. I ask them to
nominate where the link back page is, and I could check this manually. But
Multiple inserts using mysql were very slow so I read
http://ee.php.net/manual/en/function.mysql-query.php for the function below.
It works well, reducing insert/query times dramatically.
However, I don't understand the difference below between 1 second and 5
seconds taken for the code below.
I usually use INNER JOIN to link tables together in a straight line, like a
branch. Can I use it to link tables like twigs stemming off the branch. If
so, do I use:
SELECT
TABLE1.FIELD, TABLE2.FIELD, TABLE3.FIELD
FROM
(
TABLE1 INNER JOIN TABLE2
ON TABLE1.FIELD =TABLE2.FIELD
)
INNER JOIN
My first attempt was to use $result=array_merge($result1,$result2) - doesn't
work. 'not a valid resource'
I have two databases with different connections, so MySQL UNION query would
not work.
How do I merge the result set of the queries in that case?
John
--
PHP Database Mailing List
If you use LIMIT row_count with ORDER BY, MySQL ends the sorting as soon as
it has found the first row_count lines rather than sorting the whole table.
http://dev.mysql.com/doc/mysql/en/limit-optimization.html
I need to get the top $num results from a completely sorted table (eg sorted
on ID,
I am trying to upload images - in fact an image path - from a PC.
I use the input tag:
INPUT NAME=addpic TYPE=file
which nicely gives an input textfield and Browse button! This gives me, in the
input box, eg:
c:\pics\subdir\pic1.jpg
The relative path on the server is something like:
I'm looking for a programmer, preferably in London or UK, who has been maybe
out of work for a few years, to discuss an easy project with. Pass the
request on to your friends.
John
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Can I embed a variable within a blob field, so that when the blob is printed
the variable is extracted and given its correct value?
John
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Switching off Auto-select in the Encoding in IE did solve it. Thanks a lot.
John
- Original Message -
From: graeme [EMAIL PROTECTED]
To: ioannes [EMAIL PROTECTED]
Cc: php-db@lists.php.net
Sent: Friday, January 14, 2005 8:17 AM
Subject: Re: [PHP-DB] Input ++90 causing problems
It appears
)!
- Original Message -
From: graeme [EMAIL PROTECTED]
To: ioannes [EMAIL PROTECTED]
Cc: php-db@lists.php.net
Sent: Friday, January 14, 2005 8:17 AM
Subject: Re: [PHP-DB] Input ++90 causing problems
It appears as plus sign and numbers on my computer.
graeme.
ioannes wrote:
It appears that the code
It appears that the code below in short has the following problematic strings:
++90 ++90-212- gives 212- on my test page below: error2.htm. A clue
might be that a search on google turns up Arabic unicode, and the input here
was done in Turkey. check the link:
What is a good way to load a database which I have served in a sql file
(with all the sql statements etc). I have tried a GUI called Mascon, and a
terminal command mysql -u user -ppassword db_name file.sql with no luck
due to various errors, including too large packet size, need reload
I want to replace one substring with another within a MySQL table record, eg
a blob.
Do I need to extract the record and do it in php or can I do it directly
with mysql? The Replace Syntax notes in mysql.com seem to relate to
replacing the whole row and I'm not quite confident with shell
Sorry to visit this once again, but this is a problem with bits the solution
to which causes other problems.
I need to do this in a SQL query:
(arrival+nights)='$thisdate'
'arrival' is a date field, and 'nights' is an integer, so the above makes no
sense, being like 2004/12/31+7 which is
The answer seems to be DATE_ADD but I haven't got it to work yet...asking
the MySQL people.
I need to do this in a SQL query:
(arrival+nights)='$thisdate'
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
) '$thisdate';
INTERVAL means what it says, so from 1/1/04 add an interval of 1 gives
3/1/04, not 2/1/04. Hence my -1.
John
- Original Message -
From: ioannes [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, September 02, 2004 7:42 PM
Subject: Re: [PHP-DB] Dates - adding to unix 86400
Code:
?
//unix date is 1099177200 seconds since 01/01/1970
//date based on unix 31 10 2004
$thisdate=date(d m Y,1099177200);
print($thisdate);
$next=1099177200+60*60*24; //86400
//add 86400 should give next unix date
//date based on this is also 31 10 2004
print(br);
$thisdate=date(d m Y,$next);
When I run this code I get:
31 10 2004
31 10 2004
http://www.shortstay-london.com/testdates.php
- Original Message -
From: Craig Brothers [EMAIL PROTECTED]
To: ioannes [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Wednesday, September 01, 2004 2:00 PM
Subject: Re: [PHP-DB] Dates - adding
[day after first day above], but this gives me 11pm on 31 Oct as above.
?
- Original Message -
From: John Holmes [EMAIL PROTECTED]
To: ioannes [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Wednesday, September 01, 2004 2:31 PM
Subject: Re: [PHP-DB] Dates - adding to unix 86400 seconds
Magnificent.
- Original Message -
From: John Holmes [EMAIL PROTECTED]
To: ioannes [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Wednesday, September 01, 2004 3:10 PM
Subject: Re: [PHP-DB] Dates - adding to unix 86400 seconds not equal nextday
From: ioannes [EMAIL PROTECTED]
Sunday 31st
Message -
From: Simon Rees [EMAIL PROTECTED]
To: ioannes [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Wednesday, September 01, 2004 3:16 PM
Subject: Re: [PHP-DB] Dates - adding to unix 86400 seconds not equal nextday
Isn't this due to how your operating system handles the switch from
daylight
Of course, it's because the whole of Summer is an hour out and this changes
31 Oct. I had it backwards.
I'd still like to find out if there is a mysql equivalent of gmmktime for
use in queries like:
SELECT UNIX_TIMESTAMP(mydate) FROM MyTable WHERE
UNIX_TIMESTAMP(mydate)='$thisdate';
and
I'd still like to find out if there is a mysql equivalent of gmmktime for
use in queries like:
SELECT UNIX_TIMESTAMP(mydate) FROM MyTable WHERE
UNIX_TIMESTAMP(mydate)='$thisdate';
and $thisdate is a gm date. Otherwise I need to convert the GMT date back
to Summer time just for the query. Is
Final problem on this was adding a number of nights to an arrival date in a
query:
$query=SELECT field FROM Table WHERE
(UNIX_TIMESTAMP(arrival)+nights*86400-86400+3600)='$thisdate');
When the arrival date is in Summer, adding a number of night requires
adjusting for the hour [3600], because
I tried something similar, though only updating one table, where the columns
matched, and got errors:
$query=UPDATE t1 SET t1.f1=t2.f2 WHERE t1.f3=t2.f4;
query failed: Unknown table 't2' in where clause. However, t2 clearly does
exist.
Using nested query:
$query=UPDATE t1 SET t1.f1=(SELECT
52 matches
Mail list logo