php-general Digest 9 Mar 2007 19:43:07 -0000 Issue 4668
Topics (messages 250150 through 250181):
Re: IE not uploading files
250150 by: Tijnema !
Re: Monitoring download, detecting completion?
250151 by: Tijnema !
Re: Passing a class through an array
250152 by: Tijnema !
Re: Intro to PHP question
250153 by: Tijnema !
Re: url fopen() failed to open stream
250154 by: Tijnema !
Re: PHP Design View
250155 by: Tijnema !
php, oci8 and oracle
250156 by: sirakov
250158 by: Mikey
250163 by: "Miguel J. Jiménez"
name of the variable
250157 by: Cefull Lo
250159 by: Jochem Maas
250160 by: Ólafur Waage
250161 by: Ólafur Waage
looking for two remote functions
250162 by: Riyadh S. Alshaeiq
250164 by: Riyadh S. Alshaeiq
250166 by: Mikey
250167 by: Mikey
Re: Classes in PHP5 || Puzzling Problem || Trying to Set $this->$name = $value
250165 by: PHP
Re: PHP Patch open_basedir for dynamic virtualhost
250168 by: DoM
Re: Scammer alert
250169 by: markw.mohawksoft.com
250170 by: Robert Cummings
Re: Joke of the day problem
250171 by: Mark
Help with captcha
250172 by: Joker7
250173 by: Tijnema !
How to verify Folder Existence?
250174 by: Helder Lopes
250175 by: Jay Blanchard
250176 by: Chris Ditty
250177 by: Németh Zoltán
Help with the php bug in the Squirrelmail plugin's script
250178 by: Jevos, Peter
250179 by: Tijnema !
250180 by: Mark
250181 by: Jevos, Peter
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,
Can you post your HTML code of the form used?
I don't really think the problem is in PHP, as it looks like a client side
problem, and PHP is server side....
Tijnema
On 3/9/07, Skip Evans <[EMAIL PROTECTED]> wrote:
Hey all,
I have the following code uploading and image to a
directory from a form, and it works great on
FireFox, but not IE 6.0.
Does anyone have an suggestions?
Thanks,
Skip
// get the image directory.
list($mats_img_path)=bsp_DB_row_fields("SELECT
mats_img_path FROM bsp_configuration");
// move the uploaded file from the temp dir to
permanent directory.
move_uploaded_file($_FILES['image']['tmp_name'],
$_SERVER['DOCUMENT_ROOT']."/$mats_img_path/".$image);
--
Skip Evans
Big Sky Penguin, LLC
61 W Broadway
Butte, Montana 59701
406-782-2240
http://bigskypenguin.com
=-=-=-=-=-=-=-=-=-=
Check out PHPenguin, a lightweight and
versatile PHP/MySQL development framework.
http://phpenguin.bigskypenguin.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
On 3/9/07, Skip Evans <[EMAIL PROTECTED]> wrote:
Hi Tijnema,
To be clear, this can work for the client
downloading say a music (mp3) file from the server
to their local hard drive? If so, that would be
great, but I just want to be clear I spelled out
the issue properly.
Thanks tons!
Skip
I'm sorry, i thought you meant you wanted to transfer from 1 server to your
own server.
With this i can't help you any further i think, The code posted by Nicholas
Yim isn't very succesfull too i think as it only shows you when the server
outputted the last piece of the file to the client, but that is NOT the same
as when download is completed.
I don't know if it is even possible in PHP, as i don't have a way to do it
now.
Tijnema
Tijnema ! wrote:
> Hi,
>
> I think that cURL would do the job, starting the transfer with
> curl_init ,curl_setopt and curl_exec
> then you can get the info about the download with curl_getinfo
> Also take a look at the other curl functions, and have a look at the
> curl_setopt function page, as there are a lot of options that can be
set.
> cURL: http://www.php.net/curl
>
> Hope this is what you need.
>
> Tijnema
>
>
> On 3/8/07, Skip Evans <[EMAIL PROTECTED]> wrote:
>>
>> Hey all,
>>
>> I have a need to monitor a download from the
>> server to the client's machine.
>>
>> I'm not familiar with any mechanisms for doing so.
>>
>> If anyone has any hints to point me towards I'll
>> get a' researching.
>> --
>> Skip Evans
>> Big Sky Penguin, LLC
>> 61 W Broadway
>> Butte, Montana 59701
>> 406-782-2240
>> http://bigskypenguin.com
>> =-=-=-=-=-=-=-=-=-=
>> Check out PHPenguin, a lightweight and
>> versatile PHP/MySQL development framework.
>> http://phpenguin.bigskypenguin.com/
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
>
--
Skip Evans
Big Sky Penguin, LLC
61 W Broadway
Butte, Montana 59701
406-782-2240
http://bigskypenguin.com
=-=-=-=-=-=-=-=-=-=
Check out PHPenguin, a lightweight and
versatile PHP/MySQL development framework.
http://phpenguin.bigskypenguin.com/
--- End Message ---
--- Begin Message ---
On 3/9/07, Jeff Taylor <[EMAIL PROTECTED]> wrote:
Hey all,
I'm very new to programming and PHP.
I want to pass instances of a class through an array, and then use a
foreach
later to grab details of each class at once... but it returns a fatal
error
Code:
$me = new Toon('Toon1','1')
$him = new Toon('Toon2','0')
$characterListing = array($me, $him);
foreach ($characterListing as $name1)
{
if ($name1->GetIsPlayer())
{
echo "<b>Name: </b> ".$name1->$name;//.... etc etc etc
use $name1->name;instead of $name1->$name;
That's all.
Tijnema
}
}
the error I get is: Fatal error: Cannot access empty property in
c:\Inetpub\wwwroot\MyProjects\SecondOffering\htmlFns.php on line 140
Can anyone help?
Thanks, Jeff
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
On 3/8/07, Ben Ramsey <[EMAIL PROTECTED]> wrote:
On 3/8/07 1:44 PM, Tijnema ! wrote:
> He wanted to use it for the web, so why should he try it out on CL
first?
Because there are some advantages to being able to run something quickly
through the CLI without having to load it in a web browser. He was just
doing a simple test, so the PHP CLI was perfect for the job.
> I can offer a few MBs for everyone that wants to get learning PHP.
megabytes?
Yeah, a few megabytes is enough to test your PHP scripts out.
--
Ben Ramsey
http://benramsey.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
On 3/9/07, Michael Clayfield <[EMAIL PROTECTED]> wrote:
when i open up a url with fopen(), i get this error message:*
Warning*: fopen(http://sumurlhere.whatever/index.html) [function.fopen
<http://127.0.0.1/bots2/function.fopen>]: 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. in
*C:\xampp\htdocs\bots2\main.php* on line *4
*
i believe this could because i am behind a proxy server, would someone
be able to confirm this? also if this is the problem, where would i set
the proxy server to be used?*
*
Maybe you could post your code, let's say line 1-5....
I don't know a lot about proxy, but you might want to take a look at the
curl documentation, I don't know what your exactly gonna retrieve from the
server, but i think curl could do it.
curl documentation: www.php.net/curl
Tijnema
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
On 3/9/07, Chris <[EMAIL PROTECTED]> wrote:
Fred wrote:
> Hello What program whould i use to see a design view of php scripts not
on a
> server. Im running Windows XP Pro sp2. I thought Dreamweaver did but as
i
> was going to buy a friend told me it cant see design only the script.
PHP doesn't have a 'design view', your HTML controls that, maybe with
the help of PHP but HTML is what is given to the browser and that's what
you see.
As a PHP script differs in each output, it can't have a preview. If you want
to preview just save it and visit it with a browser.
If you have dreamwaver, you can also set up remote servers, and then a
CTRL+s action would automatically upload your file to the server.
example that it doesn't have the same preview each time:
<?
$a = rand(0,1);
if($a == 0)
{
echo "Preview 1";
}
if($b == )
{
echo "Preview 2";
}
?>
Sometimes it will show you preview 1, and sometimes it wil show you preview
2.
Also, PHP can handle data from databases, files, browser, etc.
you can run a script like this: www.testserver.com/myscript.php?var=abc
now you would have $_GET['var'] set to abc, but once you go to
www.testserver.com/myscript.php?var=def $_GET['var'] is set to def, and so
you can choose to give it a total different look. So the only option is to
use a browser.
Tijnema
--
Postgresql & php tutorials
http://www.designmagick.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Hi,
I have a problem with oci8. I installed ORACLE Enterprise with php5 and
apache, with this script :
<?php phpinfo(); ?>
I receive information for the set modules. I see that oci8 is enabled
however ORACLE_HOME is empty. Additionally, I tried to write a little script
which I run as a root. Due to this script, I set variables and start apache:
cmd=`which apache2ctl`
$cmd stop
ORACLE_HOME=/u01/app/oracle/oracle/product/10.2.0/db_1;export ORACLE_HOME
echo ORACLE_HOME: $ORACLE_HOME
ORACLE_SID=orcl; export ORACLE_SID
echo ORACLE_SID: $ORACLE_SID
ORATAB=/etc/oratab; export ORATAB
echo ORATAB: $ORATAB
ORACLE_HOME_LISTNER=$ORACLE_BASE, export ORACLE_HOME_LISTNER
echo ORACLE_HOME_LISTNER: $ORACLE_HOME_LISTNER
ORACLE_BASE=$ORACLE_HOME; export ORACLE_BASE
echo ORACLE_BASE: $ORACLE_BASE
NLS_LANG=AMERICAN_AMERICA.WE8ISO8859P15; export NLS_LANG
echo NLS_LANG: $NLS_LANG
LD_LIBRARY_PATH=$ORACLE_HOME/lib; export LD_LIBRARY_PATH
echo LD_LIBRARY_PATH: $LD_LIBRARY_PATH
LD_PRELOAD=/u01/app/oracle/oracle/product/10.2.0/db_1/lib/libclntsh.so
echo LD_PRELOAD:$LD_PRELOAD
$cmd start
In /etc/php5/apache2/php.ini and /etc/php5/cli/php.ini I set the
extension=oci8.sо, but ORACLE_HOME is still empty (see here
http://www.picvalley.net/u/9/8466_726.PNG)
If someone has an idea how to solve the problem, I will highly appreciate
any advices with this regard. I read about an installation of ORACLE Instant
client and oci8 but I do not know whether I need this instant client at all,
because I use Oracle Enterprise.
PS. i'm sorry for the bad english, i can't explain the problem better.
--
View this message in context:
http://www.nabble.com/php%2C-oci8-and-oracle-tf3374589.html#a9390900
Sent from the PHP - General mailing list archive at Nabble.com.
--- End Message ---
--- Begin Message ---
sirakov wrote:
Hi,
I have a problem with oci8. I installed ORACLE Enterprise with php5 and
apache, with this script :
<?php phpinfo(); ?>
I receive information for the set modules. I see that oci8 is enabled
however ORACLE_HOME is empty. Additionally, I tried to write a little script
which I run as a root. Due to this script, I set variables and start apache:
cmd=`which apache2ctl`
$cmd stop
ORACLE_HOME=/u01/app/oracle/oracle/product/10.2.0/db_1;export ORACLE_HOME
echo ORACLE_HOME: $ORACLE_HOME
ORACLE_SID=orcl; export ORACLE_SID
echo ORACLE_SID: $ORACLE_SID
ORATAB=/etc/oratab; export ORATAB
echo ORATAB: $ORATAB
ORACLE_HOME_LISTNER=$ORACLE_BASE, export ORACLE_HOME_LISTNER
echo ORACLE_HOME_LISTNER: $ORACLE_HOME_LISTNER
ORACLE_BASE=$ORACLE_HOME; export ORACLE_BASE
echo ORACLE_BASE: $ORACLE_BASE
NLS_LANG=AMERICAN_AMERICA.WE8ISO8859P15; export NLS_LANG
echo NLS_LANG: $NLS_LANG
LD_LIBRARY_PATH=$ORACLE_HOME/lib; export LD_LIBRARY_PATH
echo LD_LIBRARY_PATH: $LD_LIBRARY_PATH
LD_PRELOAD=/u01/app/oracle/oracle/product/10.2.0/db_1/lib/libclntsh.so
echo LD_PRELOAD:$LD_PRELOAD
$cmd start
In /etc/php5/apache2/php.ini and /etc/php5/cli/php.ini I set the
extension=oci8.sо, but ORACLE_HOME is still empty (see here
http://www.picvalley.net/u/9/8466_726.PNG)
If someone has an idea how to solve the problem, I will highly appreciate
any advices with this regard. I read about an installation of ORACLE Instant
client and oci8 but I do not know whether I need this instant client at all,
because I use Oracle Enterprise.
PS. i'm sorry for the bad english, i can't explain the problem better.
Oracle is a right pain to get setup correctly. Try Zend Core:
https://www.zend.com/core/oem_registration.php?access_code=OracleDB
HTH,
Mikey
--- End Message ---
--- Begin Message ---
Hi I use Debian testing with ORACLE INSTANT CLIENT and OCI8 without any
problem ... Any how, I think apache run as www-data so if you export the
variables as root only root will see them (I think). I think there is a
way to export a variable directly within apache configuration files so
you do not need to write a script. Using OIC I only need to export
LD_LIBRARY_PATH to the OIC path because I do not even need tnsnames.ora .
sirakov escribió:
Hi,
I have a problem with oci8. I installed ORACLE Enterprise with php5 and
apache, with this script :
<?php phpinfo(); ?>
I receive information for the set modules. I see that oci8 is enabled
however ORACLE_HOME is empty. Additionally, I tried to write a little script
which I run as a root. Due to this script, I set variables and start apache:
cmd=`which apache2ctl`
$cmd stop
ORACLE_HOME=/u01/app/oracle/oracle/product/10.2.0/db_1;export ORACLE_HOME
echo ORACLE_HOME: $ORACLE_HOME
ORACLE_SID=orcl; export ORACLE_SID
echo ORACLE_SID: $ORACLE_SID
ORATAB=/etc/oratab; export ORATAB
echo ORATAB: $ORATAB
ORACLE_HOME_LISTNER=$ORACLE_BASE, export ORACLE_HOME_LISTNER
echo ORACLE_HOME_LISTNER: $ORACLE_HOME_LISTNER
ORACLE_BASE=$ORACLE_HOME; export ORACLE_BASE
echo ORACLE_BASE: $ORACLE_BASE
NLS_LANG=AMERICAN_AMERICA.WE8ISO8859P15; export NLS_LANG
echo NLS_LANG: $NLS_LANG
LD_LIBRARY_PATH=$ORACLE_HOME/lib; export LD_LIBRARY_PATH
echo LD_LIBRARY_PATH: $LD_LIBRARY_PATH
LD_PRELOAD=/u01/app/oracle/oracle/product/10.2.0/db_1/lib/libclntsh.so
echo LD_PRELOAD:$LD_PRELOAD
$cmd start
In /etc/php5/apache2/php.ini and /etc/php5/cli/php.ini I set the
extension=oci8.sо, but ORACLE_HOME is still empty (see here
http://www.picvalley.net/u/9/8466_726.PNG)
If someone has an idea how to solve the problem, I will highly appreciate
any advices with this regard. I read about an installation of ORACLE Instant
client and oci8 but I do not know whether I need this instant client at all,
because I use Oracle Enterprise.
PS. i'm sorry for the bad english, i can't explain the problem better.
--
Miguel J. Jiménez
Área de Internet/XSL/PHP
[EMAIL PROTECTED]
----------------------------------------------------
ISOTROL
Edificio BLUENET, Avda. Isaac Newton nº3, 4ª planta.
Parque Tecnológico Cartuja '93, 41092 Sevilla.
Teléfono: 955 036 800 - Fax: 955 036 849
http://www.isotrol.com
"La dicotonomía entre desarrollo económico y sostenibilidad es falsa. Si nos
quedamos
sin planeta no habrá economía que valga"
(Al Gore, Ex-Vicepresidente de EE.UU.)
--- End Message ---
--- Begin Message ---
Hi everyone,
Is there any function that return the name of the variable??
i.e.
$foo='abc';
$bar=somefunc($foo); // $bar='foo' here
Thanks
--
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GSC d- s:>++ a- C++ UL/B+++$ !P L++>+++++
E--- W+ N o-- K? w++ O? M- V- PS PE++(-) Y+
PGP++@ t 5 X R+>+++$ tv- b+++ DI++ D++
G++@ e+++>+++++ h*>--- r-- z?
-----END GEEK CODE BLOCK------
--- End Message ---
--- Begin Message ---
Cefull Lo wrote:
> Hi everyone,
> Is there any function that return the name of the variable??
> i.e.
>
> $foo='abc';
> $bar=somefunc($foo); // $bar='foo' here
no - and if you think you need this then there is something very wrong with you
code,
it's completely backward-assed and you need to rethink what you are doing.
maybe if you explain the exact nature of your problem we could show you
a better way of tackling it so that you are no longer in need of a function
that 'tells you the name of the varable'
>
> Thanks
>
>
--- End Message ---
--- Begin Message ---
I found this on the zend forums. Hope it helps.
function Dump($var) {
if (key_exists($var, $GLOBALS)) {
echo "<pre>$$var:\n";
var_dump($GLOBALS[$var]);
echo "\n</pre>\n";
}
else
echo "<span class='error'>No variables named
<em>$$var</em>!</span>\n";
}
- Ólafur W
2007/3/9, Cefull Lo <[EMAIL PROTECTED]>:
Hi everyone,
Is there any function that return the name of the variable??
i.e.
$foo='abc';
$bar=somefunc($foo); // $bar='foo' here
Thanks
--
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GSC d- s:>++ a- C++ UL/B+++$ !P L++>+++++
E--- W+ N o-- K? w++ O? M- V- PS PE++(-) Y+
PGP++@ t 5 X R+>+++$ tv- b+++ DI++ D++
G++@ e+++>+++++ h*>--- r-- z?
-----END GEEK CODE BLOCK------
--- End Message ---
--- Begin Message ---
There's also another function on the official PHP site.
http://no.php.net/manual/en/language.variables.php#49997
2007/3/9, Cefull Lo <[EMAIL PROTECTED]>:
Hi everyone,
Is there any function that return the name of the variable??
i.e.
$foo='abc';
$bar=somefunc($foo); // $bar='foo' here
Thanks
--
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GSC d- s:>++ a- C++ UL/B+++$ !P L++>+++++
E--- W+ N o-- K? w++ O? M- V- PS PE++(-) Y+
PGP++@ t 5 X R+>+++$ tv- b+++ DI++ D++
G++@ e+++>+++++ h*>--- r-- z?
-----END GEEK CODE BLOCK------
--- End Message ---
--- Begin Message ---
Hello everybody,
I am looking for an HTTP function for getting remote filesizes. Keeping in
mind that I am NOT interested in getting the "size on disk" figure, I need
the actual size of the files when downloaded to a local machine. Please let
me know if there are any..
Another thing, I also need a remote function that gets the created date and
last modified separately, if possible..
Best regards
--- End Message ---
--- Begin Message ---
Hello everybody,
I am looking for an HTTP function for getting remote filesizes. Keeping in
mind that I am NOT interested in getting the "size on disk" figure, I need
the actual size of the files when downloaded to a local machine. Please let
me know if there are any..
Another thing, I also need a remote function that gets the created date and
last modified separately, if possible..
Best regards
--- End Message ---
--- Begin Message ---
Riyadh S. Alshaeiq wrote:
Hello everybody,
I am looking for an HTTP function for getting remote filesizes. Keeping in
mind that I am NOT interested in getting the "size on disk" figure, I need
the actual size of the files when downloaded to a local machine. Please let
me know if there are any..
Another thing, I also need a remote function that gets the created date and
last modified separately, if possible..
Best regards
Try looking here:
http://uk.php.net/manual/en/function.filesize.php
If the function itself isn't of use to you, look further down in the
notes and I am sure you will find something useful.
Mikey
--- End Message ---
--- Begin Message ---
Riyadh S. Alshaeiq wrote:
Hello everybody,
I am looking for an HTTP function for getting remote filesizes. Keeping in
mind that I am NOT interested in getting the "size on disk" figure, I need
the actual size of the files when downloaded to a local machine. Please let
me know if there are any..
Another thing, I also need a remote function that gets the created date and
last modified separately, if possible..
Best regards
Oh, and the Filesystem section of the manual should get you help with
the other part of your query ;o)
--- End Message ---
--- Begin Message ---
Hey Stu.
Well, isn't that special ;--)
Jesus, I kept echoing $this->$foo within the parent class and getting 0,
instead of 1.
You wrote your reply; I checked the results again, and, voila, it worked --
obviously I must have been missing something and corrected the mistake in my
endless trial and error process, lol.
In any case, thanks for sorting me out!
-Noah
"Stut" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> PHP wrote:
>> Problem:
>>
>> Class test {
>>
>> var $foo = 0;
>>
>> function __construct() {
>> $this->myfunc("foo", 1);
>> }
>>
>> function myfunc($name, $val) {
>> $this->$name = $val;
>> }
>> }
>>
>> Now, PHP correctly evaluates $this->$name as 0; i.e. the default property
>> value of $this->foo.
>>
>> However, what I really need to have happen is for $this->$name = $val to
>> be evaluated as $this->foo = 1;
>
> Works fine here: http://dev.stut.net/php/classvar.php
>
> What do you get?
>
> -Stut
--- End Message ---
--- Begin Message ---
DoM wrote:
> Hi all,
> it's a lot of time that i am trying to let Jason Greene open_basedir
> patch work with apache massive virtualhost.
>
> This is direct link to patch when it was developed:
> http://www.phpbuilder.com/lists/php-developer-list/2000101/0994.php
>
> This is a FreeBSD port more recent with same code:
> http://lists.freebsd.org/pipermail/freebsd-ports-bugs/2005-September/066983.html
>
> If i set to open_basedir directive (inside virtualhost config section)
> value VIRTUAL_DOCUMENT_ROOT, it works but i am not able to add static
> path like /tmp/
>
> This is an example:
>
> VirtualDocumentRoot /var/www/php.net/%1
> php_admin_value open_basedir VIRTUAL_DOCUMENT_ROOT
>
> user test.php.net is chrooted for php scripts in his homedir but he
> cannot write temporary files inside /tmp/
>
> I tried with value %1; VIRTUAL_DOCUMENT_ROOT:/tmp/ and more but no way.
>
> These are my apps version:
>
> OS: Debian Sarge 3.1
> Server version: Apache/2.0.54 (mpm-prefork pacchettizzata)
> PHP: 4.4.6 (Source) & 5.2.1 (Source)
>
> Any help will be useful and appreciated.
>
Does anyone know something about that ?
Regards
--- End Message ---
--- Begin Message ---
Just FYI:
I have a couple web sites and I kept getting this bozo submitting comments
with just a bunch of links to porn sites. For a while I didn't notice, but
then Google threatened to drop my blog-bits (adsense) account.
So, I looked at my logs, and the TCP/IP address is 195.225.176.66 and a
quick firewall rule took care of if.
If you have a web site that accepts input from users, look for a message
the is titled "why not cms," and from a user with some random name at
jwpcworld.com. He seems to be targeting drupal sites.
--- End Message ---
--- Begin Message ---
On Fri, 2007-03-09 at 09:24 -0500, [email protected] wrote:
> Just FYI:
>
> I have a couple web sites and I kept getting this bozo submitting comments
> with just a bunch of links to porn sites. For a while I didn't notice, but
> then Google threatened to drop my blog-bits (adsense) account.
>
> So, I looked at my logs, and the TCP/IP address is 195.225.176.66 and a
> quick firewall rule took care of if.
>
> If you have a web site that accepts input from users, look for a message
> the is titled "why not cms," and from a user with some random name at
> jwpcworld.com. He seems to be targeting drupal sites.
I wouldn't focus just on "why not cms". This stuff has been on the rise
for the past few months. I've watched the number of distinct IPs hitting
some of my sites steadily increase. You'll need something like Captcha
to eliminate it properly. These things are site bots that crawl the net
looking for sites with post forms (probably with some kind of basic
checking for fields named "comments" etc.)
Cheers,
Rob.
--
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting |
| a powerful, scalable system for accessing system services |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for |
| creating re-usable components quickly and easily. |
`------------------------------------------------------------'
--- End Message ---
--- Begin Message ---
Delta Storm wrote:
> Hi,
>
> again me with the silly questions...
>
> I need a script that will take data from MySQL database and display one
> row each day.
>
> I have googled, but with no luck.
>
> The database retrieving mechanism is of course clear but I really dont
> know how to do a 24h delay before the next row is displayed.
>
>
> Thanks in advance :)
I do something similar on my sites. Rather than hit "fortune" for every page
view, I have a process that runs fortune and pipes the output to a file
every so often. Then for sites that need a cute quote, just include as a
<PRE>...</PRE> formated element.
It reduces the load quite a bit.
--- End Message ---
--- Begin Message ---
Im trying to use a captcha script from :
http://www.boutell.com/newfaq/creating/captcha.html
I can get it to work with plan HTML forms but not with this PHP form I use.
Any help with this would be a great help.
Cheers
Chris
<?
include "header.php";
?>
<SCRIPT LANGUAGE="Javascript">
//<!--
// pop a windoid (Pictures)
function popWin(url, w, h)
{
var madURL = url;
var x, y, winStr;
x=0; y=0;
self.name="opener";
winStr =
"height="+h+",width="+w+",screenX="+x+",left="+x+",screenY="+y+",top="+y+",channelmode=0,dependent=0,directories=0,fullscreen=0,location=0,menubar=0,resizable=1,scrollbars=0,status=0,toolbar=0";
lilBaby = window.open(madURL, "_blank", winStr);
}
//--> </script>
<?
if (!strstr($_SERVER['HTTP_REFERER'], 'teaup.me.uk')) { exit ("Invalid
referrer");
}
include "admin/connect.php";
$s=$_SERVER["REMOTE_ADDR"];
$ipbancheck="SELECT * from gb_banip where IP='$s'";
$ipbancheck2=mysql_query($ipbancheck);
while($ipbancheck3=mysql_fetch_array($ipbancheck2))
{
$IPBANNED=$ipbancheck3[IP];
}
if ($IPBANNED)
{
print "You have been banned from posting";
}
else
{
if (!isset($_POST['submit']))
{
print "<table border='0' cellpadding='6'><tr><td class='book'>";
print "<form method='post' action='try.php' name='form'>";
print "<p class=content>Name:</p> <input type='text' name='name'
size='40'><br>";
print "<p class=content>Country:</p><input type='text' name='country'
size='40'><br>";
print "<p class=content>Homepage</p><input type='text' name='homepage'
value='http://' size='40'><br>";
print "<p class=content>E-mail:</p><input type='text' name='email'
size='40'><br>";
print "<p class=content>Aim:</p><input type='text' name='aim'
size='40'><br>";
print "<p class=content>ICQ:</p><input type='text' name='icq'
size='40'><br>";
print "<p class=content>Yahoo:</p><input type='text' name='yim'
size='40'><br>";
print "<p class=content>MSN:</p><input type='text' name='msn'
size='40'><br>";
print "<p class=content>Comment:</p>";
print "<textarea rows='6' name='comment' cols='45'></textarea><br>";
print "<input type='submit' name='submit' value='submit'>";
print "</form><br>";
print "<p class='big'>Clickable Smilies</p>";
print "<a onClick=\"addSmiley(':)')\"><img src='images/smile.gif'></a>
";
print "<a onClick=\"addSmiley(':(')\"><img src='images/sad.gif'></a> ";
print "<a onClick=\"addSmiley(';)')\"><img src='images/wink.gif'></a>
";
print "<a onClick=\"addSmiley(';smirk')\"><img
src='images/smirk.gif'></a> ";
print "<a onClick=\"addSmiley(':blush')\"><img
src='images/blush.gif'></a> ";
print "<a onClick=\"addSmiley(':angry')\"><img
src='images/angry.gif'></a> ";
print "<a onClick=\"addSmiley(':shocked')\"><img
src='images/shocked.gif'></a> ";
print "<a onClick=\"addSmiley(':cool')\"><img
src='images/cool.gif'></a> ";
print "<a onClick=\"addSmiley(':ninja')\"><img
src='images/ninja.gif'></a> ";
print "<a onClick=\"addSmiley('(heart)')\"><img
src='images/heart.gif'></a> ";
print "<a onClick=\"addSmiley('(!)')\"><img
src='images/exclamation.gif'></a> ";
print "<a onClick=\"addSmiley('(?)')\"><img
src='images/question.gif'></a><br>";
print "<a onclick=\"addSmiley(':{blink}')\"><img
src='images/winking.gif'></a>";
print "<A onclick=\"addSmiley('{clover}')\"><img
src='images/clover.gif'></a>";
print "<a onclick=\"addSmiley(':[glasses]')\"><img
src='images/glasses.gif'></a>";
print "<a onclick=\"addSmiley(':[barf]')\"><img
src='images/barf.gif'></a>";
print "<a onclick=\"addSmiley(':[reallymad]')\"><img
src='images/mad.gif'></a>";
print "<script language=\"JavaScript\" type=\"text/javascript\">\n";
print "function addSmiley(textToAdd)\n";
print "{\n";
print "document.form.comment.value += textToAdd;";
print "document.form.comment.focus();\n";
print "}\n";
print "</script>\n";
print "<br><br>";
print "<p class='big'><A href=\"javascript:popWin('bbcode.php',400,
5)\">BBCode instructions</a></p>";
}
else if (isset($_POST['submit']))
{
$name=$_POST['name'];
$country=$_POST['country'];
$email=$_POST['email'];
$homepage=$_POST['homepage'];
$aim=$_POST['aim'];
$icq=$_POST['icq'];
$yim=$_POST['yim'];
$msn=$_POST['msn'];
$comment=$_POST['comment'];
if(!$name || !$comment)
{
print "<font color='red'>Name or comment not entered, please go back
and sign again</font><br>";
}
else
{
$r=$_SERVER["REMOTE_ADDR"];
$day=date("D M d, Y H:i:s");
$timegone=date("U") ; //seconds since Jan 1st, 1970
$putinguestbook="INSERT INTO gbook(name, country, mail, homepage,
comment, realtime, aim, icq, yim, msn, time,IP)
VALUES('$name','$country','$email','$homepage','$comment','$day','$aim','$icq','$yim','$msn','$timegone','$r')";
mysql_query($putinguestbook);
print "Thanks for posting, you will now be redirected <META HTTP-EQUIV
= 'Refresh' Content = '2; URL =index.php'> ";
}
}
}
?>
</td></tr></table>
</center>
<?
include "footer.php";
?>
--- End Message ---
--- Begin Message ---
I'm not sure but i think that you need to place your javascript inside the
head tags, which you (i guess) output in header.php
Tijnema
On 3/9/07, Joker7 <[EMAIL PROTECTED]> wrote:
Im trying to use a captcha script from :
http://www.boutell.com/newfaq/creating/captcha.html
I can get it to work with plan HTML forms but not with this PHP form I
use.
Any help with this would be a great help.
Cheers
Chris
<?
include "header.php";
?>
<SCRIPT LANGUAGE="Javascript">
//<!--
// pop a windoid (Pictures)
function popWin(url, w, h)
{
var madURL = url;
var x, y, winStr;
x=0; y=0;
self.name="opener";
winStr =
"height="+h+",width="+w+",screenX="+x+",left="+x+",screenY="+y+",top="+y+",channelmode=0,dependent=0,directories=0,fullscreen=0,location=0,menubar=0,resizable=1,scrollbars=0,status=0,toolbar=0";
lilBaby = window.open(madURL, "_blank", winStr);
}
//--> </script>
<?
if (!strstr($_SERVER['HTTP_REFERER'], 'teaup.me.uk')) { exit ("Invalid
referrer");
}
include "admin/connect.php";
$s=$_SERVER["REMOTE_ADDR"];
$ipbancheck="SELECT * from gb_banip where IP='$s'";
$ipbancheck2=mysql_query($ipbancheck);
while($ipbancheck3=mysql_fetch_array($ipbancheck2))
{
$IPBANNED=$ipbancheck3[IP];
}
if ($IPBANNED)
{
print "You have been banned from posting";
}
else
{
if (!isset($_POST['submit']))
{
print "<table border='0' cellpadding='6'><tr><td class='book'>";
print "<form method='post' action='try.php' name='form'>";
print "<p class=content>Name:</p> <input type='text' name='name'
size='40'><br>";
print "<p class=content>Country:</p><input type='text' name='country'
size='40'><br>";
print "<p class=content>Homepage</p><input type='text' name='homepage'
value='http://' size='40'><br>";
print "<p class=content>E-mail:</p><input type='text' name='email'
size='40'><br>";
print "<p class=content>Aim:</p><input type='text' name='aim'
size='40'><br>";
print "<p class=content>ICQ:</p><input type='text' name='icq'
size='40'><br>";
print "<p class=content>Yahoo:</p><input type='text' name='yim'
size='40'><br>";
print "<p class=content>MSN:</p><input type='text' name='msn'
size='40'><br>";
print "<p class=content>Comment:</p>";
print "<textarea rows='6' name='comment' cols='45'></textarea><br>";
print "<input type='submit' name='submit' value='submit'>";
print "</form><br>";
print "<p class='big'>Clickable Smilies</p>";
print "<a onClick=\"addSmiley(':)')\"><img src='images/smile.gif'></a>
";
print "<a onClick=\"addSmiley(':(')\"><img src='images/sad.gif'></a>
";
print "<a onClick=\"addSmiley(';)')\"><img src='images/wink.gif'></a>
";
print "<a onClick=\"addSmiley(';smirk')\"><img
src='images/smirk.gif'></a> ";
print "<a onClick=\"addSmiley(':blush')\"><img
src='images/blush.gif'></a> ";
print "<a onClick=\"addSmiley(':angry')\"><img
src='images/angry.gif'></a> ";
print "<a onClick=\"addSmiley(':shocked')\"><img
src='images/shocked.gif'></a> ";
print "<a onClick=\"addSmiley(':cool')\"><img
src='images/cool.gif'></a> ";
print "<a onClick=\"addSmiley(':ninja')\"><img
src='images/ninja.gif'></a> ";
print "<a onClick=\"addSmiley('(heart)')\"><img
src='images/heart.gif'></a> ";
print "<a onClick=\"addSmiley('(!)')\"><img
src='images/exclamation.gif'></a> ";
print "<a onClick=\"addSmiley('(?)')\"><img
src='images/question.gif'></a><br>";
print "<a onclick=\"addSmiley(':{blink}')\"><img
src='images/winking.gif'></a>";
print "<A onclick=\"addSmiley('{clover}')\"><img
src='images/clover.gif'></a>";
print "<a onclick=\"addSmiley(':[glasses]')\"><img
src='images/glasses.gif'></a>";
print "<a onclick=\"addSmiley(':[barf]')\"><img
src='images/barf.gif'></a>";
print "<a onclick=\"addSmiley(':[reallymad]')\"><img
src='images/mad.gif'></a>";
print "<script language=\"JavaScript\" type=\"text/javascript\">\n";
print "function addSmiley(textToAdd)\n";
print "{\n";
print "document.form.comment.value += textToAdd;";
print "document.form.comment.focus();\n";
print "}\n";
print "</script>\n";
print "<br><br>";
print "<p class='big'><A href=\"javascript:popWin('bbcode.php',400,
5)\">BBCode instructions</a></p>";
}
else if (isset($_POST['submit']))
{
$name=$_POST['name'];
$country=$_POST['country'];
$email=$_POST['email'];
$homepage=$_POST['homepage'];
$aim=$_POST['aim'];
$icq=$_POST['icq'];
$yim=$_POST['yim'];
$msn=$_POST['msn'];
$comment=$_POST['comment'];
if(!$name || !$comment)
{
print "<font color='red'>Name or comment not entered, please go back
and sign again</font><br>";
}
else
{
$r=$_SERVER["REMOTE_ADDR"];
$day=date("D M d, Y H:i:s");
$timegone=date("U") ; //seconds since Jan 1st, 1970
$putinguestbook="INSERT INTO gbook(name, country, mail, homepage,
comment, realtime, aim, icq, yim, msn, time,IP)
VALUES('$name','$country','$email','$homepage','$comment','$day','$aim','$icq','$yim','$msn','$timegone','$r')";
mysql_query($putinguestbook);
print "Thanks for posting, you will now be redirected <META HTTP-EQUIV
= 'Refresh' Content = '2; URL =index.php'> ";
}
}
}
?>
</td></tr></table>
</center>
<?
include "footer.php";
?>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Hi people,
how to verify if folder exists in server??
--- End Message ---
--- Begin Message ---
[snip]
how to verify if folder exists in server??
[/snip]
Do you RTFM at all?
http://us2.php.net/manual/en/function.is-dir.php
--- End Message ---
--- Begin Message ---
I am a little rusty with fopen, but you should be able to do something like....
if(@fopen($dirName) != true){
note: I am currently in Coldfusion mode, so that line may/may not work as is.
On 3/9/07, Helder Lopes <[EMAIL PROTECTED]> wrote:
Hi people,
how to verify if folder exists in server??
--- End Message ---
--- Begin Message ---
2007. 03. 9, péntek keltezéssel 16.48-kor Helder Lopes ezt írta:
> Hi people,
>
> how to verify if folder exists in server??
http://hu2.php.net/manual/en/function.is-dir.php
greets
Zoltán Németh
--- End Message ---
--- Begin Message ---
Hi
I'd like to ask you for the help
I'm using Squirellmail with plugin Shared calendar. This is simple nice
plugin written by Paul Lesniewski
But I found the bug in this plugin. The bug seems to be related with
variable and memory.
The scripts are really slow and sometimes takes 20-30 seconds under some
conditions.
Unfortunately Paul is busy and has no time to examine it. Just told me
that it seems like there is a problem in that all files are inspected
even when it just needs to look for one file.
I found out what caused this delay and what action but I'm not good
programmer therefore I cannot repair it by myself
Can anybody look at this plugin and bug ? I can provide more information
Can anybody give me some advice how to proceed?
Thanks
Pet
--- End Message ---
--- Begin Message ---
If there are no people willing to, i am, but i don't have a lot of time.
I hope it isn't urgent.
Tijnema
On 3/9/07, Jevos, Peter <[EMAIL PROTECTED]> wrote:
Hi
I'd like to ask you for the help
I'm using Squirellmail with plugin Shared calendar. This is simple nice
plugin written by Paul Lesniewski
But I found the bug in this plugin. The bug seems to be related with
variable and memory.
The scripts are really slow and sometimes takes 20-30 seconds under some
conditions.
Unfortunately Paul is busy and has no time to examine it. Just told me
that it seems like there is a problem in that all files are inspected
even when it just needs to look for one file.
I found out what caused this delay and what action but I'm not good
programmer therefore I cannot repair it by myself
Can anybody look at this plugin and bug ? I can provide more information
Can anybody give me some advice how to proceed?
Thanks
Pet
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Jevos, Peter wrote:
>
> Hi
> I'd like to ask you for the help
> I'm using Squirellmail with plugin Shared calendar. This is simple nice
> plugin written by Paul Lesniewski
> But I found the bug in this plugin. The bug seems to be related with
> variable and memory.
> The scripts are really slow and sometimes takes 20-30 seconds under some
> conditions.
> Unfortunately Paul is busy and has no time to examine it. Just told me
> that it seems like there is a problem in that all files are inspected
> even when it just needs to look for one file.
> I found out what caused this delay and what action but I'm not good
> programmer therefore I cannot repair it by myself
> Can anybody look at this plugin and bug ? I can provide more information
> Can anybody give me some advice how to proceed?
You should post AS MUCH information as you have, that way someone can look
at it and decide if it is something they can do right away.
--- End Message ---
--- Begin Message ---
> >
> > Hi
> > I'd like to ask you for the help
> > I'm using Squirellmail with plugin Shared calendar. This is simple
> > nice plugin written by Paul Lesniewski But I found the bug in this
> > plugin. The bug seems to be related with variable and memory.
> > The scripts are really slow and sometimes takes 20-30 seconds under
> > some conditions.
> > Unfortunately Paul is busy and has no time to examine it.
> Just told me
> > that it seems like there is a problem in that all files are
> inspected
> > even when it just needs to look for one file.
> > I found out what caused this delay and what action but I'm not good
> > programmer therefore I cannot repair it by myself Can
> anybody look at
> > this plugin and bug ? I can provide more information Can
> anybody give
> > me some advice how to proceed?
>
>
> You should post AS MUCH information as you have, that way
> someone can look at it and decide if it is something they can
> do right away.
So I hope this can tells more
The plugin is using file backend for user calendar data.
The structure is simple:
<data_dir>
|
|---- calendar_data
|
|---- private_calendars
| |
| |- iCal files containing only calendar info
| for user personal calendars
|
|---- public_calendars
| |
| |- iCal files containing only calendar info
| for public calendars
....
....
Problem is with files stored in the private calendars folder. There are
files related to users. In my case there is thousands files. When I
deleted this files plugin run without any problem. When the count of
files is increasing it's getting worst
Here is the answer from Paul: seems like there is a problem in that all
users are inspected even when it just needs to look for one user When
user files has increased the scripts stopped running and I got error:
Allowed memory size of 33554432 bytes exhausted (tried to allocate
128bytes)
I had to increased memory_limit = 64M in php.ini but this is temporaly
solution that force the plugin to work
So it seems there is problem with variable $calId that is responsible
for unique names of the private calendars But I cannot redefine it or
change it I think it is necessary to install this plugin with SM
Thanks a lot
PEt
--- End Message ---