wkhtmktopdf on shared hosting does not return any data...? - wkhtmltopdf

Hi friends currently i m working on a small business project.
for this project i need to convert my dynamic html page into a PDF file..
I googled for html to pdf and found wkhtml...
in my local-host system its works like charm..
But in my shared server it does not gives any output... errors also. when php wrap execute, it fails silently..
Any idea guys??
another thing.. In my shared hosting, they are disabled exec,proc_open and other process related functions, So i used .htaccess file to point another php.ini for reconfiguring the disabled_functions.

Because your hosting provider has disabled the exec methods, I'm sure they won't be pleased to find out you're trying to use wkhtmltopdf. It might be a good idea to contact them about your plans.
When downloading wkhtmltopdf, make sure you grab the right package (based on the server specs). Your best bet is to use one of the static packages as it provides most of the libraries needed to run wkhtmltopdf. You might also need to change the file permissions to be able to execute the file.
Lastly, make sure your custom php.ini is even used by php (calling phpinfo() will do the trick).

Related

PyroCMS File Module Costomization

I am using Pyrocms for an application. There is a module available for File managment. Although it is good enough but i need to customize it according to my requirements.
Here are the requirements
For each file admin from backend can create multiple temporary links
Each file should be limited to some time duration defined by admin
And download limit should be 3 for each user
Now i need suggestions how i can do these tasks to accomplish the application.
Do i need some more tables to handle the situation?
Or can i extend existing file table.
What about temporary links how can i create them and let user download the file?
Another requirement if user uses the link, download popup comes and he cancels three times i have to restrict him now that he can not download it now.
So using ip will do it or some other suggestion.
If i have to send multiple links to a single user through email then how can i customize the File modules to fit my needs.
Please give some suggestion.
Would the Download module help at all?
This all sounds like it should be an extra module, as the Files job is just to handle Files. Downloads are a very different aspect, but you can use the Files library in PHP to get lists of files and server them up?
So:
Files handles Files.
Downloads handle the downloading of "Files"
If the Download module by Authur Guy is not good enough for your needs you should definitely think about building one and selling it on the store.

Redirect sub domain requests to look like it's from main domain

How do I go about doing the following:
I have a main domain at say http://www.domainname.com
and a another site at http://www.domainname.com/billing/
When loading knowledgebase articles it loads with http://www.domainname.com/billing/knowledgebase.php
I want it to load the content but make it look like it's coming from
http://www.domainname.com/knowledgebase.php
In otherwords anything when I load
http://www.domainname.com/knowledgebase.php*
it should load the content that exists at /billing/knowledgebase.php*
Possible?
It can be achieved with the .htaccess file and the use of mod_rewrite, however I know what you're trying to achieve, and from personal experience I'd say to stop while you're ahead, if you want a root based WHMCS install, then delete it all and start again, by installing WHMCS in the root, rather than a sub-directory. Although WHMCS says to install itself in a sub-directory, a lot of people treat it like a CMS, and as such really want it to be the homepage and content manager of the whole site.

Magento : CMS upload image fail silently

I am trying to figure out why the tinyMCE WYSIWYG editor in the CMS module of Magento will not upload images. I can create/delete folders but any file will simply not get uploaded, and there seems to be no message as to why the file is not successfully written on the server.
Anyone may have an idea why?
** Update **
I'm using Magento 1.6.2. I have tried to track down the problem and it seems that the controller never gets executed. I have added a line to log the arguments in the uploadAction() action (in Mage_Adminhtml_Cms_Wysiwyg_ImagesController) and nothing gets logged.
This is project inherited from someone else, and was modified to some extend, but nothing seems to point out that this part of Magento would have been touched in anyway by the modifications.
** EDIT**
The project associated with this question has been dropped and I no longer can provide an answer to this question. If anyone can confirm a working answer (as this problem was apparantly common with Magento), I will gladly mark that answer as "accepted".
Otherwise, I will flag this question for removal for the aformentioned reasons.
Thank you.
Other than solutions provided here, it may occur when you use a CDN (or a different domain) for your javascript and media files in admin panel. If you use CDN, use it for your website(s) scope and use your own domain for default scope. It will make your website(s) media and javascript files to be loaded from CDN, and backend's media and javascript files to be loaded from your own domain. This will solve your problem.
There are some known issues with flash image uploader on Magento. Unfortunately when it falls, it falls silently. Here are some cases when smth can break it:
if you try to use it with secured connection using open ssl certificate
if you're using it on server with apache authentication
on some Magento versions with prototype 1.7
I think the latter is your best bet. Maybe you should try to apply the patch from here: http://www.magentocommerce.com/boards/viewthread/4348/P45/#t327010
In my case it was a cross domain problem, and one quite hard to find if you ask me...
What was puzzling me was that the uploader for product images was working like a charm but the one in the CMS section was failing completely silently. We are serving the skin folder from an Amazon S3 bucket, and the flash uploader lives under that folder.
Interestingly enough, our version of Magento (1.7.0.2) is using two different methods to calculate the path to the SWF file, depending whether you are under CMS or Product update.
The CMS file (app/design/adminhtml/default/default/template/cms/browser/content/uploader.phtml) is using the following method to embed the Flash Uploader:
<?php echo $this->getSkinUrl('media/uploader.swf') ?>
While the Product image uploader is using:
<?php echo $this->getUploaderUrl('media/uploader.swf') ?>
In our case, the first one resolves to the AWS S3 url, obviously in a separate domain, while the second one will still reference the local domain's url.
So yeah, the quick, dirty fix would be to replace getSkinUrl for getUploaderUrl in app/design/adminhtml/default/default/template/cms/browser/content/uploader.phtml. Alternatively you can extend the core to load a different template in which you would have replaced that method.
I hope this helps somebody... I wish I had found something like this five days ago when I first stumbled upon the issue :-)
Are you using flash uploader with https? If so, is your secure address in differente domain (usually used in shareds ssl)?
I got some trouble with this. I solved by installing a flash uploader disabler plugin.
You can download the plugin with this downloader key:
http://connect20.magentocommerce.com/community/Dull_Uploader
I hope it helps.

