Gocart codeigniter Installation issues - php

I have a problem with installing go cart on Linux live server cpanel
When i install go cart on Linux server the empty page occurred and nothing happens
Please can someone help me?

Turn on error reporting in php.ini.
In ubuntu php.ini is here: /etc/php5/apache2/php.ini
Try to search lines like this
; error_reporting
error_reporting = XXXXXXXXX
and replace to :
error_reporting = E_ALL & E_NOTICE & E_STRICT
See also http://pl1.php.net/function.error_reporting
#edit
You can also add following code to script:
<?php
error_reporting(E_ALL);
ini_set('display_errors', 1);

This might be because you don't have the php_intl extension enabled on your server, which gocart requires (from version 2.3 I believe). Without error reporting on, all you will get is a white screen.
If you have access to your php.ini file, make sure this line is uncommented;
extension=php_intl.dll
If you don't have access to the php.ini file, then you will need to ask your hosts if they can enable this for you.

Related

Can't seem to turn off deprecated errors in php

Im on a development server using a version of php that doesn't support mysql_connect() our production server does. I have tried: error_reporting = E_ALL ^ E_DEPRECATED but it doesn't work. After restarting Apache I still the deprecated error message.
I have access to the ini file I should not need php functions to change the error reporting. this is also for wordpress.
error_reporting() is a function. Try: error_reporting(E_ALL ^ E_DEPRECATED ^ E_USER_DEPRECATED);. Or ini_set("error_reporting", E_ALL & ~E_DEPRECATED);. Then test the settings with echo ini_get("error_reporting");. Minimal PHP version must be 5.3.0 for that.
Try replacing your mysql_connect() with mysqli_connect()
Are you sure that you've modified the correct php.ini? Often there are several included with an install. Is this happening on your local development machine, or on a live server? The best way to make sure you've modified the right php.ini is to run a phpinfo file.
Create a new file, name it phpinfo.php and write:
<?php echo phpinfo(); ?>
Run this script in your browser and go down to the line that says "Loaded Configuration File"
This used to cause me headaches when using a WAMP install.
WordPress sets the error_reporting to E_ALL in its config files, thus overriding whatever you've set in php.ini. I beleieve setting error_reporting(E_ALL ^ E_DEPRECATED) in wp-config.php clears it up. See Turn off deprecated errors php 5.3 for various and sundry variations on that setting.
setting: define('WP_DEBUG', false); to false fixed the issue.

Why does $some_array['an-undefined-key'] throw an error on Mac but not Wamp?

For some reason my Mac is displaying the error message "Undefined index: an-undefined-key" whereas on Windows with WAMP it gracefully ignores the exception.
Example of usage:
if ($some_array['an-undefined-key']) {
// ...
}
Is there a PHP configuration which changes this behaviour?
I realise that I can do the following, but I would rather use the above technique if possible:
if (isset($some_array['an-undefined-key']) && $some_array['an-undefined-key']) {
// ...
}
Yes, you need to adjust the error_reporting and display_errors settings which sounds like they are different between your two different environments.
Here are links
error_reporting
PHP ini_set - look at first example for display_errors
The difference between the PHP on your Mac using the installed repo and your WAMP server is the php.ini, try editing your script and append the following lines to the top:
ini_set('display_errors', '1');
error_reporting(E_ALL);
This should be on your scripts. If this is not the problem, then please comment back and I will change accordingly.
You should not add unnecessary line to your script as you will have to change them when you go live.
Edit you php.ini ( using the wampmanager menus so you get the correct file )
left click wampmanager -> PHP -> php.ini
Look for these parameters and change to these values
error_reporting = E_ALL
This one makes error show on the web page
display_errors = On
error_log = "c:/wamp/logs/php_error.log"
this one will make the errors log into the file specified by error_log even if they dont show on the screen
log_errors = On
WAMP comes with XDEBUG configured so you should now see big orange errors in the web page
Check the bottom of the php.ini file for this line. Numbers for versions may differ on your system
; XDEBUG Extension
zend_extension = "c:/wamp/bin/php/php5.X.Y/zend_ext/php_xdebug-2.2.0-5.3-vc9.dll"

