[PHP] Power failure = php failure: HELP!

2004-09-15 Thread Justin Rietz
I am running Apache. Xoops, and Squirrelmail on a
Fedora 2 server.  I recently had a power failure - my
daughter turned off my power strip :-(  The network
card was fried.  Anyway, PHP does not seem to be
working now.  Apache serves static html pages fine,
squirrelmail loads in the browser but can't read
mailboxes, and the Xoops home page pulls up VERY
slowly but doesn't post any graphics.

I have spent 2 days trying to find the solution.  If
anyone has any ideas, it would be much appreciated!

Thanks,

-JR

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Submitting info from a form to a db

2004-09-15 Thread Logan Moore
heres the code, but im getting an error

? mysql_query(INSERT INTO `users`(fullname, email, username, password)
VALUES ('.$_POST['fullname'].', '.$_POST['email'].',
'.$_POST['username'].', '.md5($_POST['password'].'));
?

This time I dont have a clue whats happening

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Submitting info from a form to a db

2004-09-15 Thread raditha dissanayake
Logan Moore wrote:
heres the code, but im getting an error
 

and the error is?
? mysql_query(INSERT INTO `users`(fullname, email, username, password)
VALUES ('.$_POST['fullname'].', '.$_POST['email'].',
'.$_POST['username'].', '.md5($_POST['password'].'));
?
This time I dont have a clue whats happening
 


--
Raditha Dissanayake.

http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload
Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader
Graphical User Inteface. Just 128 KB | with progress bar.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Power failure = php failure: HELP!

2004-09-15 Thread raditha dissanayake
Justin Rietz wrote:
I am running Apache. Xoops, and Squirrelmail on a
Fedora 2 server.  I recently had a power failure - my
daughter turned off my power strip :-(  The network
card was fried.  Anyway, PHP does not seem to be
working now.  Apache serves static html pages fine,
squirrelmail loads in the browser but can't read
mailboxes, and the Xoops home page pulls up VERY
slowly but doesn't post any graphics.
I have spent 2 days trying to find the solution.  If
anyone has any ideas, it would be much appreciated!
 

What could have happened is that the power outage caused a few bad 
sectors or lost chains. Or it may have resulted in buffered data not 
been written to disk. To cut a long story short your php installation 
would have been corrupted. A reinstall would probably fix the problem.

Thanks,
-JR
__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

 


--
Raditha Dissanayake.

http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload
Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader
Graphical User Inteface. Just 128 KB | with progress bar.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: Submitting info from a form to a db

2004-09-15 Thread Niklas Lampén
First:
Post the error code when you get one.
Second:
Split the code into pieces/rows to find errors.
-- CODE --
?
mysql_query(
  INSERT INTO `users`
  (
fullname,
email,
username,
password
  ) VALUES (
 ' . $_POST['fullname'] . ',
 ' . $_POST['email'] . ',
 ' . $_POST['username'] . ',
 ' . md5($_POST['password'] . '
  )
  );
?
-- END --
Easier to spot the error? md5() tag is not closed.
Niklas

Logan Moore wrote:
heres the code, but im getting an error
? mysql_query(INSERT INTO `users`(fullname, email, username, password)
VALUES ('.$_POST['fullname'].', '.$_POST['email'].',
'.$_POST['username'].', '.md5($_POST['password'].'));
?
This time I dont have a clue whats happening
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: =?unknown?b?ztK5q8u+09C/7MvZvu3DxaOsv+zL2czhyf3DxaOsuaTStcjtw8WjrLj31tbI7aOs07JQVkPNuMP3sOWjrLSwwbEsy9zBz8a/sMu088+1wdA=?=

2004-09-15 Thread L-Soft list server at LISTS.NAU.EDU (1.8d)
 ÎÒ¹«Ë¾ÊÇÒ»¼Ò¾ßÓÐÊ®¶àÄêµÄÀúÊ·ºÏ×ÊÆóÒµ£¬¹«Ë¾²úÆ·ÒÑÐγɾíÃÅ£¬¿ìËÙÌáÉý
Unknown command -
ÎÒ¹«Ë¾ÊÇÒ»¼Ò¾ßÓÐÊ®¶ÀÄʵÄÀÚÊ·ºÏ×ÊÆÓÒµ£¬¹«Ë¾²ÚÆ·ÒÑÐγɾÍÃÅ£¬¿ÌËÙÌÁÉÝ. Try
HELP.

 ÃÅ£¬¹¤ÒµÈíÃÅ£¬¸÷ÖÖÈí£¬Ó²PVC͸Ã÷°å£¬´°Á±,ËÜÁÏÆ¿°Ë´óϵÁУ¬ÉÏ°ÙÖÖ¹æ¸ñ¼°²úÆ·¡£
Unknown   command  -
ÃÅ£¬¹¤ÒµÈÍÃÅ£¬¸÷ÖÖÈÍ£¬Ó²PVC͸Ã÷°Å£¬´°Á±,ËÜÁÏÆ¿°Ë´ÓϵÁУ¬ÉÏ°ÙÖֹƸѼ°²ÚÆ·¡£
. Try HELP.

 ÓÈÆäÔÚרҵÉú²úÖÆÔì¸ô¾øÉ豸ÁìÓòÀÆäÓÃ;¹ã·º£¬×¨ÒµÐÔÇ¿£¬Êǵ±Ç°¹ú¼ÊÉÏ
Unknown  command  -
ÓÈÆÄÔÚרҵÉÚ²ÚÖÆÔ̸ԾØÉȱ¸ÁÌÓÒÀÏ£¬ÆÄÓÃ;¹Ã·º£¬×¨ÒµÐÔÇ¿£¬Êǵ±Ç°¹Ú¼ÊÉÏ. Try
HELP.

 ¹«ÈϵÃ×î¼Ñ¸ô¾øÉèÊ©
Unknown command - ¹«ÈϵÃ×μѸԾØÉÈÊ©. Try HELP.

 ÎÒ³§ÊÇרҵÉú²úËÜÁÏÆ¿µÄ³§¼Ò£¬Êǹú¼ÒÅ©Òµ²¿¡¢Öйú¶¯Îï±£½¡Æ·Ð­»áÖ¸¶¨£¬×¨ÃÅΪGMPÊÞÒ©ÈÏÖ¤³§¼Ò·þÎñµÄËÜÁÏÆ¿°ü×°³§¡££¨ÔÚGMPÎļþ±àÖÆÖ¸ÄÏABCDËľíÊéÖоù¿É²éѯµ½¸ÃËÜÁÏÆ¿³§×ÊÁÏ£©
Unknown   command  -
ÎÒ³§ÊÇרҵÉÚ²ÚËÜÁÏÆ¿µÄ³§¼Ò£¬ÊǹڼÒÅ©Òµ²¿¡¢Öйڶ¯Îϱ£½¡Æ·Ð­»ÁÖ¸¶¨£¬×¨ÃÅΪGMP
ÊÞÒ©ÈÏÖ¤³§¼Ò·ÞÎѵÄËÜÁÏÆ¿°Ü×°³§¡££¨ÔÚGMPÎļޱÀÖÆÖ¸ÄÏABCDËľÍÊÉÖоٿɲÉѯµ½¸ÃË
ÜÁÏÆ¿³§×ÊÁÏ£©. Try HELP.

 ±¾³§¼¼ÊõÁ¦Á¿ÐÛºñ£¬¹¤ÒÕÏȽø£¬É豸¾«Á¼£¬¸÷Àà´µ¡¢×¢³ÉÐÍ»ú26̨£¬ÎÒ³§¾ßÓнÏÇ¿µÄ¾­¼ÃʵÁ¦£¬²úÆ·ÐÐÏúÈ«¹ú¸÷µØ£¬ÒÔÒ»Á÷µÄ²úÆ·ÖÊÁ¿£¬Ò»Á÷µÄÆóÒµÐÅÓþ£¬Ó®µÃÁ˸÷ÊÞÒ©ÆóÒµµÄÒ»ÖÂÔÞÓþ¡£±¾²úÆ·»¹¹ã·ºÓÃÓÚÒ½Ò©¡¢Å©Ò©¡¢»¯¹¤¡¢Ê³Æ·µÈÐÐÒµ¡£
Unknown   command  -
±¾³§¼¼ÊÕÁ¦Á¿Ðۺѣ¬¹¤ÒÕÏȽأ¬Éȱ¸¾«Á¼£¬¸÷ÀÀ´µ¡¢×¢³ÉÐÍ»Ú26̨£¬ÎÒ³§¾ßÓнÏÇ¿µÄ¾
­¼ÃʵÁ¦£¬²ÚÆ·ÐÐÏÚÈ«¹Ú¸÷µØ£¬ÒÔÒ»Á÷µÄ²ÚÆ·ÖÊÁ¿£¬Ò»Á÷µÄÆÓÒµÐÅÓÞ£¬Ó®µÃÁ˸÷ÊÞÒ©ÆÓÒ
µµÄÒ»ÖÂÔÞÓÞ¡£±¾²ÚÆ·»¹¹Ã·ºÓÃÓÚÒ½Ò©¡¢Å©Ò©¡¢»¯¹¤¡¢Ê³Æ·µÈÐÐÒµ¡£. Try HELP.

 ±¾³§²úÆ·¹æ¸ñÆëÈ«£¬ÑùʽÐÂÓ±£¬ÓÐÏû¶¾¼ÁÆ¿¡¢ÒßÃçÆ¿¡¢Ò»¹«½ïÍ°£¬Ê®¹«½ïÍ°£¨×°µç½â£¬Î¬Ëü£©µÈµÈ¡£ÎÒ³§·Ç³£ÖØÊÓвúÆ·µÄ¿ª·¢ºÍ´´Ð£¬½ñºóÔ¸Óë¸ü¶àµÄ³§¼ÒºÏ×÷£¬ÒÔÓÅÖʼÛÁ®µÄ²úÆ··îÏ׸ø¹ã´ó¿Í»§£¬³§³¤ÁõÈêìÍÕæ³ÏÆÚ´ý×ÅÓëÄãЯÊÖ¹²Ä±·¢Õ¹¡£
Unknown   command  -
±¾³§²ÚÆ·¹Æ¸ÑÆËÈ«£¬ÑÙʽÐÂÓ±£¬ÓÐÏÛ¶¾¼ÁÆ¿¡¢ÒßÃÇÆ¿¡¢Ò»¹«½ÏÍ°£¬Ê®¹«½ÏÍ°£¨×°µÇ½Â£
¬Î¬ËÜ£©µÈµÈ¡£ÎÒ³§·Ç³£ÖØÊÓвÚÆ·µÄ¿ª·¢ºÍ´´Ð£¬½ÑºÓÔ¸Ó˸ܶÀµÄ³§¼ÒºÏ×÷£¬ÒÔÓÅÖʼ
ÛÁ®µÄ²ÚÆ··ÎÏ׸عôӿͻ§£¬³§³¤ÁÕÈÊÌÍÕƳÏÆÚ´Ý×ÅÓËÄÃЯÊÖ¹²Ä±·¢Õ¹¡£. Try HELP.

 ÎÒ¹«Ë¾¾ßÓÐÏȽøµÄÉú²úÉ豸¼°³§·¿£¬Òý½øÈÕ±¾£¬Ì¨Í壬ŷÖ޵ȹú¼ÒµÄ¼¼Êõ
Unknowncommand-
ÎÒ¹«Ë¾¾ßÓÐÏȽصÄÉÚ²ÚÉȱ¸¼°³§·¿£¬ÒݽØÈÕ±¾£¬Ì¨ÍÅ£¬Å·Ö޵ȹڼҵļ¼ÊÕ. Try
HELP.

 ¼°É豸¡£Éú²ú³ö¸ßƷ룬ÓÅÖʲúÆ·£¬ÏúÍù¶íÂÞ˹£¬·ÆÂɱö£¬ÃÀ¹ú£¬µÂ¹ú¼°È«¹ú
Unknown  command  -
¼°Éȱ¸¡£ÉÚ²Ú³Ö¸ßƷ룬ÓÅÖʲÚÆ·£¬ÏÚÍÙ¶ÍÂÞ˹£¬·ÆÂɱ֣¬ÃÀ¹Ú£¬µÂ¹Ú¼°È«¹Ú. Try
HELP.

 ¸÷µØ£¬Êܵ½Á˹úÄÚÍâÊÀ½çÈËÊ¿µÄ³ç°®¼°ºÃÆÀ¡£ÓÈÆäÔÚPVC¼â¶Ë¼¼Êõ·½Ãæ×ö³ö
Unknown command-
¸÷µØ£¬Êܵ½Á˹ÚÄÚÍÂÊÀ½ÇÈËÊ¿µÄ³Ç°®¼°ºÃÆÀ¡£ÓÈÆÄÔÚPVC¼Â¶Ë¼¼ÊÕ·½ÃÆ×Ö³Ö. Try
HELP.

All subsequent commands have been flushed.

Summary of resource utilization
---
 CPU time:0.000 sec
 Overhead CPU:0.000 sec
 CPU model: Ultra-80 (4096M)
 Job origin:  [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] OT how to create a transparent watermark in png with photoshop

2004-09-15 Thread Fernando Gutierrez
i'm trying to do a watermark to use gd support from php in adobe
photoshop , but always my watermark image show white  border (i test
with 8-bit , alpha chanel , 24-bit). Anyone can explain to me to do
this correctly.

Thanks in advance

-- 
-- Fernando Gutierrez Perez --
gmeileando un poco :)

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Capturing an Image of a web page

2004-09-15 Thread john
 Has anyone run across a tool available to PHP that can render an image of
 a
 entire webpage from a URL, so that it can be reduced to a thumbnail and
 stored in a database?

I'm sure this has been discussed and solved on/in TheList (Evolte) but
I've just searched the archive and not found it. Probably the solution
wasn't PHP tho, but at least it was automated. Anyway .. you could join
theList and ask there.

Cheers
J

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] PHP frontend