code igniter framework guidance for beginners

I am just a beginner in code igniter. I have just downloaded the code igniter framework. But i don't know that where should i keep my html, php files and stylesheets, images etc. Is there any procedure to do the things? Please guide me.
CodeIgniter has an awesome user guide that will come with the install you can read through (or read it online at - http://codeigniter.com/user_guide/ ), or you can watch some of the videos on their site - http://codeigniter.com/tutorials/
In comparison to most other frameworks you're going to find they have maybe the smallest learning curve and great documentation. I would also recommend learning basic PHP and getting familiar with your web environment maybe before beginning.
I used these tutorials to help get me started with the framework haven't look back since! http://net.tutsplus.com/sessions/codeigniter-from-scratch/
hi I am a weekend coder and picked up CI about a year ago.
It helped me a lot.
The best tutorial I found was on the IBM's developer site. It runs through putting together a simple application. Admittedly, there's nothing in it about directory and file placement but it helps cement ideas about how models, views and controllers (MVC), and why MVC is so helpful. Because the basic idea is quite simple, it's worth running through a simple CI tutorial again and again till you 'feel' or intuit the basic helpfulness of the setup.
Things like JS, CSS files can be kept in their own folders at the first level of your website folder e.g /js or /css or /images. You ask about PHP files as well. PHP files which you, the coder, write, are either 'views', 'models' or 'controllers'. These go in the folders with those names in the /application folder e.g /application/views/yourview.php or /application/controllers/yourcontroller.php. The CI install comes with a default view file and a default controller, which you are probably already aware of.
The files inside /application/config are important as well. Read the user-guide about tweaking these files. The most obvious tweaks are to database.php to connect to your db, autoload to give automatic use of CI helpers/libraries which you can choose, and to config.php to give CI the name of your website e.g the name you give to '/'.
The file 'index.php' comes with the CI installation (/index.php). You don't need to fiddle with it at all really except to determine the level of error reporting you want ('environment') and that's not a priority at all. But it's important to remember this about index.php - that CI uses it as the essential reference for defining paths to useful folders like CSS or images. So even if your view file is in /application/views, if it refers to an image like a logo.gif in /images for example, the path to it is just /images/logo.gif. It is not anything more complicated like ../../images/logo.gif.
I hope that helps.
Tom
Offline version of CodeIgniter user guide is available with CodeIgniter which already downloaded by you.
just extract your CodeIgniter zip file in your localhost server root directory,
Then http://localhost/www/CodeIgniter_2.1.2/user_guide/ open this url with browser ,here you can access offline version of CodeIgniter user guide.
Here I am using wamp server so I used this url, If you are using xampp server then please use http://localhost/CodeIgniter_2.1.2/user_guide/
Okay this is what I would usually do for code igniter
here is my directory structure.
CI App Path (e.g "c:\xampp\htdocs\ci_app_name" )
-application
-system
-assets
--css (new folder , where css files will be included)
--js (javascript and jquery libraries location)
Basic HTML and PHP files should be location
CI_app_pah
-application
--views (this is where to put HTML and PHP files)
For other things such as Controller , Models and Views , you can't put any where but put in their related area.
That will be
CI app
-application
--controllers
--models
--views

Taking over a Joomla created site

So i have a client, who has a disc of an entire site. Root server files, all the way to /httphome/ files...
However, it looks like it was created using Joomla. Now, i know my HTMl and CSS but have never used a CMS like Joomla.
To get this site up and running, am i going to have to install Joomla on my clients server, and then upload the files?
i am going to assume its not that easy.... anyone got any insight into this process and what im looking at?
thanks
Keep in mind that Joomla content resides in a MySql database.
You need the following:
Database export
Create a DB on you MySQL server
Upload the files
Edit configuration.php to work with you db and also set your path there
Also, some components might need some more setup, as some of them have their own cfg files.
To get this site up and running (if the file is really the entire site) should be as simple as setting up a web server and pointing it to the directory with the index in it. Joomla should already be in that file. Let me know if i can elaborate on the process.
Since you are new to Joomla, you might want to try loading the disc contents up on your localhost first. Personally, when I'm trying something new, I hate for my first attempts to be somewhat public - I always feel a little safer if I do the first install someplace local where I'm the only person who can see it.
Best of luck with your project! If you run into any problems, or if you want to confirm that the site is definitely Joomla, let us know and we will get you sorted out.
Do you have the related database? The files that make up Joomla are useless without the database. You could install Joomla and upload your files over the top, but any database changes made by any installed extensions wouldn't be made to that install. You'd also be missing all of the actual site content without the database.
If you do have the database, then all you need to do is import the database in you your mySQL, then upload the files you have on the disc and edit configuration.php file with the new database user and password.

Resources