php-windows Digest 28 Jul 2001 07:47:05 -0000 Issue 672

Topics (messages 8532 through 8542):

Re: script timeout problem
        8532 by: Paul Smith
        8534 by: Robert J Sherman

Re: Refresh window with php script?
        8533 by: Ron Woods
        8535 by: Robert J Sherman

Why doesn't this work?
        8536 by: Joel
        8537 by: Ivan Milanez Castellanos
        8540 by: Joel

passing array with form
        8538 by: afan
        8539 by: afan

PHP problems -permissions
        8541 by: Emerald Shop
        8542 by: Joel

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]


----------------------------------------------------------------------


I saw a script like this somewhere that does that at somepoint. See if
you can figure it out. What it does is it sets the script to execute in
the background.

http://px.sklar.com/code-pretty.html?code_id=218

BlackLord wrote:
> 
> Hello,
> 
> I am trying to develop a scrpit which emails my email to my 800,000
> recipients(yes, too much). Appr. it takes min. 15hrs to send to all these
> recipients. I wanted to do this task with a php script automatically. But, i
> have a problem:
> 
> My script is being terminated x hours later. I don't know why? I have
> disabled php's timeout. Is there any other configuration which terminates my
> script?
> 
> Can not i develop a script to send email to my 800,000 recipients?
> 
> Please help, thanks....
> 
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
Paul Smith
[EMAIL PROTECTED]
http://www.dostuff.net




I don't know about your script, but depending on a number of different
things
it might very well be possible that your outgoing mail server is causing the
timeout.

If you sending through a service provider especially.. 800K + could very
easily
set off anti-spam systems..

Again, I dunno..

Frankly, in many systems it's a good idea to batch those mails.. i.e. setup
a script
which say, sends in groups of 50 - 100K at a time.. might save you the
timeout problem.

Could still be automated that way..

"Blacklord" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hello,
>
> I am trying to develop a scrpit which emails my email to my 800,000
> recipients(yes, too much). Appr. it takes min. 15hrs to send to all these
> recipients. I wanted to do this task with a php script automatically. But,
i
> have a problem:
>
> My script is being terminated x hours later. I don't know why? I have
> disabled php's timeout. Is there any other configuration which terminates
my
> script?
>
> Can not i develop a script to send email to my 800,000 recipients?
>
> Please help, thanks....
>
>
>






Try adding this before the <html> tag. It will refresh itself every thirty
seconds without user intervention.
<META  HTTP-EQUIV=refresh CONTENT="30;URL=quorum.php">

Ron Woods/GAI
Sr. Software Engineer
303 Clarence Tinker Dr
Suite 100
San Antonio, TX 78226
Tel: 210-927-0544 x104
Fax: 210-224-2277
http://www.gai-inc.com


-----Original Message-----
From: Lukáš Noskievič [mailto:[EMAIL PROTECTED]]
Sent: Friday, July 27, 2001 6:17 AM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Refresh window with php script?


Hi, i need refresh window with some data from MySQL. I want to have window
with result and form button "Refresh data". How can i do that?
I'm able to reload my page, but i want to do that from the same page. Please
help, thanks.



--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]





Luka,

    As the other post indicates, you will need to add either a meta refresh
tag, or simply add a link in the document (<a href="javascript:
location.reload()">Reload</a>)



"Lukáš Noskievič" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi, i need refresh window with some data from MySQL. I want to have window
> with result and form button "Refresh data". How can i do that?
> I'm able to reload my page, but i want to do that from the same page.
Please
> help, thanks.
>
>






I'm trying to create table in a database using PHP with MySQL.
I want the script to do it on its own, I tried but couldn't get it
to work. The script is below :
<?php
$db = mysql_connect("localhost","myusername","mypass");
mysql_select_db("sitesko2",$db);
$sql = "CREATE TABLE computers (Email TEXT not null , Username TEXT not null , 
Password TEXT not null )";
mysql_result($sql,$db);
echo "<B>DONE!</B>";
?>

Please let me know whats going wrong in that.

Thanks,

--
Joel Agnel.
[EMAIL PROTECTED]







Joel: I had the same problem you did, the script isn't wrong it's just
that even though the PHP manual says to use the sintax you used, the
actual sintax for mysql_select_db and for mysql_query or mysql_result
is:

mysql_select_db(string db_name)
mysql_query(string query_string)
mysql_result(string query_string)

At least that's how it worked for me.

Later.

Iván

-----Mensaje original-----
De: Joel [mailto:[EMAIL PROTECTED]] 
Enviado el: Viernes, 27 de Julio de 2001 01:08 p.m.
Para: [EMAIL PROTECTED]
Asunto: [PHP-WIN] Why doesn't this work?