2004-09-15 Thread Sagar C Nannapaneni
Hi there,

I wonder whats this PHP forntend is?
Is this diff from the PHP we work with regularly?
If any one could suggest some articles on thisit wud b greatly apprecieated

Thanks,,
/sagar


Re: [PHP] something like an SID

2004-09-15 Thread Chris Dowell
Try this:
http://uk.php.net/output_add_rewrite_var
Dennis Gearon wrote:
You make a good point, Marek. They CAN open a new window with 
different results. Maybe it's up to each page to keep track of where 
it is at, via form elements alone, instead of through session values. 
Hadn't thought of that, but it must be the only way. Adding and extra 
layer to that might end up being really confusing to programmers for 
my site.

The values for previous forms could just be sent as hidden 
elements(and not kept in the session), until the whole thing is 
collected, then they are all qualified again.

The only thing in the session would be the user's id.
Marek Kilimajer wrote:
Dennis Gearon wrote:
I'd like a value to be passed back from every page, if that page was 
originally passed that value.

The two ways that I can think of it, are:
1/ Javascript with some sort of 'onSubmit()' function which causes a 
minimal form to be submitted via POST or GET
2/ A hidden form value, and make every action on a page be a button, 
which submits a form as above.

3. Define your SID value:
$SID = isset($_REQUEST['var_name']) ? 'var_name=' . 
urlencode($_REQUEST['var_name']) : '';
Write every link as href=page.php??php echo $SID; ?
Something similar for forms.

If no value was received, it would know it was a first access.
NO, I don't think Sessions will do it - I will use this value IN 
PARALELL to Sessions.
NO, I don't think Cookies will do it, since I want the value to be 
different for each
   browser instance and each 'TAB' in each browser instance.

You will fail. User can use right click to open any link in a new 
window and the value will stay the same.

Someone tell me if I'm on the right track, and point me to a link 
that shows how to do:

   My idea 1,
My idea 2,
   or your idea?


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Submitting info from a form to a db

2004-09-15 Thread Stephan Fiedler
Hi Logan,
1stly My cristall ball tells me it's an unexpected ;
expected was a ) here.
.md5($_POST['password']).'));
---^
2ndly.
Please Submit the error you get.
3rdly.
check posted values before inserting them into db.
Have a nice day
Stephan
[oops, 1st time sent it went to the OP not to the list, sorry]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] problem compailing php-4.3.6 please help !!!!!

2004-09-15 Thread Juan Fernandez
Hi,

 

I am installing php-4.3.6 on Fedora,

 

When I am compiling I receive the following error :

 

[EMAIL PROTECTED] php-4.3.6]# make install

Installing PHP SAPI module:   apache2handler

/www/build/instdso.sh SH_LIBTOOL='/www/build/libtool' libphp4.la
/www/modules

/www/build/libtool --mode=install cp libphp4.la /www/modules/

cp .libs/libphp4.lai /www/modules/libphp4.la

cp .libs/libphp4.a /www/modules/libphp4.a

ranlib /www/modules/libphp4.a

chmod 644 /www/modules/libphp4.a

libtool: install: warning: remember to run `libtool --finish
/root/snortinstall/php-4.3.6/libs'

Warning!  dlname not found in /www/modules/libphp4.la.

Assuming installing a .so rather than a libtool archive.

chmod 755 /www/modules/libphp4.so

chmod: failed to get attributes of `/www/modules/libphp4.so': No such file
or directory

apxs:Error: Command failed with rc=65536

.

make: *** [install-sapi] Error 1

 

 

what can I do ? 

 

Thanks !!!



Re: RE: [PHP] convert degrees to heading

2004-09-15 Thread Dave Restall - System Administrator,,,
Hi Trevor,

 Very nice solution, Dave.   I like simple, elegant and effective
 solutions like this.  I was wracking my brain yesterday to come up with
 something like this, but my brain wasn't working. Hah.  Good job!

Thanks for the compliments - my head is now a bit bigger :-)

I thought 0 degrees should have been east but thought you were using
a southern hemisphere compass :-)  Anyway, I went back and checked the
original post :-

  I have to write a little function to convert a direction=20
 from degrees
  to a compass -type heading. 0 =3D West. 90 =3D North. E.g.:
=20
 Something like this... it'll account for 360 degrees, too.=20
 No different=20
 that a bunch of IF statements, though...

which is what I coded for - which only goes to prove that the system
will only be as good as the specification :-)

Regards,


Dave
php/trevor-2004-09-15.tx   [EMAIL PROTECTED]
   php-general,[EMAIL PROTECTED]
++
| Dave Restall,   IIRC Limited, PO Box 46, Skelton, Cleveland, TS12 2GT. |
| Tel. 0845 10 80 151Mob. +44 (0) 7973 831245   Int. +44 (0) 1287 653003 |
| email : [EMAIL PROTECTED]   [EMAIL PROTECTED] Web : http://www.iirc.net |
++
| The last person that quit or was fired will be held responsible for|
| everything that goes wrong -- until the next person quits or is fired. |
++

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Capturing an Image of a web page

2004-09-15 Thread Chris Dowell
You can try this:
http://open.thumbshots.org/image.pxf?url=http://www.php.net
But I'm not sure how useful it will be to you - it's a database of 
thumbnails, not a tool to dynamically generate them.

[EMAIL PROTECTED] wrote:
Has anyone run across a tool available to PHP that can render an image of
a
entire webpage from a URL, so that it can be reduced to a thumbnail and
stored in a database?
   

I'm sure this has been discussed and solved on/in TheList (Evolte) but
I've just searched the archive and not found it. Probably the solution
wasn't PHP tho, but at least it was automated. Anyway .. you could join
theList and ask there.
Cheers
J
 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Power failure = php failure: HELP!

2004-09-15 Thread Markus Mayer
I had a similar problem myself 1 1/2 weeks ago when my system locked up 
through an IDE bus lock up after 560 days uptime (system still ran, but no 
access to anything on the IDE drives, scsi was ok).  There was significant 
file system damage, which for me took out my web pages, MySQL, a number of 
executables, and a few other files.  

Your whole problem sounds like file system damage to me.  I'm assuming you've 
run something like fsck to examine your file systems, been through the 
lost+found directories on the various partitions and put together again as 
much as you can.  Just because a program still kind of runs doesn't mean it 
or its files escaped the crash undamaged.

I think your only two reasonable options here are to reach for you backups 
(you did make them, didn't you???), or to rebuild the failing components.

If you need further help, you can contact me directly as this thread doesn't 
really belong on the PHP list.

regards
Markus

On Wednesday 15 September 2004 08:14, Justin Rietz wrote:
 I am running Apache. Xoops, and Squirrelmail on a
 Fedora 2 server.  I recently had a power failure - my
 daughter turned off my power strip :-(  The network
 card was fried.  Anyway, PHP does not seem to be
 working now.  Apache serves static html pages fine,
 squirrelmail loads in the browser but can't read
 mailboxes, and the Xoops home page pulls up VERY
 slowly but doesn't post any graphics.

 I have spent 2 days trying to find the solution.  If
 anyone has any ideas, it would be much appreciated!

 Thanks,

 -JR

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Submitting info from a form to a db

2004-09-15 Thread dirk
Try it with escaped qutation marks (\)
? mysql_query(INSERT INTO `users`(fullname, email, username, password)
VALUES (\.$_POST['fullname'].\, \.$_POST['email'].\,
\.$_POST['username'].\, \.md5($_POST['password'].\));
?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] gmp precision

2004-09-15 Thread El Santo
hi there
i'm trying to use gmp functions to compute a square root i need the 
decimal part, but the gmp functions, at least afaik, implemented in php 
only return the integer part... i found no way to get this with gmp...

i used bcmath functions for that, but i found they are 15 to 20 times 
slower

will future releases of php implement gmp decimal functions or should i 
write a C cgi?

regards
s.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Submitting info from a form to a db

2004-09-15 Thread Stephan Fiedler
Hi Dirk,
dirk wrote:
Try it with escaped qutation marks (\)
This is completely wrong here, because mysql doesn't understand those 
marks().
The string delimiter in mysql (in sql in general) is '
(http://dev.mysql.com/doc/mysql/en/index.html)

Grusz Stephan
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Help with fwrite()

2004-09-15 Thread Nick Wilson
Hi all, 

Im trying to delete a line from a file after having first read the line.  
The file contains a list or urls, one per new line: like this:

urls.txt
http://example.com/somedir/
http://www.example.com/page.php?name=Nick+W

Here's what I have so far:

?php
  $file = 'urls.txt';
  $f = fopen($file, 'r+');
  $url2use = fgets($f);
  fseek($f, 0);
  fwrite($f, '', strlen($url2use)); // Where is the gotha?
  print($url2use);
  fclose($f);
? 

Clearly im using fwrite incorrectly (at least i think that's clear ;-)
but i cant seem to figure out what im doing wrong? (well, i kinda can
but i cant get any further with it without a little help..)

Much thanks for your time...
-- 
Nick W

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Help with fwrite()

2004-09-15 Thread Nick Wilson

* and then Nick Wilson declared
 Hi all, 
 
 Im trying to delete a line from a file after having first read the line.  
 The file contains a list or urls, one per new line: like this:

BTW, reading the file into an array, shifting off the first element and
rewriting isnt a good option for me as the urls.txt file can be *very*
big...
-- 
Nick W

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] if syntax using multiple conditions

2004-09-15 Thread Brian Anderson
Thanks! And, *wow* yes I just did try php2asp. Pretty good translation,
although a few things need adjusting, it seems to do a remarkable job. I'll
definitely have to play with it some more.

:)

-Brian

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Security - Semi OT

2004-09-15 Thread John Nichel
Chris Shiflett wrote:
2. I value my time, so I'm not cheap. :-)
So much for all those rumors I've been hearing. ;)
--
John C. Nichel
ÜberGeek
KegWorks.com
716.856.9675
[EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] php - no results - display other message

2004-09-15 Thread John Nichel
Dustin Krysak wrote:
Hi there... I have a simple search page (mysql database), and I can get 
it to display the results no issues, but i was wondering how I could 
display a message stating there were no results, instead of just having 
the field blank. I am familiar with IF and ELSE statements, but I am not 
sure how to test the no result option from the results of a SQL query

thanks!
d
Depends on how you're recieving your results...
function doSearch ( $string ) {
$sql = SELECT *.blah, blah
more code;
if ( $result = 
return $result;
} else {
return false;
}
}
if ( $search = doSearch ( $terms ) ) {
// display results
} else {
// display no results found
}
--
John C. Nichel
ÜberGeek
KegWorks.com
716.856.9675
[EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] problem compailing php-4.3.6 please help !!!!!

2004-09-15 Thread Juan Fernandez
Hi, 

  

I am installing php-4.3.6 on Fedora, 

  

When I am compiling I receive the following error : 

  

[EMAIL PROTECTED] php-4.3.6]# make install 

Installing PHP SAPI module:   apache2handler 

/www/build/instdso.sh SH_LIBTOOL='/www/build/libtool' libphp4.la 
/www/modules 

/www/build/libtool --mode=install cp libphp4.la /www/modules/ 

cp .libs/libphp4.lai /www/modules/libphp4.la 

cp .libs/libphp4.a /www/modules/libphp4.a 

ranlib /www/modules/libphp4.a 

chmod 644 /www/modules/libphp4.a 

libtool: install: warning: remember to run `libtool --finish 
/root/snortinstall/php-4.3.6/libs' 

Warning!  dlname not found in /www/modules/libphp4.la. 

Assuming installing a .so rather than a libtool archive. 

chmod 755 /www/modules/libphp4.so 

chmod: failed to get attributes of `/www/modules/libphp4.so': No such file 
or directory 

apxs:Error: Command failed with rc=65536 

. 

make: *** [install-sapi] Error 1 

  

  

what can I do ? 

  

Thanks !!! 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] OK ... WHY does this work ?????

