shared-hosting

How do you get a Cronjob executing a PHP script to run longer than 30 seconds?

与世无争的帅哥 提交于 2019-12-02 03:51:36
问题 How can I rewrite this into a cron that will run every day for longer than 30 seconds? Also, do I need to edit the .htaccess or php.ini file in the cron.php directory to say something? Over the browser it runs just fine for longer than 30 seconds; over the shell, it runs just fine too. But as a cron set task, it dies after 30 seconds. I'm on 1and1 share hosting. 0 12 * * * php5 /this/is/the/file/cron.php 回答1: There are several things that could be terminating your script. One could be the

ViewStateUserKey + shared hosting + ViewStateMac validation failure

本小妞迷上赌 提交于 2019-12-02 03:51:19
问题 So, the question is simple, even though I'm starting to have doubts if this will get answered... I have a website, where I wanted to secure my viewstate with the recommended ViewStateUserKey.. In my base page (inherited from Page obviously) I have this code: protected override void OnInit(EventArgs e) { base.OnInit(e); if (User.Identity.IsAuthenticated) base.ViewStateUserKey = Session.SessionID; } Works good on localhost, however, when I upload it to hosting (shared hosting provided by one of

Running Ruby app on Apache

若如初见. 提交于 2019-12-02 03:46:21
问题 I have been learning Ruby lately, and I want to upload a test web application to my server. But I can't figure out how to get it to run on my shared hosting. My Hosting Details Shared Hosting with JustHost (see here for list of features) OS: Linux Apache: 2.2.11 cPanel: 11.25.0-STABLE No SSH access. Can install Ruby Gems. Can't install Apache modules. Can " Manage Ruby on Rails Applications " through cPanel. Mongrel gem is installed. I built the following simple HelloWorld Ruby Rack app using

Running Ruby app on Apache

痴心易碎 提交于 2019-12-02 02:40:31
I have been learning Ruby lately, and I want to upload a test web application to my server. But I can't figure out how to get it to run on my shared hosting. My Hosting Details Shared Hosting with JustHost (see here for list of features ) OS: Linux Apache: 2.2.11 cPanel: 11.25.0-STABLE No SSH access. Can install Ruby Gems. Can't install Apache modules. Can " Manage Ruby on Rails Applications " through cPanel. Mongrel gem is installed. I built the following simple HelloWorld Ruby Rack app using Sinatra : #!/usr/bin/ruby ruby require 'rubygems' require 'sinatra' get '/hi' do "Hello World!" end I

ViewStateUserKey + shared hosting + ViewStateMac validation failure

99封情书 提交于 2019-12-02 01:47:05
So, the question is simple, even though I'm starting to have doubts if this will get answered... I have a website, where I wanted to secure my viewstate with the recommended ViewStateUserKey.. In my base page (inherited from Page obviously) I have this code: protected override void OnInit(EventArgs e) { base.OnInit(e); if (User.Identity.IsAuthenticated) base.ViewStateUserKey = Session.SessionID; } Works good on localhost, however, when I upload it to hosting (shared hosting provided by one of our local providers), it gives the traditional "Validation of viewstate MAC failed" error after I

How to turn off php safe_mode off for a particular directory in a shared hosting environment?

落花浮王杯 提交于 2019-12-02 01:31:52
Hi I'm used shared hosting. I want to turn off php safe_mode off for my site. My provider gave me a php.ini file and asked me to put it with my settings in my public_html folder to override the settings, but it didn't work. You can also try to create a file called php.ini in the root (public_html or other) folder, and putting the following in it: safe_mode = Off Depending on server settings, this may or may not work. Your service provider might have forgot to tell you that you need to enable your user defined php.ini configuration by adding this line in the .htaccess file that you find in your

How do you get a Cronjob executing a PHP script to run longer than 30 seconds?

可紊 提交于 2019-12-01 23:33:24
How can I rewrite this into a cron that will run every day for longer than 30 seconds? Also, do I need to edit the .htaccess or php.ini file in the cron.php directory to say something? Over the browser it runs just fine for longer than 30 seconds; over the shell, it runs just fine too. But as a cron set task, it dies after 30 seconds. I'm on 1and1 share hosting. 0 12 * * * php5 /this/is/the/file/cron.php There are several things that could be terminating your script. One could be the maximum execution time set in the php.ini file. If that's the case, you can override it in your script with set

is shared hosting secure?

南笙酒味 提交于 2019-12-01 23:13:32
I have a question with security point of view, it might sound silly but i'm very interested to know. If someone uploads his code on shared hosting (assuming some general US based web hosting companies where it cost about $5 to 10$ a month), is it secure there? Would the other users hosted on same servers somehow access the code? (and of course the hosting administrators can access?) In that case is it really safe to host on shared hosting companies? This depends on how the individual web hosting company have setup there systems. You need to trust the company you are hosting with but any half

PHP + PhantomJS Rasterize

ぃ、小莉子 提交于 2019-12-01 22:46:16
I'm using PhantomJS 64 bit in my PHP application to dynamically capture an HTML page to be emailed to the user. phantomjs rasterize.js "http://..." /path_to_images/image.png This method works fine when I run the above on the command line but when the PHP script runs the command using exec it fails with no output and returns exit code 11. If I switch it to use the 32 bit phantomJS binary, the command succeeds but fails to load the google JSAPI on the page since with error Reference Error: can't find variable google . This is a problem because not all of the page content is loaded and captured

PHP Websocket on Bluehost

﹥>﹥吖頭↗ 提交于 2019-12-01 13:13:57
问题 I am trying to setup Websocket based PHP chat application from Chat-Using-WebSocket-and-PHP-Socket on Bluehost on domain XYZ.ABC.com. I have changed $host to XYZ.ABC.com both in server.php & index.php. I am not able find a way to invoke & keep server.php alive. Is any other way to get this done? even switching hosing provider works for me. 回答1: If you have shell access you need to run the script with nohup <command> & It will then run in background and not stop if you leave the shell. If you