Category Archive: php

Mar 29

PHP Parse error: syntax error, unexpected T_STRING

If you see error PHP Parse error: syntax error, unexpected T_STRING on accessing your site. This error is commonly caused because you have not have short_open_tag set in php.ini. Enabling this will solve your problem. 1) If you have a Suexec/suphp enabled on server server , then you can create php.ini file under document root …

Continue reading »

Mar 29

PHP fatal error: session_start()

For some reason for a PHP script if you get such error: Fatal error: session_start() Or Warning: session_start() [function.session-start] Check session.save_path in your configuration file and check the path if you have correctly set. Generally session file are saved to server /tmp directory. If your server is not suexec and suphp then you can add …

Continue reading »

Mar 29

Warning: include() [function.include]: URL file-access is disabled

I see the warning message while access my .php file. Warning: include() [function.include]: URL file-access is disabled On investigating I found allow_url_fopen and allow_url_include were disable. To check the status you can create a phpinfo file to check you php configuration. Following is the code for phpinfo. <? phpinfo(); ?> Now access the file in …

Continue reading »

Mar 29

How to change date and time zone in php

If your php script is not showing correct date and time then it means your script is using date and time zone configured on your server. If you want to set your own date and time zone for your domain then it can be done in a very simple manner. You will need to create …

Continue reading »