2004-09-15 Thread Gryffyn, Trevor
Read over some of the examples at:
http://us4.php.net/types.array

If you don't set a key, PHP starts with '0' and increments as you add
more elements to the array.

If you have NOTICEs turned on, I believe you'll get a notice saying
that $arrlevels[99] doesn't exist.  It's not a fatal error, so PHP just
passes over it and doesn't say anything unless you tell it to.

# One dimensional array
$arrlevels = array(1,2,3);

# Three dimensional array.  $lvl_guest is a key and 'levelname' is a key
$arrlevels[$lvl_guest]['levelname'];

-TG

 On Tue, 14 Sep 2004 22:32:54 +0200, -{ Rene Brehmer }-
 [EMAIL PROTECTED] wrote:
  Unless I misunderstand how PHP make unspecified arrays (and 
 I probably do
  since this works), when you have an array of 3 elements on the first
  dimenstion like I do, and then ask for 
 $arrlevels[$lvl_guest]['levelname'],
  which in this case actually means it asks for 
 $arrlevels[99]['levelname']
   how come it pick the correct element, and not error 
 out that element
  99 don't exist ??
  
  My only conclusion (based on the fact that this actually 
 works) is that PHP
  makes the key the same as the value if the key isn't 
 specified. But is this
  actually correct  Or is there something going on that 
 I don't know
  about ???

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Security - Semi OT

2004-09-15 Thread John Holmes
From: John Nichel [EMAIL PROTECTED]
Chris Shiflett wrote:
2. I value my time, so I'm not cheap. :-)
So much for all those rumors I've been hearing. ;)
Yeah, sorry. I'll stop spreading them now.
---John Holmes...
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] Image question

2004-09-15 Thread Gryffyn, Trevor
Jason Paschal posted this link a while ago, regarding storing and
retriving images from MySQL:

http://www.dailymedication.com/modules.php?name=Forumsfile=viewtopict=
15

-TG

 -Original Message-
 From: Ed Lazor [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, September 14, 2004 8:44 PM
 To: [EMAIL PROTECTED]
 Subject: RE: [PHP] Image question
 
 
 Oop... spoke too soon.  I was able to store the image into 
 the database, but
 now I can't pull it back out and manipulate it with the gd 
 image functions.
 Instead of using the imagejpeg function, I can just echo the 
 field and the
 image will display in a browser window.  How do I restore the 
 data from the
 database in a way that I can continue to manipulate it with the image
 functions, like imagejpeg($data)?  
 
 Thanks,
 
 Ed
 
 
  -Original Message-
  From: Ed Lazor [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, September 14, 2004 5:20 PM
  To: 'Jason Wong'; [EMAIL PROTECTED]
  Subject: RE: [PHP] Image question
  
  Got it.  Thanks Jason.
  
   -Original Message-
Imagejpeg($im);  // successfully displays image
  
   Use the ob_*() functions to capture the output. See archives for
  details.
  
  
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Help with fwrite()

2004-09-15 Thread John Holmes
From: Nick Wilson [EMAIL PROTECTED]
Im trying to delete a line from a file after having first read the line.
The file contains a list or urls, one per new line: like this:
[snip]
 fwrite($f, '', strlen($url2use)); // Where is the gotha?
Hmmm... how can you write an empty string with a length?
If you did something like
fwrite($f,str_repeat('x',strlen($url2use));
then you'd overwrite the URL with , though.
You can't just remove part of a file like you remove part of a string. 
You'll need to read (eventually) the entire file and only write back what 
you want to keep.

Now, you said this could be a very large file, so you don't want to read the 
whole thing into memory. That's smart, so maybe using a swap file would be 
handy? Read from file1, if it's a URL you want to keep, then write it to 
file2. rinse, lather, repeat and at the end rename file2 to file1. This way 
you're only reading one line at a time into memory.

Maybe I'm overlooking another obvious method. If so, someone will pop up. :)
---John Holmes... 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] something like an SID

2004-09-15 Thread Dennis Gearon
Just what the doctor ordered! Thanks Chris.
Chris Dowell wrote:
Try this:
http://uk.php.net/output_add_rewrite_var
Dennis Gearon wrote:
You make a good point, Marek. They CAN open a new window with 
different results. Maybe it's up to each page to keep track of where 
it is at, via form elements alone, instead of through session values. 
Hadn't thought of that, but it must be the only way. Adding and extra 
layer to that might end up being really confusing to programmers for 
my site.

The values for previous forms could just be sent as hidden 
elements(and not kept in the session), until the whole thing is 
collected, then they are all qualified again.

The only thing in the session would be the user's id.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Help with fwrite()

2004-09-15 Thread John Nichel
John Holmes wrote:
From: Nick Wilson [EMAIL PROTECTED]
Im trying to delete a line from a file after having first read the line.
The file contains a list or urls, one per new line: like this:
[snip]
 fwrite($f, '', strlen($url2use)); // Where is the gotha?

Hmmm... how can you write an empty string with a length?
If you did something like
fwrite($f,str_repeat('x',strlen($url2use));
then you'd overwrite the URL with , though.
You can't just remove part of a file like you remove part of a string. 
You'll need to read (eventually) the entire file and only write back 
what you want to keep.

Now, you said this could be a very large file, so you don't want to read 
the whole thing into memory. That's smart, so maybe using a swap file 
would be handy? Read from file1, if it's a URL you want to keep, then 
write it to file2. rinse, lather, repeat and at the end rename file2 to 
file1. This way you're only reading one line at a time into memory.

Maybe I'm overlooking another obvious method. If so, someone will pop 
up. :)

---John Holmes...
Is keeping this info in a db an option?
--
John C. Nichel
ÜberGeek
KegWorks.com
716.856.9675
[EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] php - no results - display other message

2004-09-15 Thread Chris Dowell
Or alternatively
$result = mysql_query(SELECT * FROM tablename);
if (mysql_num_rows($result))
{
 while ($row = mysql_fetch_row($result))
 {
   // display results
 }
}
else echo No results;
Hope this helps
Cheers
Chris
John Nichel wrote:
Dustin Krysak wrote:
Hi there... I have a simple search page (mysql database), and I can 
get it to display the results no issues, but i was wondering how I 
could display a message stating there were no results, instead of 
just having the field blank. I am familiar with IF and ELSE 
statements, but I am not sure how to test the no result option from 
the results of a SQL query

thanks!
d
Depends on how you're recieving your results...
function doSearch ( $string ) {
$sql = SELECT *.blah, blah
more code;
if ( $result = 
return $result;
} else {
return false;
}
}
if ( $search = doSearch ( $terms ) ) {
// display results
} else {
// display no results found
}
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Removing strange chars from array (or string)

2004-09-15 Thread Zoran Lorkovic
Hi

Well, when parsing html page data I want to save is saved in txt file. But when saving 
in txt file I got some strange chars like small square (this I see when open in 
NotePad).

When I try to open in WordPad this strange chars (squares) are recognized as new lines 
so in my file I got many empty lines.

I've try to trim array (string) before saving to file but that didn't help (tried with 
trim, ltrim and rtrim).

Am I missing something?

Regards,
Zoran

[PHP] Refresh page with frames...

2004-09-15 Thread Andre
Hello
How can I refresh a page with frames, I use the code below but don't it
doesn't work

Can I refresh a page with frames with this code?
echoMETA HTTP-EQUIV=javascript:top.Refresh
CONTENT='0;URL=http://localhost';
Thank's



Re: [PHP] Refresh page with frames...

2004-09-15 Thread John Holmes
From: Andre  [EMAIL PROTECTED]
How can I refresh a page with frames, I use the code below but don't it
doesn't work
Right click - Refresh Frame
---John Holmes...
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Refresh page with frames...

2004-09-15 Thread John Nichel
Andre wrote:
Hello
How can I refresh a page with frames, I use the code below but don't it
doesn't work
You can't with PHP.  But I'm betting that if you Google, you'll find 
some info on JavaScript.

--
John C. Nichel
ÜberGeek
KegWorks.com
716.856.9675
[EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Removing strange chars from array (or string)

2004-09-15 Thread John Holmes
From: Zoran Lorkovic [EMAIL PROTECTED]
Well, when parsing html page data I want to save is saved in txt file.
But when saving in txt file I got some strange chars like small square
(this I see when open in NotePad).
[snip]
Am I missing something?
You forgot to post your code. If you're only using \n for newlines, Notepad 
won't recognize them (it's expecting \r\n) and will mess up your layout.

---John Holmes... 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Removing strange chars from array (or string)

2004-09-15 Thread Chris Dowell
Zoran
Sounds like your problem is with line endings - your unix (i presume) 
box ends its lines with a newline (\n)

Windows ends lines with a carraige return followed by a newline (\r\n or 
CRLF)

Notepad doesn't recognise a newline on its own as either a valid 
character or a valid line ending, so it displays it as a box

Wordpad is slightly cleverer from the sound of things, and correctly 
interprets your newline characters

trim() probably won't help because it only trims whitespace from the 
ends of the string - it won't strip it from the middle

if you're building up your output line by line, try trim()ming it line 
by line

otherwise you might want to look into regexes to strip repeated newlines
Cheers
chris
Zoran Lorkovic wrote:
Hi
Well, when parsing html page data I want to save is saved in txt file. But when saving 
in txt file I got some strange chars like small square (this I see when open in 
NotePad).
When I try to open in WordPad this strange chars (squares) are recognized as new lines 
so in my file I got many empty lines.
I've try to trim array (string) before saving to file but that didn't help (tried with 
trim, ltrim and rtrim).
Am I missing something?
Regards,
Zoran
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Help with fwrite()

2004-09-15 Thread Nick Wilson

* and then John Nichel declared
 John Holmes wrote:
 You can't just remove part of a file like you remove part of a string. 
 You'll need to read (eventually) the entire file and only write back 
 what you want to keep.
 
 Now, you said this could be a very large file, so you don't want to read 
 the whole thing into memory. That's smart, so maybe using a swap file 
 would be handy? Read from file1, if it's a URL you want to keep, then 
 write it to file2. rinse, lather, repeat and at the end rename file2 to 
 file1. This way you're only reading one line at a time into memory.
 
 
 Is keeping this info in a db an option?

Not a good one, no. I've tried to figure a schema for it but it's been a
long time since i did db work ;-)

Speed is key here, it's an app that uses the Google API to fetch
relevant urls, then uses cURL to fetch the pages, and if the user wants,
to POST to that page. A DB would be okay i think but filesystem calls
are just faster aren't they?

Where I fail on the DB schema is getting my head around the relationship
between the data, here's roughly what i need to do if anyone is curious
or might prod me in the right direction...

Each user (must have an id,name clearly) can fetch as many urls as they
wish, those urls get written to the db, then as each url is fetched from
the db it is dealt with with php and deleted from the db.

What if a user gets cut off from the script and a whole bunch of
unwanted urls are in the db though? 

Should the db go like this?

db_urls
url_id | user_id | project_id | url

db_user
user_id | name | whatever

db_project
project_id | user_id

Wow, now i've written it down it seems clearer ;) you guys reckon that's
the right kind of schema (based on what you know from the above..)?

Thanks John Holmes, that's seems pretty neat but i may have been
mistaken, i did a test with 5000 urls (shouldnt get much more than that
at any one time) and the memory usage wasnt so bad at all...

-- 
Nick W

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] php - no results - display other message

