BlogEngine config fail with sub domain? - blogengine.net

I use godaddy hosting with IIS7, there is a blogengine in the root, I create a new subdomain named: http://leech.code2code.info (PHP code).
I din't work. I did the same like instruction http://blogengine.codeplex.com/discussions/32808
But the problem still occur.
Please advice me,
Thanks

Reread the error message. This doesn't seem like you're having some config error in your code. Your webserver is missing an assembly it needs to execute the code. The server is missing the component "Microsoft.Web.Infrastructure" or it couldn't load the correct version.
Check the file D:\hosting\6918570\html\web.config on line 74 for this reference. It might work removing the dependency (backup the file first), but that really depends on the code used.
The linked thread is talking about a different issue, just resulting in a similar error message.

These instructions on BIN deploying by Scott Hanselman helped me.
http://www.hanselman.com/blog/BINDeployingASPNETMVC3WithRazorToAWindowsServerWithoutMVCInstalled.aspx

Related

Clone development environment on an office server to use locally

Situation:
As a developer I'd like to "clone" our development environment (on an office server) so we can use it locally (for example when no/limited internet access is available). We've decided to give Vagrant a try.
What did I do?
First I used PuPHPet to create a basic config including nginx, php (incl modules), composer, git, memcached etc. You can find my config here. I also added a nginx vhost for our website.dev. This is where I run into the first problem.
We use a few additional config settings to the location block. A rewrite, a fastcgi_pass and a include. This is not available so I searched a lot online and I found out I could use the following statement (was more a try/fail/retry).
location_cfg_append:
{ rewrite: ".* /dispatch.php break", include: "fastcgi-params.conf", fastcgi_pass: "127.0.0.1:9000" }
First question:
This does work, however is this the way to do this? I'm not sure if I should be editing this config file (the file generated by PuPHPet) directly.
Second question:
How should I 'upload' the fastcgi-params.conf file I want to include? I did not find a way to do this in the config.yaml but there is a way to run some scripts. For now I've added a echo [contents] > /etc/nginx/fastcgi-params.conf that does work. However...
Third question:
When the VM is provisioned the nginx config is created. When that is done nginx is restarted. However at that moment the fastcgi-params.conf file does not exist yet (this is created AFTER the provisioning).
When nginx reloads this will fail, trigger an error and the machine can not finish the provision sequence (so it will never create the config file).
I can create this file on the next boot (and then nginx will work) but this cannot be the correct way to do this. So: how can I (before nginx 'installation') create / deploy a file to the VM? Or more generic (question 2): How can I upload a file to the VM?
If this is totally not the way to go please let me know! This are our first steps into creating a locally development machine so other/better methods are welcome.
First question: This does work, however is this the way to do this? I'm not sure if I should be editing this config file (the file generated by PuPHPet) directly.
Yes, I encourage this.
Second question: How should I 'upload' the fastcgi-params.conf file I want to include?
Place it inside one of your shared folders. It'll be available within the VM and you can reference it that way.
Third question
The above answer fixes this issue.

How did my PHP session path change?

