PHP version Add-On not working
Posted by: bheksta (---.autopage.co.za)
Date: September 27, 2012 08:51AM

PHP 5.3.8 working perfect on wamp (Icon green), but when switching to PHP version 5.2.6 it does not work( I installed PHP version 5.2.6 as Add-On ) icon stays Yellow.

Please help

Options: ReplyQuote
Re: PHP version Add-On not working
Posted by: stevenmartin99 (Moderator)
Date: September 27, 2012 08:58AM

All the addons are vc6 and the one you download is vc9 as written on download page.

So you need to also install an apache Addon so the compiler version matches

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]

Options: ReplyQuote
Re: PHP version Add-On not working
Posted by: bheksta (---.autopage.co.za)
Date: September 27, 2012 09:05AM

I didnt see any vcX written on download page

Please advise which apache add-on to download in my case ?

Thanks

Options: ReplyQuote
Re: PHP version Add-On not working
Posted by: stevenmartin99 (Moderator)
Date: September 27, 2012 09:08AM

Any of them. All the Addons are vc6


It's written on the download page of wampserver packages.

"All previous versions are compiled with vc6 and are not comparable with these packages..."

This is not technically true as , if u add a vc6 apache and php thy will work together

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]

Options: ReplyQuote
Re: PHP version Add-On not working
Posted by: bheksta (---.autopage.co.za)
Date: September 27, 2012 09:21AM

Hi Steve,

I have tried installing Apache add-on ( 2.2.2 & 2.2.14)
Also PHP 5.2.9

BUT still NO LUCK

Options: ReplyQuote
Re: PHP version Add-On not working
Posted by: stevenmartin99 (Moderator)
Date: September 27, 2012 09:25AM

Can I take a quick look with Teamviewer ?

I have 15 mins free now or else later today

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]

Options: ReplyQuote
Re: PHP version Add-On not working
Posted by: bheksta (---.autopage.co.za)
Date: September 27, 2012 09:31AM

Please do and and revert to me.

I have recently tried Apache add-on 2.2.10 with PHP 5.2.6 & 5.2.9 , still nothing

Options: ReplyQuote
Re: PHP version Add-On not working
Posted by: bheksta (---.autopage.co.za)
Date: September 27, 2012 09:44AM

Hi Steve

I managed to sort it out OR get it to Apache to run with previous PHP versions add-on

I had to change on httpd.config file

Listen port
ServerName port

Port 80 was conflicting with MS IIS 7.5

Thanks a lot for your help and quick responses

Options: ReplyQuote
Re: PHP version Add-On not working
Posted by: bheksta (---.autopage.co.za)
Date: September 27, 2012 02:52PM

I have trouble connecting to MS SQL server using PHP 5.2.6 and 5.2.9

php_mssql extension is enabled in all versions

Any idea on why DB connection fails ?

Options: ReplyQuote
Re: PHP version Add-On not working
Posted by: stevenmartin99 (Moderator)
Date: September 27, 2012 03:43PM

Cannot you paste the connection code and the error?

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]

Options: ReplyQuote
Re: PHP version Add-On not working
Posted by: RiggsFolly (---.as13285.net)
Date: September 27, 2012 05:43PM

Check out this it should get you going

[social.technet.microsoft.com]

Options: ReplyQuote
Re: PHP version Add-On not working
Posted by: bheksta (---.autopage.co.za)
Date: September 28, 2012 08:48AM

Im using Apache 2.2.8 add-on and PHP 5.2.6 add-on

config.php

define('DB_SERVER', '(local)\SQLEXPRESS');
define('DB_SERVER_USERNAME', 'sa');
define('DB_SERVER_PASSWORD', 'password');
define('DB_DATABASE', 'Test_DB');
define('USE_PCONNECT', 'true');

DB.php

class wP_Database_mssql extends wP_Database {
var $use_transactions = false,
$use_fulltext = false,
$use_fulltext_boolean = false;

function __construct($server, $username, $password) {
$this->server = $server;
$this->username = $username;
$this->password = $password;

if ($this->is_connected === false) {
$this->connect();
}
}

function connect() {

if (defined('USE_PCONNECT') && (USE_PCONNECT == 'true')) {
$connect_function = 'mssql_pconnect';
} else {
$connect_function = 'mssql_connect';
}

if ($this->link = @$connect_function($this->server, $this->username, $this->password)) {

$this->setConnected(true);

return true;
} else {

print('cannot connect to server: ' . $this->server. ' <br />user: '. $this->username . ' <br />password: ' . $this->password . '<br>'. mssql_get_last_message());

$this->setError($this->mssql_error(), $this->mssql_errorno());

return false;
}

}

function disconnect() {
if ($this->isConnected()) {
if (@mssql_close($this->link)) {
return true;
} else {
return false;
}
} else {
return true;
}
}

HTM page error
cannot connect to server: (local)\SQLEXPRESS
user: sa
password: password

Options: ReplyQuote
Re: PHP version Add-On not working
Posted by: stevenmartin99 (Moderator)
Date: September 28, 2012 09:00AM

define('DB_SERVER', '(local)\SQLEXPRESS');

Shouldn't this be

define('DB_SERVER', '.\SQLEXPRESS');

Or

define('DB_SERVER', 'YOUR-PC-NAME\SQLEXPRESS');

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]

Options: ReplyQuote
Re: PHP version Add-On not working
Posted by: RiggsFolly (---.as13285.net)
Date: September 28, 2012 09:58AM

Is this line correct?

if ($this->link = @$connect_function($this->server, $this->username, $this->password)) {

The @$connect_function should be @connect_function ( without the $ which would make connect_function a variable that php probably cannot find??

Look in the php_error.log for errors

Options: ReplyQuote
Re: PHP version Add-On not working
Posted by: bheksta (---.autopage.co.za)
Date: September 28, 2012 11:29AM

if ($this->link = @$connect_function($this->server, $this->username, $this->password)) { }

it should be @$connect_function

Cuz I declare it here :

if (defined('USE_PCONNECT') && (USE_PCONNECT == 'true')) {
$connect_function = 'mssql_pconnect';
} else {
$connect_function = 'mssql_connect';
}

No, it's perfectly fine, and working....

I had to replace all " ntwdblib.dll" in ( apache & php xxx folders ), with the one I just downloaded online

Thanks a lot for your help

Options: ReplyQuote


Sorry, only registered users may post in this forum.