2004-09-15 Thread John Holmes
From: Chris Dowell [EMAIL PROTECTED]
Or alternatively
$result = mysql_query(SELECT * FROM tablename);
if (mysql_num_rows($result))
{
 while ($row = mysql_fetch_row($result))
 {
   // display results
 }
}
else echo No results;
bah... you're wasting precious resources on a mysql_num_rows call... ;)
$result = mysql_query( ... );
if($row = mysql_fetch_assoc($result))
{
 do{
   //display results
 }while($row=mysql_fetch_assoc($result));
}
else
{ echo 'No results'; }
Millions ways to do it. :)
---John Holmes...
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] something like an SID

2004-09-15 Thread John Holmes
Subject: Re: [PHP] something like an SID
Anyone else read that as something like an STD ?? and thought we were 
getting more spam to the list!?!? ;)

---John Holmes... 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] something like an SID

2004-09-15 Thread Chris Dowell
Perhaps it's something Freudian to do with your chequered past
Just a thought :)
John Holmes wrote:
Subject: Re: [PHP] something like an SID

Anyone else read that as something like an STD ?? and thought we were 
getting more spam to the list!?!? ;)

---John Holmes...
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Bug? ... ? ? and commenting them out

2004-09-15 Thread Stefan
i've the dump feeling there's a bug in the parser (or in my mind =) 
since i tried to commenting out some code, containing ? ... ?. The 
according code was something like ...

--- begin
//$xml = ? ?;
--- end
the occured error is ...
--- begin
Parse error:  parse error, unexpected $ in buninteresting/b on line 
b154/b
--- end

... where 154 the document's last line.
# for comment it out either, whereby /* ... */ works fine (as excepted). 
Seems like the parser doesn't parse the quotes in the statement, but 
parses the ? .. ? tags. So ? ... ? has an higher specifity than the 
comment itself.

PHP Version is 5.0.1. Can anybody reproduce the problem (deleting the 
line fixes it ;o), or find out, wheter ignoring the comment is the 
desired behaviour?

regards, Stefan Bolus
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Help with fwrite()

2004-09-15 Thread John Holmes
From: Nick Wilson [EMAIL PROTECTED]
Each user (must have an id,name clearly) can fetch as many urls as they
wish, those urls get written to the db, then as each url is fetched from
the db it is dealt with with php and deleted from the db.
What if a user gets cut off from the script and a whole bunch of
unwanted urls are in the db though?
Should the db go like this?
db_urls
url_id | user_id | project_id | url
db_user
user_id | name | whatever
db_project
project_id | user_id
Wow, now i've written it down it seems clearer ;) you guys reckon that's
the right kind of schema (based on what you know from the above..)?
That structure looks good, but it really depends upon what dealt with by 
PHP means.

As for the user getting cut off with urls still in the DB... it shouldn't be 
an issue, but again it depends on what dealt with by PHP means.

---John Holmes... 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Help with fwrite()

2004-09-15 Thread Nick Wilson

* and then John Holmes declared
 Should the db go like this?
 
 db_urls
 url_id | user_id | project_id | url
 
 db_user
 user_id | name | whatever
 
 db_project
 project_id | user_id
 
 Wow, now i've written it down it seems clearer ;) you guys reckon that's
 the right kind of schema (based on what you know from the above..)?
 
 That structure looks good, but it really depends upon what dealt with by 
 PHP means.

Well, the url is fetched into a variable by cURL, i then do a whole
bunch of stuff with that variable with regex and wotnot, then the user
decides if they want to post to that url, or discard it. Either way, the
result is the url is deleted from the db_url (and now i think more about
it, written to db_url_done - or a flag put on db_url (that's better i
think))

 As for the user getting cut off with urls still in the DB... it shouldn't 

Yeah, i realized that the moment i sent the mail ;-) they should be able
to pick up with a project right where they left off

my thanks, always good to get your schema cheked out by more
knowledgable folk

-- 
Nick W

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] IIS 4 vulnerabilities

2004-09-15 Thread Angelo Zanetti
Hi guys, 

A client of mine is running PHP on a windows box (SErver) with IIS 4
installed. I am definitely not a favourite of it being a windows box and
secondly IIS version 4. I have heard many things about security breaches
in IIS version 4. A question I want to ask you all is it still safe for
the site to be hosted on this kind of platform and web server (IIS 4)
even though the server might be patched and have all the security
updates. OR should they upgrade their IIS version or just use Apache?
maybe on a unix box?

I know this might be slightly off topic, so Im not looking for message
that are going to flame me rather just dont respond, and I would like to
hear from those of you who can give me some useful input and maybe some
past good and bad experiences with a similiar setup.

Thanks
angelo

Disclaimer 
This e-mail transmission contains confidential information,
which is the property of the sender.
The information in this e-mail or attachments thereto is 
intended for the attention and use only of the addressee. 
Should you have received this e-mail in error, please delete 
and destroy it and any attachments thereto immediately. 
Under no circumstances will the Cape Technikon or the sender 
of this e-mail be liable to any party for any direct, indirect, 
special or other consequential damages for any use of this e-mail.
For the detailed e-mail disclaimer please refer to 
http://www.ctech.ac.za/polic or call +27 (0)21 460 3911

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Bug? ... ? ? and commenting them out

2004-09-15 Thread John Holmes
From: Stefan [EMAIL PROTECTED]
i've the dump feeling there's a bug in the parser (or in my mind =) since 
i tried to commenting out some code, containing ? ... ?.
http://us4.php.net/manual/en/language.basic-syntax.comments.php
Quote:The one-line comment styles actually only comment to the end of the 
line or the current block of PHP code, whichever comes first. This means 
that HTML code after // ? WILL be printed: ? skips out of the PHP mode and 
returns to HTML mode, and // cannot influence that. If asp_tags 
configuration directive is enabled, it behaves the same with // %.

Although maybe it should say even if ? is within a string to clear up any 
confusion?

---John Holmes...
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] iguanahost - anyone else being plagued?

2004-09-15 Thread Nick Wilson
Anyone else getting these infuriating italian messages about some muppet
that doesnt exist?

'desintione non existente'?

I've written to [EMAIL PROTECTED] but no joy, everytime i post on the
php list i get half a dozen of the damn things...
-- 
Nick W

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Removing strange chars from array (or string)

2004-09-15 Thread Zoran Lorkovic
 From: Zoran Lorkovic [EMAIL PROTECTED]

  Well, when parsing html page data I want to save is saved in txt file.
  But when saving in txt file I got some strange chars like small square
  (this I see when open in NotePad).
 [snip]
  Am I missing something?

 You forgot to post your code. If you're only using \n for newlines,
Notepad
 won't recognize them (it's expecting \r\n) and will mess up your layout.

Ok, here is one piece of code dealing with this:

$data[0] = preg_replace(/([])+([^])+([.])*([])+/i,, $data[0]);
$data[0] = str_replace (nbsp, , $data[0]);
$file = fopen (data.txt, wb);
fwerite ($file, $data[0]);
flocse ($file);

As you see, I'm not using any \n for new lines because this code deals with
HTML page.

I guess problem is in new line, and trim() only cuts whitespaces.

Regards.
Zoran

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] IIS 4 vulnerabilities

2004-09-15 Thread Greg Donald
On Wed, 15 Sep 2004 17:28:50 +0200, Angelo Zanetti [EMAIL PROTECTED] wrote:
 A client of mine is running PHP on a windows box (SErver) with IIS 4
 installed. I am definitely not a favourite of it being a windows box and
 secondly IIS version 4. I have heard many things about security breaches
 in IIS version 4. A question I want to ask you all is it still safe for
 the site to be hosted on this kind of platform and web server (IIS 4)
 even though the server might be patched and have all the security
 updates. OR should they upgrade their IIS version or just use Apache?
 maybe on a unix box?
 
 I know this might be slightly off topic, so Im not looking for message
 that are going to flame me rather just dont respond, and I would like to
 hear from those of you who can give me some useful input and maybe some
 past good and bad experiences with a similiar setup.

Just because the box is patched and up to date doesn't mean
non-publicized exploits don't exist.  Evil crackers sometimes sit on
exploits they discover until they find a target they wish to attack. 
This is true no matter the OS and web server software you use. 
Consider if your site is a valuable target or not and act accordingly.
 Review the logs, watch the traffic, be diligant with updates, etc.

I am a open source advocate and would never advise anyone to run any
software that's related to Microsoft in any way.  I run Windows behind
a firewall for a couple of games that aren't available otherwise. 
Other than that I find the Windows OS a very risky venture, especially
when it comes to server applications.  Microsoft has proven time and
time again they are fairly incapable of being secure.  That may change
in the future but this is now.


-- 
Greg Donald
http://gdconsultants.com/
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] iguanahost - anyone else being plagued?

2004-09-15 Thread Gryffyn, Trevor
Yeah, I get tons of them too.  Ideally, someone should identify which
user subscribed to the list is the culprit and remove their address.

-TG

 -Original Message-
 From: Nick Wilson [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, September 15, 2004 11:53 AM
 To: php-general
 Subject: [PHP] iguanahost - anyone else being plagued?
 
 
 Anyone else getting these infuriating italian messages about 
 some muppet
 that doesnt exist?
 
 'desintione non existente'?
 
 I've written to [EMAIL PROTECTED] but no joy, everytime i 
 post on the
 php list i get half a dozen of the damn things...
 -- 
 Nick W
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] security issus

2004-09-15 Thread H. Ch. Esperer
Hello,

I have an apaci 1.3 and php 5.0.1 running on my machine and when I enter a url in a 
browser without a slash at the end of it I get the php script(!) instead of its 
output. When I add a slash, it works all right.
Has anyone experienced this before? Did I just misconfigure something?

