View Full Version : Error with installation


linuxuser
01-20-2008, 04:24 PM
I am getting the following error when I tried to install the script.

"There was an error: $queryYou have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '; -- ---------------------------- -- Table structure for alu"

Jafo
01-21-2008, 09:45 AM
What did you enter for the MySQL prefix?

linuxuser
01-21-2008, 10:12 AM
I did not actually do anything to how it came i.e. define('MYSQL_PREFIX', 'alumni_');

Thanks.

Jafo
01-21-2008, 10:14 AM
Did you edit the mysql.txt file in any way, or did you upload it in Binary mode?

linuxuser
01-21-2008, 10:25 AM
Thanks for your kind response.

No I did not edit sql.txt in any way. I have also tried to upload it since your last response in binary, ascii and auto mode and yet the same problem.

Thanks.

Jafo
01-21-2008, 10:26 AM
If you want, I can take a look at it. I will need FTP access and the URL information. You can send it to me via the contact form on this site.

linuxuser
01-21-2008, 10:33 AM
I have just sent that.

Thanks

Jafo
01-21-2008, 10:42 AM
Not sure what happened here, but the mysql.txt file was saved in DOS mode, where it should have been saved in Unix mode. Resaved the file in Unix mode, uploaded, and the install went through just fine.

You should be all set to continue. You need not run install.php anymore. You may want to save the copy of mysql.txt for yourself. Delete install.php, and the mysql.txt files from that directory, and continue as per the readme. Don't forget to change your password. You can change your username from the admin control panel.

linuxuser
01-21-2008, 11:20 AM
Many thanks for this but when I try to continue am getting this error:
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in d:\Domains\name of my site\alumni\includes\auth.php on line 306

I changed the url to name of my site so please bear that in mind when testing.

Thanks.

Jafo
01-21-2008, 11:33 AM
I think the problem here is, you are using PHP version 4.4.1, which is seriously out of date and riddled with issues, including security ones. 4.4.1 was released in oct of 2005. In fact, the latest version of 4, is 4.4.8. PHP has stopped supporting version 4 starting Jan 1st:

