phpvox
-
Posts
50 -
Joined
-
Last visited
Never
Posts posted by phpvox
-
-
how can i make the below code compatble with PHP5.......this works fine with php4......what changed in php5 that it cant connect to database anymore ? thanks
<?
$connected = false;
function c()
{
global $db_host, $db_login, $db_pswd;
$db = @mysql_connect($db_host, $db_login, $db_pswd);
$connected = true;
return $db;
}
function q($q_str)
{
global $db_name, $connected;
if(!$connected)
{
c();
}
$r = mysql($db_name, $q_str);
return $r;
}
function d($db)
{
@mysql_close($db);
}
function e($r)
{
if(@mysql_numrows($r))
return 0;
else return 1;
}
function f($r){
return @mysql_fetch_array($r);
}
function nr($r){
return @mysql_num_rows($r);
}
?>
-
how can i do that ?
-
MySQL Error: Could not locate the specified database
-
i got the error msg
MySQL Error: Could not locate the specified database
-
did u look at it ?
-
I would do with #3.........
setting are everything eles is the same, this happenes when i click and upgrade to PHP 5....i get that error on line 19
<?
$connected = false;
function c()
{
global $db_host, $db_login, $db_pswd;
$db = @mysql_connect($db_host, $db_login, $db_pswd);
$connected = true;
return $db;
}
function q($q_str)
{
global $db_name, $connected;
if(!$connected)
{
c();
}
$r = mysql($db_name, $q_str);
return $r;
}
function d($db)
{
@mysql_close($db);
}
function e($r)
{
if(@mysql_numrows($r))
return 0;
else return 1;
}
function f($r){
return @mysql_fetch_array($r);
}
function nr($r){
return @mysql_num_rows($r);
}
?>
-
anybody ? :'(
-
it has nothing to do with it............it works when i downgrade to php4.....its not the setting in the conf file, its the same info........
<xml>
</section>
<section name="DATABASE CONFIGURATION">
<field type="select" name="db_type" text="Select your database type" help="http://www.ThisWasRemovedByMe.com/products/ThisWasRemovedByMe/documentation/system_configuration.html#select_your_database_type">MySQL<enum val="MySQL">1</enum>
</field>
<field required="1" type="edit" name="db_host" text="Your database host" help="http://www.ThisWasRemovedByMe.com/products/ThisWasRemovedByMe/documentation/system_configuration.html#your_database_host">localhost</field>
<field required="1" type="edit" name="db_login" text="Your database username" help="http://www.ThisWasRemovedByMe.com/products/ThisWasRemovedByMe/documentation/system_configuration.html#your_database_username">REMOVED</field>
<field type="edit" name="db_pswd" text="Your database password" help="http://www.ThisWasRemovedByMe.com/products/ThisWasRemovedByMe/documentation/system_configuration.html#your_database_password">REMOVED</field>
<field required="1" type="edit" name="db_name" text="Database name" help="http://www.ThisWasRemovedByMe.com/products/ThisWasRemovedByMe/documentation/system_configuration.html#database_name">REMOVED</field>
</section>
</xml>
-
what code ? where do i find that ??
-
well why does it work as soon as i down grade to PHP4 and it works.......i have to upgrade to PHP5
the script is encoded and im not getting support from the vendor.
i think i have to change something in mysql
-
as soon as i upgraded from PHP4 to PHP5 and i started getting the bellow error, its not connecting to the database no more, files and setting are the same.....this is a compatibility issue, how can i get a fix around this ??? i cant post the script here, its too big.....any help ??? ......thanks
Warning: mysql() [function.mysql]: Access denied for user 'apache'@'localhost' (using password: NO)
-
is this true ?????????
The problem was that your PHP version was upgraded to 5.0.4. PHP5 deals with things differently than PHP4 does.
-
i know this is pain in the butt
-
yes this is the only file, the database info are 100 % correct, ive checked them 20 times and i also had someone eles look at them just in case i missed something
everything is encoded except the templates folder......
-
<xml>
<section name="DATABASE CONFIGURATION">
<field type="select" name="db_type" text="Select your database type">MySQL<enum val="MySQL">1</enum>
</field>
<field required="1" type="edit" name="db_host" text="Your database host (it may be an IP address)">localhost</field>
<field required="1" type="edit" name="db_login" text="Your database username">DATABASE NAME</field>
<field type="edit" name="db_pswd" text="Your database password">PASSWORD</field>
<field required="1" type="edit" name="db_name" text="Database name">USER NAME</field>
</xml>
-
what should i post ?? what file do u want to see? thanks
-
well how come everything eles works just fine except this script, this is the only scrip that is giving an error
-
yes it works fine with php4
-
thorpe
yes it is the same as yours
-
no, could you please tell me how i can find out ??? i know how to open php.ini but what should i look for and what should i change it to ?? sorry im newbie to mysql
-
its something to do with php5 .......script worked fine on php
-
when I run zend optimizer 2.6.2 the window comes up messed up.."all of them"... it didnt do this before but im not sure why im getting wierd codes like that now, nothing changed in the server at all.....thanks a million
[img]http://i14.tinypic.com/2r6o9q8.jpg[/img] -
???
-
Curl question
Im trying to get my script to function, but it kept hanging, so I email my host and I was told the following:
Go Daddy's HTTPs Proxy requires special options to be placed within any CURL session before it can be used with the HTTPS protocol. The following options will need to be entered into the CURL Session.
curl_setopt ($ch, CURLOPT_HTTPPROXYTUNNEL, TRUE);
curl_setopt ($ch, CURLOPT_PROXYTYPE, CURLPROXY_HTTP);
curl_setopt ($ch, CURLOPT_PROXY, 'http://64.202.165.130:3128');
curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
Now how can I do that? This is my code:
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_USERAGENT, $agent);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
Thanks in advance
how can i make the below code compatble with PHP 5 ?
in PHP Coding Help
Posted
i tried it, nothing happened