PHP GD Extension is loaded and working on local server but it is not loaded correctly on our live server even though I am using all the exact same files.
(PHP GD is working fine here)
Local Server: Microsoft Windows Server 2003 For Small Business Server SP2
IIS Version: 6
Then I copied the whole "C:\PHP" folder from local server to "C:\Program Files (x86)\" on live server. That "PHP" folder does include ext folder and "php_gd2.dll" file inside it. I changed the path from "C:\PHP" to "C:\Program Files (x86)\" in "php.ini" too. However, PHP is not loaded on live server.
PHPINFO Local:http://jsfiddle.net/hFKfx/
PHPINFO Live: http://jsfiddle.net/h77Hy/
I am not very good with PHP. Please help.
In Win2K3 / IIS6, you're running PHP as a ISAPI module (thread-safe).
In Win 7 / IIS7.5, you're running PHP as a FCGI module (non-thread-safe).
This is likely your problem. You can't mix and match thread-safe (TS) / non-thread-safe (NTS) extensions with core PHP. If you just copied everything over, you probably have TS extensions. You need to download and use the NTS ones.
(archive link to PHP 5.2.6 NTS)
To verify this assumption, check where php.ini specifies a log for startup errors. If you're logging startup errors, you should see something similar to:
PHP Warning: PHP Startup: gd Extension: Unable to initialize module
Module compiled with build ID=API20041225,TS,VC6
PHP compiled with build ID=API20041225,NTS,VC6
These options need to match
(note "TS" vs "NTS")
Hope that helps. If not, maybe you'll find something else in the log that indicates what the problem is.
Related
On my PC (Windows 10) I wrote a new website (VB windows forms, .aspx files).
If I run the site from inside Visual Studio 2019, all OK, it starts and run correctly.
Now I need to have this site always "ON", I installed IIS, configured a "new website", name, directory and so on. I configured the new website in IIS to the directory where I develop, not in wwwroot.
Nothing works: I always have a 404 error.
To simplyfy everything I wrote a simple .HTML file, "prova.html", I placed it in the real website directory, and I tested it with Firefox: http://127.0.0.1/test.html.
Still 404:
URL requested http://127.0.0.1:80/prova.html
Physical path C:\inetpub\wwwroot\prova.html
It seems that IIS ALWAYS searches the file in the wrong path, but I configured the correct directory where the file is.
Of course if I place my test file in "inetpub\wwwroot ..." IIS finds and opens the file.
Any suggestion?
You can refer to the following steps to deploy the project in IIS:
Right click on your project and select publish:
Then add the site in IIS:
Solved ... installing IIS I didn't install the .NET part ... I feel very stupid.
Background:
I currently have a working ASP.NET4.0 + Razor2.0(view engine only, no MVC) + mod_mono + Apache + mono3.0.4 + Ubuntu12.10 on a cloud server provider. I found another service provider which is more cost-effective than my current one.
The Issue:
This server is running on Ubuntu13.04 and was able to compile Mono 3.2.5(the latest release on Mono site). I configured it almost identical to my other server and made a simple CSHTML page which works on my MSVS2010; a simple page with layout. I uploaded everything to the directory and when I tried to open the page, instead of being rendered, the server only let me download the whole cshtml file.
I added these lines in mod_mono.conf:
<IfModule mod_mono.c>
MonoAutoApplication enabled
MonoServerPath /usr/bin/mod-mono-server4
</IfModule>
AddType application/x-asp-net .cshtml
Then on my virtual hosting file for Apache2, I added these lines to let Mono handle everything:
<Location /mono>
SetHandler mono-ctrl
Order deny,allow
allow from all
</Location>
My configurations are identical to my previous server which is working properly. The only difference I know is I'm using Mono 3.2.5 and Ubuntu 13.04, also I'm using the master branch of XSP, mod_mono, and libgdiplus. I pulled the code through git.
UPDATE
I checked again the the current stable version of Mono and found out that it is 3.2.4 so I re-compiled it to this version but the the issue is still there.
UPDATE 10-Dec 2013
I was able to rebuild the server using Debian 7.0 and it is already running ASP.NET 4.0(and theoretically even 4.5). It can now run properly execute regular ASPX but not CSHTML.
The page runs properly under IIS on MS Windows 7 but it can't render and just download the page when I try to run it on mod_mono(mono 3.2.7 runtime) + Apache2 + Debian or XSP4 + Windows 7 though both can run ASPX pages properly. This test site still runs on my older server running mod_mono(mono 3.0.4 runtime) + Apache2 + Ubuntu 12.10. Both servers have the same configuration on both mod_mono.conf and site(/etc/apache2/sites-enabled/000-default) but can't make it run on my new server.
Even if the following are already in the GAC, copying and placing the files in the "bin" directory fixed the issue:
System.Web.Helpers.dll
System.Web.Razor.dll
System.Web.WebPages.dll
System.Web.WebPages.Razor.dll
I'm running XDebug on Linux CentOS. I want to profile pages on a web app built with CodeIgniter, served by Apache.
XDebug is enabled in php.ini with the following settings:
zend_extension=/usr/lib64/php/modules/xdebug.so
xdebug.profiler_enable = 1
xdebug.profiler_output_dir = /tmp/xdebug
Everything works fine when I trigger php scripts from the command line, and XDebug profile logs are written to /tmp/xdebug, as expected. When I load a url from the web app through the browser, XDebug does not create any profile log files.
Has anyone gotten XDebug to work with Codeigniter? From what I can tell, I should not have to trigger XDebug profiling via GET in the url because profiler_enable is turned on for all php scripts, although I've tried this and it doesn't seem to work either.
Apache needed to have write permissions on the /tmp/xdebug folder.
sudo chown -R apache:apache /tmp/xdebug
XDebug can profile Codeigniter page loads from a browser now.
Thanks #J. Bruni.
It seems to me that the issue is not related to CodeIgniter... It seems you may have multiple php.ini files...
In my Ubuntu installation, I have several sub-directories inside /etc/php5 directory: cgi, cli, fpm, etc. Each one of these has a php.ini file inside it, which is specific to a single "mode".
In other words: PHP may have several different php.ini files... one for CLI (command-line), other for CGI, and so on...
Maybe the xdebug configuration lines you pasted above are not in the php.ini file used when you access PHP scripts from the browser. Maybe you added these lines to /etc/php5/cli/php.ini instead of /etc/php5/cgi/php.ini (or another... in my setup, it is /etc/php5/fpm/php.ini, because I use php-fpm)
I'm struggling getting my MVC3 site I developed on Windows to correctly run on Linux (Ubuntu) and Apache using Mono 2.10.5.
When I browse to the site root via my web browser, I see my file/folder structure instead of the home page of the site, which appears to me as though routing is not working. Everything works fine on my development environment on Windows.
When in this view, if I click on Global.asax, for instance, I see the standard ASP.NET "yellow screen of death" (YSOD) with a 500 error stating "Could not load type 'System.ComponentModel.DataAnnotations.KeyAttribute' from assembly 'MyWebSite'.".
On the bottom of the YSOD, I see the following: Version information: Mono Runtime Version: 2.10.5 (Debian 2.10.5-1); ASP.NET Version: 4.0.30319.1
I've followed the instructions for configuring Mono for MVC3 here: http://www.integratedwebsystems.com/2011/06/get-mvc3-razor-running-on-mono/
Does anyone have any clues as to why the file/folder structure is being listed when I visit the site root from my browser?
It turns out that mono was running under port 8080, and I couldn't configure it to run on port 80 due to a conflict with another module. I am able to run things fine on port 8080 now.
Is there an open source Node.JS webserver available yet that has CGI support?
There is a node-cgi module (found through npm registry) which looks to be actively maintained.
If you are looking for a CGI module to run node.js under webservers like Apache or IIS then cgi-node will allow you to do just that.
Apache example: you can add a .htaccess file within your web folder to point all *.jscirpt files to be executed using Node.js through the cgi-node module. Something like this:
Action cgi-node /cgi-bin/cgi-node.js
AddHandler cgi-node .jscript
Also including the cgi-node.js script found on the cgi-node.org website within the cgi-bin folder.
CGI-Node allows Node.js to behaves exactly like PHP when running under a webserver.
Documentations and tutorials available on the site: cgi-node.org