PHP: Downloads (http://us2.php.net/downloads.php)

Is it possible for you to upgrade the latest version of PHP5?

linuxuser
01-21-2008, 11:37 AM
Ok Thanks. I actually downgraded to mysql 4.0 because i thought initially that that was the problem. I will upgrade now and come back to you.

Thanks for so helpful.

linuxuser
01-21-2008, 12:03 PM
Jafo,

Sorry I misunderstood your previous post. I thought you were talking about mysql but now realised you are talking about php5. I will talk to my host and will let you know.

Once again I appreciate your help.

linuxuser
01-21-2008, 12:19 PM
PHP5 enabled but am now getting this errorwhen I click on Login:

CGI Error
The specified CGI application misbehaved by not returning a complete set of HTTP headers

CGI-bin and Perl is installed on the host server.

Any info?

Thanks.

Jafo
01-21-2008, 12:26 PM
I am getting no error message:

AlumniPro (http://www.completefootballforum.com/alumni/index.php)

Perhaps your host was rebooting when they moved over to php 5 at the time?

linuxuser
01-21-2008, 12:32 PM
Not sure because I only changed it in the control panel from php4 to php5 by ticking a text box using the Web Extension page form.

Thanks.

Jafo
01-21-2008, 12:33 PM
Great, glad all is working. Let me know if there are any more issues.

linuxuser
01-21-2008, 01:01 PM
The home page opens now but am getting an - "CGI Error
The specified CGI application misbehaved by not returning a complete set of HTTP headers" error when I click on Login link i.e. login.php

Thanks.

Jafo
01-21-2008, 01:18 PM
Your PHP install has warnings turned on by default, even when the PHP documentation says to leave it off on production servers.

PHP can throw warnings on perfectly fine code. In your php.ini file, sounds like this setting:

error_reporting

Is wrong. At the worst, it should be set to:

error_reporting = E_ERROR

But it sounds like it is set for:

error_reporting = E_ERROR|E_WARNING

I have a feeling this is what is causing the 500 error (darn windows servers)..

I believe, even on windows, after the changes are made to the php.ini, Apache, or whatever you are using for a webserver, needs to be restarted.

linuxuser
01-21-2008, 01:30 PM
hmmmm.... will see how I can convince the host to make the changes and restart their server for me. I will keep you posted.

Thanks as always

Jafo
01-21-2008, 01:35 PM
You can always point them to this text in the php.ini file:

Print out errors (as a part of the output). For production web sites,
; you're strongly encouraged to turn this feature off, and use error logging
; instead (see below). Keeping display_errors enabled on a production web site
; may reveal security information to end users, such as file paths on your Web
; server, your database schema or other information.

eduran582
02-22-2008, 12:50 PM
I bought the AlumniPro2 software, installed it according to instructions (at first using the ISP's default PHP4) and I'm getting an error after the installation finishes when I try to go to the program:

Parse error: parse error, unexpected T_STRING, expecting
T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in
/home/content/a/c/s/acsodsa/html/_IHSR/alumni/includes/auth.php on
line 306

I read the above thread related to this error but I get the same error even after setting up a new mySQL db, re-installing and using PHP5 (into yet another directory on the same Linux server), and running the setup (which finishes fine.)

Please advise.

Jafo
02-22-2008, 01:47 PM
Are you running PHP 4 or PHP 5?

eduran582
02-22-2008, 06:27 PM
You might have missed it in my post but the first time it was PHP 4 and I got the error and when I read the thread, I remember a mention of using PHP 5, which my ISP also has. My last paragraph states I then re-installed the program in a new directory with a new PHP 5 db (deleted the php 4 installation).

Same error.

Jafo
02-22-2008, 09:01 PM
Your message is confusing. PHP 5 DB? PHP is not a DB. I assumed you meant MySQL 5 DB?

Open a text editor and create a new file with this code:


<?php

phpinfo();

?>


Name it test.php and execute it in the same directory you have index.php in and tell me what version it reports to you.

eduran582
02-24-2008, 06:17 PM
The PHP version reported is: PHP Version 4.3.11

:o My mistake in syntax. It is mySQL version 5.0.18 that I changed to from 4.1.

Jafo
02-25-2008, 10:07 AM
Does your server have php 5? You can test this on some servers by renaming the test file in the previous post to test.php5 and see if it reports a different version.

eduran582
02-25-2008, 12:17 PM
Yes, I believe so. When I renamed the file to test.php5 is reported back:
"PHP Version 5.1.4"

Jafo
02-25-2008, 01:09 PM
Ok, you probably want to use php 5 in that directory. If using Apache (mosts hosts do) you can probably set this in the htaccess file in the alumni directory:


AddHandler x-httpd-php5 .php


But this may be different depending on your host. If this doesn't work, your host should be able to point you in the right direction pretty quick on how to set default php 5 per directory via htaccess...

eduran582
02-25-2008, 01:53 PM
Ok. I added the line you gave me to the .htaccess_example file that's in the alumni directory and I still get the same error.

I'll contact the ISP and see how I should get this program to work based on your direction.

If I can get a resolution with the ISP, how about changing all the .php to .php5 or would that make any difference?

Thanks and I'll advise.

eduran582
02-26-2008, 09:11 PM
Update:
I upgraded the hosting account to PHP 5 (simple select from PHP 4 to 5 in the "control panel"). However, there was a warning that it may cause existing php installations to quit working; one of which I have running the site that is a php database. Nevertheless, I proceeded and true to the warning, it screwed up the existing (db app) php installation.

However, when I checked the alumni pro program, it seemed to display properly (first time) which indicated to me that it was working properly.

I changed the php installation back to 4.1 for the sake of the existing php application that is in use.

I believe my only recourse at this time is to install alumni pro2 on another domain (hosting account) with php 5 installed and simply link from the existing site to it in order for the users to use this feature.

Thanks for your help but at this time it seems alumni pro2 cannot exist in the same environment as other php applications that use php 4.

Jafo
02-26-2008, 11:25 PM
If you set it with the .htacess file, you can run PHP5 in only the directories you wish (as I described above).

eduran582
02-27-2008, 01:38 AM
The first time I tried that, it gave an error. Then I noticed you said "the .htaccess file" and the file in the installation is labeled ".htaccess_sample"

Forgot to take off the _sample. Seems to work ok now.

Thanks for the help.

Jafo
02-27-2008, 01:45 AM
Glad it is working!

eduran582
02-27-2008, 01:53 AM
I may have spoken too soon. I get an error when going to the "contact us" page. Please go to this link and tell me if you get two "warnings" at the top:

Irvington High Reunions Alumni Pro (http://www.irvingtonhighreunions.org/alumni/contact_us.php)

Jafo
02-27-2008, 01:55 AM
open init.php and find this line:

error_reporting(E_ALL & ~E_NOTICE);

Change to:

error_reporting(0);

eduran582
02-27-2008, 02:07 AM
Changed as indicated in the init.php file in the /alumni/ directory. Now only one "warning". Please click the link above again to see.

Jafo
02-27-2008, 02:31 AM
Kind of stupid that it still throws warnings when you tell it not to, but ok, around line 70 of contact_us.php you will see:


Set_Mail(&$mail);

Change to:

Set_Mail($mail);

eduran582
02-27-2008, 02:40 AM
Ok. That did the trick! I'll continue testing before allowing the users access to it and advise if I come across any other warnings or errors.

Thanks for the quick response and fine support!

eduran582
02-27-2008, 11:47 AM
Jafo,

Another warning pops up at the top when you go to the "Register" page:
Irvington High Reunions Alumni Pro (http://www.irvingtonhighreunions.org/alumni/register.php)

Please advise.
TIA

Jafo
02-27-2008, 02:41 PM
Same "fix" on the register.php file..

eduran582
02-27-2008, 11:44 PM
Thanks! FYI, same thing happened in the "show_alumni.php" and the "forgotpass.php" file and the same fix worked on both.

Jafo
02-27-2008, 11:46 PM
This really isn't an error and your server should not be throwing it as one. It is a setting in the php.ini file, but that is probably out of your control.

Let me know if there are any more issues.

mtomo
04-12-2008, 09:22 AM
I had a similar issue. My host recommended:
To use php5

1) Give file name extension php5 to php files

2) Use following code in your .htaccess file

AddHandler application/x-httpd-php5 .php .php4 .php3 .phtml .html

Use any one of the above 2 methods

Confirm the server supports php5