Frequently Asked Questions: script questions: flinx troubles
Below are all the frequently asked questions added to the site. Please read through them before asking a question in the forums!
Latest
-
1
MySQL Numrows error when combining scripts?
I have Flinx installed along with another script and it was working fine up until I set up the other script - now I keep getting an error that looks like this: Warning: mysql_numrows(): supplied argument is not a valid MySQL result resource in /home/you/public_html/folder/category.php on line #. What’s wrong?
You need to edit the scripts to use an absolute path for their config.php. As both scripts are looking for a file with the same name (config.php), it can cause errors.
To fix this, open up the pages that are causing the errors, eg. category.php. You will see this line near the top:
include("config.php");All you need to do is to change the part inside the quotes to the absolute path to config.php. This is usually in the form /home/username/public_html/folder/config.php. If you don’t know your absolute path, ask your host or check the forums.
July 28, 2005 |
By Amelie |
Filed under FAQ, Flinx: Troubles, Scripts
-
2
I get the following error when going to any of the .php pages: “Unable to select database.”
This means there is a problem with your database connection. Open up config.php and carefully re-check your database information. Make sure you have put in the right MySQL username, database name and password, and that you have added the MySQL user to the MySQL database with all permissions. If you are unsure about what your username, etc are, check your domain control panel. In cPanel, there will be a section for MySQL, that will list your MySQL usernames and database names. If you still can’t figure it out, please contact your host and ask them.
If the script used to work just fine, and it suddenly started giving this error without you touching any databases, it means there’s something wrong on your server. The SQL server could be temporarily down. If this problem does not go away, you should contact your host to ask them about this.
May 21, 2004 |
By Sasha |
Filed under FAQ, Flinx: Troubles, PHPCalendar, PHPCurrently, PHPFanBase: Troubles, PHPQuotes, Scripts
-
3
I get an error similar to this when I run create.php: “You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use.”
You most likely used a number as your table name. MySQL table names cannot consist of only numbers and cannot begin with numbers, so try adding a letter to it in config.php, and then run create.php again.
It’s also possible that you used a MySQL reserved word as the table name. This is not allowed either. A list of reserved words can be found here (scroll down).
May 21, 2004 |
By Sasha |
Filed under FA-PHPHosting: Troubles, FAQ, Flinx: Troubles, PHPCalendar, PHPCurrently, PHPFanBase: Troubles, PHPQuotes, Scripts
-
4
I keep getting the following error: “Warning: Cannot add header information - headers already sent…”!
This is usually caused by either your header.inc file or your config.php file. Try deleting all white lines (spaces, blank lines, etc.) and HTML code from header.inc. In config.php, make sure there are no white lines, spaces or HTML code before and after the opening <? and ?>. If that doesn’t work, try uploading the original, unedited config.php (with your MySQL information in it though!), header.inc and footer.inc that came with the script. If that doesn’t work either, post a message at the Forums. We’ll try to help you solve this as best as we can.
May 21, 2004 |
By Sasha |
Filed under FA-PHPHosting: Troubles, FAQ, Flinx: Troubles, PHPCalendar, PHPCurrently, PHPFanBase: Troubles, PHPQuotes, Scripts
-
5
Every time I log in, it takes me back to the login page. I know my username and password are correct, and I don’t get an error.
The most common cause of this problem is the scripts’ reliance on a PHP setting called “register_globals”. This setting is turned off by default in new versions of PHP, but at the time when most of CodeGrrl’s scripts were written, it was on.
This problem will affect you if register_globals is turned OFF on your server and if you are using any of the following scripts:
PHPCalendar, PHPClique, PHPCurrently, PHPFanBase, PHPQuotes, simpbook, Flinx and Flinx Collective.
You can do one of two things to fix this issue:
Either:
-
Use .htaccess/php.ini to turn register_globals back on. Add the following line to your .htaccess file:
php_flag register_globals on
If modifying .htaccess causes an internal server error, your host does not allow you to change these settings. Instead, you should paste this code into another blank file which you should call php.ini. This file goes into your root folder (usually called public_html):
register_globals = On
-
OR: Add the following code to config.php, placing it below the opening <?:
extract($_SERVER, EXTR_SKIP); extract($_COOKIE, EXTR_SKIP); extract($_POST, EXTR_SKIP); extract($_GET, EXTR_SKIP);
Note that this will only fix one script at a time. You will need to modify config.php for each one that is causing problems.
How do I check if register_globals is off on my server?
Add the following to a blank file, and save it as anything with a .php extension:
<?php phpinfo(); ?>
Upload it, then run it in your browser. You will get a long list of PHP settings and details. Press CTRL + F (on Windows) to find “register_globals” - you should see two columns to the right of it detailing whether the setting is on or off. If, under the FIRST column, it says “Off”, register_globals is off on your server.
If the above does NOT fix the problem, or register_globals is on on your server, there may be something to do with your computer or browser that is causing the login to fail.
Try the following solutions:
- Check that your computer’s date is set correctly. If it’s set in the future, you may have problems staying logged in.
- Delete all your Temporary Internet Files, including your cookies, clear out your cache and make sure cookies are enabled in your browser. Then reboot and try logging in again. This will solve it if it’s a cookie problem, like your browser not accepting them, or duplicate cookies being stored.
- Make sure that any ad-blocking software you have installed is allowing cookies from your domain. If it’s blocking them, you will be unable to login.
May 21, 2004 |
By Sasha |
Filed under FA-PHPHosting: Troubles, FAQ, Flinx: Troubles, PHPCalendar, PHPCurrently, PHPFanBase: Troubles, PHPQuotes, Scripts
-