View Full Version : MYSQL Error at install
Anonymous
10-18-2004, 06:01 PM
Hey there.
Trying to install and keep getting this error on the admin page after I enter in admin name and passwd:
Error: You have an error in your SQL syntax near '; ' at line 11
I have tried this with having a DB created beforehand and also to see if the script would create the DB. Neither work.
This is the first part of the script where it indicated there was an error:
<?php
// ################################################## ##
// PIXELPOST VERSION 1.1.2 - admin script | PHOTOBLOG PUNK SOFTWARE BY PUNK@PIXELPUNK.SE
// ################################################## ##
// admin.php version 1.3.2
require("pixelpost.php");
/* start up mysql */
mysql_connect($pixelpost_db_host, $pixelpost_db_user, $pixelpost_db_pass) || die("Error: ". mysql_error());
mysql_select_db($pixelpost_db_pixelpost) || die("Error: ". mysql_error());
// check to see if it's installed
$check = mysql_query("select * from pixelpost limit 0,1");
if(!$check) {
header("Location: install.php");
exit();
}
pixelpunk
10-18-2004, 06:33 PM
It's a known error the script has with older MySQL, the syntax is wrong somewhere, I haven't put much time into it to be honest.
Quick solution is to manually create the tables as indicated by install.php.
Another solution is to update MySQL.
If you decide to manually create the tables don't forget that the password for admin are encoded.
Have a look at this thread:
http://www.pixelpunk.se/software/forum/viewtopic.php?t=7&postdays=0&postorder=asc&start=1 5
Hope it'll work out, let me know if I can be of any help.
// punK
Anonymous
10-18-2004, 11:30 PM
Thanks.
Got the tables created, but a little lost with the meaning of this:
If that is the problem, open the table and insert a new password.
Code:
YWRtaW4=
The above is admin. You can change your password once you've logged in, so no worries.
What does code mean?
Thanks
kev
pixelpunk
10-18-2004, 11:41 PM
YWRtaW4=
Never mind the Code: thing.
Edit your table and insert the above YWRtaW4=, then when you login your password is admin.
Hope it works // punK
Anonymous
10-18-2004, 11:57 PM
This is the last try and i'll stop buggin you!! Not a DB guy, sorry. Not sure where in the pixelpost_config table to add that.
Add that in the password field?
Field name
Data type Warning! Changing type may result in data loss
Type width
Type options Case insensitive Case sensitive
Allow nulls? Yes No
Default value
Part of primary key? Yes No
Or somewhere here:
Field name Type Allow nulls? Key Default value Extras
admin varchar(20) No None
password varchar(20) No None
template varchar(150) No None
imagepath varchar(150) No None
siteurl varchar(100) No None
sitetitle varchar(100) No None
calendar varchar(30) No None
version varchar(10) No None
Thanks for your help. Taking donations?
:?:
pixelpunk
10-19-2004, 12:07 AM
Don't stop bug me until it's done, I don't like when pixelpost is acting up and ruining the experience for those who downloads it.
Can you enter sql somewhere, do you use phpmyadmin?
If so enter this query:
update pixelpost_config set password='YWRtaW4='
That should work, not tested though.
In the table pixelpost_config there is a column/field called password, that is the one we want to change.
// punk
Edit: Donations? Good idea. I want a postcard! :)
Anonymous
10-19-2004, 12:13 AM
worked!!!!!
Thanks dude!
flashlight
10-19-2004, 09:37 PM
I'm having the same problem. I know just enough to really get myself in trouble. Using phpMyAdmin, I pasted:
$query = mysql_query("
CREATE TABLE pixelpost_categories (
id int(11) NOT NULL auto_increment,
name varchar(100) NOT NULL default '',
KEY id (id)
) TYPE=MyISAM;
");
into the SQL query box under the SQL tab. I got the following error message:
Error
SQL-query*:*
$query = mysql_query(
" CREATE TABLE pixelpost_categories ( id int(11) NOT NULL auto_increment, name varchar(100) NOT NULL default '', KEY id (id) ) TYPE=MyISAM; "
)
MySQL said:
#1064 - You have an error in your SQL syntax near '$query = mysql_query( "
CREATE TABLE pixelpost_categories (
id int(11) NOT NU' at line 1
I've installed pixelpost successfully on another server, but am over my head here. Any advice would be most appreciated.
Thanks,
turnover
10-19-2004, 09:45 PM
just past CREATE TABLE pixelpost_categories (
* id int(11) NOT NULL auto_increment,
* name varchar(100) NOT NULL default '',
* KEY id (id)
) TYPE=MyISAM;
flashlight
10-19-2004, 10:04 PM
Ah yes, it's so obvious once you know the answer...
Thanks
flashlight
10-19-2004, 10:17 PM
So close:
I've created all the tables, and run the query above to set the password. When I try to login using admin as the password though, nothing happens - no error message, just reloads the same page.
Should the user be blank? I've tried blank, admin, etc
Thanks!
EDIT: I've also tried manually setting the password via phpMyAdmin, but with the same result. Help!
pixelpunk
10-20-2004, 07:02 AM
Are your server running Windows? Possibly even Windows IIS?
Let me know, there are some weird stuff going on with Windows. The scripts requirements is apache and unix by the way :)
// punK
flashlight
10-21-2004, 03:06 PM
Hiya Punk,
No, the server is Linux running Apache. Any other ideas?
Maybe I should try deleting the tables and the files and re-installing?
Thanks
pixelpunk
10-21-2004, 03:48 PM
Lets try the holistic approach.
Zip a glass of cold milk and have a cookie. Then find close to the top of the admin/index.php something along the lines of
header("Location: index.php");
Take those lines and put two slashes in front of it (comment it out, the script will not read those lines after that).
// header("Location: index.php");
Have another cookie and try to login. Be sure to manually reload the page after you've entered your password, the script will not notify you of success nor failure.
// punK
flashlight
10-21-2004, 04:04 PM
Ummm... Cookies!
I had my snack, commented out the line, had another cookie (chocolate), crossed my fingers, and.... nothing :(
Time to delete and re-install?
pixelpunk
10-21-2004, 04:13 PM
Damn.
If you feel like giving me ftp login so that I can reach the files I can try and help you that way. I have helped others this way and worked it out. I'm a good guy so no worries, although I understand if you don't feel like trusting me :)
punk [at] pixelpunk.se is my email, or pm me here, with details.
Other than that I'm not quite sure what to do, I'm a lousy theoreticist, I'm more of a trial and error guy :)
// punK
vBulletin® v3.7.3, Copyright ©2000-2013, Jelsoft Enterprises Ltd.