I'm trying to create table in a database using PHP with MySQL. I want
the script to do it on its own, I tried but couldn't get it to work. The
script is below : <?php $db =
mysql_connect("localhost","myusername","mypass");
mysql_select_db("sitesko2",$db);
$sql = "CREATE TABLE computers (Email TEXT not null , Username TEXT not
null , Password TEXT not null )"; mysql_result($sql,$db); echo
"<B>DONE!</B>"; ?>

Please let me know whats going wrong in that.

Thanks,

--
Joel Agnel.
[EMAIL PROTECTED]




-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED] To
contact the list administrators, e-mail: [EMAIL PROTECTED]





Hi Ivan and the others,

I realized my mistake, it was a slight confusion.
Actually no function like mysql_result exists. It was mysql_query
and I mistook it for mysql_result. The script works now and can
successfully create the tables, the script below now works :

<?php
$db = mysql_connect("localhost","myusername","mypass");
mysql_select_db("mydatabase",$db);
$sql = "CREATE TABLE computers (Email TEXT not null , Username TEXT not null , 
Password TEXT not null )";
mysql_query($sql,$db);    //Now it works because it was not mysql_result
echo "<B>DONE!</B>";
?>

Thanks anyway, you could do so many functions that phpMyAdmin does
when you wanted your PHP script to automatically do that using the above
code snip.

Ivan, I think you've not configured PHP properly on your windows system if the
above script doesn't run (after you've created a database called mydatabase).

Joel Agnel.

--------
Sign up for our Free Weekly Newsletter that delivers
Cool Sites directly to you by e-mail. You'll have Fun!
Click Here : http://www.siteskool.com/sites/
--------

"Ivan Milanez Castellanos" <[EMAIL PROTECTED]> wrote in message 
000a01c116c3$86404fc0$4e2a10ac@intra002">news:000a01c116c3$86404fc0$4e2a10ac@intra002...
Joel: I had the same problem you did, the script isn't wrong it's just
that even though the PHP manual says to use the sintax you used, the
actual sintax for mysql_select_db and for mysql_query or mysql_result
is:

mysql_select_db(string db_name)
mysql_query(string query_string)
mysql_result(string query_string)

At least that's how it worked for me.

Later.

Iván

-----Mensaje original-----
De: Joel [mailto:[EMAIL PROTECTED]]
Enviado el: Viernes, 27 de Julio de 2001 01:08 p.m.
Para: [EMAIL PROTECTED]
Asunto: [PHP-WIN] Why doesn't this work?


I'm trying to create table in a database using PHP with MySQL. I want
the script to do it on its own, I tried but couldn't get it to work. The
script is below : <?php $db =
mysql_connect("localhost","myusername","mypass");
mysql_select_db("sitesko2",$db);
$sql = "CREATE TABLE computers (Email TEXT not null , Username TEXT not
null , Password TEXT not null )"; mysql_result($sql,$db); echo
"<B>DONE!</B>"; ?>

Please let me know whats going wrong in that.

Thanks,

--
Joel Agnel.
[EMAIL PROTECTED]




--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED] To
contact the list administrators, e-mail: [EMAIL PROTECTED]







HI to all,
I have a little, simple form and after submitting, together with that
information I have to pass an array with other info. How?

Let's say array is called $Name

I tried this:

$Name2 = addslashes(serialize($Name));