hc

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] security issus

2004-09-15 Thread Greg Donald
On Wed, 15 Sep 2004 12:47:05 -0400, H. Ch. Esperer
[EMAIL PROTECTED] wrote:
 I have an apaci 1.3 and php 5.0.1 running on my machine and when I enter a url in a 
 browser without a slash at the end of it I get the php script(!) instead of its 
 output. When I add a slash, it works all right.
 Has anyone experienced this before? Did I just misconfigure something?

This may be of some help:
http://httpd.apache.org/docs/mod/mod_dir.html


-- 
Greg Donald
http://gdconsultants.com/
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] fopen problem, 5 line script

2004-09-15 Thread Mag
Hi,
Can someone tell me what I am doing wrong here please?

?php
$fileptr =
fopen(http://www.google.com/index.html,r;);

$contents = fread($fileptr, filesize($fileptr));

if(strstr($contents,
href=\/froogle?hl=entab=wf\))
{ $result = 1;}else{ $result = 2;}

echo $result;
?

This is the error I get:
Warning: filesize(): Stat failed for Resource id #1
(errno=2 - No such file or directory) in
/home/quickxxx/public_html/tpg/ check- remote.php on
line 4

Warning: fread(): Length parameter must be greater
than 0. in /
home/quickxxx/public_html/tpg/check-remote.php on line
4
2



Any ideas?

Thanks,
Mag

=
--
- The faulty interface lies between the chair and the keyboard.
- Creativity is great, but plagiarism is faster!
- Smile, everyone loves a moron. :-)



__
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!
http://promotions.yahoo.com/new_mail

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: php - no results - display other message

2004-09-15 Thread Dustin Krysak
Actually, after some searching I got it figured out... here is the way 
I ended up doing it

Obviously the RSdel and the MLemail are specific to my record set 
and my database field.


  ?php if ($row_RSdel['MLemail'] !=  ) { ?
  Show result from database.
   ?php
}
else { ?
  No matching email address in the database!
   ?php
}
?
Thanks everyone! appreciate the help!
Dustin
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] fopen problem, 5 line script

2004-09-15 Thread Mark

--- Mag [EMAIL PROTECTED] wrote:

 Hi,
 Can someone tell me what I am doing wrong here please?
 
 ?php
 $fileptr =
 fopen(http://www.google.com/index.html,r;);
 
 $contents = fread($fileptr, filesize($fileptr));

http://us2.php.net/filesize
int filesize ( string filename)


 
 if(strstr($contents,
 href=\/froogle?hl=entab=wf\))
 { $result = 1;}else{ $result = 2;}
 
 echo $result;
 ?
 
 This is the error I get:
 Warning: filesize(): Stat failed for Resource id #1
 (errno=2 - No such file or directory) in
 /home/quickxxx/public_html/tpg/ check- remote.php on
 line 4
 
 Warning: fread(): Length parameter must be greater
 than 0. in /
 home/quickxxx/public_html/tpg/check-remote.php on line
 4
 2
 
 
 
 Any ideas?
 
 Thanks,
 Mag
 
 =
 --
 - The faulty interface lies between the chair and the keyboard.
 - Creativity is great, but plagiarism is faster!
 - Smile, everyone loves a moron. :-)
 
 
   
 __
 Do you Yahoo!?
 Yahoo! Mail - 50x more storage than other providers!
 http://promotions.yahoo.com/new_mail
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 


=
Mark Weinstock
[EMAIL PROTECTED]
***
You can't demand something as a right unless you are willing to fight to death to 
defend everyone else's right to the same thing.
***



__
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!
http://promotions.yahoo.com/new_mail

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] fopen problem, 5 line script

2004-09-15 Thread Curt Zirzow
* Thus wrote Mag:
 Hi,
 Can someone tell me what I am doing wrong here please?
 
 ?php
 $fileptr =
 fopen(http://www.google.com/index.html,r;);
 
 $contents = fread($fileptr, filesize($fileptr));
...
 
 This is the error I get:
 Warning: filesize(): Stat failed for Resource id #1
 (errno=2 - No such file or directory) in
 /home/quickxxx/public_html/tpg/ check- remote.php on
 line 4
 
 Warning: fread(): Length parameter must be greater
 than 0. in /
 home/quickxxx/public_html/tpg/check-remote.php on line

filesize() relies on the fact that the file you opened has support
for stat(). the http wrapper does not have such a thing.

see:
  http://php.net/filesize
  http://php.net/wrappers.http


Curt
-- 
The above comments may offend you. flame at will.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] fopen problem, 5 line script

2004-09-15 Thread Vail, Warren
I thought filesize required the file name, and not the fileptr???

Warren Vail


-Original Message-
From: Curt Zirzow [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, September 15, 2004 10:17 AM
To: php php
Subject: Re: [PHP] fopen problem, 5 line script


* Thus wrote Mag:
 Hi,
 Can someone tell me what I am doing wrong here please?
 
 ?php
 $fileptr =
 fopen(http://www.google.com/index.html,r;);
 
 $contents = fread($fileptr, filesize($fileptr));
...
 
 This is the error I get:
 Warning: filesize(): Stat failed for Resource id #1
 (errno=2 - No such file or directory) in 
 /home/quickxxx/public_html/tpg/ check- remote.php on line 4
 
 Warning: fread(): Length parameter must be greater
 than 0. in /
 home/quickxxx/public_html/tpg/check-remote.php on line

filesize() relies on the fact that the file you opened has support for
stat(). the http wrapper does not have such a thing.

see:
  http://php.net/filesize
  http://php.net/wrappers.http


Curt
-- 
The above comments may offend you. flame at will.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] iguanahost - anyone else being plagued?

2004-09-15 Thread Jim Grill
 Anyone else getting these infuriating italian messages about some muppet
 that doesnt exist?

 'desintione non existente'?

 I've written to [EMAIL PROTECTED] but no joy, everytime i post on the
 php list i get half a dozen of the damn things...
 -- 
 Nick W


I've been getting those stupid things too. Is that Italian? I thought it was
Spanish. LOL

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] fopen problem, 5 line script

2004-09-15 Thread Mag

--- Curt Zirzow [EMAIL PROTECTED] wrote:

 * Thus wrote Mag:
  Hi,
  Can someone tell me what I am doing wrong here
 please?
  
  ?php
  $fileptr =
  fopen(http://www.google.com/index.html,r;);
  
  $contents = fread($fileptr, filesize($fileptr));
 ...
  
  This is the error I get:
  Warning: filesize(): Stat failed for Resource id
 #1
  (errno=2 - No such file or directory) in
  /home/quickxxx/public_html/tpg/ check- remote.php
 on
  line 4
  
  Warning: fread(): Length parameter must be greater
  than 0. in /
  home/quickxxx/public_html/tpg/check-remote.php on
 line
 
 filesize() relies on the fact that the file you
 opened has support
 for stat(). the http wrapper does not have such a
 thing.
 
 see:
   http://php.net/filesize
   http://php.net/wrappers.http
 
 


Thanks for your replies guys but you have left me even
more confused...can someone correct my 5 line script
and tell me what was wrong THEN give me the php.net
manual urls? like this am just getting more
confused...

Thanks,
Mag

=
--
- The faulty interface lies between the chair and the keyboard.
- Creativity is great, but plagiarism is faster!
- Smile, everyone loves a moron. :-)




__
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
http://promotions.yahoo.com/new_mail 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] iguanahost - anyone else being plagued?

2004-09-15 Thread Vail, Warren
Could it be that lizards are nocturnal? ;-)

Warren Vail


