RE: [PHP] PHP (32 bit) on IIS7.5 and MySQL 5.1.45 (64 bit) -> established connection failed because connected host has failed to respond
-Original Message- From: SED [mailto:s...@sed.is] Sent: Sunday, April 04, 2010 11:48 AM To: 'SED' Cc: php-general@lists.php.net Subject: RE: [PHP] PHP (32 bit) on IIS7.5 and MySQL 5.1.45 (64 bit) -> established connection failed because connected host has failed to respond Hi Kevin, Thank you for your assistance. I finally gave up and let my self to default Microsoft Installation for IIS7.5+PHP+MySQL. Everything runs fine on my developer machine - and that was my main goal - so I'm fine. However, after about 48 hours of search, I was not able to find to how to do this manually - and it shock me (as a open source fan). At least, my Linuxs' servers are still intact. Ps. there is still snowing here in Iceland (heat -15°C in wind) and a volcano eruption that is growing. :) Thanks for your help, Summi -Original Message- From: SED [mailto:s...@sed.is] Sent: 4. apríl 2010 10:06 To: 'Kevin Kinsey' Cc: php-general@lists.php.net Subject: RE: [PHP] PHP (32 bit) on IIS7.5 and MySQL 5.1.45 (64 bit) -> established connection failed because connected host has failed to respond Hi Kevin, - MySQL 5.1 (64bit) is listening at port 0.0.0.0:3306 - MySQL 4.1 (32bit) is listening at port 0.0.0.0:3307 - When running MySQL command via PHP (CMD or browser) I get 127.0.0.1:3306 Established - I can connect to MySQL via CMD or MySQL Administrator GUI. - PHP (32bit) loads php_mysql.dll - php.ini works 100% - All Firewalls are disabled on LAN - Is this a PHP bug or am I getting crazy? ;-) - Is there a 64bit of PHP who is assumed ok for develope machine with firewalls? Regards, Summi -Original Message- From: Kevin Kinsey [mailto:k...@daleco.biz] Sent: 4. apríl 2010 01:02 To: Sumarliði Einar Daðason Cc: php-general@lists.php.net Subject: Re: [PHP] PHP (32 bit) on IIS7.5 and MySQL 5.1.45 (64 bit) -> established connection failed because connected host has failed to respond Sumarliði Einar Daðason wrote: > I have setup PHP (32 bit) on IIS7.5 and MySQL 5.1.45 (64 bit) with success. > phpinfo() shows the MySQL extension loaded, but when I try to use > mysql_connect( $host, $user, $password ) in a PHP script I get > following > error: > > PHP Warning: mysql_connect() [ href='function.mysql-connect'>function.mysql-connect]: [2002] A > connection attempt failed because the connected party did not (trying > to connect via tcp://localhost:3306) in > C:\inetpub\wwwroot\old\index.php on line 29 > > I have search on the Internet for a solution for this but without any luck. > Any ideas? Yes, first check that MySQL is actually listening on port 3306 ("Netstat" should do that trick), and, if it is, try turning your firewall off. What is the value of $host? KDK -- 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
[PHP] Get the title from an HTML page
I'll be loading the contents of an HTML page into a variable and I need to get the title of the from that variable. Basically I need to ge the text from in between the tags. Any ideas? Thanks, Matt [EMAIL PROTECTED] < www.mralston.co.uk /> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] About MS SQL
Think you might need to enable the ms sql server module in the php.ini file. -- Thanks, Matt [EMAIL PROTECTED] < www.mralston.co.uk /> Hassan Arteaga <[EMAIL PROTECTED]> wrote in message 7F548E90E63BD1118E4600609707771F8BEFF9@goliath">news:7F548E90E63BD1118E4600609707771F8BEFF9@goliath... Hi all !! I'm trying to connecto to MS SQL Database I receive this error MSG "Fatal error: Call to undefined function: mssql_connect() in C:\Inetpub\wwwroot\myphp\sqltest.php on line 13 " The line 13 is $Conn=mssql_connect("","",""); Thanks in advanced !!! -- M. Sc. Hassan Arteaga Rodríguez Microsoft Certified System Engineer Network Admin, WEB Programmer FUNDYCS, Ltd [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] About MS SQL
from what i recall there is a line (to enable ms sql server support) in the php.ini file already that just needs uncommenting. have a look right through the file...there's one for sql server 6.5 and one for 7. -- Thanks, Matt [EMAIL PROTECTED] < www.mralston.co.uk /> Hassan Arteaga <[EMAIL PROTECTED]> wrote in message 7F548E90E63BD1118E4600609707771F8BF005@goliath">news:7F548E90E63BD1118E4600609707771F8BF005@goliath... > For example if my SQL installation files are in c:\MSSQL what is the right > configuration ? extension_dir=c:\MSSQL; > Now I just made the job with ODBC functions but I would like to use SQL > function !! > > thanks !!! > > -Original Message- > From: Romulo Pereira [mailto:[EMAIL PROTECTED]] > Sent: Monday, April 30, 2001 11:38 AM > To: [EMAIL PROTECTED] > Subject: RE: [PHP] About MS SQL > > > Hello, > > Your php.ini is not configured correctilly. That is what is doing the php to > do not include the MsSQL functions to the php api. Open your php.ini file > and find (and correct) the section below: > > ; > ; Paths and Directories ; > ; > ... > extension_dir=./extensions; > > Your scripts should work then. > > Have fun, > > Rom > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: RE: RE: [PHP] About MS SQL
you might have to restart your webserver/php if it's apache you might need to recompile it or something...i've not compiled php into apache before...am using it as a cgi...so i'm not sure -- Thanks, Matt [EMAIL PROTECTED] < www.mralston.co.uk /> Hassan Arteaga <[EMAIL PROTECTED]> wrote in message 7F548E90E63BD1118E4600609707771F8BF00A@goliath">news:7F548E90E63BD1118E4600609707771F8BF00A@goliath... > I did it ..But nothing > > Thanks !!! > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] include("../file.inc");
How do you include or require a file that is above the current script in the directory hierarchy? For example how would I include or require a file whose path is "../file.inc" relative to the current script? I tried all of: include("../file.inc"); require("../file.inc"); include("/file.inc"); require("/file.inc"); include("..\file.inc"); require("..\file.inc"); include("\file.inc"); require("\file.inc"); but it doen't like any of them. :( I don't want to use a full path relative to the root of the drive or webserver folder because the included file and the script may move as the development server is setup differently to the real web server. Any ideas? -- Thanks, Matt [EMAIL PROTECTED] < www.mralston.co.uk /> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Get the string between custom delimiters
Is there a nice easy function that could be used to get a sub string that lies in between two other sub strings in one big string. For example... get the text that lies in between "" and "" (without the quotes) in the code of a web page. I'm after a function like: string getstring_between_customdelimiters(string source, string open_delimiter, sting close_delimiter) Or something that could be easily be used in that manner. Case insensitive if possible! Thanks, Matt [EMAIL PROTECTED] < www.mralston.co.uk /> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Converting MySQL Date (2001-05-21) to Friendly Date (21 May 2001)
I've got a date stored in a MySQL database in a "DATE" field, so it is stored as "2001-05-21". How do I convert that into a more friendly date like "21 May 2001" or even "21st May 2001" for display on a web page? I've tried print date("jS F Y", $dbtable[date]); but I always get "1st January 1970" because I don't know how to convert the MySQL date into a PHP timestamp. Can someone tell me how to do it please? -- Thanks, Matt [EMAIL PROTECTED] < www.mralston.co.uk /> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Converting MySQL Date (2001-05-21) to Friendly Date (21 May 2001)
Thanks Papi, That works fine. Matt [EMAIL PROTECTED] < www.mralston.co.uk /> Pavel Jartsev <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Matthew Ralston wrote: > > > > I've got a date stored in a MySQL database in a "DATE" field, so it is > > stored as "2001-05-21". How do I convert that into a more friendly date like > > "21 May 2001" or even "21st May 2001" for display on a web page? > > > > I've tried > > > > print date("jS F Y", $dbtable[date]); > > > > but I always get "1st January 1970" because I don't know how to convert the > > MySQL date into a PHP timestamp. > > > > Can someone tell me how to do it please? > > > > Maybe it's not very nice, but it works: > list($y,$m,$d) = explode('-', $dbtable['date']); > print date("jS F Y", mktime(0, 0, 0, $m, $d, $y)); > ?> > > > Hope this helps. > > -- > Pavel a.k.a. Papi > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] ftp_get: possible security hole?
Hey, guys, Apologies if I should have sent this to the dev list instead. It seems to me that ftp_get() is a potential security hole, or maybe we've just got it misconfigured on our system. When a script calls ftp_get() and transfers a file, the new file on the local system (e.g. the box running php) is owned by the webserver. Now this would make sense if the client to the php script were doing an HTTP upload, but shouldn't an FTP transfer be created as the user of the script? We're running PHP 4.0.4pl1 in "safe mode" under Apache 1.3.9. Apache is running as www/www and the script is run as John Q. User. If this can be used to create arbitrary files as the webserver, it seems like any legitimate user can create malicious scripts, ftp_get() them so that they are owned by the webserver user, then run them just by surfing to the new file. Even with safe mode and "php_admin_value docroot" set, it seems like there'd be a variety of "attacks" a user could do, if s/he were so inclined. I'm not a hacker (so looking at php's source wouldn't help me), but I'm a concerned sysadmin who's suddenly very scared of the --with-ftp configure directive. -Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]