Frequently Asked Questions: page: 18
Page 18 of 21 · <1 ... 17 18 19 ... 21 >
-
1
I’m using the include format “layout.php?x=file.html”, but someone told me that there could be a security problem with this. Is there?
In fact, yes, there are several possible security risks with this. Anyone could write a PHP script with malicious code and include it in your page, because it is your server that parses and runs that include. And even if no files from remote servers can be included, if the open_basedir setting isn’t correctly configured this could mean that someone can abuse this function to include and therefore view any of the server’s configuration files. Even if PHP has only access to folders beneath your web directory, if you have any configuration files containing passwords stored there that are not enclosed in php tags (for example config files for a Perl script), someone who knows the location of these files could include and thus view them.
Therefore it is usually better to do it the other way round and make a php page for every content page and “wrap” it in the layout with header and footer includes. It’s more secure, and better to crawl for search engines since some of them won’t index pages with the same filename and different parameters.
For more information on this, please read this forum thread.
-
2
How do I access phpMyAdmin?
That depends on your host and control panel.
If you have cPanel, click on the MySQL Databases icon and scroll all the way to the bottom. The phpMyAdmin link is at the bottom. Some versions of cPanel will link phpMyAdmin on the front page, so have a look there first.
If you’re using Ensim, click in MySQL > MySQL Admin. That’ll lead you to a page with a link to MySQL Administration Tool. Click on it, and you’re in phpMyAdmin.
If you’re hosted by Dreamhost, just enter your database’s hostname into your browser, it will take you straight to phpMyAdmin.If you can’t find phpMyAdmin on your server, send your host an email and ask them about it.
-
3
Can I include two of the calendar files (such as calendar.php and calendar_year.php) on the same page?
Sorry, but no. You will get an error like this:
Fatal error: Cannot redeclare class date_calc in /home/user/public_html/calendar/calc.php on line 31
This happens because calendar.php defines the date_calc function relating it to the month, since it’s just a month calendar. The other two files (calendar_year.php and calendar_bdays.php) define the date_calc function relating it to the year. So, when you try to include them to the same page, the second file you include won’t work.
May 21, 2004 |
By Louise |
Filed under FAQ, PHPCalendar, Scripts
-
4
When I include the file, I get this error: “Warning: Failed opening ‘config.php’ for inclusion (include_path=”)…” What’s wrong?
It means the script can?¢‚Ǩ‚Ñ¢t find the config file. Try to include the full path to the config file. So, instead of
include 'config.php';
you would have
include '/path/to/folder/config.php';
For PHPCurrently, you would have to edit the second line of current.php. For PHPCalendar, it?¢‚Ǩ‚Ñ¢s the fourth line on calendar.php, calendar_bdays.php and calendar_year.php, and/or the second line of list.php, list_bday.php and list_year.
May 21, 2004 |
By Sasha |
Filed under FAQ, PHPCalendar, PHPCurrently, Scripts
-
5
Can I use PHPFanBase without a MySQL database?
Sorry, but no. The script needs the database to store the members in, and at the moment, there is no version available that will work without a database. You may however be interested in BellaBuffs which does not require a database.
May 21, 2004 |
By Sasha |
Filed under FAQ, PHPFanBase: Installation, Scripts