-Original Message-
From: Jim Grill [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, September 15, 2004 10:05 AM
To: Nick Wilson; php-general
Subject: Re: [PHP] iguanahost - anyone else being plagued?


 Anyone else getting these infuriating italian messages about some 
 muppet that doesnt exist?

 'desintione non existente'?

 I've written to [EMAIL PROTECTED] but no joy, everytime i post on 
 the php list i get half a dozen of the damn things...
 --
 Nick W


I've been getting those stupid things too. Is that Italian? I thought it was
Spanish. LOL

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Multiple web sites, one IP address...

2004-09-15 Thread René Fournier
I have a question that I'm not sure how to phrase (and google)... I 
know this is a little off-topic, but I was hoping some guru here might 
at least be able to point me in the right direction...

---
I have several web sites (PHP-driven :-) that I want to host on my new 
xServe, which is sitting behind a regular router/firewall. I know how 
to forward port 80, etc., from the WAN side to the xServe on the LAN, 
and that's working fine. But now I would like to move several web sites 
that are presenting running on various ISPs to this server o' mine.

This is where I'm kinda stuck. I know the xServe and Mac OS X Server 
can run multiple web sites/domains (the docs say so). But does each of 
my domains, registered with Network Solutions, need to point to a 
unique IP address? If they can all point to the same IP address (my 
router), then once the HTTP request is passed through the router, and 
port-forwarded to the xServe, how will the xServe know which request is 
for which domain/web site? If each domain needs its own IP address, 
then how can the all be forwarded to the same single router (which just 
has one IP address)?
---

Asking this question I realize that there is some fundamental network 
stuff I don't understand. But the thing is, I don't know *what* I need 
to learn or in what order, so it's a little hard to start googling my 
ignorance away.

If any of you know a good tutorial or how-to guide that more or less 
covers this kind of thing, I would very much appreciate it.

...Rene

...René
---
René Fournier
www.renefournier.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Refresh page with frames...

2004-09-15 Thread Jasper Howard
script language=Javascript
!--
location.refresh(true);
//OR
parent.document.location='LOCATION HERE';
//--
/script

-- 


--
Jasper Howard :: Database Administration
ApexEleven Web Design
1.530.559.0107
http://www.ApexEleven.com/
--
John Nichel [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Andre wrote:
  Hello
  How can I refresh a page with frames, I use the code below but don't it
  doesn't work

 You can't with PHP.  But I'm betting that if you Google, you'll find
 some info on JavaScript.

 -- 
 John C. Nichel
 ÜberGeek
 KegWorks.com
 716.856.9675
 [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] iguanahost - anyone else being plagued?

2004-09-15 Thread Dan Joseph
I've done the same thing.  Most likely its an auto-response msg from them
after we reply to anything on this list.  I can't read the language its in
personally.  I wrote abuse several times, I get the same msg back.

-Dan Joseph

 -Original Message-
 From: Nick Wilson [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, September 15, 2004 11:53 AM
 To: php-general
 Subject: [PHP] iguanahost - anyone else being plagued?
 
 Anyone else getting these infuriating italian messages about some muppet
 that doesnt exist?
 
 'desintione non existente'?
 
 I've written to [EMAIL PROTECTED] but no joy, everytime i post on the
 php list i get half a dozen of the damn things...
 --
 Nick W
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] fopen problem, 5 line script [SOLVED!]

2004-09-15 Thread Mag
Got it,
'case anybody else needs this:

$page =
file_get_contents('http://www.google.se/index.html');
if(strstr($page,
'href=/imghp?hl=svtab=wiie=UTF-8'))
{
  $resultt = 1;
}
else
{
  $resultt = 2;
}

echo $resultt;

Cheers,
Mag

=
--
- The faulty interface lies between the chair and the keyboard.
- Creativity is great, but plagiarism is faster!
- Smile, everyone loves a moron. :-)



___
Do you Yahoo!?
Declare Yourself - Register online to vote today!
http://vote.yahoo.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Multiple web sites, one IP address...

2004-09-15 Thread raditha dissanayake
René Fournier wrote:
I have a question that I'm not sure how to phrase (and google)... I 
know this is a little off-topic, but I was hoping some guru here might 
at least be able to point me in the right direction...
the term you are looking for is 'virtual hosting' their is an excellent 
guide in the apache manual which will definitely help you get started. 
Further discussion of course will definitely be off topic.

--
Raditha Dissanayake.

http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload
Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader
Graphical User Inteface. Just 128 KB | with progress bar.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Multiple web sites, one IP address...

2004-09-15 Thread John Nichel
René Fournier wrote:
I have a question that I'm not sure how to phrase (and google)... I know 
this is a little off-topic, but I was hoping some guru here might at 
least be able to point me in the right direction...
snip
run multiple web sites/domains (the docs say so). But does each of my 
domains, registered with Network Solutions, need to point to a unique IP 
Those IP in your domain record are for Name Servers, not the actual box 
that the site's on.

address? If they can all point to the same IP address (my router), then 
once the HTTP request is passed through the router, and port-forwarded 
to the xServe, how will the xServe know which request is for which 
domain/web site? If each domain needs its own IP address, then how can 
the all be forwarded to the same single router (which just has one IP 
address)?
Search for virtual domain with the web server software you're going to 
use.

Asking this question I realize that there is some fundamental network 
stuff I don't understand. But the thing is, I don't know *what* I need 
to learn or in what order, so it's a little hard to start googling my 
ignorance away.
This isn't as easy as a link.
But if your web server software has a mailing list, that would be a good 
place to start.

--
John C. Nichel
ÜberGeek
KegWorks.com
716.856.9675
[EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] iguanahost - anyone else being plagued?

2004-09-15 Thread John Holmes
Subject: [PHP] iguanahost - anyone else being plagued?
I have a big lizard, if that helps. 

---John Holmes...
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


FW: [PHP] Refresh page with frames...

2004-09-15 Thread Andre
I need to refresh  the top frame and I am on the content frame (for example)
and this code doesn’t work for this
script language=Javascript
!--
location.refresh(true);
//OR
parent.document.location='LOCATION HERE';
//--
/script
And I try whit this;
META HTTP-EQUIV=Refresh CONTENT='0;URL=http://localhost/; tar'
-Original Message-
From: Jasper Howard [mailto:[EMAIL PROTECTED] 
Sent: quarta-feira, 15 de Setembro de 2004 18:27
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Refresh page with frames...

script language=Javascript
!--
location.refresh(true);
//OR
parent.document.location='LOCATION HERE';
//--
/script

-- 


--
Jasper Howard :: Database Administration
ApexEleven Web Design
1.530.559.0107
http://www.ApexEleven.com/
--
John Nichel [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Andre wrote:
  Hello
  How can I refresh a page with frames, I use the code below but don't it
  doesn't work

 You can't with PHP.  But I'm betting that if you Google, you'll find
 some info on JavaScript.

 -- 
 John C. Nichel
 ÜberGeek
 KegWorks.com
 716.856.9675
 [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: FW: [PHP] Refresh page with frames...

2004-09-15 Thread John Nichel
Andre wrote:
This list is for PHP, not a JavaScript.
--
John C. Nichel
ÜberGeek
KegWorks.com
716.856.9675
[EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Refresh page with frames...

2004-09-15 Thread Jasper Howard
so change parent to the name of the frame

-- 


--
Jasper Howard :: Database Administration
ApexEleven Web Design
1.530.559.0107
http://www.ApexEleven.com/
--
Andre [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
I need to refresh  the top frame and I am on the content frame (for example)
and this code doesn't work for this
script language=Javascript
!--
location.refresh(true);
//OR
parent.document.location='LOCATION HERE';
//--
/script
And I try whit this;
META HTTP-EQUIV=Refresh CONTENT='0;URL=http://localhost/; tar'
-Original Message-
From: Jasper Howard [mailto:[EMAIL PROTECTED]
Sent: quarta-feira, 15 de Setembro de 2004 18:27
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Refresh page with frames...

script language=Javascript
!--
location.refresh(true);
//OR
parent.document.location='LOCATION HERE';
//--
/script

-- 


--
Jasper Howard :: Database Administration
ApexEleven Web Design
1.530.559.0107
http://www.ApexEleven.com/
--
John Nichel [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Andre wrote:
  Hello
  How can I refresh a page with frames, I use the code below but don't it
  doesn't work

 You can't with PHP.  But I'm betting that if you Google, you'll find
 some info on JavaScript.

 -- 
 John C. Nichel
 ÜberGeek
 KegWorks.com
 716.856.9675
 [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] iguanahost - anyone else being plagued?

2004-09-15 Thread Gryffyn, Trevor
It appears to be a user not found type error..'desintione non
existente' looks a lot like destination doesn't exist.  The guys that
manage the PHP-General list need to be made aware so they can remove the
offending email address.  There's not a lot these iguana guys can do if
a user no longer exists on their system except to maybe ADD the account
back in so it doesn't return an autoresponder or something.

-TG

 -Original Message-
 From: Dan Joseph [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, September 15, 2004 1:37 PM
 To: 'php-general'
 Subject: RE: [PHP] iguanahost - anyone else being plagued?
 
 
 I've done the same thing.  Most likely its an auto-response 
 msg from them
 after we reply to anything on this list.  I can't read the 
 language its in
 personally.  I wrote abuse several times, I get the same msg back.
 
 -Dan Joseph
 
  -Original Message-
  From: Nick Wilson [mailto:[EMAIL PROTECTED]
  Sent: Wednesday, September 15, 2004 11:53 AM
  To: php-general
  Subject: [PHP] iguanahost - anyone else being plagued?
  
  Anyone else getting these infuriating italian messages 
 about some muppet
  that doesnt exist?
  
  'desintione non existente'?
  
  I've written to [EMAIL PROTECTED] but no joy, everytime i 
 post on the
  php list i get half a dozen of the damn things...
  --
  Nick W
  
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] iguanahost - anyone else being plagued?

2004-09-15 Thread Ron Guerin
Gryffyn, Trevor wrote:
It appears to be a user not found type error..'desintione non
existente' looks a lot like destination doesn't exist.  The guys that
manage the PHP-General list need to be made aware so they can remove the
offending email address.  There's not a lot these iguana guys can do if
a user no longer exists on their system except to maybe ADD the account
back in so it doesn't return an autoresponder or something.

They're sending autoreplies to mailing list mail.  By definition, they've
got a problem to fix.
- Ron
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Checking file_exists()

2004-09-15 Thread PHP Junkie
Ave,

I have a simple file upload form, which uploads without a problem.
Today I added the file_exists() function to my PHP code. And everything
stopped working. What am I doing wrong here:

?php
if($upload_file) {
$db = mysql_connect(localhost,usr,pwd);
mysql_select_db(imsafm,$db);
$date = date(m-d-Y, D, H:i);
$trauma = 'imsafm/$PHP_login/$img1_name';
if (file_exists($trauma)) {
   echo The file $img1_name already exists. Please choose a different
name.;
 }
else { 
$sql = INSERT INTO file (login,filename,descr,size,uppedby,date) VALUES
('$PHP_login','$img1_name','$desc','$img1_size','$PHP_login','$date');
$result = mysql_query($sql) or die(There is a problem.);
copy($img1, imsafm/$PHP_login/$img1_name) or die(Could not do);
echo brbismallFile $img1_name uploaded to $PHP_login
folder./small/i/bbr;
}
}
?

I'm not getting any errors (for some reason I don't on my MAC browser, just
a blank white page whenever PHP doesn't work).

Thanks.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] iguanahost - anyone else being plagued?

2004-09-15 Thread Gryffyn, Trevor
Fair enough.

 -Original Message-
 From: Ron Guerin [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, September 15, 2004 3:04 PM
 To: Gryffyn, Trevor
 Cc: php-general; Dan Joseph
 Subject: Re: [PHP] iguanahost - anyone else being plagued?
 
 
 Gryffyn, Trevor wrote:
 
 It appears to be a user not found type error..'desintione non
 existente' looks a lot like destination doesn't exist.  
 The guys that
 manage the PHP-General list need to be made aware so they 
 can remove the
 offending email address.  There's not a lot these iguana 
 guys can do if
 a user no longer exists on their system except to maybe ADD 
 the account
 back in so it doesn't return an autoresponder or something.
 
 
 
 They're sending autoreplies to mailing list mail.  By 
 definition, they've
 got a problem to fix.
 
 - Ron
 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: iguanahost - anyone else being plagued?

2004-09-15 Thread Jasper Howard
yeah, im pretty sure that's spanish

-- 


--
Jasper Howard :: Database Administration
ApexEleven Web Design
1.530.559.0107
http://www.ApexEleven.com/
--
Nick Wilson [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Anyone else getting these infuriating italian messages about some muppet
 that doesnt exist?

 'desintione non existente'?

 I've written to [EMAIL PROTECTED] but no joy, everytime i post on the
 php list i get half a dozen of the damn things...
 -- 
 Nick W

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] iguanahost - anyone else being plagued?

2004-09-15 Thread Nick Wilson

* and then Gryffyn, Trevor declared
 It appears to be a user not found type error..'desintione non

I must say, im glad it's not just me hehe! I was beginning to think it
was just me. I've been away from the list (never a big participant...)
for a while but stuff like that used got sorted faster...?

-- 
Nick W

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] jpgraph newbie

2004-09-15 Thread blackwater dev
I go the following code form phpfreaks..problem is, when I run it I
get a page not found error.  I know jpgraph sends the image back to
the browser but why do I get page not found?  If I force some syntax
errors, they will be displayed but this just doesn't seem to do
anything.

Thanks!

$db=new db();
$sql = select year, mph from car limit 10;
$db-query($sql);

while($row = $db-fetch()){
$data[] = $row[1];
$leg[] = $row[0];
} 
 
$graph = new Graph(250,150,auto);
$graph-SetScale(textint);
$graph-img-SetMargin(50,30,50,50);
//$graph-AdjBackgroundImage(0.4,0.7,-1); //setting BG type
//$graph-SetBackgroundImage(linux_pez.png,BGIMG_FILLFRAME); //adding image
$graph-SetShadow();

$graph-xaxis-SetTickLabels($leg);

$bplot = new BarPlot($data);
$bplot-SetFillColor(lightgreen); // Fill color
$bplot-value-Show();
$bplot-value-SetFont(FF_ARIAL,FS_BOLD);
$bplot-value-SetAngle(45);
$bplot-value-SetColor(black,navy);

$graph-Add($bplot);
$graph-Stroke(); ?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Checking file_exists()

2004-09-15 Thread John Holmes
From: PHP Junkie [EMAIL PROTECTED]
$trauma = 'imsafm/$PHP_login/$img1_name';
http://www.php.net/manual/en/language.types.string.php#language.types.string.syntax.single
---John Holmes... 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Checking file_exists()

2004-09-15 Thread Greg Donald
On Wed, 15 Sep 2004 15:05:02 -0400, PHP Junkie [EMAIL PROTECTED] wrote:
 I have a simple file upload form, which uploads without a problem.
 Today I added the file_exists() function to my PHP code. And everything
 stopped working. What am I doing wrong here:
 
 ?php
 if($upload_file) {
 $db = mysql_connect(localhost,usr,pwd);
 mysql_select_db(imsafm,$db);
 $date = date(m-d-Y, D, H:i);
 $trauma = 'imsafm/$PHP_login/$img1_name';

Variables inside single quotes don't get evaluated.


-- 
Greg Donald
http://gdconsultants.com/
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] File Download Problems

2004-09-15 Thread PHP Junkie
Ave,

I've been having a very nagging and frustrating problem for a while and I
hope someone can help me out with this.

I created a simple File Manager application, a lot of you already know about
it as you helped me with coding at different stages.

The problem is this: The Download.
When you download a file, it's giving problems sometimes. What is happening
is, a 1 KB file downloads instead of the actual file. And thus the file
downloaded is no good. The file uploaded is absolutely perfect. Since I have
the web server which contains this website, I'm easily able to check all
these things. When a user uploads a file, it's uploaded absolutely perfect.
It's not a 1 KB file.. The whole file is uploaded and it's not corrupt. But
when a user downloads the file... Most of the time a 1 KB file is
downloaded.. And its' corrupt of course.

The more frustrating part is, it happens sometimes.. Not everytime. It is
happening 90% of the time.. But sometimes it is able to download the actual
file. If you try the same file from different locations, 15 times... 1 out
of 15 times the file will download fine.

I've been doing all sorts of testing to narrow down the problem but I don't
know the problem. 

This is my download script :

?php
$file = $P/$F;
header(Content-Description: File Transfer);
header(Content-Type: application/force-download);
header(Content-Disposition: attachment; filename=.basename($file));
@readfile($file);
? 

Which is called using this link on the main page:

a 
href=\imsafm_user_dl.php?ID=$myrow[ID]P=imsafm/$userF=$myrow[filename]\
img src=b_newtbl.png border=0/a

I know that my Upload is working excellent so there's no point going into
it. I check the file once it's uploaded on my Server and I find it's
absolutely perfect... I try and download the same file using the same
applications and it gets corrupted.

I don't' know what to do. Can anyone help?

Thanks.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP include before or after Apache SSI?

2004-09-15 Thread Andrew W
On 13 Sep 2004, at 19:11, Ed Lazor wrote:
Why use SSI?  PHP's include directive allows you to bring separate 
pages
together for creating an overall page.  You can include .html files.  
Also,
PHP programming isn't *required* in a file with the php extension.
I had wondered about that but I must be using it wrong because when I 
include a section of code it doesn't include the source it includes the 
output - if that makes sense.

In other words suppose I had a file which contained the interfeace HTML 
and took an argument like this  file1.php?id=value

now suppose the actual PHP code which took that id=value and did some 
processing with it was in another file, file2.php, in order to get the 
value to file2.php file1 would have to include the following:

$id = $_REQUEST['id'];
include 'file1.php?id=$value';
In other words the arguments have to be passed accross twice.  What am 
I doing wrong?

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Checking file_exists()

2004-09-15 Thread PHP Junkie
Ave,

I can swear it wasn't working with the Double Quotes either because I tried
it first. But well, now it is so no point in anything.

Thanks a lot.




On 9/15/04 3:19 PM, John Holmes [EMAIL PROTECTED] wrote:

 From: PHP Junkie [EMAIL PROTECTED]
 
 $trauma = 'imsafm/$PHP_login/$img1_name';
 
 http://www.php.net/manual/en/language.types.string.php#language.types.string.s
 yntax.single
 
 ---John Holmes...
 
 
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] jpgraph newbie

2004-09-15 Thread Greg Donald
On Wed, 15 Sep 2004 07:10:39 -1200, blackwater dev
[EMAIL PROTECTED] wrote:
 I go the following code form phpfreaks..problem is, when I run it I
 get a page not found error.  I know jpgraph sends the image back to
 the browser but why do I get page not found?  If I force some syntax
 errors, they will be displayed but this just doesn't seem to do
 anything.

Are you supplying it with fonts?  The last time I installed JPGraph it
required Arial and Arial Bold at least.

Does your PHP install support the GD library?


-- 
Greg Donald
http://gdconsultants.com/
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] MySQL to OO

2004-09-15 Thread Neo Theone
I am searching for a MySQl to Object abstraction class.
I am thinking something like WebObjects does in Java (it is just a part) 
in PHP. I had one for Ruby but now I have to use a DB in MySQL and such 
a class would make it alot easier.

Does anybody know such a project or something similar?
I just want to avoid writing to much SQL
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: MySQL to OO

2004-09-15 Thread Matthew Weier O'Phinney
* Neo Theone [EMAIL PROTECTED]:
 I am searching for a MySQl to Object abstraction class.
 I am thinking something like WebObjects does in Java (it is just a part) 
 in PHP. I had one for Ruby but now I have to use a DB in MySQL and such 
 a class would make it alot easier.

 Does anybody know such a project or something similar?
 I just want to avoid writing to much SQL

You might want to look into PEAR's DB_DataObject class.

-- 
Matthew Weier O'Phinney   | mailto:[EMAIL PROTECTED]
Webmaster and IT Specialist   | http://www.garden.org
National Gardening Association| http://www.kidsgardening.com
802-863-5251 x156 | http://nationalgardenmonth.org

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] MySQL to OO

2004-09-15 Thread Jay Blanchard
[snip]
I am searching for a MySQl to Object abstraction class.
I am thinking something like WebObjects does in Java (it is just a part)

in PHP. I had one for Ruby but now I have to use a DB in MySQL and such 
a class would make it alot easier.

Does anybody know such a project or something similar?
I just want to avoid writing to much SQL
[/snip]

PEAR http://pear.php.net/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] MySQL to OO

2004-09-15 Thread John Holmes
From: Neo Theone [EMAIL PROTECTED]
I am searching for a MySQl to Object abstraction class.
I am thinking something like WebObjects does in Java (it is just a part) 
in PHP. I had one for Ruby but now I have to use a DB in MySQL and such a 
class would make it alot easier.
Are you talking about accessing MySQL using an OO interface or receiving 
results/schema/etc in an OO format?

---John Holmes... 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] XML parser for PHP5

2004-09-15 Thread Matthew Sims

Anyone know any good XML parsers that work with PHP5? Most of what I can
find on freshmeat are still using PHP4 classes and Google isn't turning up
much either.

-- 
--Matthew Sims
--http://killermookie.org

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: XML parser for PHP5

2004-09-15 Thread Greg Beaver
Matthew Sims wrote:
Anyone know any good XML parsers that work with PHP5? Most of what I can
find on freshmeat are still using PHP4 classes and Google isn't turning up
much either.
What do you want to do?  This parses xml pretty well:
?php
$parsed = simplexml_load_file('filename.xml');
?
as does this
?php
$dom = new DOMDocument;
$dom-load('filename.xml');
?
The first one is brilliant for reading xml whose structure you know, the 
second is better for xml whose structure you wish to manipulate or 
transform.

best, it's built into PHP.  If you want a system that can be easily 
serialized and unserialized as an object (as in sessions), you're 
probably best off using XML_Serializer from PEAR, as neither simplexml 
nor DOM retains any useful information when serialized and unserialized.

Greg
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Re: XML parser for PHP5

2004-09-15 Thread Matthew Sims
 Matthew Sims wrote:

 Anyone know any good XML parsers that work with PHP5? Most of what I can
 find on freshmeat are still using PHP4 classes and Google isn't turning
 up
 much either.

 What do you want to do?  This parses xml pretty well:

 ?php
 $parsed = simplexml_load_file('filename.xml');
 ?

 as does this

 ?php
 $dom = new DOMDocument;
 $dom-load('filename.xml');
 ?

 The first one is brilliant for reading xml whose structure you know, the
 second is better for xml whose structure you wish to manipulate or
 transform.

 best, it's built into PHP.  If you want a system that can be easily
 serialized and unserialized as an object (as in sessions), you're
 probably best off using XML_Serializer from PEAR, as neither simplexml
 nor DOM retains any useful information when serialized and unserialized.

 Greg


My fault, I should have been more specific. An RSS reader. :) I was using
xmlParser-0.3 and feedParser-0.5 to display news sites. Since I've
converted to PHP5, they no longer work for me.

-- 
--Matthew Sims
--http://killermookie.org

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] File Download Problems

2004-09-15 Thread Marek Kilimajer
PHP Junkie wrote:
Ave,
I've been having a very nagging and frustrating problem for a while and I
hope someone can help me out with this.
I created a simple File Manager application, a lot of you already know about
it as you helped me with coding at different stages.
The problem is this: The Download.
When you download a file, it's giving problems sometimes. What is happening
is, a 1 KB file downloads instead of the actual file. And thus the file
downloaded is no good. The file uploaded is absolutely perfect. Since I have
the web server which contains this website, I'm easily able to check all
these things. When a user uploads a file, it's uploaded absolutely perfect.
It's not a 1 KB file.. The whole file is uploaded and it's not corrupt. But
when a user downloads the file... Most of the time a 1 KB file is
downloaded.. And its' corrupt of course.
The more frustrating part is, it happens sometimes.. Not everytime. It is
happening 90% of the time.. But sometimes it is able to download the actual
file. If you try the same file from different locations, 15 times... 1 out
of 15 times the file will download fine.
I've been doing all sorts of testing to narrow down the problem but I don't
know the problem. 

This is my download script :
?php
$file = $P/$F;
header(Content-Description: File Transfer);
header(Content-Type: application/force-download);
header(Content-Disposition: attachment; filename=.basename($file));
@readfile($file);
? 

Which is called using this link on the main page:
a 
href=\imsafm_user_dl.php?ID=$myrow[ID]P=imsafm/$userF=$myrow[filename]\
img src=b_newtbl.png border=0/a

What does the 1 KB file contain? Is it the beginning of the wanted file? 
Remove @ while debuging.
Add header('Content-Lenght: ' . filesize($file));
Check server logs.

HTH
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] mysql_connect does not connect

2004-09-15 Thread Sam Hobbs
I appreciate your attempts to help, but you must understand that when 
attempts to help just cause time to be wasted, then it might be appropriate 
to not appreciate the help. Then when I try to explain that you are not 
helping, you make comments such as this, trying to blame me. If I am the 
only person you do this to, then I can live with it. If however you do this 
to others, then I hope you are told by others that you are trying too hard 
to help and that you resort to insulting others when you don't help.

Perhaps there is some validity to what you are saying, but you are also 
saying some things that are not valid, which makes it difficult or 
impossible to determine what is valid. I do try to tell you in reasonably 
polite and useful ways that much of what you say is not helpful. Obviously I 
need to just ignore your help instead.


Jason Davidson [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]
 There is an issue with sp2 and loopback, you can argue all you like, but
 many have had this problem, and many have resolved it. Mysql will not
 connect through udp, it will use tcp.  If you supply a hostname in your
 connect function, it will use tcpip to connect over a port, if oyu dont
 supply a hostname, or i beleive put a '.' in its place, it will attempt
 to connect through a named pipe which doesnt use the network.  In the
 time you spend writing this email, you could have attemped a suggested
 solution.

 A little more acceptance to help would gain a lot more respect from me,
 not that you probably care about others respect.

 And for further note, for the sake of discussion, as you have mentioned
 to me on a certain forum.  A firewall can absolutely interfere with a
 connection to mysql even if you are using localhost, if, and only if,
 that connection is being done over tcpip, which in unix, is rarely, but
 in windows, is not all that rare.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] mysql_connect does not connect

