I've just installed the magento and when I tried to add new product from admin,But now product form is not being displaying. I can see the page like this
what should I do? Please, I searched through Google, but, couldn't find any appropriate answer.
Have you already tried to clear cache and cookies? also some times you have to do it on the shell on /path/to/my/magento/folder/var/cache just run "rm -fr *".
If that doesn't work you can check you files ownership and permissions (the http service has to have the write write permissions an ownership on the files and folder - http://www.magentocommerce.com/wiki/groups/227/resetting_file_permissions).
Hope that works for you.
You could try enabling display_errors in index.php i.e.
ini_set('display_errors', 1);
Also you could enable logs in your backend, and check for errors in system.log and exception.log
As Magneto's back end makes heavy use of prototype.js, check your console for errors .
Related
I have a ZF3 project with a controller which opens excel-files and compares them with an template which will be openened, too.
On my development notebook (xampp) everything works fine, at my production system (ubuntu) the phpspreadsheet causes errors (I think it is the one).
here a snippet from my code:
$fileName="./public/files/" . $fileName; //.\ neu
echo $fileName;
$template= new Spreadsheet();
$importdcl= new Spreadsheet();
$template= \PhpOffice\PhpSpreadsheet\IOFactory::load('./public/files/Template_DCL_final.xlsx');
$importdcl= \PhpOffice\PhpSpreadsheet\IOFactory::load( $fileName);
echo "filename geladen";
I already have the folders in non relative paths because basePath() doesn't work, it won't give any result.
The echo statement is just because the server log won't give any errors. On my development system I get the echo text on my production system the error seems to be at the load statements.
First question: How could I use relative paths in here?
Second question: How can I get an idea wether is something wrong with the spreadsheet class?
This is what composer loaded:
"phpoffice/phpspreadsheet" : "dev-develop",
Is it a problem, because it has this dev version? At this point I'm quite confused because I played with the pathes of the files, I changed the rights manually in the folder, I checked server logs and now I don't have any idea left.
Here the rights in the folder:
Any helpful suggestions appreciated.
Answer (hopefully) to the first question: if your application is based on ZendSkeletonApplication, then you can use paths relative to your application root (from index.php):
/**
* This makes our life easier when dealing with paths. Everything is relative
* to the application root now.
*/
chdir(dirname(__DIR__));
So if your data files are located in <application root>/public/files, then you should be able to read them from controller/service/etc. using public/files/<file name> path. You can test it with eg. the file_exists function.
I’m unable to answer your second question, but here are some suggestions (OK, questions…):
what is the status code of your (production) server’s response?
Do you have read/write permissions to the data files from the server’s account (www-data?)?
Does phpspreadsheet depend on any PHP extensions? Do you have them installed on both your development machine and the server?
What PHP version is installed on the server? Do you or phpspreadsheet use any features that may be unavailable on that version?
Try running your project not through Apache, but with PHP’s builtin server (but don’t do it long-term) and try to reproduce the issue.
I am getting this error on export of my database in adminer.
Error: Invalid CSRF token. Send the form again. If you did not send this request from Adminer then close this page. Need Help
Try this!
chgrp nginx /var/lib/php/session
The problem may cause by session save path not writable. I have faced the same problem and I fixed it by above command. I use nginx but if you use another web server, just change it. Hope this helps!
The problem for me was that the session cookie had the secure flag, while I was accessing adminer via http only (not https).
Our nginx configuration had
fastcgi_param HTTPS on;
which I had to remove.
Check that /var/lib/php/session exists and that nginx can write to it.
Your session should contain a CSRF token to prevent a CSRF attack. This message means that you either have no token stored or your token is not the same as that generated by your server.
I assume that you don't have a writable path configured in your php.ini where you can store the session. Please check if you have set session.save_path in php.ini to a writable path.
Find session.save_path in phpinfo (/var/lib/php/session for Centos) and change the mode:
chmod -R 777 /var/lib/php/session
done!
What setup are you using? I had this happen with nginx + php-fpm, and after I did a diff of php.ini of one machine where adminer worked and one where it didn't, and found out that I needed to blank out the value for session.cookie_domain.
Create a phpinfo.php file
<?php phpinfo(); ?>
Find real session save path
/var/opt/remi/php72/lib/php/session
Change directory permission
chmod -R 0777 /var/opt/remi/php72/lib/php/session
Sometimes it happens on previous PHP versions, which is not very important.
You can refresh the page or reopen it, this will fix it.
It happened to me an hour ago.
Check you have enough space in /var.
I cleaned it and it works again.
https://sourceforge.net/p/adminer/bugs-and-features/174/#429b : Yes this problem is caused by session savepath not being writable, add this line to the top of your file, will work if your host allows it
ini_set( 'session.save_path', 'path/to/writable/directory/' );
Check if your filesystem is not full.
df - kh
It can be a explanation of not be able to write on it.
I am working on a railo 4.2.1.008 server. I can run the web admin from localhost/railo-context/admin/web.cfm and www.mydomain.com/railo-context/admin/web.cfm. Both of them are showing individual settings. But the local one allows me to add an event gateway. When I added one, it lists the added instance above the add form. But in the other one, the form get submits and it is not listing anything. i am not sure it is added or not. Also I am not sure both the admin console are running from a same folder. Can anyone advice me on this?
I also had the same issue.Please check your application.cfc and check for any onrequest codes.In my case I renamed my application.cfc and it worked as the application.cfc variables got reset.
My tomcat application writes some value in a file under /usr/share/tomcat6/webapps/myApp/munin/. Permissions on this file are default (tomcat:tomcat ownership) 644. I wrote a very simple munin plugin to read those value, and it stands in /usr/share/munin/plugins/. Permissions there are (root:root) 755, like the other plugins. I also made a symlink in /etc/munin/plugins/.
If I use munin-run myApp_lookuptime, I get proper output for values, config and --debug.
However, if I telnet, it gives me "Bad exit".
munin-node.log says:
2013/05/03-14:35:08 [30657] Error output from myApp_lookuptime:
2013/05/03-14:35:08 [30657] /etc/munin/plugins/myApp_lookuptime: line 15: /usr/share/tomcat6/webapps/myApp/munin/myApp.LookupTime.log: Permission denied
2013/05/03-14:35:08 [30657] Service 'myApp_lookuptime' exited with status 1/0.
In /etc/munin/plugin-conf.d/munin-node, I wrote:
[myApp*]
user root
group root
But it still fails. From any dummy account on this server, I'm able to read that log, but still munin fails with "Permission Denied" error. What am I doing wrong?
Well, it was simple really. SELinux was blocking my plugins. So, either turn it off if your server is not public or learn to make rules if the server is public.
Here is a guide for CentOS: http://www.centos.org/docs/5/html/5.2/Deployment_Guide/sec-sel-enable-disable.html
After that, I rebooted, and my plugins worked like a charm.
Thank you, me.
Setting env.PATH variable for your plugin in /etc/munin/plugin-conf.d/munin-node so it can find all executables did the trick for me.
See
http://munin-monitoring.org/wiki/faq#Q:Whydoesapluginworkwithmunin-runbutnotinmunin-node
I’ve a shared hosting account and installed SugarCRM. Everything is fine except the message i get for the module loader. Here i get the message to add suhosin.executor.include.whitelist = “upload://” to the php.ini file.
The message is:
Upload stream is blocked by Suhosin, please add "upload" to
suhosin.executor.include.whitelist (See sugarcrm.log for more
information)
Because i have a shared hosting account i don’t have access to my etc map and therefore also not to my php.ini file.
I want to use the .htaccess file for this but don't know exact code. Can anyone help me?
You Can Try Add this to your .htaccess file as suggested in http://forums.sugarcrm.com/f6/upload-stream-blocked-suhosin-82116/
<IfModule mod_php.c>
php_value suhosin.executor.include.whitelist upload://
</IfModule>
In my case I'm using php-fpm so I modified the php.ini locater in /etc/php5/fpm/conf.d/suhosin.ini and I have no more warnings from SugarCRM
; configuration for php suhosin module
extension=suhosin.so
suhosin.executor.include.whitelist="phar"
suhosin.executor.include.whitelist="upload"
The solution posted by Carlos Quijano didn't work for me.
I've found that the solution is different depending if PHP is run as module, CGI or FASTCGI .
This is the documentation I've found about the different methods you can use to use a custom php.ini file for your domain (or even subdomains)
First you should check which one is your case.
For this, you can use the phpinfo command:
Create a php file called phpinfo.php with this content: <?php phpinfo(); ?>
and upload it into your domain root, then visit www.yourdomain.com/phpinfo.php,
you'll see a table and next to "Server API" you'll see which way PHP is run.
For me it was "CGI/FastCGI", so I had to get a copy of the global php.ini, which I didn't know how to get since it was not accessible by FTP access. I've found a solution in a Drupal forum:
Create a php file you can call gettheini.php with this content:
<?php system("cp /usr/local/php5/lib/php.ini /home/YOURCPANELUSERNAME/php.ini"); ?>
*The first path must be the path next to "Configuration File (php.ini) Path" in the table obtained before (phpinfo.php), with php.ini at the end. The second path is the path where you want to copy it to.
Upload it into your domain root, then visit www.yourdomain.com/gettheini.php.
This command will copy the global php.ini file yo the path you specified.
Then you can edit that file adding
; configuration for php suhosin module
extension=suhosin.so
suhosin.executor.include.whitelist="phar"
suhosin.executor.include.whitelist="upload"
save it and upload it.
As my hosting service had made some arrangements php.ini overriding, when I checked again the phpinfo page, the new file was already working (check next to "Loaded Configuration File").
Don't forget to protect the new file, add
<Files php.ini>
order allow,deny
deny from all
</Files>
to the end of yout .htaccess file (in the same root folder of your domain or subdomain)
I hope my experience can help you to solve your problem or at least give you some guidance.