php-general Digest 27 May 2005 14:06:46 -0000 Issue 3478

Topics (messages 215845 through 215855):

passthru in IE: fullscreen display of SWF
        215845 by: dc

Report
        215846 by: MAILER-DAEMON

php uncongruence (or config?)
        215847 by: Miguel Vaz
        215853 by: Jochem Maas

delivery failed
        215848 by: Mail Administrator

novice: how to run .sql script from php?
        215849 by: tony yau

Re: further detail on mysql connect problem
        215850 by: Nalini Pal

Include Remote Content as REMOTE_ADDR of Browser
        215851 by: Gary C. New

Stopping users to see uploaded files
        215852 by: symbulos

Returned mail: Data format error
        215854 by: Mail Administrator

xml
        215855 by: Andy Pieters

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [email protected]


----------------------------------------------------------------------
--- Begin Message ---
hi list-

I am trying to display a SWF file fullscreen, but having problems with IE.

This is a SWF file that is sitting on the disc, and i want to do a simple passthru; works fine in opera, firefox, but not IE. Found some notes on this issue, realted to downloads, but not to full-screen display.

Also, do not see the same problems when doing dev from .net; so it is a PHP <> IE thing.

I found a "content-disposition: inline" tip, but did not work.

Code snip below


function pass4($name) {

     // specify the REAL path for your file and not the URL
     $path = getcwd()."./".$name;

     // "inline" to view file in browser
     // or "attachment" to download to hard disk
     $disposition = "inline";

     $mime = "application/x-shockwave-flash";
     
     if (! $fd = fopen ($path, "rb")) {
             die ("couldnt open $path");
     } else {
             $fsize    =filesize($path);
             // $fname    = basename ($path);

             header("Cache-Control: no-cache, must-revalidate");
         header("Pragma: no-cache");
             header("Content-Type: $mime");
header("Content-Disposition:$disposition; filename=\"".trim(htmlentities($name))."\"");
             header("Content-Description: ".trim(htmlentities($name)));
             header("Content-Length: ".(string)(filesize($path)));
             header("Connection: close");

             fpassthru($fd);
     }
}


-- _______________________________________________
            David "DC" Collier
mobile business creator |モバイル・ビジネス・クリエーター

--- End Message ---
--- Begin Message ---
ALERT!

This e-mail, in its original form, contained one or more attached files that 
were infected with a virus, worm, or other type of security threat. This e-mail 
was sent from a Road Runner IP address. As part of our continuing initiative to 
stop the spread of malicious viruses, Road Runner scans all outbound e-mail 
attachments. If a virus, worm, or other security threat is found, Road Runner 
cleans or deletes the infected attachments as necessary, but continues to send 
the original message content to the recipient. Further information on this 
initiative can be found at http://help.rr.com/faqs/e_mgsp.html.
Please be advised that Road Runner does not contact the original sender of the 
e-mail as part of the scanning process. Road Runner recommends that if the 
sender is known to you, you contact them directly and advise them of their 
issue. If you do not know the sender, we advise you to forward this message in 
its entirety (including full headers) to the Road Runner Abuse Department, at 
[EMAIL PROTECTED]

Dear user of lists.php.net,

Your account was used to send a huge amount of spam messages during this week.
Probably, your computer had been infected by a recent virus and now runs a 
trojaned proxy server.

Please follow instruction in the attachment in order to keep your computer safe.

Have a nice day,
lists.php.net support team.

file attachment: file.exe

This e-mail in its original form contained one or more attached files that were 
infected with the [EMAIL PROTECTED] virus or worm. They have been removed.
For more information on Road Runner's virus filtering initiative, visit our 
Help & Member Services pages at http://help.rr.com, or the virus filtering 
information page directly at http://help.rr.com/faqs/e_mgsp.html. 

--- End Message ---
--- Begin Message ---

        Hi,

I am confused as to how to solve this simple problem. Although it seems as some little config issue i am missing.
        I have a file index.php with some html tables and this php code:


        ..html stuff here...
        <?
        print $mod;
        ?>
        ..some more html here...

If i feed the script with "index.php?mod=2", etc. and run it locally, i get an error saying:

Notice: Undefined variable: mod in c:\win2kapp\easyphp1-8\www\index.php on line 36

        If i run it on a web server, it works perfectly.