2004-09-15 Thread Sam Hobbs
Greg Donald [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]

 I lost track of who the original poster was, but anyway...

 Why not disconnect from the internet, turn off all the firewalls, and
 then see if it works.  If it doesn't then post some error messages and
 code for what's being tried and failing.

I am the original poster. The reason I avoid doing things like that is 
because it is a guess. It should not be necessary; the firewal should not be 
relevant. Sometimes people suggest things that are not likely to be a 
solution but are easy to suggest.

However I also believe in being methodical and in verifying assumptions. It 
does help to eliminate possilities. Something that has not been mentioned is 
that I am using versions that are not fully tested, so it is possible that 
there are bugs. Apparently something is trying to use the internet that is 
not supposed to. If I am correct, then it is difficult to say what I should 
try except that I should eliminate possibilities in the manner you say.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: XML parser for PHP5

2004-09-15 Thread Greg Beaver
Matthew Sims wrote:
My fault, I should have been more specific. An RSS reader. :) I was using
xmlParser-0.3 and feedParser-0.5 to display news sites. Since I've
converted to PHP5, they no longer work for me.
definitely a combination of simplexml and DOM would work.  You need DOM 
in order to determine what the name of the root node's namespace is to 
find RSS 1.0.

http://php.net/simplexml
http://php.net/DOM
for example:
?php
$rss = simplexml_load_file('http://www.example.com/blah.rss');
$dom = new domdocument(1.0);
$dom_rss = $dom-importnode($rss, true);
$dom_rss = $dom-appendchild($rss);
if ($dom_rss-namespaceURI == '') {
$rssversion = '1.0';
} else {
$rssversion = $rss['version'];
}
switch ($rssversion) {
case '1.0' :
case '2.0' :
if (isset($rss-channel-pubDate)) {
echo Publication Date:  . $rss-channel-pubDate . br /;
}
case '0.91' :
case '0.92' :
case '0.93' :
case '0.94' :
echo 'a href=';
echo $rss-channel-link;
echo '' . $rss-channel-title . '/abr /';
foreach ($rss-channel-item as $item) {
echo $item-title . 'br /';
echo 'a href=';
echo $item-link;
echo '' . $item-description . '/abr /';
}
break;
}
?
Of course, the full range RSS tags are available to you as object 
properties, and attributes as array access (like $rss['version'])

