I am using the following code:
$.post( "includes/modules/list.php" );
And I have tried the following:
jQuery("#empty").load("/includes/modules/list.php", {}, function() {
refreshlist();
});
And:
$.post("/includes/modules/list.php",function(data){
alert(data);
});
It was working fine on IIS but after switching to Apache (which I thought would actually work properly) it stopped working.
Now the IIS server was configured by Plesk, so maybe that has something to do with it?
This is my first post here, so please excuse any of my errors.
Edit: I am did this with XAMPP, meaning that PHP was tied up with it. PHP scripts do work, I did test hello world things and they all work, but when I try to call it, it won’t work.
I am using Windows. I am seriously debating just rewriting this in ASP.NET and installing back IIS but this is taking so much time already. This is a personal project but I really do want to have this work and be able to use PHP since that is the most mainstream option.
Another Edit: This is my php -i dump as requested (since I have no idea where to look)
SimpleXML
Simplexml support => enabled
Revision => $Id: a915862ec47f9589309acc4996ca8f6179788746 $
Schema support => enabled
soap
Soap Client => enabled
Soap Server => enabled
Directive => Local Value => Master Value
soap.wsdl_cache => 1 => 1
soap.wsdl_cache_dir => /tmp => /tmp
soap.wsdl_cache_enabled => 1 => 1
soap.wsdl_cache_limit => 5 => 5
soap.wsdl_cache_ttl => 86400 => 86400
sockets
Sockets Support => enabled
SPL
SPL support => enabled
Interfaces => Countable, OuterIterator, RecursiveIterator, SeekableIterator, Spl
Observer, SplSubject
Classes => AppendIterator, ArrayIterator, ArrayObject, BadFunctionCallException,
BadMethodCallException, CachingIterator, CallbackFilterIterator, DirectoryItera
tor, DomainException, EmptyIterator, FilesystemIterator, FilterIterator, GlobIte
rator, InfiniteIterator, InvalidArgumentException, IteratorIterator, LengthExcep
tion, LimitIterator, LogicException, MultipleIterator, NoRewindIterator, OutOfBo
undsException, OutOfRangeException, OverflowException, ParentIterator, RangeExce
ption, RecursiveArrayIterator, RecursiveCachingIterator, RecursiveCallbackFilter
Iterator, RecursiveDirectoryIterator, RecursiveFilterIterator, RecursiveIterator
Iterator, RecursiveRegexIterator, RecursiveTreeIterator, RegexIterator, RuntimeE
xception, SplDoublyLinkedList, SplFileInfo, SplFileObject, SplFixedArray, SplHea
p, SplMinHeap, SplMaxHeap, SplObjectStorage, SplPriorityQueue, SplQueue, SplStac
k, SplTempFileObject, UnderflowException, UnexpectedValueException
sqlite3
SQLite3 support => enabled
SQLite3 module version => 0.7-dev
SQLite Library => 3.8.4.3
Directive => Local Value => Master Value
sqlite3.extension_dir => no value => no value
standard
Dynamic Library Support => enabled
Path to sendmail => C:xamppmailtodiskmailtodisk.exe
Directive => Local Value => Master Value
assert.active => 1 => 1
assert.bail => 0 => 0
assert.callback => no value => no value
assert.quiet_eval => 0 => 0
assert.warning => 1 => 1
auto_detect_line_endings => 0 => 0
default_socket_timeout => 60 => 60
from => no value => no value
url_rewriter.tags => a=href,area=href,frame=src,input=src,form=fakeentry => a=hr
ef,area=href,frame=src,input=src,form=fakeentry
user_agent => no value => no value
tokenizer
Tokenizer Support => enabled
wddx
WDDX Support => enabled
WDDX Session Serializer => enabled
xml
XML Support => active
XML Namespace Support => active
libxml2 Version => 2.9.1
xmlreader
XMLReader => enabled
xmlrpc
core library version => xmlrpc-epi v. 0.51
php extension version => 0.51
author => Dan Libby
homepage => http://xmlrpc-epi.sourceforge.net
open sourced by => Epinions.com
xmlwriter
XMLWriter => enabled
xsl
XSL => enabled
libxslt Version => 1.1.27
libxslt compiled against libxml Version => 2.7.8
EXSLT => enabled
libexslt Version => 0.8.16
zip
Zip => enabled
Extension Version => $Id: a9db166c839b24cbebccad95120bd535e720038f $
Zip version => 1.12.4
Libzip version => 0.11.2
zlib
ZLib Support => enabled
Stream Wrapper => compress.zlib://
Stream Filter => zlib.inflate, zlib.deflate
Compiled Version => 1.2.7.3
Linked Version => 1.2.7.3
Directive => Local Value => Master Value
zlib.output_compression => Off => Off
zlib.output_compression_level => -1 => -1
zlib.output_handler => no value => no value
Additional Modules
Module Name
Environment
Variable => Value
ALLUSERSPROFILE => C:ProgramData
AMDAPPSDKROOT => C:Program Files (x86)AMD APP
APPDATA => C:UsersXilenceAppDataRoaming
asl.log => Destination=file
CommonProgramFiles => C:Program Files (x86)Common Files
CommonProgramFiles(x86) => C:Program Files (x86)Common Files
CommonProgramW6432 => C:Program FilesCommon Files
COMPUTERNAME => AURORA51
ComSpec => C:Windowssystem32cmd.exe
FP_NO_HOST_CHECK => NO
GPU_MAX_ALLOC_PERCENT => 50
HOMEDRIVE => C:
HOMEPATH => UsersXilence
HuluDesktopPath => C:UsersXilenceAppDataLocalHuluDesktopinstances .9.14.1
HuluDesktop.exe
LOCALAPPDATA => C:UsersXilenceAppDataLocal
LOGONSERVER => \AURORA51
MIBDIRS => C:/xampp/php/extras/mibs
MYSQL_HOME => C:xamppmysqlbin
NUMBER_OF_PROCESSORS => 4
OPENSSL_CONF => C:/xampp/apache/bin/openssl.cnf
OS => Windows_NT
Path => ;C:xampp;C:xamppphp;C:xamppperlsitebin;C:xamppperlbin;C:xamp
papachebin;C:xamppmysqlbin;C:xamppFileZillaFTP;C:xamppMercuryMail;C:xa
mppsendmail;C:xamppwebalizer;C:xampptomcatbin;C:Program Files (x86)iis e
xpressPHPv5.6;C:ProgramDataOracleJavajavapath;C:Program Files (x86)AMD A
PPbinx86_64;C:Program Files (x86)AMD APPbinx86;C:zpanelbinapachebin;C:
zpanelbinmysqlbin;C:zpanelbinphp;C:zpanelbinwget;C:zpanelbinbindbi
n;C:Program FilesCommon FilesMicrosoft SharedWindows Live;C:Program Files (
x86)Common FilesMicrosoft SharedWindows Live;C:Program Files (x86)NVIDIA Co
rporationPhysXCommon;C:Windowssystem32;C:Windows;C:WindowsSystem32Wbem;C
:WindowsSystem32WindowsPowerShellv1.0;C:Program Files (x86)ATI Technologi
esATI.ACECore-Static;C:Program FilesPerforce;C:Program Files (x86)Windows
LiveShared;C:Program FilesPerforceServer;C:Program FilesMicrosoftWeb Plat
form Installer;;C:Program FilesPerforceServer
PATHEXT => .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
PHPRC => C:xamppphp
PHP_PEAR_BIN_DIR => C:xamppphp
PHP_PEAR_CFG_DIR => C:xamppphpcfg
PHP_PEAR_DATA_DIR => C:xamppphpdata
PHP_PEAR_DOC_DIR => C:xamppphpdocs
PHP_PEAR_INSTALL_DIR => C:xamppphppear
PHP_PEAR_PHP_BIN => C:xamppphpphp.exe
PHP_PEAR_SYSCONF_DIR => C:xamppphp
PHP_PEAR_TEST_DIR => C:xamppphptests
PHP_PEAR_WWW_DIR => C:xamppphpwww
PROCESSOR_ARCHITECTURE => x86
PROCESSOR_ARCHITEW6432 => AMD64
PROCESSOR_IDENTIFIER => AMD64 Family 16 Model 4 Stepping 3, AuthenticAMD
PROCESSOR_LEVEL => 16
PROCESSOR_REVISION => 0403
ProgramData => C:ProgramData
ProgramFiles => C:Program Files (x86)
ProgramFiles(x86) => C:Program Files (x86)
ProgramW6432 => C:Program Files
PROMPT => Xilence@AURORA51$S$P$_#$S
PSModulePath => C:Windowssystem32WindowsPowerShellv1.0Modules
PUBLIC => C:UsersPublic
SESSIONNAME => Console
SystemDrive => C:
SystemRoot => C:Windows
TEMP => C:UsersXilenceAppDataLocalTemp
TMP => C:xampptmp
USERDOMAIN => Aurora51
USERNAME => Xilence
USERPROFILE => C:UsersXilence
windir => C:Windows
PHP Variables
Variable => Value
_SERVER["ALLUSERSPROFILE"] => C:ProgramData
_SERVER["AMDAPPSDKROOT"] => C:Program Files (x86)AMD APP
_SERVER["APPDATA"] => C:UsersXilenceAppDataRoaming
_SERVER["asl_log"] => Destination=file
_SERVER["CommonProgramFiles"] => C:Program Files (x86)Common Files
_SERVER["CommonProgramFiles(x86)"] => C:Program Files (x86)Common Files
_SERVER["CommonProgramW6432"] => C:Program FilesCommon Files
_SERVER["COMPUTERNAME"] => AURORA51
_SERVER["ComSpec"] => C:Windowssystem32cmd.exe
_SERVER["FP_NO_HOST_CHECK"] => NO
_SERVER["GPU_MAX_ALLOC_PERCENT"] => 50
_SERVER["HOMEDRIVE"] => C:
_SERVER["HOMEPATH"] => UsersXilence
_SERVER["HuluDesktopPath"] => C:UsersXilenceAppDataLocalHuluDesktopinstanc
es .9.14.1HuluDesktop.exe
_SERVER["LOCALAPPDATA"] => C:UsersXilenceAppDataLocal
_SERVER["LOGONSERVER"] => \AURORA51
_SERVER["MIBDIRS"] => C:/xampp/php/extras/mibs
_SERVER["MYSQL_HOME"] => C:xamppmysqlbin
_SERVER["NUMBER_OF_PROCESSORS"] => 4
_SERVER["OPENSSL_CONF"] => C:/xampp/apache/bin/openssl.cnf
_SERVER["OS"] => Windows_NT
_SERVER["Path"] => ;C:xampp;C:xamppphp;C:xamppperlsitebin;C:xamppperl
bin;C:xamppapachebin;C:xamppmysqlbin;C:xamppFileZillaFTP;C:xamppMercur
yMail;C:xamppsendmail;C:xamppwebalizer;C:xampptomcatbin;C:Program Files
(x86)iis expressPHPv5.6;C:ProgramDataOracleJavajavapath;C:Program Files
(x86)AMD APPbinx86_64;C:Program Files (x86)AMD APPbinx86;C:zpanelbinap
achebin;C:zpanelbinmysqlbin;C:zpanelbinphp;C:zpanelbinwget;C:zpanel
binbindbin;C:Program FilesCommon FilesMicrosoft SharedWindows Live;C:Prog
ram Files (x86)Common FilesMicrosoft SharedWindows Live;C:Program Files (x86
)NVIDIA CorporationPhysXCommon;C:Windowssystem32;C:Windows;C:WindowsSyst
em32Wbem;C:WindowsSystem32WindowsPowerShellv1.0;C:Program Files (x86)ATI
TechnologiesATI.ACECore-Static;C:Program FilesPerforce;C:Program Files (x8
6)Windows LiveShared;C:Program FilesPerforceServer;C:Program FilesMicroso
ftWeb Platform Installer;;C:Program FilesPerforceServer
_SERVER["PATHEXT"] => .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
_SERVER["PHPRC"] => C:xamppphp
_SERVER["PHP_PEAR_BIN_DIR"] => C:xamppphp
_SERVER["PHP_PEAR_CFG_DIR"] => C:xamppphpcfg
_SERVER["PHP_PEAR_DATA_DIR"] => C:xamppphpdata
_SERVER["PHP_PEAR_DOC_DIR"] => C:xamppphpdocs
_SERVER["PHP_PEAR_INSTALL_DIR"] => C:xamppphppear
_SERVER["PHP_PEAR_PHP_BIN"] => C:xamppphpphp.exe
_SERVER["PHP_PEAR_SYSCONF_DIR"] => C:xamppphp
_SERVER["PHP_PEAR_TEST_DIR"] => C:xamppphptests
_SERVER["PHP_PEAR_WWW_DIR"] => C:xamppphpwww
_SERVER["PROCESSOR_ARCHITECTURE"] => x86
_SERVER["PROCESSOR_ARCHITEW6432"] => AMD64
_SERVER["PROCESSOR_IDENTIFIER"] => AMD64 Family 16 Model 4 Stepping 3, Authentic
AMD
_SERVER["PROCESSOR_LEVEL"] => 16
_SERVER["PROCESSOR_REVISION"] => 0403
_SERVER["ProgramData"] => C:ProgramData
_SERVER["ProgramFiles"] => C:Program Files (x86)
_SERVER["ProgramFiles(x86)"] => C:Program Files (x86)
_SERVER["ProgramW6432"] => C:Program Files
_SERVER["PROMPT"] => Xilence@AURORA51$S$P$_#$S
_SERVER["PSModulePath"] => C:Windowssystem32WindowsPowerShellv1.0Modules
_SERVER["PUBLIC"] => C:UsersPublic
_SERVER["SESSIONNAME"] => Console
_SERVER["SystemDrive"] => C:
_SERVER["SystemRoot"] => C:Windows
_SERVER["TEMP"] => C:UsersXilenceAppDataLocalTemp
_SERVER["TMP"] => C:xampptmp
_SERVER["USERDOMAIN"] => Aurora51
_SERVER["USERNAME"] => Xilence
_SERVER["USERPROFILE"] => C:UsersXilence
_SERVER["windir"] => C:Windows
_SERVER["PHP_SELF"] =>
_SERVER["SCRIPT_NAME"] =>
_SERVER["SCRIPT_FILENAME"] =>
_SERVER["PATH_TRANSLATED"] =>
_SERVER["DOCUMENT_ROOT"] =>
_SERVER["REQUEST_TIME_FLOAT"] => 1420338712.5439
_SERVER["REQUEST_TIME"] => 1420338712
_SERVER["argv"] => Array
(
)
_SERVER["argc"] => 0
PHP License
This program is free software; you can redistribute it and/or modify
it under the terms of the PHP License as published by the PHP Group
and included in the distribution in the file: LICENSE
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
If you did not receive a copy of the PHP license, or have any
questions about PHP licensing, please contact [email protected].
Xilence@AURORA51 c:xampp
#
2
Answers
Okay I fixed it. It was really dumb of me but somewhere in my editing I removed the
<?php
part at the beginning of the document and only had<?
so that had caused it not to be parsed by the server, anyway... thank you so much for your help everyone! Should have just put code here in the first place. I will next time. Again, thank you!I’m a little confused by your question but what I think you are asking is that when your php page is called it returns the php script rather than executing it (I do not see why Ajax is important here – I assume the same happens if you browse directly to the php page in your browser?)
My first question would be whether you have installed php on the server as this is the usual problem in this situation? If not, assuming it it’s Linux then run either apt-get install php5 (if it is ubuntu, Debian or similar like Mint) or yum install php5 (if it is Redhat Fedora or Centos)
If php is installed, check your httpd.conf (usually in /etc/httpd/conf) and check that the php module is being loaded – I won’t go into loads of detail about this as Google is full of good info on Apache configs.
Also check your php page is executable as it is a script (ls -l yourphppagename.php and look for the x characters on the left)