php-windows Digest 11 Dec 2007 05:50:53 -0000 Issue 3384

Topics (messages 28642 through 28648):

Re: Can't get MySQL extensions to load
        28642 by: James Crow
        28643 by: Patrick Farley

Re: Are there free IDEs for PHP?
        28644 by: Geoff Lane
        28645 by: Bill Bolte

Just to let you know it's now all working
        28646 by: Jacob Kruger
        28647 by: Jacob Kruger

php mail function issue.
        28648 by: vikas batra

Administrivia:

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

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

To post to the list, e-mail:
        [EMAIL PROTECTED]


----------------------------------------------------------------------
--- Begin Message ---
Run phpinfo again and see if the mysql extension shows as loaded. You
should see a section in the output from phpinfo about mysql. If you do
not see that section than the mysql extension is not loaded. 

If the mysql extension shows that it is loading then it may be something
with the mysql server. Try to connect to the mysql server from the
windows command prompt:

mysql -h 127.0.0.1 -u username -ppassword

If you can connect with that string try the same string in php:
<?php
$db_link = mysql_connect('127.0.0.1', 'username', 'password');
if (!$db_link) {
        // connection failed
        print "MySQL connection failed. Error was: " . mysql_error();
} else {
        print "Connection successful!";
        mysql_close ($db_link);
}
?>

That code could have a bug in it because it is all from memory and
untested, but you should get the idea.

If the mysql extension is loading but the php connection won't work post
the response (the mysql_error above) that should help determine the
problem.

I have never worked with Win 2003, but it could be that the default
firewall is blocking the mysql connection. Maybe try turning it off or
creating an exception for the mysql server (TCP port 3306). 

Thanks,
James



Since you said that you were using the newest PHP
On Sun, 2007-12-09 at 00:11 -0500, Patrick Farley wrote:
> Evening.
> 
>  
> 
> I've installed the latest PHP using the zip files (not the installer) to my
> Windows 2003 machine with IIS.  I have tested the installation with a
> phpinfo() and was successful.  I installed Roundcube and when trying to
> connect to the site was greeted with an error about being unable to connect
> to the database.  I rechecked my connection string and all seemed well.
> Figuring I'd come back to it later, I went to install Joomla and during the
> install process was told that Joomla is unable to connect to MySQL.
> 
>  
> 
> I have checked and rechecked my php.ini file (though I may be missing
> something not obvious)
> 
> PHP in general works.
> 
> My system PATH is configured for C:\php and I have restarted several times
> 
> I've even redownloaded the php zip files and compared the md5 to make sure
> it was not corrupt.
> 
> MySQL is active and working on localhost for an email server without any
> issue.
> 
> Have tried both mysql.dll and mysqli.dll
> 
> I have searched Google with out any success.
> 
>  
> 
> Is this something with PHP or my MySQL install?  I'm out of ideas.
> 
>  
> 
> 
> 
> 
> 
> Patrick
> 

--- End Message ---
--- Begin Message ---
 I figured this one out late last night.  For as many times as I've set up
PHP on IIS I've never seen this or had to go through these.

I noticed on the phpinfo page that the loaded php.ini file was from
C:\Windows.  Confused I did a search of that directory to see why there
would be a file there.  There was not any file there, but from what I had
read that was a default configuration.  Taking that into consideration I was
armed with some new keywords to use in Google.  Sure enough I found a post
recommending to set up the PHPRC in the System Variables.  Immediately after
that and a restart the proper C:\php\php.ini file was loading, and the mysql
dll's loaded up without issue, and Joomla and Roundcube connected without
any issue.

Strange to me.  I've never had to set that up before, but maybe something
changed since I last did it this way.  I've been playing with the FastCGI
from Microsoft.

Thanks for the help though.  Hopefully someone else finds all of this
information useful.

