- 1 Common Error Messages
- 1.1 Why do I get a blank page?
- 1.2 Fatal error: Allowed memory size of 33554432 bytes exhausted
- 1.3 Warning: Cannot modify header information - headers already sent
- 1.4 Warning: session_start() [function.session-start]: open(/tmp\sess_2056cb1c9e9ebe4bee597b943e7bda56, O_RDWR) failed
- 1.5 Notice: Undefined variable _SERVER
- 1.6 SQL Injection warning when adding or editing notes?
- 1.7 Warning: mail() [function.mail]: SMTP server response: 501
- 1.8 ERROR 8: unserialize()
- 1.9 Lost password to PhpGedView
- 1.10 403 Error - Access Denied
Common Error Messages
Why do I get a blank page?
If you have copied the PhpGedView files to your website and all you get is a blank page when trying to access PhpGedView in your browser, then this probably means that PHP is not installed on your website.
PhpGedView is written using the PHP programming language and in order for it to run, your website must support PHP. See the PHP section of this page for information about how to find out if you can use PHP files on your website.
Fatal error: Allowed memory size of 33554432 bytes exhausted
Your PHP process has run out of memory. 33554432 bytes is 32MB, which is the default value on new installations of PhpGedView. You can increase this value in your site configuration settings, which you can access from the site administration page. If you are unable to access this page, you can edit the config.php file directly. Typical values are;
- 32MB - small gedcoms
- 64MB - medium gedcoms
- 128MB - large gedcoms
- 256MB - very large gedcoms
Note that many servers restrict the amount of memory available to PHP. Either they impose a maximum value that applications can request, or they prevent you from changing the default value. If this happens, you will need to contact your host to ask for an increase.
Warning: Cannot modify header information - headers already sent
This error is usually the result of other errors on the page beginning before output is printed to the page. Look for other errors that appear first on the page and try to fix them first. If you get the other errors fixed, this error will disappear.
The most common types of errors that will cause this warning are BOM characters in the language files, file permissions errors, or session configuration errors. The BOM (Byte Order Mark) in the language files can be checked from the Edit Languages page. Refer to the other sections of this FAQ for details on dealing with the different types of errors.
Warning: session_start() [function.session-start]: open(/tmp\sess_2056cb1c9e9ebe4bee597b943e7bda56, O_RDWR) failed
This means that PHP could not write the new session data to a file for storage between requests. There could be many things that are causing this, but they are all unrelated to PhpGedView.
The first thing to check is that the /tmp directory or the C:\PHP\sessiondata directory have write permissions for PHP. The next thing to check is that the session.save_path parameter of the php.ini file (/etc/php.ini or C:\WINDOWS\php.ini) is pointing to the correct location.
These settings likely have to be changed by the server administrator, if that is not you then it could take a while for them to answer your request. PhpGedView has a configuration parameter that will allow you to change the session.save_path paramter just for PhpGedView scripts. To set this, go to editconfig.php and set the Session Save Path to "./index" or any other directory where you have given PHP write permissions.
Notice: Undefined variable _SERVER
This means that you are running PhpGedView on an unsupported version of PHP. PhpGedView requires PHP version 4.3.0 or later. To fix this, you should first contact your web host and ask them to upgrade to a newer version of PHP.
If for some reason, your host won't upgrade their installation of PHP, you will have to replace all instances of $_SERVER with $HTTP_SERVER_VARS in the PhpGedView code in order to fix this error.
SQL Injection warning when adding or editing notes?
SQL injection is a common technique used by hackers which gives them control of the database. PhpGedView protects you from this attack, but sometimes this message can occur if PhpGedView misinterprets some of the text coming in as an SQL command.
To solve the problem, try to look for words like INSERT, DELETE, UPDATE, DROP, and TABLE and choose alternate words or rearrange thier order. The Error message should give you some clues as to what text triggered the warning.
Warning: mail() [function.mail]: SMTP server response: 501
This warning probably means that your email SMTP server does not support email addresses in the form Full Name <email@address>. This error is most common on Windows based SMTP servers.
If possible, you should consult the documentation for your SMTP server to see if you can change these settings. You may also configure PhpGedView to only use the email address instead of including the full name by following these steps:
- Login and a site administrator
- Go to the Admin page
- Click on Configuration
- Set the Use simple mailheaders in external mails to "yes"
- Click the "Save Configuration" button.
ERROR 8: unserialize()
You are getting something similar to this (in PHPGEDVIEW 4.0 Beta 6):
ERROR 8: unserialize(): Error at offset 97 of 2658 bytes 0 Error occurred on in function unserialize 1 called from line 2586 of file functions_db.php in function get_event_list 2 called from line 49 of file todays_events.php in function print_todays_events 3 called from line 1 of file index.php(277) : eval()'d code in function eval 4 called from line 277 of file index.php
I think that this occurs when you simply copy the installation of PHPGedView from one server / domain to another. (Of course you copy the contents of the database as well) You might simply prevent this error when you do the following:
- Backup your old settings in "MyGedView Portal" under "Site administration" choose "Backup".
- Reinstall PHPGedView on the new server
- Before you run it: upload the contents of the backup file to the new servers directories. - Make sure you have correct settings in config.php.
This way switching the server worked just fine for me.
In my case this error appeared during normal operation. After investigation we found that this is probably a problem with PHP. An entry in the user table which should have been 9 Bytes was only 7 Bytes. It was manually corrected and the warnings disappeared.
Lost password to PhpGedView
If you loose your admin passsword and can not log in. You would receive the "Unable to authenticate user" error message."
Open a text editor and write:
<?php echo (crypt('mypassword')); ?>
Exchange the mypassword to your own password.
- For Windows users
Save the file as: C:\pgvpass.php, or what ever name you choose. Open your Command prompt and type:
C:\php\php -f C:\pgvpass.php
The C:\php\ would be the PHP installation folder.
- For UNIX/Linux users:
Save the file as /home/user/pgvpass.php, or what ever name you choose. Open your terminal and type:
php -f /home/user/pgvpass.php
The -f is the option to the php program to run a file, like pgvpass.php. Copy and past the returned crypted password into your database and log in to PhpGedView.
If you are using MySQL you can use the Command prompt or terminal to do this. Type:
mysql -u root -p your_phpgedview_databasename
Make sure that you are in the right database! Ones you are logged in to MySQL, type:
UPDATE `pgv_users` SET `u_password` = 'YOUR_CRYPTED_PASSWORD' WHERE CONVERT( `u_username` USING utf8 ) = 'YOUR_USERNAME' LIMIT 1 ;
403 Error - Access Denied
If you get this error, check the URL line. If the last parameter on the line is "command=xxx" where xxx is the command to be executed (e.g. ged, user, etc), you may be running into an Apache security module setting.
Check to see if you are running on Apache. If so, the ISP may have mod_security running. Mod_security does not like the "command=xxx" parameter to be anywhere on the URL line except as the very first parameter on the URL list.
If you are running into this, the fix is pretty straight forward.
Build a .htaccess file in your application directory with the following entries:
<IfModule mod_security.c> SecFilterEngine Off </IfModule>