#31013 [NEW]: ERRORE DI SYNTAX
| From: | m_zanon at tiscali dot it | Date: | Tue, 07 Dec 2004 23:48:35 +0000 |
| Subject: | #31013 [NEW]: ERRORE DI SYNTAX | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-69904@lists.php.net to get a copy of this message | ||
From: m_zanon at tiscali dot it
Operating system: win 2003 server
PHP version: 5.0.2
PHP Bug Type: *General Issues
Bug description: ERRORE DI SYNTAX
Description:
------------
Ho INSTALLATO LA VERSIONE 5.0.2 NEL MIO WEB SERVER WIN 2003 E PURTROPPO
RISCONTRO QUESTO PROBLEMA:
Parse error: syntax error, unexpected T_STRING in
E:\Inetpub\wwwroot\HostDirector\config\config.php on line 12
Prima avevo la precedente versione 4.3 e non ha manifestato nessun
errore.
Credo che l'errore sia nel file php.ini, qualcuno mi sa aiutare??
Molte Grazie
Reproduce code:
---------------
<?
require("../config/config.php");
require("../config/functions.php");
$my_session = get_session();
while (list($key, $val) = @each($HTTP_GET_VARS)) { $GLOBALS[$key] = $val;
}
while (list($key, $val) = @each($HTTP_POST_VARS)) { $GLOBALS[$key] = $val;
}
#################################################################################################################
# Check to see whether Domain Name is valid
if (!strlen($domain)) { message("No Domain Name","You did not enter a
Domain Name."); }
if (ereg('[^A-Za-z0-9-]', $domain)) { message("Invalid Characters","Your
Domain Name contains invalid characters"); }
if ($domain{0} == "-") { message("Invalid Domain Name","Your Domain Name
must not begin with a dash"); }
#################################################################################################################
if (!$extensions) { message("No Extensions Selected","You did not select
any Domain Name extensions to search. Click <a
href=\"javascript:history.go(-1)\">here</a> to return to the search
form."); }
$first_part = $domain;
$output = array();
foreach ($extensions as $ext) {
$results = array();
$random = rand(0, 32768);
#################################################################################################################
# Check lengths of extensions
if ($ext == ".com" and (strlen($first_part) < 2)) { message("Invalid
Domain Name",".com Domain Names must contain more than 2 characters"); }
if ($ext == ".net" and (strlen($first_part) < 2)) { message("Invalid
Domain Name",".net Domain Names must contain more than 2 characters"); }
if ($ext == ".org" and (strlen($first_part) < 2)) { message("Invalid
Domain Name",".org Domain Names must contain more than 2 characters"); }
if ($ext == ".info" and (strlen($first_part) < 3)) { message("Invalid
Domain Name",".info Domain Names must contain more than 3 characters"); }
if ($ext == ".biz" and (strlen($first_part) < 3)) { message("Invalid
Domain Name",".biz Domain Names must contain more than 3 characters"); }
if ($ext == ".no" and (strlen($first_part) < 2)) { message("Invalid Domain
Name",".no Domain Names must contain more than 2 characters"); }
#################################################################################################################
$domain_to_search = $first_part . $ext;
$extension_details = get_whois_data($ext);
#################################################################################################################
# Create Drop-Down Menu for Available Domain Names
$drop_down = array();
array_push($drop_down, "<select name=\"years|$random\" size=1>");
if ($extension_details[3] > 0) { array_push($drop_down, "<option
value=1|$extension_details[3]|$domain_to_search|$random>1</option>"); }
if ($extension_details[4] > 0) { array_push($drop_down, "<option
value=2|$extension_details[4]|$domain_to_search|$random>2</option>"); }
if ($extension_details[5] > 0) { array_push($drop_down, "<option
value=3|$extension_details[5]|$domain_to_search|$random>3</option>"); }
if ($extension_details[6] > 0) { array_push($drop_down, "<option
value=4|$extension_details[6]|$domain_to_search|$random>4</option>"); }
if ($extension_details[7] > 0) { array_push($drop_down, "<option
value=5|$extension_details[7]|$domain_to_search|$random>5</option>"); }
if ($extension_details[8] > 0) { array_push($drop_down, "<option
value=6|$extension_details[8]|$domain_to_search|$random>6</option>"); }
if ($extension_details[9] > 0) { array_push($drop_down, "<option
value=7|$extension_details[9]|$domain_to_search|$random>7</option>"); }
if ($extension_details[10] > 0) { array_push($drop_down, "<option
value=8|$extension_details[10]|$domain_to_search|$random>8</option>"); }
if ($extension_details[11] > 0) { array_push($drop_down, "<option
value=9|$extension_details[11]|$domain_to_search|$random>9</option>"); }
if ($extension_details[12] > 0) { array_push($drop_down, "<option
value=10|$extension_details[12]|$domain_to_search|$random>10</option>");
}
array_push($drop_down, "</select>");
$drop_down = implode("\n", $drop_down);
# Create Hidden Field for Registered Domains
$hidden_field = "<input type=\"hidden\" name=\"years|$random\"
value=\"T|$extension_details[13]|$domain_to_search|$random\">";
#################################################################################################################
if (!$extension_details[0]) { message("No Domain Name Details
Found","Unable to find any details for the $ext extension in the
database."); }
if ($extension_details[13] <= 0) { $extension_details[13] = "FREE"; } else
{ $extension_details[13] = "<b>$currency</b> $extension_details[13]"; }
#################################################################################################################
# Check to see whether Domain Name is available
if ($extension_details[2] == "whois") { $whois_output =
whois($domain_to_search,$extension_details[0],0); }
elseif ($extension_details[2] == "non_whois") { $whois_output =
non_whois($domain_to_search,$extension_details[0],0); }
if (stristr($whois_output, "$extension_details[1]")) {
if ($log_searches == "yes") {
log_search($domain_to_search,"$text_available","$my_session"); }
$filename = "template_results_available_row.html";
$handle = fopen ($filename, "r");
$contents = fread ($handle, filesize ($filename));
$contents = str_replace(XdomainX, $domain_to_search, $contents);
$contents = str_replace(Xproduct_codeX, $extension_details[14],
$contents);
$contents = str_replace(XpriceX, $extension_details[15], $contents);
$contents = str_replace(Xdrop_downX, $drop_down, $contents);
$contents = str_replace(XrandomX, $random, $contents);
$contents = str_replace(XtypeX, $extension_details[2], $contents);
fclose ($handle);
array_push ($output, $contents);
} else {
if ($log_searches == "yes") {
log_search($domain_to_search,"$text_registered","$my_session"); }
$filename = "template_results_registered_row.html";
$handle = fopen ($filename, "r");
$contents = fread ($handle, filesize ($filename));
$contents = str_replace(XdomainX, $domain_to_search, $contents);
$contents = str_replace(XserverX, $extension_details[0], $contents);
$contents = str_replace(XpriceX, $extension_details[15], $contents);
$contents = str_replace(XtransferX, $extension_details[13], $contents);
$contents = str_replace(Xproduct_codeX, $extension_details[14],
$contents);
$contents = str_replace(XtypeX, $extension_details[2], $contents);
$contents = str_replace(XrandomX, $random, $contents);
$contents = str_replace(XhiddenX, $hidden_field, $contents);
fclose ($handle);
array_push ($output, $contents);
} $count++;
}
#################################################################################################################
if (!$count) { message("No Domain Name Extensions Selected","You need to
select some Domain Name extensions to search."); }
$output = implode("\n", $output);
#################################################################################################################
# Get the current contents of the cart
$cart_contents_domains = cart_contents_domains($my_session);
$cart_contents_hosting = cart_contents_hosting($my_session);
$cart_contents_extras = cart_contents_extras($my_session);
$cart_contents_domains = implode("\n", $cart_contents_domains);
$cart_contents_hosting = implode("\n", $cart_contents_hosting);
$cart_contents_extras = implode("\n", $cart_contents_extras);
#################################################################################################################
# Get the current total cost
$total_price = total_price($my_session,"");
$monthly_price = total_price($my_session,"M");
$quarterly_price = total_price($my_session,"Q");
#################################################################################################################
# Display the results in the browser
$filename = "template_results.html";
$handle = fopen ($filename, "r");
$contents = fread ($handle, filesize ($filename));
$contents = str_replace(XresultsX, $output, $contents);
$contents = str_replace(XdomainsX, $cart_contents_domains, $contents);
$contents = str_replace(XhostingX, $cart_contents_hosting, $contents);
$contents = str_replace(XextrasX, $cart_contents_extras, $contents);
$contents = str_replace(XtX, $total_price, $contents);
$contents = str_replace(XmX, $monthly_price, $contents);
$contents = str_replace(XqX, $quarterly_price, $contents);
$contents = str_replace(XsessionX, $my_session, $contents);
$contents = str_replace("Z~", $currency, $contents);
print $contents;
fclose ($handle);
#################################################################################################################
?>
--
Edit bug report at http://bugs.php.net/?id=31013&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=31013&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=31013&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=31013&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=31013&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=31013&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=31013&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=31013&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=31013&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=31013&r=support
Expected behavior: http://bugs.php.net/fix.php?id=31013&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=31013&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=31013&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=31013&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=31013&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=31013&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=31013&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=31013&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=31013&r=float
MySQL Configuration Error: http://bugs.php.net/fix.php?id=31013&r=mysqlcfg