EDIT - HUGE ERROR ON MY PART
I found another site that had the issue that I knew was not on the same server. Then I realized that the original site with the issue was also on a different server and had not been moved over completely yet. The server in question was actually a Plesk Parallels' server and the issue was caused by a patch applied to the server over the weekend due to a security update. This server did have the file path and I just had to chmod it to 777 instead of 77x for it to work. I apologize for the confusion and thank everyone for trying to help. +'s for all. :)
Original Post
I have a website on a shared hosting server (also mine) that since yesterday started giving me this error:
Warning: session_start() [function.session-start]: open(/var/lib/php/session/sess_678cf69f0f17b87c52136ee0280d23cc, O_RDWR) failed: Permission denied (13) in /var/www/vhosts/domain.net/httpdocs/index.php on line 1
I've checked /usr/lib/php.ini and /usr/local/lib/php.ini to see where it is set and both say it is set to the /tmp directory, which is where it should be set and always has been. The /var/lib/php/session directory never even existed. I did create it and give it 777 permissions but that did not help. Though the bigger issue here is why did it change to begin with. There is no .htaccess file for this site and I cannot find this being set anywhere on the site itself either.
This is the ONLY site on this server with this issue, telling me its something local to the website. I just cannot figure out what. So my question is this: what should I look for to check the session save path settings for an individual site on a shared hosting environment to find out why it suddenly changed for this one client?
FYI, I am running a WHM server.
Thanks
session_save_path(realpath(dirname($_SERVER['DOCUMENT_ROOT']) . '/../tmp'));
You need to add the above code before starting the session.
You don't appear to have write permission to the /var directory on your server. This is a bit weird, but you can work around it. Before the call to session_start() put in a call to session_save_path() and give it the name of a directory writable by the server. More details here
I found another site that had the issue that I knew was not on the same server. Then I realized that the original site with the issue was also on a different server and had not been moved over completely yet. The server in question was actually a Plesk Parallels' server and the issue was caused by a patch applied to the server over the weekend due to a security update. This server did have the file path and I just had to chmod it to 777 instead of 77x for it to work. I apologize for the confusion and thank everyone for trying to help. +'s for all. :)

Server error when loging in Joomla

The site has been just moved to a new host. Everything works as it is supposed, but when trying to log in as administrator, I am given the following error:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, webmaster#localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
Any idea of what can be wrong? htcaccess file is renamed to htcaccess.txt
If you follow everything in here you will find what you forgot.
Typically configuration.php is what is forgotten. In addition I strongly recommend Akeeba backup. Something to think about next time.
I have finaly figured it out. The htaccess.txt was in the root directory. What I had to do is to rename the .htaccess file in administrtor folder.

Twilio script runs locally but not on server?

I've been using twilio's library just fine locally (mac os x with XAMPP), but when I upload it to an amazon ec2 instance, the ability to send sms messages breaks.
$sms = $client->account->sms_messages->create(
"xxx-xxx-xxxx", $users[pnumber], "Testing!");
(the x's are numbers)
The above code seems to be what breaks it. I have uploaded the twilio library to the correct directory. I have also tried enabling all permissions to see if it was a permission issue.
I'm rather inexperienced to running things on my own server. Any guidance, guesses, and tips would be appreciated!
edit: Clarification - by "breaks", I mean the rest of the page does not load. If I add "echo "Hi";", it will not be printed. However, echo-ing before the code above works.
The problem was that I had not installed cURL onto my server yet. It was not included in my php installation. Thanks to Kevin Burke's advice, I ran it in command line and realized that it was calling a non-existant function. Some googling led to me installing curl, which fixed the problem. Thanks Kevin!

EC2 Caching Code and Server Error 500

I started to mess around with the EC2 “Micro Instance” for a new site i’m working on. I put on an ubuntu lamp server and loaded up our favorite php framework and started along the coding path.
One frustrating thing i’m finding is whenever I make a mistake coding (which is rare! j/k), it gives my a “Server Error 500” and won’t display the php error line number or the helpful references to where the mistake might have happened.
Also when ever an error does appear and I try to fix the mistake it will remain the same for a couple of minutes. Its like its caching on my system or something. If I do something like this :
echo "test" //leaving off the semicolon
refresh the browser it comes up with the error. Then when I fix it:
echo "foo"; //corrected
I still get the Server Error 500. Not sure if anyone else has run in to these issues. Maybe its a php.ini configuration, .htaccess configuration (i’m using Paul Irish’s HTML5Boilerplate .htaccess code), or a LAMP configuration issue. Any pointers to where the problem might lie would be a huge help.
Thanks! Steve
this has nothing to do with ec2.
see php error directives in /etc/php5/apache2/php.ini

Resources