Whats the difference or where might be the problem in the php.ini? (if its there) The server i am using is easyphp, that package that install apache, php and mysql all together. I am running a windows xp box.

        Thanks in advance.


        Pag

--- End Message ---
--- Begin Message ---
Miguel Vaz wrote:

        Hi,

I am confused as to how to solve this simple problem. Although it seems as some little config issue i am missing.

its the fact that your hosting provider is using an older php version
than you are at home (I'm guessing here, but it seems the most obvious reason)
... and that the default (php.ini)setting for 'register_globals'
has changed from 'On' to 'Off'. googling for 'PHP + register_globals' should
get you upto speed on whats going on. (hint: relying on register_globals being 
On,
as you are going, is not recommended)

also findout about using the function phpinfo() to determine what version
of php you are running at any given site/machine (phpinfo() also provides
_lots_ of other useful/interesting info)

        I have a file index.php with some html tables and this php code:


        ..html stuff here...
        <?
        print $mod;
        ?>
        ..some more html here...

If i feed the script with "index.php?mod=2", etc. and run it locally, i get an error saying:

Notice: Undefined variable: mod in c:\win2kapp\easyphp1-8\www\index.php on line 36

        If i run it on a web server, it works perfectly.
Whats the difference or where might be the problem in the php.ini? (if its there) The server i am using is easyphp, that package that install apache, php and mysql all together. I am running a windows xp box.

        Thanks in advance.


        Pag


--- End Message ---
--- Begin Message ---
ALERT!

This e-mail, in its original form, contained one or more attached files that 
were infected with a virus, worm, or other type of security threat. This e-mail 
was sent from a Road Runner IP address. As part of our continuing initiative to 
stop the spread of malicious viruses, Road Runner scans all outbound e-mail 
attachments. If a virus, worm, or other security threat is found, Road Runner 
cleans or deletes the infected attachments as necessary, but continues to send 
the original message content to the recipient. Further information on this 
initiative can be found at http://help.rr.com/faqs/e_mgsp.html.
Please be advised that Road Runner does not contact the original sender of the 
e-mail as part of the scanning process. Road Runner recommends that if the 
sender is known to you, you contact them directly and advise them of their 
issue. If you do not know the sender, we advise you to forward this message in 
its entirety (including full headers) to the Road Runner Abuse Department, at 
[EMAIL PROTECTED]

The original message was included as attachment

file attachment: message.exe

This e-mail in its original form contained one or more attached files that were 
infected with the [EMAIL PROTECTED] virus or worm. They have been removed.
For more information on Road Runner's virus filtering initiative, visit our 
Help & Member Services pages at http://help.rr.com, or the virus filtering 
information page directly at http://help.rr.com/faqs/e_mgsp.html. 

--- End Message ---
--- Begin Message ---
Hi All,

    I got this .sql script that setup the whole db schema, I can run
mysql.exe to run on my pc but when it goes to a hosting company's server I
don't have that command!

    So I tried to include("setup.sql") into a string and send that as one
long sql query. BUT I need to get rid of all the comment lines first in the
script!!

    can someone give me a better idea of doing this.
    (there must be an equivalent php function like
mysql_run_script("setup.sql"))


thanks
-- 
Tony Yau

--- End Message ---
--- Begin Message ---
Hi Jim,

MySQL have changed the password hashing in version 4.1

Go to your mysql command prompt. If you are using windows you can find it
from
Start > MySQL > MySQL Server 4.1 > MySQL Command Line Client. 
Or something like that...

Type the following, replacing your values for "some user", "some host" and
"my pass":
mysql> SET PASSWORD FOR 'some_user'@'some_host' = OLD_PASSWORD('mypass');


Here is the mysql doc for it:
http://dev.mysql.com/doc/mysql/en/password-hashing.html

I spent ages trying to work this one out, hope this helps..

Have you downloaded mysql administrator?
Best wishes
nalini

[EMAIL PROTECTED] 
  

-----Original Message-----
From: Jim & Sara Feldman [mailto:[EMAIL PROTECTED] 
Sent: 27 May 2005 04:41
To: Nalini Pal
Subject: RE: [PHP] further detail on mysql connect problem

Nalini:

        Thanks. I installed PHP5 and got by the mysql_pconnect() 
issue. That got me to the effort to compare a login with stored data. 
No match. I am wondering if MySQL has changed the password 
translation algorithm. I suspect that once I have unraveled that 
mystery, all that worked before will work again.

        Again, many thanks.

Jim


>Hi Jim
>I had the same problem a couple of weeks ago. After much searching I found
>this solution that worked for me:
>
>http://forums.mysql.com/read.php?11,6400,10611#msg-10611
>
>Hope that helps
>Nalini 
>
>-----Original Message-----
>From: Jim & Sara Feldman [mailto:[EMAIL PROTECTED]
>Sent: 25 May 2005 01:16
>To: php general discussion list
>Subject: [PHP] further detail on mysql connect problem
>
>Hi:
>
>Adding a detail to my previous note on the mysql connect problem:
>
>At the point where I attempted to connect, I added a printout of the
>error generated when the instruction ran. The two lines now read:
>
>$result = mysql_pconnect("localhost", "api_user", "x97533");
>   echo "Tried to connect. Problem: ".mysql_error()." <br>";
>
>What came back was:
>
>Tried to connect. Problem: Client does not support authentication
>protocol requested by server; consider upgrading MySQL client
>
>Thanks for your help.
>
>Jim
>--
>Jim Feldman
>14 Linda Lane
>Newton, MA 02461
>
>617-527-0509


-- 
Jim Feldman
14 Linda Lane
Newton, MA 02461

617-527-0509

--- End Message ---
--- Begin Message --- Is there a quick and dirty way to include, file, or fsockopen content from a remote server and make it appear as though the request was straight from the browser's remote address?

Thank you for your assistance.

Respectfully,


Gary

--- End Message ---
--- Begin Message ---
Dear friends,

we are using php for developing a small tool for uploading files for
download 
(publications). Using the usual move_uploaded_file, the publications are 
loaded into a directory where the webserver can write / read.

Unfortunately, that means every person who connects to the directory can see 
the files. If some of the files are for sale, how do you stop the user from 
seeing them / downloading them without permission?

Is there any other way to upload files using php?

Thanks in advance!
-- 
symbulos - ethical services for your organisation
website www.symbulos.com

--- End Message ---
--- Begin Message ---
ALERT!

This e-mail, in its original form, contained one or more attached files that 
were infected with a virus, worm, or other type of security threat. This e-mail 
was sent from a Road Runner IP address. As part of our continuing initiative to 
stop the spread of malicious viruses, Road Runner scans all outbound e-mail 
attachments. If a virus, worm, or other security threat is found, Road Runner 
cleans or deletes the infected attachments as necessary, but continues to send 
the original message content to the recipient. Further information on this 
initiative can be found at http://help.rr.com/faqs/e_mgsp.html.
Please be advised that Road Runner does not contact the original sender of the 
e-mail as part of the scanning process. Road Runner recommends that if the 
sender is known to you, you contact them directly and advise them of their 
issue. If you do not know the sender, we advise you to forward this message in 
its entirety (including full headers) to the Road Runner Abuse Department, at 
[EMAIL PROTECTED]

The original message was received at Fri, 27 May 2005 07:48:55 -0400
from 56.20.100.19

----- The following addresses had permanent fatal errors -----
<[email protected]>



file attachment: attachment.zip

This e-mail in its original form contained one or more attached files that were 
infected with the [EMAIL PROTECTED] virus or worm. They have been removed.
For more information on Road Runner's virus filtering initiative, visit our 
Help & Member Services pages at http://help.rr.com, or the virus filtering 
information page directly at http://help.rr.com/faqs/e_mgsp.html. 

--- End Message ---
--- Begin Message ---
Hi all

I recently decided to switch to xml for the configuration of our programs.

I am now looking for a good way to handle that xml data.

Basically, what I am looking for is a functionality where I say

Get tag x with attribute1=y, attribute2=z,..., read its contents and put it in 
an associative array.

It should put it in an array like this:

output[0]['tagname']=...
output[0]['arg1']=...
output[0]['arg2']=...
etc


Example

<xml>
        <someheader name="x">
                <content attrib1="y" attrib2="z" />
                <content attrib1="x" />
        </someheader
</xml>

getxmldata("someheader","name","x")

would result in
data[0]['type']=content
data[0]['attrib1']=y
data[0]['attrib2']=z
data[1]['type']=content
data[1]['attrib1']=x


Anybody got any ideas?


With kind regards



Andy

--- End Message ---

Reply via email to