-----Original Message-----
From: James Crow [mailto:[EMAIL PROTECTED] 
Sent: Monday, December 10, 2007 8:08 AM
To: Patrick Farley
Cc: php-windows
Subject: Re: [PHP-WIN] Can't get MySQL extensions to load

Run phpinfo again and see if the mysql extension shows as loaded. You should
see a section in the output from phpinfo about mysql. If you do not see that
section than the mysql extension is not loaded. 

If the mysql extension shows that it is loading then it may be something
with the mysql server. Try to connect to the mysql server from the windows
command prompt:

mysql -h 127.0.0.1 -u username -ppassword

If you can connect with that string try the same string in php:
<?php
$db_link = mysql_connect('127.0.0.1', 'username', 'password'); if
(!$db_link) {
        // connection failed
        print "MySQL connection failed. Error was: " . mysql_error(); } else
{
        print "Connection successful!";
        mysql_close ($db_link);
}
?>

That code could have a bug in it because it is all from memory and untested,
but you should get the idea.

If the mysql extension is loading but the php connection won't work post the
response (the mysql_error above) that should help determine the problem.

I have never worked with Win 2003, but it could be that the default firewall
is blocking the mysql connection. Maybe try turning it off or creating an
exception for the mysql server (TCP port 3306). 

Thanks,
James



Since you said that you were using the newest PHP On Sun, 2007-12-09 at
00:11 -0500, Patrick Farley wrote:
> Evening.
> 
>  
> 
> I've installed the latest PHP using the zip files (not the installer) 
> to my Windows 2003 machine with IIS.  I have tested the installation 
> with a
> phpinfo() and was successful.  I installed Roundcube and when trying 
> to connect to the site was greeted with an error about being unable to 
> connect to the database.  I rechecked my connection string and all seemed
well.
> Figuring I'd come back to it later, I went to install Joomla and 
> during the install process was told that Joomla is unable to connect to
MySQL.
> 
>  
> 
> I have checked and rechecked my php.ini file (though I may be missing 
> something not obvious)
> 
> PHP in general works.
> 
> My system PATH is configured for C:\php and I have restarted several 
> times
> 
> I've even redownloaded the php zip files and compared the md5 to make 
> sure it was not corrupt.
> 
> MySQL is active and working on localhost for an email server without 
> any issue.
> 
> Have tried both mysql.dll and mysqli.dll
> 
> I have searched Google with out any success.
> 
>  
> 
> Is this something with PHP or my MySQL install?  I'm out of ideas.
> 
>  
> 
> 
> 
> 
> 
> Patrick
> 

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

--- End Message ---
--- Begin Message ---
On Monday, December 10, 2007, 5:13:30 AM, Andre wrote:

> Are there free-license IDEs to develop and debugging PHP codes?
> What is the best among those IDEs?
---

I quite like PHP Code Pro (http://www.phpide.de/) It gives me similar
functionality to what Visual Studio gives me for ASP.

HTH,

-- 
Geoff

--- End Message ---
--- Begin Message ---
I've been usind PDT/Eclipse: http://www.eclipse.org/pdt/
It's pretty good...

Bill 

-----Original Message-----
From: Andre Junianto [mailto:[EMAIL PROTECTED] 
Sent: Sunday, December 09, 2007 11:14 PM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Are there free IDEs for PHP?

Hi all,

Are there free-license IDEs to develop and debugging PHP codes?
What is the best among those IDEs?

T.I.A
Andre.

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

--- End Message ---
--- Begin Message ---
Thanks to Bill Bolte for referring me to the Wamp installation.

I can now in fact start doing what I want using the combination of PHP and MySQL.

Only funny thing I found was that initially after the installation, after starting up MySQL.exe in order to create a database, add a user etc., for some reason it kept on generating errors when I tried to create the user using the following syntax:
create user blindza identified by 'whatever';

However it now seems to be working fine, since I've now created the database with one table in it so far, and specified the new username/password combo, granted them privileges to that database, and tested it with some very simple code just reading what's currently the only record in that DB, and displaying it in the output.

Either way, like I said, thanks since I can now finally try to get back on track, and the next thing I will most likely try is to implement the PHPMyAdmin app that I downloaded since it's also what gets used by/at my hosting provider.

Stay well


Jacob Kruger
Blind Biker
Skype: BlindZA
'...Fate had broken his body, but not his spirit...'

--- End Message ---
--- Begin Message ---
Thanks again.

What it really comes down to for me at this stage is that not everything/all config interfaces are really all that 'acccessible' at this stage since part of what I'm still getting 100% comfortable in is trying to do 'everything' I used to in the old days, where I still looked up everything/taught myself everything - basically using only MS stuff, and (obviously) sighted - LOL!

Stay well

Jacob Kruger
Blind Biker
Skype: BlindZA
'...Fate had broken his body, but not his spirit...'

----- Original Message ----- From: "Bill Bolte" <[EMAIL PROTECTED]>
To: "Jacob Kruger" <[EMAIL PROTECTED]>
Sent: Monday, December 10, 2007 11:57 PM
Subject: RE: [PHP-WIN] Just to let you know it's now all working


Jacob,
Glad to hear you got it working. It was a bit frustrating for me when I
first started venturing into this territory, WAMP reduced a lot of my
stress.

Take care...

Bill

-----Original Message-----
From: Jacob Kruger [mailto:[EMAIL PROTECTED]
Sent: Monday, December 10, 2007 3:38 PM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Just to let you know it's now all working

Thanks to Bill Bolte for referring me to the Wamp installation.

I can now in fact start doing what I want using the combination of PHP
and
MySQL.

Only funny thing I found was that initially after the installation,
after
starting up MySQL.exe in order to create a database, add a user etc.,
for
some reason it kept on generating errors when I tried to create the user

using the following syntax:
create user blindza identified by 'whatever';

However it now seems to be working fine, since I've now created the
database
with one table in it so far, and specified the new username/password
combo,
granted them privileges to that database, and tested it with some very
simple code just reading what's currently the only record in that DB,
and
displaying it in the output.

Either way, like I said, thanks since I can now finally try to get back
on
track, and the next thing I will most likely try is to implement the
PHPMyAdmin app that I downloaded since it's also what gets used by/at my

hosting provider.

Stay well


Jacob Kruger
Blind Biker
Skype: BlindZA
'...Fate had broken his body, but not his spirit...'

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

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

I am trying to send mail using mail function of php, it's working fine on one 
server and it fails to send mails on other server.On  first server is showing 
message "Mail Sent Successfully" and on other it is showing "Mail Sending 
Failed".In my local system it is also working fine,this code was working fine 
some days ago but suddenly it stopped working,this problem might be due to some 
server configuration changes, but i am not getting what exactly is the issue , 
so that i can resolve it.what might be the reasons?Any body can explain 
me.......

<?php
if(isset($_REQUEST['send'])){
    $to = $_POST['email'];
    $subject = $_POST['subject'];
    $message = $_POST['message'];
    $headers  = 'MIME-Version: 1.0' . "\r\n";
    $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
    $headers .= 'From: SCONNECT <[EMAIL PROTECTED]>' . "\r\n";
    $headers .= 'Cc: [EMAIL PROTECTED]' . "\r\n";

    if(mail ($to, $subject, $message, $headers )){
        $msg = "Mail Sent Successfully";
    }else {
        $msg = "Mail Sending Failed";
    }
}
?>

<html>
    <head>
        <title>
            Mail test from script
        </title>
    </head>
    <body>
        <table width='60%' align='center' style="border:1px solid #000">
        <?php if($msg == ""){?>
        <form method='post' action='mailtest.php'>
            <tr><td colspan='2' align='center'><h4>This page is used to test 
the mail from script.</h4></td></tr>
            <tr><td>Email: </td><td> <input name='email' type='text' 
/></td></tr>
            <tr><td>Subject: </td><td><input name='subject' type='text' 
/></td></tr>
            <tr><td>Message:</td><td><textarea name='message' rows='15' 
cols='40'></textarea></td></tr>
            <tr><td colspan='2' align='center'> <input type='submit' 
value='Send Mail' name='send'/></td></tr>
        </form>
        <?php }else{?>
            <tr><td><?php echo $msg;?></td></tr>
        <?php }?>
        </table>
    </body>
</html>


Regards.
Vikas Batra





      Save all your chat conversations. Find them online at 
http://in.messenger.yahoo.com/webmessengerpromo.php

--- End Message ---

Reply via email to