pChart - running scripts as www-data doesn't work - php

So I'm having trouble running PHP scripts for pChart. Running them as the user who created them works fine, but if I sudo to www-data, I get these errors:
PHP Deprecated: Comments starting with '#' are deprecated in /etc/php5/cli/conf.d
/mcrypt.ini on line 1 in Unknown on line 0
PHP Warning: include(/usr/lib/pchart/class/pDraw.class.php): failed to open stream: Permission denied in /usr/share/phpmyadmin/test.php on line 4
PHP Warning: include(): Failed opening '/usr/lib/pchart/class/pDraw.class.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /usr/share/phpmyadmin/test.php on line 4
PHP Warning: include(/usr/lib/pchart/class/pImage.class.php): failed to open stream: Permission denied in /usr/share/phpmyadmin/test.php on line 5
PHP Warning: include(): Failed opening '/usr/lib/pchart/class/pImage.class.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /usr/share/phpmyadmin/test.php on line 5
PHP Warning: include(/usr/lib/pchart/class/pData.class.php): failed to open stream: Permission denied in /usr/share/phpmyadmin/test.php on line 6
PHP Warning: include(): Failed opening '/usr/lib/pchart/class/pData.class.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /usr/share/phpmyadmin/test.php on line 6
PHP Fatal error: Class 'pData' not found in /usr/share/phpmyadmin/test.php on line 10
Does anyone have any idea what permissions or groups I'd need to change to get this working? I've tried changing everything mentioned in the output above to 777 but it's still happening.

Ok, it was permissions, though it's not clear which ones yet. It started working when I changed the pChart2.1.3 folder permissions to 777. Now I can tidy up.

Related

Laravel not working in terminal

I had laravel all set up on my computer and everything was working great, then they released version 5.5 and things didn't work for me anymore. When I type laravel in my terminal I get:
PHP Warning: require(/Users/logan/.composer/vendor/composer/../guzzlehttp/psr7/src/functions_include.php): failed to open stream: No such file or directory in /Users/logan/.composer/vendor/composer/autoload_real.php on line 66
Warning: require(/Users/logan/.composer/vendor/composer/../guzzlehttp/psr7/src/functions_include.php): failed to open stream: No such file or directory in /Users/logan/.composer/vendor/composer/autoload_real.php on line 66
PHP Fatal error: require(): Failed opening required '/Users/logan/.composer/vendor/composer/../guzzlehttp/psr7/src/functions_include.php' (include_path='.:') in /Users/logan/.composer/vendor/composer/autoload_real.php on line 66

Errors occurred during magento installation

I'm trying to install magento 1.x on my centos machine. After dowloading and extracting magento i faced this errrors
Warning: include_once(Mage/Core/functions.php): failed to open stream: No such file or directory in /home/xxxx/app/Mage.php on line 50
Warning: include_once(): Failed opening 'Mage/Core/functions.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php:/home/username/php') in /home/xxxx/app/Mage.php on line 50
Warning: include_once(Varien/Autoload.php): failed to open stream: No such file or directory in /home/xxxx/app/Mage.php on line 51
Warning: include_once(): Failed opening 'Varien/Autoload.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php:/home/username/php') in /home/xxxx/app/Mage.php on line 51
Fatal error: Class 'Varien_Autoload' not found in /xxxx/app/Mage.php on line 54
I tried to run php shell/compiler.php compile the the errors disappeared and the installation page appeared but without any next or back buttons.
How can i fix this issue?
Make sure on the new server , you have permissions to open and rewrite files. some mangento extensions require full permissions before installations.

Magento URl error with PHP

I installed fresh magento 1.9.2.2. While installing and after it instaled, whenever i try my domain url the same error have been coming like shown below.
Warning: include_once(Mage/Core/functions.php): failed to open stream: No such file or directory in /home/website/public_html/app/Mage.php on line 50
Warning: include_once(): Failed opening 'Mage/Core/functions.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php:/home/website/php') in /home/website/public_html/app/Mage.php on line 50
Warning: include_once(Varien/Autoload.php): failed to open stream: No such file or directory in /home/website/public_html/app/Mage.php on line 51
Warning: include_once(): Failed opening 'Varien/Autoload.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php:/home/website/php') in /home/website/public_html/app/Mage.php on line 51
Fatal error: Class 'Varien_Autoload' not found in /home/website/public_html/app/Mage.php on line 54
So I used
http://xxx.xxx.xxx.xxx [my ip address]/~website/
then in installtion I changed my path to my domain name. Its not working.
Anyone know any solution. Please help me.
I think that your problem caused by the .htaccess file. Try to rename it to test this idea or check rewrite/redirect rules.

Cron Job failed to open stream: No such file or directory

INCLUDE './config/databases.php';
require './vendor/phpmailer/phpmailer/PHPMailerAutoload.php';
When i execute this script from browser i get no warning / issues .
but when i put same script for Cron job
Warning: include(./config/databases.php): failed to open stream: No such file or directory in /home/webdir/public_html/corn_mail.php on line 2
Warning: include(): Failed opening './config/databases.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/webdir/public_html/corn_mail.php on line 2
Warning: require(./vendor/phpmailer/phpmailer/PHPMailerAutoload.php): failed to open stream: No such file or directory in /home/webdir/public_html/corn_mail.php on line 3
Fatal error: require(): Failed opening required './vendor/phpmailer/phpmailer/PHPMailerAutoload.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/webdir/public_html/corn_mail.php on line 3
also tried to change from ./config/databases.php to /home/webdir/public_html/config/databases.php Still the same.
any suggestions ?
Try with removing the ./ - config/databases.php and if the vendor is in same folder then vendor/phpmailer/phpmailer/PHPMailerAutoload.php. No need of ./.

Magento blank page

[20-Feb-2015 17:45:02 Europe/Berlin] PHP Fatal error: Class 'Varien_Autoload' not found in /home/vzvutpbd/public_html/app/Mage.php on line 53
[20-Feb-2015 17:46:32 Europe/Berlin] PHP Warning: include_once(Mage/Core/functions.php): failed to open stream: No such file or directory in /home/vzvutpbd/public_html/app/Mage.php on line 49
[20-Feb-2015 17:46:32 Europe/Berlin] PHP Warning: include_once(): Failed opening 'Mage/Core/functions.php' for inclusion (include_path='.:/usr/php4/lib/php:/usr/local/php4/lib/php:/usr/lib/php:/usr/local/lib/php:/home/vzvutpbd/php') in /home/vzvutpbd/public_html/app/Mage.php on line 49
Ensure that all files listed are there & have appropriate read permissions.
Magento - Wiki - Resetting File Permissions
This should resolve your issues, granted the files are indeed there.

Categories