PHP errors make page inaccessible

Every time I have an error within my code and try to run it, the page becomes inaccessible. This is clearly very frustrating as it's hard debugging code with no feedback.
Relevant information from cPanel:
Apache version 2.2.22
PHP version 5.3.14
MySQL version 5.1.68-cll
Architecture x86_64
Operating system linux
If more information is required then please ask, I'm sorry I cannot provide any more information but frankly I am stumped.
Thanks.
Enable error reporting to see what error PHP had, if it had one.
There are several places you can look, firstly try checking your Apache error log. In many cases this is located in /var/log/apache2/error.log . Another way to debug a page like this is to enable error logging.
The simplest way of doing this being adding these lines to your php file:
ini_set('display_errors',1);
error_reporting(E_ALL);
In addition to this, you can also clean up the errors formatting by adding:
ini_set('html_errors', 'On');
In addition to this method of enabling error reporting, you may also enable them from you configuration file by adding the following line:
error_reporting = E_ALL
You need to update your php.ini to display errors. There are a couple settings.
Search your php.ini for display_errors and error_reporting. The file is usually commented very well on the options for error reporting, but error_reporting = E_ALL is a typical setting. Sometimes people want to suppress notices and set error_reporting to E_ALL & ~E_NOTICE.
display_errors = On is the config to print the errors to the screen.
After changing your php.ini, Apache usually needs to be restarted. I'm not sure how much control you have over your server, so if you can't restart Apache but you have a php.ini available, your host probably has it configured so you don't need to restart.

Error logging with WAMP server in PHP

I have a WAMP 2.2 server running on a Windows 7 box and cannot get PHP error logging working at all.
The file is always blank even after I explicitly trigger USER_ERROR errors, or cause normal ERROR errors.
I'm including the error relevant sections of the php.ini file - hopefully you can find something:
error_reporting = E_ALL
error_log = "c:/wamp32/logs/php_error.log" ;(UNCOMMENTED BY ME)
log_errors = On
display_errors = On
The line ; log_errors is just a comment for the following block, for the purpose of showing you what the settings are in dev vs production. You uncommented four lines which aren't meant to control anything, and I'm surprised your Apache service doesn't have problems starting up because of it.
What you need to do is look for the line:
log_errors = Off
And change the value to On
That said, once you restart the Apache service, the settings should take effect. However, I was unable to get WampServer to properly log php errors despite these settings. Apache will not start up when I specify the error_log parameter.
For me it turned out to be a permissions error. I ended up giving EVERYONE full control of the error log file and it seemed to fix my issue. Best of luck.
Did you try adding these lines to your php file?
ini_set("display_errors", "1");
ini_set("log_errors", "1");
ini_set("error_log", "/wamp64/logs/php_error.log");

"Internal server error" caused by a PHP error (XAMPP on Mac OS)

Any error in PHP scripts causes "Internal server error". I used to work for a long time with my current project and it worked fine but I had to upgrade XAMPP package and thus PHP and apache too. Now when there is an error somewhere I can only see "Internal server error" while in the error.log there is a normal error message. I checked php.ini and saw that "display_errors = On" + "log_errors = Off". There no any problems with file permissions nor anything that could override the settings within the project. I'm pretty sure because I worked on this project before the upgrade and everything was fine. Plus if there are no errors in the scripts everything also works.
Please help! Working like this is pain... :(
Try the following:
Make sure that you're editing the right php.ini
Uncomment a line like error_reporting = E_ALL & ~E_NOTICE
Be sure that there aren't any other error_reporting lines uncommented
Be sure that display_errors = On and there are no other lines overwriting the value
Restart XAMPP

Categories