Greg
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Re: XML parser for PHP5

2004-09-15 Thread Matthew Sims
 Matthew Sims wrote:

 My fault, I should have been more specific. An RSS reader. :) I was
 using
 xmlParser-0.3 and feedParser-0.5 to display news sites. Since I've
 converted to PHP5, they no longer work for me.

 definitely a combination of simplexml and DOM would work.  You need DOM
 in order to determine what the name of the root node's namespace is to
 find RSS 1.0.

 http://php.net/simplexml
 http://php.net/DOM

 for example:

 ?php
 $rss = simplexml_load_file('http://www.example.com/blah.rss');
 $dom = new domdocument(1.0);
 $dom_rss = $dom-importnode($rss, true);
 $dom_rss = $dom-appendchild($rss);
 if ($dom_rss-namespaceURI == '') {
  $rssversion = '1.0';
 } else {
  $rssversion = $rss['version'];
 }
 switch ($rssversion) {
  case '1.0' :
  case '2.0' :
  if (isset($rss-channel-pubDate)) {
  echo Publication Date:  . $rss-channel-pubDate . br
 /;
  }

  case '0.91' :
  case '0.92' :
  case '0.93' :
  case '0.94' :
  echo 'a href=';
  echo $rss-channel-link;
  echo '' . $rss-channel-title . '/abr /';
  foreach ($rss-channel-item as $item) {
  echo $item-title . 'br /';
  echo 'a href=';
  echo $item-link;
  echo '' . $item-description . '/abr /';
  }
  break;
 }
 ?

 Of course, the full range RSS tags are available to you as object
 properties, and attributes as array access (like $rss['version'])

 Greg


Very nice, thank you. This should get my feet wet with a little XML.

-- 
--Matthew Sims
--http://killermookie.org

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: mysql_connect does not connect

2004-09-15 Thread Sam Hobbs
Andrew Kreps [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]
 On Tue, 14 Sep 2004 10:11:24 -0700, Sam Hobbs [EMAIL PROTECTED] wrote:
 Also, are the warning messages documented? As I asked in my original
 question, is 10061 an error code?

 10061 is a generic winsock error for a timeout, it's not PHP or MySQL
 specific.  It means that the call couldn't connect to the socket you
 were trying to hit within the time allowed.

Again, thank you.

Apparently there is a problem with the internet being accessed. I tried to 
determine the problem but it is not clear. What I did to try to diagnose the 
problem is that I deleted from ZoneAlarm the configuration for the relevant 
programs. For those not familiar with ZoneAlarm, I essentially removed from 
it anything it knew about Apache, MySQL and php. I thne tried the 
mysql_connect, and ZoneAlarm asked if Apache could access the internet. 
However it behaved differently, depending on whether I was using an account 
with administrator privileges. If I was using administrator privileges, 
Apache tried to connect to address 0.0.0.0. If I was not using administrator 
privileges, Apache tried to connect to the DNS server address. However there 
are more details so assuming this is a bug I need to coordinate with someone 
to determine how to diagnose this.

By removing Apache, MySQL and php from ZoneAlarm and then allowing Apache to 
access the internet when I did the mysql_connect, I am able to connect. I 
assume that this is not how it should be.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: mysql_connect does not connect

2004-09-15 Thread Jason Wong
On Thursday 16 September 2004 06:14, Sam Hobbs wrote:

[quote from another Sam Hobbs post]
 I am the original poster. The reason I avoid doing things like that is
 because it is a guess. It should not be necessary; the firewal should not
 be relevant. Sometimes people suggest things that are not likely to be a
 solution but are easy to suggest.
[end quote]

 Apparently there is a problem with the internet being accessed. I tried to
 determine the problem but it is not clear. What I did to try to diagnose
 the problem is that I deleted from ZoneAlarm the configuration for the
 relevant programs. For those not familiar with ZoneAlarm, I essentially
 removed from it anything it knew about Apache, MySQL and php. I thne tried
 the
 mysql_connect, and ZoneAlarm asked if Apache could access the internet.
 However it behaved differently, depending on whether I was using an account
 with administrator privileges. If I was using administrator privileges,
 Apache tried to connect to address 0.0.0.0. If I was not using
 administrator privileges, Apache tried to connect to the DNS server
 address. However there are more details so assuming this is a bug I need to
 coordinate with someone to determine how to diagnose this.

 By removing Apache, MySQL and php from ZoneAlarm and then allowing Apache
 to access the internet when I did the mysql_connect, I am able to connect.
 I assume that this is not how it should be.

So now are you fully convinced it's your firewall that's the root of your 
problem?

1) How are you connecting using mysql_connect()? Do you use IP addresses or 
hostnames?
2) What are your exact connection parameters when connecting as an admin 
user?
3) What are your exact connection parameters when connecting as an normal 
user?

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
Moneyliness is next to Godliness.
-- Andries van Dam
*/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] mysql_connect does not connect

2004-09-15 Thread Jason Davidson
Good day, im glad you seem to have resolved your problem, i shall
comment on your comments.

Sam Hobbs [EMAIL PROTECTED] wrote: 
 
 I appreciate your attempts to help, but you must understand that when 
 attempts to help just cause time to be wasted, then it might be appropriate 
 to not appreciate the help. 
Its no waste of time to attempt a solution, if it doesnt work, youve
eliminated that solution.  That is one step closer.

Then when I try to explain that you are not 
 helping, you make comments such as this, trying to blame me. If I am the 
 only person you do this to, then I can live with it. If however you do this 
 to others, then I hope you are told by others that you are trying too hard 
 to help and that you resort to insulting others when you don't help.

Im bashing my head on the wall now

 
 Perhaps there is some validity to what you are saying, but you are also 
 saying some things that are not valid, which makes it difficult or 
 impossible to determine what is valid. I do try to tell you in reasonably 
 polite and useful ways that much of what you say is not helpful. Obviously I 
 need to just ignore your help instead.
 
Now that you have figured out, that it is possible its your firewall,
which, many, and i think you claimed before was impossible, what
exactly makes you sure i said anything invalid.


Now that my rant is done, i made it clear, that i i have solved a
problem with your EXACT error msg before.  That makes this not a guess,
but an educated and experienced suggestion.  and yes, all forms of help
on this form are as such. 

Yup, im an a$$hole , i dont like being completely shutdown by people
requesting help, when i take the time to impart some experience... 

J


 
 Jason Davidson [EMAIL PROTECTED] wrote in message 
 news:[EMAIL PROTECTED]
  There is an issue with sp2 and loopback, you can argue all you like, but
  many have had this problem, and many have resolved it. Mysql will not
  connect through udp, it will use tcp.  If you supply a hostname in your
  connect function, it will use tcpip to connect over a port, if oyu dont
  supply a hostname, or i beleive put a '.' in its place, it will attempt
  to connect through a named pipe which doesnt use the network.  In the
  time you spend writing this email, you could have attemped a suggested
  solution.
 
  A little more acceptance to help would gain a lot more respect from me,
  not that you probably care about others respect.
 
  And for further note, for the sake of discussion, as you have mentioned
  to me on a certain forum.  A firewall can absolutely interfere with a
  connection to mysql even if you are using localhost, if, and only if,
  that connection is being done over tcpip, which in unix, is rarely, but
  in windows, is not all that rare.
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: mysql_connect does not connect

2004-09-15 Thread Jason Davidson
firewall, who would have thought

Jason Wong [EMAIL PROTECTED] wrote: 
 
 On Thursday 16 September 2004 06:14, Sam Hobbs wrote:
 
 [quote from another Sam Hobbs post]
  I am the original poster. The reason I avoid doing things like that is
  because it is a guess. It should not be necessary; the firewal should not
  be relevant. Sometimes people suggest things that are not likely to be a
  solution but are easy to suggest.
 [end quote]
 
  Apparently there is a problem with the internet being accessed. I tried to
  determine the problem but it is not clear. What I did to try to diagnose
  the problem is that I deleted from ZoneAlarm the configuration for the
  relevant programs. For those not familiar with ZoneAlarm, I essentially
  removed from it anything it knew about Apache, MySQL and php. I thne tried
  the
  mysql_connect, and ZoneAlarm asked if Apache could access the internet.
  However it behaved differently, depending on whether I was using an account
  with administrator privileges. If I was using administrator privileges,
  Apache tried to connect to address 0.0.0.0. If I was not using
  administrator privileges, Apache tried to connect to the DNS server
  address. However there are more details so assuming this is a bug I need to
  coordinate with someone to determine how to diagnose this.
 
  By removing Apache, MySQL and php from ZoneAlarm and then allowing Apache
  to access the internet when I did the mysql_connect, I am able to connect.
  I assume that this is not how it should be.
 
 So now are you fully convinced it's your firewall that's the root of your 
 problem?
 
 1) How are you connecting using mysql_connect()? Do you use IP addresses or 
 hostnames?
 2) What are your exact connection parameters when connecting as an admin 
 user?
 3) What are your exact connection parameters when connecting as an normal 
 user?
 
 -- 
 Jason Wong - Gremlins Associates - www.gremlins.biz
 Open Source Software Systems Integrators
 * Web Design  Hosting * Internet  Intranet Applications Development *
 --
 Search the list archives before you post
 http://marc.theaimsgroup.com/?l=php-general
 --
 /*
 Moneyliness is next to Godliness.
   -- Andries van Dam
 */
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] mysql_connect does not connect

2004-09-15 Thread Greg Donald
On Wed, 15 Sep 2004 15:06:11 -0700, Sam Hobbs [EMAIL PROTECTED] wrote:
 I am the original poster. The reason I avoid doing things like that is
 because it is a guess. It should not be necessary; the firewal should not be
 relevant. Sometimes people suggest things that are not likely to be a
 solution but are easy to suggest.

Yeah, seeing how we don't have physical access to your system that's
all you will get is guesses and suggestions.  If you want definative
answers, hire a consultant, bring them to your pc, and pay them to fix
it.

 However I also believe in being methodical and in verifying assumptions. It
 does help to eliminate possilities. Something that has not been mentioned is
 that I am using versions that are not fully tested,

If you wanted us to know what versions of software you are using, no
one is stopping you from saying so.

 so it is possible that
 there are bugs.

Since when does fully tested mean bug free?

 Apparently something is trying to use the internet that is
 not supposed to. If I am correct, then it is difficult to say what I should
 try except that I should eliminate possibilities in the manner you say.

You obviously know what's best Sam..  Good luck.


-- 
Greg Donald
http://gdconsultants.com/
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



  1   2   >