On screen:
a:5:{i:0;s:13:\"Name 1\";i:1;s:6:\"Name 2\";i:2;s:10:\"Name
3\";i:3;s:11:\"Name 4\";i:4;s:12:\"Name 5\";}

And after submitting:

On screen:
a:9:{i:0;s:13:  - part after quotes is cutted off!

After:
$Name = unserialize(stripslashes($Name2));

no results!


Any idea how to fix this?

Thanks!

Afan Pasalic






I just did it:

$Name = serialize($Name);
$Name = ereg_replace("\"", "'", $Name);

<form>
<input type=hidden name=Name value=$Name>
<submit>
</form>

After submitting:

$Name = eregi_replace("'", "\"", $Name);
$Name = stripslashes($Name);
$Name = unserialize($Name);


Ok, this works, but there is mush better way, I'm sure. Can somebody tell
me?

Afan Pasalic


-----Original Message-----
From: afan [mailto:[EMAIL PROTECTED]]
Sent: Friday, July 27, 2001 3:29 PM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] passing array with form


HI to all,
I have a little, simple form and after submitting, together with that
information I have to pass an array with other info. How?

Let's say array is called $Name

I tried this:

$Name2 = addslashes(serialize($Name));

On screen:
a:5:{i:0;s:13:\"Name 1\";i:1;s:6:\"Name 2\";i:2;s:10:\"Name
3\";i:3;s:11:\"Name 4\";i:4;s:12:\"Name 5\";}

And after submitting:

On screen:
a:9:{i:0;s:13:  - part after quotes is cutted off!

After:
$Name = unserialize(stripslashes($Name2));

no results!


Any idea how to fix this?

Thanks!

Afan Pasalic


--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]






Dear sirs,

Does anyone use Apache and PHP on Windows ME ? I have not been able to work
with because I have not intalled the software as requiered !

I have installed Apache 1.3.19 and PHP4 over Windows Millenium.

#I put this in httpd.conf file:

LoadModule php4_module c:/php/sapi/php4apache.dll
AddType application/x-httpd-php .php .phtml

I copied the files MSVCRT.DLL and PHP4TS.DLL to c:/windows/system.

I wrote a script file named test.php with the following information:
<? phpinfo(); ?>

When I open the test.php file at my browser, I get a DOS window running a
lot of HTML code quickly. My browser doesn`t show me anything. The
documentation explains that file permissions on my php script, php.exe,
php4ts.dll, php.ini or any php extensions I am trying to load are such that
the anonymous internet user ISUR_<machinename> cannot access them.

How do I change permissions for these files over Windows ME ?

Thank you very much for your cooperation.

Emerald Shop
Eng. Aldemar Martin B.
Manager
Calle 22 #20-26
Santa Fe de Bogota, D.C. - COLOMBIA
Phone: (571) 562 29 11
Fax: (571) 268 45 60
email: [EMAIL PROTECTED]

P.D. Sorry for my english, I am learning.




Hi Emerald,

You should have messed with the DLLs. I know that's what
the PHP documentation says but all I did was copy 3 lines
of code in the httpd.conf file of Apache. Thats it, I didn't do
anything else and it worked fine. I can execute any PHP script
on my computer.

These are the 3 lines of code you have to put in the httpd.conf file.

#---------------
ScriptAlias /php/ "c:/php/"
AddType application/x-httpd-php .php .phtml .php3
Action application/x-httpd-php "/php/php.exe"
#---------------

That's it! Copy to you httpd.conf file and don't do anything else, everything
should work fine. Do a test on your local computer.
In your browser, enter : http://127.0.0.1/mycode.php
127.0.0.1 is the root directory and you must specify which directory should
it be or you'll get an error.

Not sure but I think the problem was you didn't mention the directory of PHP.
You missed this line : ScriptAlias /php/ "c:/php/".
You don't have to change the permission of files in Windows ME.

I use PHP4, Apache 1.3.19 with Windows Millenium Edition and was able to install
PHP successfully. Since you've already messed with PHP and Apache, if you still
fail to install PHP, I suggest you do a reinstall of PHP and Apache and follow the
above the method. If you have any more problems, let me know.

Hope this helps,
--
Joel Agnel.

--------
Sign up for our Free Weekly Newsletter that delivers
Cool Sites directly to you by e-mail. You'll have Fun!
Click Here : http://www.siteskool.com/sites/
--------

"Emerald Shop" <[EMAIL PROTECTED]> wrote in message 
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Dear sirs,
>
> Does anyone use Apache and PHP on Windows ME ? I have not been able to work
> with because I have not intalled the software as requiered !
>
> I have installed Apache 1.3.19 and PHP4 over Windows Millenium.
>
> #I put this in httpd.conf file:
>
> LoadModule php4_module c:/php/sapi/php4apache.dll
> AddType application/x-httpd-php .php .phtml
>
> I copied the files MSVCRT.DLL and PHP4TS.DLL to c:/windows/system.
>
> I wrote a script file named test.php with the following information:
> <? phpinfo(); ?>
>
> When I open the test.php file at my browser, I get a DOS window running a
> lot of HTML code quickly. My browser doesn`t show me anything. The
> documentation explains that file permissions on my php script, php.exe,
> php4ts.dll, php.ini or any php extensions I am trying to load are such that
> the anonymous internet user ISUR_<machinename> cannot access them.
>
> How do I change permissions for these files over Windows ME ?
>
> Thank you very much for your cooperation.
>
> Emerald Shop
> Eng. Aldemar Martin B.
> Manager
> Calle 22 #20-26
> Santa Fe de Bogota, D.C. - COLOMBIA
> Phone: (571) 562 29 11
> Fax: (571) 268 45 60
> email: [EMAIL PROTECTED]
>
> P.D. Sorry for my english, I am learning.
>




Reply via email to