illdevilinc
May 10 2006, 01:23 AM
| | hi, I have a problem with my PHP on my site. It just started happening now but i think the PHP database some how corrupted its self. How can i reinstall the PHP or upgrade it to the latest PHP version, please respond back as this is effecting alot of my PHP scripts. Thanks |
Reply
jlhaslip
May 10 2006, 01:41 AM
What do the errors say? Post the error message here and then we will know what it is. Might be something that you can do something about (or maybe not). But we need to see the message first.
Reply
snlildude87
May 10 2006, 01:43 AM
You can't touch the PHP installation unless you are on a dedicated server. Trap17 only offers shared hosting. Are you sure that it's not your faulty script? Go to http://pastebin.com and paste your code there. Maybe someone here can help you out.
Reply
illdevilinc
May 10 2006, 02:05 AM
QUOTE(jlhaslip @ May 9 2006, 06:41 PM)  What do the errors say? Post the error message here and then we will know what it is. Might be something that you can do something about (or maybe not). But we need to see the message first.
The error is saying parse error: parse error, unexpected $ in /home/idimm/public_html/skalinks_1_5/install/index.php on line 106But the thing is that this code was working a couple of days ago and nothing had been changed and when i tried to reinstall this PHP application it gave me this error. This code is on 755 cmos so it was impossible for the code to edit its self and i even replaced the code with a fresh code from the designers after it gave me this message.
Reply
jlhaslip
May 10 2006, 02:13 AM
First thing to check for are mis-matched curly braces. Post the code or submit a link to the source saved as a text file.
Reply
Hamtaro
May 10 2006, 02:21 AM
I think that error means that the script unexpectedly ended (for example, forgetting a } for an if, else, etc. I think it could even be caused by forgetting the close ?> on the script, but I'm not sure). Maybe you should check the code there. However, if it was working a few days ago, that may not be the problem. One last thing: You mentioned it was affecting a lot of your scripts. Are there any scripts you can run that don't have an if, else/elseif, while, or anything else that uses { and }? Sorry, but that's as much as I can help with.
Reply
illdevilinc
May 10 2006, 02:26 AM
QUOTE(Hamtaro @ May 9 2006, 07:21 PM)  I think that error means that the script unexpectedly ended (for example, forgetting a } for an if, else, etc. I think it could even be caused by forgetting the close ?> on the script, but I'm not sure). Maybe you should check the code there. However, if it was working a few days ago, that may not be the problem.
One last thing: You mentioned it was affecting a lot of your scripts. Are there any scripts you can run that don't have an if, else/elseif, while, or anything else that uses { and }? Sorry, but that's as much as I can help with.
The code is extremaily big. but i dont know how all of a sudden this error could of happened as the code was never modified by anyone. but the code is this CODE <?php if ( !$_POST['Install'] ) { require_once( '../SkaLinks_include/English_lang.php' ); require_once( 'template.php' ); } else { $package_version = 15; foreach( $_POST as $key => $value ) { if( !strlen( $value ) && ( $key != 'mysql_userpwd' ) ) { die( "<font color=red>The value of $key parameter is empty!</font>" ); } } $f = fopen( '../headers.php', 'w' ); $content = '<?php
//Section for script configuraion - START //For info, refer to the Manual.
$_url_main_site = \''.$_POST['url_main_site'].'\'; //http://www.mysite.com/dir/ $_url_root = \''.$_POST['url_root'].'\'; //http://www.mysite.com/ $_dir_root = \''.$_POST['dir_root'].'\'; // /my/home/directory/ If you are unsure about the correct path to the home directory of your site in the server file system, please contact your web-hosting support for assistance. $_site_title = \''.$_POST['page_title'].'\'; $_site_full_name = \''.$_POST['site_full'].'\'; $_site_brand = \''.$_POST['site_brand'].'\'; $_site_description = \''.$_POST['site_description'].'\'; $_mysql_username = \''.$_POST['mysql_username'].'\'; $_mysql_userpwd = \''.$_POST['mysql_userpwd'].'\'; $_mysql_host = \''.$_POST['mysql_host'].'\'; $_mysql_dbname = \''.$_POST['mysql_dbname'].'\';
//Section for script configuraion - END $_skalinks_url[\'root\'] = $_url_root; $_skalinks_url[\'dir\'] = $_skalinks_url[\'root\']; $_skalinks_url[\'templates\'] = $_skalinks_url[\'root\'].\'templates/\'; $_skalinks_url[\'admin\'] = $_skalinks_url[\'root\'].\'admin/\'; $_skalinks_url[\'main_site\'] = $_url_main_site; $_skalinks_url[\'rm_news\'] = \'http://www.skalinks.com/news/news.rss\';
$_skalinks_dir[\'root\'] = $_dir_root; $_skalinks_dir[\'dir\'] = $_skalinks_dir[\'root\']; $_skalinks_dir[\'admin\'] = $_skalinks_dir[\'root\'].\'admin/\'; $_skalinks_dir[\'db_backup\'] = $_skalinks_dir[\'admin\'].\'db_backup/\';
$_skalinks_dir[\'smarty\'] = $_skalinks_dir[\'root\'].\'smarty/\'; $_skalinks_dir[\'template_dir\'] = $_skalinks_dir[\'root\'].\'templates/\'; $_skalinks_dir[\'compile_dir\'] = $_skalinks_dir[\'root\'].\'compile/\'; $_skalinks_dir[\'config_dir\'] = $_skalinks_dir[\'root\'].\'config/\'; $_skalinks_dir[\'cache_dir\'] = $_skalinks_dir[\'root\'].\'cache/\';
$_skalinks_mysql[\'username\'] = $_mysql_username; $_skalinks_mysql[\'userpwd\'] = $_mysql_userpwd; $_skalinks_mysql[\'host\'] = $_mysql_host; $_skalinks_mysql[\'dbname\'] = $_mysql_dbname; $_skalinks_mysql[\'tbl_prefix\'] = \'dir_\';
$_skalinks_page = array ( \'title\' => $_site_title, \'title_add_cat\' => \'Add Category\', \'title_add_url\' => \'Add Link\', \'title_search\' => \'Find your Link\', \'title_search_result\' => \'Search Result\', \'title_edit_cat\' => \'Edit Category\', \'title_edit_url\' => \'Edit Link\', \'title_admin\' => \'Admin index page\', \'title_link_list\' => \'Links list\', \'title_cat_list\' => \'Categories list\', \'title_dirtree\' => \'Tree of categories\', );
$_skalinks_site = array ( \'site_description\' => $_site_description, \'site_full\' => $_site_full_name, \'brand\' => $_site_brand, \'mail_theme\' => \'Message\', );
require_once( \'SkaLinks_include/English_lang.php\' ); require_once( \'SkaLinks_include/component.php\' ); require_once( \'SkaLinks_include/SkaLinks.class.php\' ); require_once( $_skalinks_dir[\'smarty\'].\'Smarty.class.php\' ); require_once( \'SkaLinks_include/design.php\' ); $SkaLinks = new SkaLinks( $_skalinks_mysql ); $SkaLinks->SetRootURL( $_skalinks_url[\'root\'] ); $SkaLinks->SetPrefix( $_skalinks_mysql[\'tbl_prefix\'] ); $color_theme = $SkaLinks->GetParam( \'color_theme\' ); $_skalinks_url[\'color_theme\'] = $_skalinks_url[\'templates\'].$color_theme.\'/\'; // Get some settings $_output[\'register_users\'] = $SkaLinks->GetParam( \'register_users\' );
?>'; fwrite( $f, $content ); fclose; // Mysql dump installation
// Connect to MySql server $link = mysql_connect ( $_POST['mysql_host'], $_POST['mysql_username'], $_POST['mysql_userpwd'] ); mysql_select_db( $_POST['mysql_dbname'], $link ); $query = mysql_query( "SELECT `Package_ver` FROM `dir_settings` LIMIT 0,1", $link ); $package = ( $query ) ? mysql_fetch_assoc( $query ): ""; if ( !$package['Package_ver'] ) { $sql_file = "skalinks_mysql_dump.sql"; if ( !mysql_select_db ($_POST['mysql_dbname'], $link ) ) { die ("<font color=red>Could not select database ".$_POST['mysql_dbname'].": " . mysql_error()."</font>"); } // Begin installation of dump file if ( file_exists( $_POST['dir_root']."install/".$sql_file ) ) { $dump_file = $_POST['dir_root']."install/".$sql_file; } else { die( "<font color=red>The path to directory is wrong. Couldn't find dump file : $sql </font>" ); } if ( !($f = fopen ( $dump_file, "r" )) ) { die( "<font color=red>Could not open file with sql instructions: $dump_file </font>" ); }
while ( $s = fgets ( $f, 10240) ) { $s = trim ($s); if ( $s[0] == '#' ) continue; if ( $s[0] == '-' ) continue;
if ( $s[strlen($s)-1] == ';' ) { $s_sql .= $s; } else { $s_sql .= $s; continue; }
$res = mysql_query ( $s_sql, $link ); if ( !$res ) { $ret .= "<i><font color=red><b>Error</b> while executing:</i> $s_sql <br>".mysql_error()."</font><hr>"; } $s_sql = ""; }
fclose($f); } else { while( $package['Package_ver'] < $package_version ) {
$sql_file = "upgrade_base_".$package['Package_ver'].".sql";
// Begin installation of dump file if ( file_exists( $_POST['dir_root']."install/".$sql_file ) ) { $dump_file = $_POST['dir_root']."install/".$sql_file; } else { die( "<font color=red>The path to directory is wrong. Couldn't find dump file </font>" ); } if ( !($f = fopen ( $dump_file, "r" )) ) { die( "<font color=red>Could not open file with sql instructions: $dump_file </font>" ); }
while ( $s = fgets ( $f, 10240) ) { $s = trim ($s); if ( $s[0] == '#' ) continue; if ( $s[0] == '-' ) continue;
if ( $s[strlen($s)-1] == ';' ) { $s_sql .= $s; } else { $s_sql .= $s; continue; }
$res = mysql_query ( $s_sql, $link ); if ( !$res ) { $ret .= "<i><font color=red><b>Error</b> while executing:</i> $s_sql <br>".mysql_error()."</font><hr>"; } $s_sql = ""; }
fclose($f); $new_ver = mysql_query( "SELECT `Package_ver` FROM `dir_settings`", $link ); $number_new_version = ( $new_ver ) ? mysql_fetch_assoc( $new_ver ): ""; $package['Package_ver'] = ( $number_new_version ) ? $number_new_version['Package_ver']: $package['Package_ver']+=1; } }
setcookie( "adminname", "admin", time()+36000000, "/" ); setcookie( "pwd", md5( "test" ), time()+36000000,"/" ); header( "Location: ".$_POST['url_root']."admin/index.php?Build_cat=yes" ); }
?>
Reply
Hamtaro
May 12 2006, 02:29 AM
I know you mentioned that you hadn't messed with the file, but I may have found the error. I belive it could also cause it to say unexpected $ as well. Line 106 does contain the error. Here's a portion of the code: CODE // Get some settings $_output[\'register_users\'] = $SkaLinks->GetParam( \'register_users\' );
?>'; <--this is the error, and is line 106 fwrite( $f, $content ); fclose; // Mysql dump installation The error is that there is an unneeded "?>';" in it. The revised code is below: CODE // Get some settings $_output[\'register_users\'] = $SkaLinks->GetParam( \'register_users\' ); fwrite( $f, $content ); fclose; // Mysql dump installation That's the only error I noticed right away. The rest of the file may contain more errors (but I'm not sure). Anyway, try to remove that, and see if it helps any.
Reply
Recent Queries:--
smarty url_root index.php - 106.61 hr back. (1)
Similar Topics
Keywords : php spitting errors- Is The Database System Gone Again? [resolved]
- Errors on PHPMyAdmin again (12)
- Two Errors I Get.
- On my phpBB2 forums. (1)
One is one I think everyone is getting. I tried to submit a support request but it says I have to
define a language. I click the button and I get a WHW error or something. Then it redirects me back
to the main page. Then at the bottom of the sumbit request page is says that this feature has not
been set up by a admin yet. I think everyone is getting this one. If so please say you are or if I
am alone. QUOTE Warning: mysql_connect() : Can't connect to local MySQL server through
socket '/var/lib/mysql/mysql.sock' (2) in /home/damen/public_html/phpBB/db/m...
Database Errors!
- Started after HDD change.. (5)
Hello, I am having database errors. They started after yesterdays HDD change. Its all fine when i
refresh site, they not that often but still i get them. It says "could not connect to database". And
i also received mail from gamma.xisto.com which says: QUOTE There has been a problem with the
database! This is a notice email to let you know that SMF could not connect to the database,
contact your host if this continues. so i am contacting my host.....
Parse Errors While Installing Smf Board
- (3)
I seem to be getting a LOT of parse errors with my php scripts. there are two things they have in
common: 1. they are downloaded and uploaded without modifying them. 2. they all seem to have
"unexpected $end" e.g QUOTE Parse error: syntax error, unexpected $end in
/home/random1/public_html/hsp/forum/webinstall.php on line 271 that example for webinstall.php, a
script used to install SMF. I know that trap17 provides fantastico to install SMF, but I want to
install SMF1.1RC3 to use with joomla-smf, which fantastico doesn't support. if I upload and ins...
Errors With Php Setcookie() And Headers! Please Help!
- Having header errors when I try to set a cookie with PHP function setc (2)
Hey guys, I'm having a problem setting cookies with PHP. I am trying to implement a script that
will allow someone to log in and access members only pages on my website. One of the aspects is that
I have to place a cookie on that persons computer. I know that you can use the PHP function
setcookie() to place it on your computer. The problem is that wherever i have setcookie() in my PHP
code I get an error: " Warning: Cannot modify header information - headers already sent by (output
started at /home/runeco/public_html/cookie.php:6) in /home/runeco/public_html/cooki...
Sites Disapeard, Mysql Errors? Also Server Folders Deleted
- (18)
Hello its 15:40 and I login see if everything runs oke, and I see numerus things deleted my mysql is
working again. Whats going on? My Webpage couple websites got deleted, and server folder files now
whats going on? /sad.gif" style="vertical-align:middle" emoid=":(" border="0" alt="sad.gif" /> my
forum also give errors but mysql db stil there /sad.gif" style="vertical-align:middle" emoid=":("
border="0" alt="sad.gif" />......
[solved]dsn Help (errors)
- (3)
Solved...
Errors Trying To Access Website
- along with cpanel access (2)
My website, http://morosophos.trap17.com/ doesn't work as http://www.morosophos.trap17.com/ .
Why is this? I can no longer use 99% of the functions on cpanel, and wordpress (which I installed)
is also no longer working correctly. Does anyone know why this is happening? Topic title and
description are very important. Editing. ...
Posting Issues...
- Many errors when people post (11)
It seems lately that I have seen a lot of grammatical and spelling errors when people post in the
forums. I really have enjoyed my stay here at Trap17 but I get really frustrated when I see
people carelessly type their message and give little consideration to any errors they may have
typed. Now of course it's not a big deal if there is one or two errors when you post, but when
someone posts a small message and there is a couple of errors, it really bothers me. I'm not
going to whine or anything, I just want to pass the message that we should all do our best ...
Relevant Links
- some errors (6)
I know that the new relevant links feature gives trap17 money. But it shows the hosting competitors....
Frequent Dns Errors...
- Trap17 or .cjb.net? (8)
I am working on my site and am getting DNS errors every 2 minutes or so, and was wondering is the
DNS errror Trap17's name servers or my .cjb.net, my free DNS domain provider? Because I was
planning to buy a .com domain and switch to that, but if it's Trap17 I don't want to pay
money if it might not always be up, but if it is .cjb.net then I will switch sooner....
I Keep Getting Errors When..
- ..trying to view directories on my site (5)
My site is www.subzero.trap17.com However, I set the servers in GoDaddy for my domain to
ns1.trap17.com and ns2.trap17.com Every time I try to go to a directory on the site (for example,
/boards) I always get a 500 error. I keep getting it and even got it when trying to log into my
cPanel. It's extremely annoying! /mad.gif' border='0' style='vertical-align:middle'
alt='mad.gif' /> Can somebody please tell me why I get these errors?...
Errors And Things To Do With Cpanel
- cpanel errors after trying a fix..... (7)
I installed cube cart into one of my subdomains. It kept giving me errors when I opened the url.
So I wnet ot a help forum for the thing and followed their advice and added tmp folders and gave
them chmod 777 well I did it in the admin folder of the subdomain as well as the subdomain folder
(whitebird.unicornrose.com) and in the public_html folder/www folder. Well I removed the cubecart
because this did not help me at all. I removed the tmp folder i made in the www folder and now I am
getting this error whe I try to install anything in cpanel and my cpanel is not wor...
Regarding Bandwidth Usage
- errors ? (2)
Did any1 notice that the bandwidth usage on the frontpage of cpanel is actually DOUBLE the
bandwidth that u had actually used? U can go to section under bandwidth and see ur bandwidth usage.
For mine it stated that i've used 199.56 Meg but looking at the details it only total up to
99.78 Meg. But looking at the AWStats (updated) .. it stated that i;ve only use 77 Meg (including
traffic viewed + not viewed ) I need some advise about this .. because i think if i've used 200
mb for only day 4 of the month ... then im going to run out of bandwidth very soon...
Missing File In Cpanel ?
- Errors in quota (1)
When i enter in quota of accout default at : http:// user name
.trap17.com:2082/frontend/rvorange/ftp/editquota.html?acct=ftp I seen : QUOTE Not Found
The server was not able to find the document (./frontend/rvorange/ftp/editquota.html) you requested
Please check the url and try again. You might also want to report this error to your webhost.
Is this a errors or missing file ? And Raw Log Manager don't working too . I checked
cell : "Archive Logs in your home directory at the end of each stats run " and put save but i
never seen logs that...
Install Moodle 1.3.4 In Cpanel Have Errors !
- I trying install few feature in my site (0)
My hosting till enought space for anything intalls , i have about 26 mb for this intalls ! I
seen errors after intall Moodle 1.3.4 Warning: main(mod/resource/lib.php): failed to open stream:
No such file or directory in /home/nuhoaxul/public_html/moodle/index.php on line 6 Fatal error:
main(): Failed opening required 'mod/resource/lib.php'
(include_path='.:/usr/lib/php:/usr/local/lib/php') in
/home/nuhoaxul/public_html/moodle/index.php on line 6 I sorry , but i think moodle is pretty big
with host 50 mbs ! I can't delete this post ! A...
Restore Database Have Bug ?
- I restore and have errors ! (2)
I tried restore a database as type : username_forumname.sql ! After restore , check in cpanel
, feature mysql datase , I seen a new database is : username_usernameforumnamesql ! Have
anything wrong ?...
Control Panel Errors....
- Help? (2)
Hey, i used fantastico auto installer to install some forum but everytime i do it (no matter what
forum i install) it only comes up with an error page. I dont know why so could you please help?...
Looking for php, sudden, spitting, errors
|
|
Searching Video's for php, sudden, spitting, errors
|
advertisement
|
|