Parse error - please help
Moderator: General Moderators
Parse error - please help
Hey there,
I'm kinda new here but I'll try to get familliar with PHP while browsing the forum and doing the stuff.
I have a website running on MySQL 4.0.18-Max via TCP/IP. It's running on ISP server, I just connect with all the rights. I have uploaded phpMyAdmin-2.8.0.3 and installed as mentioned in documentation. Alas... When I try to load index.php, I get an error displayed by web browser (doesn't matter it is latest firefox or ie):
Parse error: parse error, expecting `')'' in ./libraries/Theme.class.php on line 66
And the line 66 in Theme.class.php looks like OK:
} elseif ( isset( $theme_generation, $theme_version ) ) {
The strangest thing is the `')'' Wtf?
Any help would be appreciated. Thanks.
I'm kinda new here but I'll try to get familliar with PHP while browsing the forum and doing the stuff.
I have a website running on MySQL 4.0.18-Max via TCP/IP. It's running on ISP server, I just connect with all the rights. I have uploaded phpMyAdmin-2.8.0.3 and installed as mentioned in documentation. Alas... When I try to load index.php, I get an error displayed by web browser (doesn't matter it is latest firefox or ie):
Parse error: parse error, expecting `')'' in ./libraries/Theme.class.php on line 66
And the line 66 in Theme.class.php looks like OK:
} elseif ( isset( $theme_generation, $theme_version ) ) {
The strangest thing is the `')'' Wtf?
Any help would be appreciated. Thanks.
feyd | Please use
OK, I have bolded the line 66. I tried to search the `')'' symbols. ` is absent in document, so I can't understand why it's in the error message. And I found this line kinda suspicios:
' onclick="takeThis(\'' . addslashes( $this->getId() ) . '\');'

feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]Code: Select all
function loadInfo() {
if ( ! file_exists( $this->getPath() . '/info.inc.php' ) ) {
return false;
}
if ( $this->mtime_info === filemtime( $this->getPath() . '/info.inc.php' ) ) {
return true;
}
@include( $this->getPath() . '/info.inc.php' );
// did it set correctly?
if ( ! isset( $theme_name ) ) {
return false;
}
$this->mtime_info = filemtime( $this->getPath() . '/info.inc.php' );
if ( isset( $theme_full_version ) ) {
$this->setVersion( $theme_full_version );
} elseif ( isset( $theme_generation, $theme_version ) ) {
$this->setVersion( $theme_generation . '.' . $theme_version );
}
$this->setName( $theme_name );
return true;
}' onclick="takeThis(\'' . addslashes( $this->getId() ) . '\');'
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]Sorry and thanks for the correcting my code.
server php version is 4.3.4 and the server's settings are below:
http://gintas.is.lt/info.php
and how I could solve isset() problem?
server php version is 4.3.4 and the server's settings are below:
http://gintas.is.lt/info.php
and how I could solve isset() problem?
- shiznatix
- DevNet Master
- Posts: 2745
- Joined: Tue Dec 28, 2004 5:57 pm
- Location: Tallinn, Estonia
- Contact:
Code: Select all
} elseif ( isset( $theme_generation) && isset($theme_version ) ) {Well, that doesn't help me muchshiznatix wrote:Code: Select all
} elseif ( isset( $theme_generation) && isset($theme_version ) ) {
Is this problem from client (that means my) side or server? Because I don't believe phpMyAdmin is buggy 'cause it's latest version and I didn't hear any problems from the other guys.
Next. I have deleted phpMyAdmin-2.8.0.3 and uploaded phpMyAdmin-2.7.0-pl2 instead.
Now I get same looking error while trying to open index.php:
Parse error: parse error, expecting `')'' in ./libraries/grab_globals.lib.php on line 32
And the code in grab_globals.lib.php looks like:
I don't beliece phpMyAdmin being bugy.
And the line 32 is (you can see it in the php code):
unset( $key, $value );
Could that be because of incorrect config.inc.php configuration?
Now I get same looking error while trying to open index.php:
Parse error: parse error, expecting `')'' in ./libraries/grab_globals.lib.php on line 32
And the code in grab_globals.lib.php looks like:
Code: Select all
foreach ( get_defined_vars() as $key => $value ) {
if ( ! in_array( $key, $variables_whitelist ) ) {
unset( $$key );
}
}
unset( $key, $value );
// protect against older PHP versions' bug about GLOBALS overwrite
// (no need to translate this one )
// but what if script.php?GLOABLS[admin]=1&GLOBALS[_REQUEST]=1 ???
if ( isset( $_REQUEST['GLOBALS'] ) || isset( $_FILES['GLOBALS'] )
|| isset( $_SERVER['GLOBALS'] ) || isset( $_COOKIE['GLOBALS'] )
|| isset( $_ENV['GLOBALS'] ) ) {
die( 'GLOBALS overwrite attempt' );
}And the line 32 is (you can see it in the php code):
unset( $key, $value );
Could that be because of incorrect config.inc.php configuration?
- Ollie Saunders
- DevNet Master
- Posts: 3179
- Joined: Tue May 24, 2005 6:01 pm
- Location: UK
they aren't necessarily bugs. phpMyAdmin is PHP code and is therefore subject to the variences in PHP configurations, which there are many.
Its possible you have your server configured in such a way that phpMyAdmin won't run. Have a look in the phpMyAdmin documentation for the PHP requirements and ensure your server meets them all. Start with the PHP version and then look to more specific requirements and configuration directives.
Yeah you've hit the nail on the head.Could that be because of incorrect config.inc.php configuration?
Its possible you have your server configured in such a way that phpMyAdmin won't run. Have a look in the phpMyAdmin documentation for the PHP requirements and ensure your server meets them all. Start with the PHP version and then look to more specific requirements and configuration directives.
Parse errors pointing to PHP files are always server side.Is this problem from client (that means my) side or server?