PHP - File Creation And Delivery (apache)
Day
I'm using Codeigniter and inside the framework I create a file with PHP code If I try to point to it, the web-server doesn't deliver due to permission issues.
All this is done in a 'register function' where I create some fields in a SQL
If I put the user credentials into the database 'by hand' and likewise when I
I'm pretty sure this issue has been existed before and I'd appreciate any help.
Thanks for your help in forward. Gee Edited August 17, 2020 by bogusSimilar TutorialsI havent included the whole title as it wouldnt let me but I was wondering if someone could help me on this? I know this is possible as torrentflux caters for this but unsure of where to start. I dont want to allow file or directory uploads or creation in my /etc/php.ini file (this is turned off). Yet then torrentflux allows me to link a torrent from an external source (using legal downloads of course ) but then it uploads it on my server and creates folders on a per user basis. How is this possible can someone give me some pointers please? I look forward to any replies, Jeremy. I am using apache web server on linux. I am using PHP for web designing. On web server, i want to show the configuration data by reading the ini file. I am creating this ini file from one php code itself. If this php code i run through linux terminal, the file is created with file and group owner as root.(i am having sudo rights on machine) Then if i try to read the ini file from my apache web server, it gives warning as failed to open stream: permission denied. I have tried changing the owner, and permissions to 777 of the file. Still it is not readable.
On the other hand, if i run the php code of ini file creation through web server, ini file is created with file and group owner as apche. and web server is able to read/ write the file.
But i want to create that file from root or some other user and later read/written by apache.
How to give this access permission?
i have mysql community server 5.5 workbench 5.2 php 5.3.8 apache http server 2.2 summary: can i write the same code using less variables for the file name and content? okay so i managed to write a code that creates a filename, and each new filename is 1 higher. colony1 colony2 colony3. it also uses the same mysql query created variable to write idcol as 1 higher in the new file than in the previous written file. however to write the code i had to use a buttload of variables. here is the code, the resultant filename and the resultant content of the created file. is there a way to write such a code with less than 15 variables? the problem seems to be that when writing text to a file, i cannot insert certain characters outside of a variable into the final variable which is put in the $string variable input into the fwrite() function. File Name: Colony$.php where $=the last entry in the idcol column in table coltest. File Code: Code: [Select] <?php $idcol = $; include('Colony0.php'); ?> </body> </html> where $=the last entry in the idcol column in table coltest. Code: Code: [Select] <?php $dbhost = 'localhost:3306'; $dbuser = 'root'; $dbpass = 'root'; $dbname = 'aosdb'; $conn = mysql_connect($dbhost,$dbuser,$dbpass) or die ('Error connecting to mysql'); mysql_select_db($dbname); $query = "SELECT idcol FROM coltest ORDER BY idcol DESC LIMIT 1"; $result = mysql_query($query); $id = mysql_result($result, 0); $vcol = "Colony"; $vcolp = ".php"; $File = "$vcol$id$vcolp"; $FileHandle = fopen($File, 'w') or die("can't open file"); fclose($FileHandle); $File = "$vcol$id$vcolp"; $myFile = $File; $fh = fopen($myFile, 'w') or die("can't open file"); $idw = "$"; $icol= "idcol"; $ique = "?"; $iphp = "Colony0.php"; $ief = "<"; $ieb = ">"; $irese = "= "; $iresn = ";"; $iii= "include('$iphp');"; $ihtml ="</body> </html>"; $hph = "php"; $string = "$ief$ique$hph $idw$icol $irese$id$iresn $iii $ique$ieb $ihtml"; fwrite($fh, $string); fclose($fh); ?> I am using apache web server on linux. I am using php for coding. My php code is not able to read the files from /var/tmp folder. If apache itself creates some files in /var/tmp folder then php code is able to read it. Why this permission denied issues are there though full access permissions are given to each file?
This topic has been moved to PHP Applications. http://www.phpfreaks.com/forums/index.php?topic=351056.0 Hi guys,
Can someone help me with this if statement please. I'm trying to create two delivery amounts, so I'm trying to use an if statement instead of $delivery = "3.50";. All items should have a rate of £3.50 except item id 22 which should be 0.50p.
When I use this if statement below it just takes the price of £3.50 and ignores the else the part of the formula..
Thanks in advance.
$delivery = "3.50"; I'm currently working on a browser based mmorpg. First things first, here is an example of my battle.php <?php include_once 'connect.php'; session_start(); include_once 'logo.php'; ?> <link href="style.css" rel="stylesheet" type="text/css" /> <div id="login2" div align="center"> <?php if (isset($_SESSION['player'])) { $player=$_SESSION['player']; } else { echo "Not Logged in <br><br> <A href='login.php'>Login</a>"; exit; } ?> </div> <?php $playerinfo="SELECT * from players where name='$player'"; $playerinfo2=mysql_query($playerinfo) or die("could not get player stats!"); $playerinfo3=mysql_fetch_array($playerinfo2); include_once 'statpanel.php'; $pid = $playerinfo3['id']; $name = $playerinfo3['name']; $playerhp = $playerinfo3['hpoints']; $playerattack = $playerinfo3['attack']; $playerdefense = $playerinfo3['defense']; if ($playerhp < 1) { echo "You are dead!" ; echo "<br><a href='inn.php>Heal at the lake"; exit; } ?> <div id="table"> <?php if (isset($_GET['randid'])) { $randid=$_GET['randid']; $iteminfo="SELECT * from inventory where randid='$randid' AND id ='$pid'"; $iteminfo2=mysql_query($iteminfo) or die("could not get item stats!"); $iteminfo3=mysql_fetch_array($iteminfo2); if (!$iteminfo3['name']) { } else { $iname = $iteminfo3['name']; $stats = $iteminfo3['stats']; $statadd = $iteminfo3['statadd']; $type = $iteminfo3['type']; if ($type == "healing") { $newhp = $statadd + $playerhp; if ($newhp > $playerinfo3['maxhp']) { $newhp = $playerinfo3['maxhp']; } $updateplayer="update players set hpoints='$newhp' where id='$pid'"; mysql_query($updateplayer) or die("Could not update player"); $updateitem="DELETE from inventory where id='$pid' AND randid='$randid' limit 1"; mysql_query($updateitem) or die("Could not delete item"); $playerhp = $newhp; echo "Used " . $iname . " and recovered " . $statadd . ".<br>"; } }} $creature = $playerinfo3['creature']; if ($creature != 0) { $creatureinfo="SELECT * from creatures where id='$creature'"; $creatureinfo2=mysql_query($creatureinfo) or die("could not get the creature you were fighting!"); $creatureinfo3=mysql_fetch_array($creatureinfo2); } else { $creatureinfo="SELECT * from creatures order by rand() limit 1"; $creatureinfo2=mysql_query($creatureinfo) or die("could get a creature!"); $creatureinfo3=mysql_fetch_array($creatureinfo2); $cid = $creatureinfo3['id']; $updateplayer="update players set creature='$cid' where name='$name'"; mysql_query($updateplayer) or die("Could not update player"); } $creature = $creatureinfo3['name']; $creaturehp = $creatureinfo3['hpoints']; $creatureattack = $creatureinfo3['attack']; $creaturedefense = $creatureinfo3['defense']; ?> </div> <div id="player"> <?php /////player info echo "<u> " . $playerinfo3['name'] . "</u><br>"; echo "Hit points = " . $playerhp . "<br>"; echo "Attack = " . $playerattack . "<br>"; echo "Defense = " . $playerdefense . "<br><br><br>"; ?> </div> <div id="creature"> <img src="images/<?php echo $creatureinfo3['imgurl'];?>" <br> <?php ///////creature info echo "<u> " . $creatureinfo3['name'] . "</u><br>"; echo "Hit points = " . $creaturehp . "<br>"; echo "Attack = " . $creatureattack . "<br>"; echo "Defense = " . $creaturedefense . "<br><br><br>"; ?> </div> <div id="options"> <?php echo "<a href='attack.php'>Attack</a>"; echo "<br><a href='usemagic.php'>Use Magic</a>"; echo "<br><a href='useitem.php'>Use Item</a>"; echo "<br><a href='index.php'>Exit Arena</a>"; ?> </div> <div id="logout"> <?php echo "<br><a href='logout.php'><img src='images/logout.gif'>"; ?> </div> Particular functions I'm interested in for zone creation. -Pay to get in & have the initial icon switch to a now usable adventure zone. (done) -When 'adventuring' in this link. Battle php randomizes encounters between 'combat encounters' and 'non-combat' encounters. (can't get this right, and removed my utter failures from the code above as to not clutter it. Pulls randomly from the Creature DB just fine but when I try to add in the 2nd,non-combat,db..it pulls nothing.) -NonCombat encounters dish our reward. (currently my non combats do not give reward. Unlike a standard creature encounter where a players gold and exper get updated on a victory...I dont know how to immediately trigger the change on encounter & I'm epically unsure how to craft the $updateplayer= to be so broad as to include all possibilities of improvement but only to utilize the one being called upon in the encounter) -I'm also interested in updating my battle.php to include a dropdown list of usable spells/items instead of the current method of Attacking/going back/selecting magic or items/going back/...repeat. It works, sure, but its nasty..Any ideas on how to call on the database for user specific data to fill in a drop down menu? Hi All, Long long long time lurker here!
A little background to understand how this fits in So I am building a local directory for my local area as part of a community project. Part of this there is the ability for local stores to sell online locally for people to have delivered or collect. So in the UK we have postcodes in the formats: AB12 3CD, A1 2BC A12 3CD, A1B 2CD
Most delivery pricing solutions only care about the full postcode as they are all about national delivery or at best only care about the first half. Due to the local nature we need more granularity to it so we have some rules: Delivery Available EH => Price EH3 => Price EH3 1 => Price EH3 1-4 => Price
Exceptions - No Delivery allowed EH => null EH3 => null EH3 1 => null EH3 1-4 => null
Can mix and match for example:
EH3 = £2.00 EH3 2 => £2.25 EH3 5 => null
This means that ALL EH3 address the delivery cost is £2 BUT If they are in EH3 2 then its £2.25 or if the are in EH3 5 then no delivery is possible.
I have came up with this monstrosity of code that for the most part works but also can throw the wrong delivery prices out due to bugs and issues that I can't seem to work out!
Main Function: function isDeliverable($postcode, $rules){ $canDeliver = false; $deliveryValue = 0.00; $found = false; list($outward, $inward) = explode(' ', $postcode); $area = substr($outward, 0, 2); $district = substr($outward, 2); $sector = substr($inward, 0, 1); $unit = substr($inward, 1,1); $rulez = json_decode($rules, true); //RULE START - EH10 9RJ $pcFound = inRule($rulez, $postcode); if($pcFound){ return ['canDeliver' => $pcFound['deliverable'], 'deliveryValue' => $pcFound['price']]; } //RULE END - EH10 9RJ //RULE START - EH10 9R $pcFound = inRule($rulez, $area.$district.' '.$sector.$unit); if($pcFound && !strpos($pcFound['postcode'], "-")){ return ['canDeliver' => $pcFound['deliverable'], 'deliveryValue' => $pcFound['price']]; } //RULE END - EH10 9R //RULE START - EH10 9A-F $pcFound = inRule($rulez, $area.$district.' '.$sector.$unit, 1); if($pcFound){ $postArray = postcodeExploder($pcFound, 1); $pcFound = inRule($postArray, $area.$district.' '.$sector.$unit); if($pcFound){ return ['canDeliver' => $pcFound['deliverable'], 'deliveryValue' => $pcFound['price']]; } } //RULE END - EH10 9A-F //RULE START - EH10 9 $pcFound = inRule($rulez, $area.$district.' '.$sector); if($pcFound && !strpos($pcFound['postcode'], "-")){ return ['canDeliver' => $pcFound['deliverable'], 'deliveryValue' => $pcFound['price']]; } //RULE END - EH10 9 //RULE START - EH10 1-4 $pcFound = inRule($rulez, $area.$district.' '.$sector, 2); if($pcFound){ $postArray = postcodeExploder($pcFound, 2); $pcFound = inRule($postArray, $area.$district.' '.$sector); if($pcFound){ return ['canDeliver' => $pcFound['deliverable'], 'deliveryValue' => $pcFound['price']]; } } //RULE END - EH10 1-4 //RULE START - EH10 $pcFound = inRule($rulez, $area.$district); if($pcFound && !strpos($pcFound['postcode'], "-")){ return ['canDeliver' => $pcFound['deliverable'], 'deliveryValue' => $pcFound['price']]; } //RULE END - EH20 //RULE START - EH1-20 $pcFound = inRule($rulez, $area.$district, 3); if($pcFound){ $postArray = postcodeExploder($pcFound, 3); $pcFound = inRule($postArray, $area.$district); if($pcFound){ return ['canDeliver' => $pcFound['deliverable'], 'deliveryValue' => $pcFound['price']]; } } //RULE END - EH1-20 //RULE START - EH $pcFound = inRule($rulez, $area); if($pcFound && !strpos($pcFound['postcode'], "-")){ return ['canDeliver' => $pcFound['deliverable'], 'deliveryValue' => $pcFound['price']]; } //RULE END - EH return ['canDeliver' => $canDeliver, 'deliveryValue' => $deliveryValue]; }
Helper Functions: function inRule($rules, $postcode, $type = null){ foreach($rules as $key => $rule){ if(substr_count($rule['postcode'], '-') !== 0 && strlen($postcode) > 2){ $pEX = postcodeExploder($rule, $type); foreach($pEX as $r){ if($r['postcode'] == $postcode){ return $rules[$key]; } //$rule['postcode'] = trim(substr($rule['postcode'], 0, strpos($rule['postcode'], "-")-1)); } } if ( $rule['postcode'] == $postcode ) return $rules[$key]; } return false; } function postcodeExploder($rule, $type){ $out = []; $r = explode(' ', $rule['postcode']); $count = count($r); //It must be in the form AB1 1C //$first = AB1 //$last = 1C-G if($count == 2){ list($first, $last) = $r; } else { $last = $r[0]; } list($left, $right) = explode('-', $last); $sec = $left[0]; $leftInward = substr($last, strpos($last, '-')-1,1); $rightInward = substr($last, strpos($last, '-')+1,1); $range = range($leftInward, $rightInward); foreach($range as $key => $ra){ if($type == 1){ $out['a'.$key] = [ 'postcode' => $first.' '.$sec.$ra, 'deliverable' => $rule['deliverable'], 'price' => $rule['price'] ]; } else if($type == 2){ $out['a'.$key] = [ 'postcode' => $first.' '.$ra, 'deliverable' => $rule['deliverable'], 'price' => $rule['price'] ]; } else { $out['a'.$key] = [ 'postcode' => preg_replace('/\PL/u', '', $left).$ra, 'deliverable' => $rule['deliverable'], 'price' => $rule['price'] ]; } } return $out; } Stores Rules: $rules = '{"a1":{"postcode":"EH9","deliverable":true,"price":"1.50"},"a2":{"postcode":"EH9 7","deliverable":true,"price":"1.60"},"a3":{"postcode":"EH9 7A","deliverable":true,"price":"1.70"},"a4":{"postcode":"EH9 7AY","deliverable":true,"price":"1.80"},"a5":{"postcode":"EH1-2","deliverable":true,"price":"1.90"},"a6":{"postcode":"EH1 2-3","deliverable":true,"price":"2.00"},"a7":{"postcode":"EH4 5A-N","deliverable":true,"price":"2.10"},"a8":{"postcode":"EH","deliverable":true,"price":"1.40"},"a9":{"postcode":"TD14","deliverable":true,"price":"2.00"},"a10":{"postcode":"TD14 5DC","deliverable":false,"price":null}}';
I have a form that passes multiple images and I wanted them to have a substring of a md5 encrypted time for generating unique codes so I don't delete or overwrite an older file. I keep the actual images in a folder and the path in mysql. The folder is working perfectly and there are no problems generating unique codes but I have been trying all night and I can't figure out why mysql won't update. I can actually get it to update but then I loose the functionallity of the code and if I don't upload a 4 images and leave one blank, the blank one deletes the previously uploaded field in the table row. Here is the md5 encrypted time for generating unique codes: Code: [Select] $unique = strtolower(substr(md5(time()), 0, 4)); This is how it works with the folder: Code: [Select] $filePath = $uploadDir . $unique . $fileName; This is how I get it to update mysql but then loose functionality: Code: [Select] $values[$i] = $unique . mysql_real_escape_string(basename(trim($_FILES[$fields[$i]]['name']))); Here is the entire code: Code: [Select] <?php require_once('storescripts/connect.php'); mysql_select_db($database_phpimage,$phpimage); $unique = strtolower(substr(md5(time()), 0, 4)); $uploadDir = 'upload/'; if(isset($_POST['upload' . $config])) { foreach ($_FILES as $file) { $fileName = $file['name']; $tmpName = $file['tmp_name']; $fileSize = $file['size']; $fileType = $file['type']; if($fileName==""){ $filePath = 'upload/'; } else{ $filePath = $uploadDir . $unique . $fileName; } $filePath = str_replace(" ", "_", $filePath); $result = move_uploaded_file($tmpName, $filePath); if(!get_magic_quotes_gpc()) { $fileName = addslashes($fileName); $filePath = addslashes($filePath); } $fileinsert[]=$filePath; } } $mid = mysql_real_escape_string(trim($_POST['mid'])); $cat = mysql_real_escape_string(trim($_POST['cat'])); $item = mysql_real_escape_string(trim($_POST['item'])); $price = mysql_real_escape_string(trim($_POST['price'])); $about = mysql_real_escape_string(trim($_POST['about'])); $fields = array(); $values = array(); $updateVals = array(); for($i=1; $i<=4; $i++) { $fields[$i] = 'name'.$i; $values[$i] = mysql_real_escape_string(basename(trim($_FILES[$fields[$i]]['name']))); if($values[$i] != '') { $updateVals[] = "{$fields[$i]} = '{$values[$i]}'"; } } $updateNames = ''; if(count($updateVals)) { $updateNames = ", " . implode(', ', $updateVals); } $update = "INSERT INTO image (mid, cid, item, price, about, name1, name2, name3, name4) VALUES ('$mid', '$cat', '$item', '$price', '$about', '$values[1]', '$values[2]', '$values[3]', '$values[4]') ON DUPLICATE KEY UPDATE cid = '$cat', item = '$item', price = '$price', about = '$about' $updateNames"; $result = mysql_query($update) or die (mysql_error()); $id = mysql_insert_id(); ?> <p style="font-size:35px; font-family:Arial, Helvetica, sans-serif; color:#255E67; margin-left:25px;">Your Item Has Been Uploaded!</p> <script type="text/javascript"> setTimeout('ourRedirect()', 2000) function ourRedirect() { location.href='protator_php.php?mid=<?php echo $id ?>' } </script> So far, my company has been using Apache (Linux)-based web hosts for our hosting needs. Ever since the Heartbleed bug was found in OpenSSL, which is common to open source software, including Apache HTTP Server, I was wondering if Microsoft's IIS was any more secure than Apache. Opinions?
My arguement is that although IIS is a closed-source system, it is also a widely targeted platform (Windows) so that may be of concern. My argument for Apache is that it is open source, so exploits can be implemented using the source code as well, which is available for free download.
So, the question really is which HTTP server platform is more secure?
With the following code i can create an xml file. Code: [Select] <?php $myXML = new SimpleXMLElement("<myroot></myroot>"); $title= $myXML->addChild('title'); $title->addAttribute('number','12'); $titleName= $title->addChild('titleName', 'title1'); $titleLink= $title->addChild('titleLink', 'link1'); Header('Content-type: text/xml'); echo $myXML->asXML(); ?> But when i check the validity of xml file http://www.validome.org/xml/validate/ This error occurs: Can not find declaration of element 'myroot'. I suppose that the problem is missing of !DOCTYPE and !ELEMENT lines. How can i create valid XML documents with PHP automatically?? Is it possible to make it without writing doctype and element types for the whole element types of xml by hand $title, $titleName and $titleLink Thank you I'm trying to run a process using shell_exec, however the program i'm trying to run must communicate with a process that is not a system process, and everytime i run it, it fails, does anyone know how to make a apache server run active windows not in the system process? I am attempting to create an image and I have run into a snag. I want to add both text and another image to the image I am making. Here is the code so far minus unnecessary parts: header ("Content-type: image/png"); $name = $fetch_user['username']; $rank = $fetch_rank['rank_title']; $img_url = 'path''. $fetch_rank['rank_image']; $im = @imagecreatefrompng("$img_url") or die("Cannot Initialize new GD image stream"); // try changing this as well $font = 4; $width = imagefontwidth($font) * strlen($string) ; $height = imagefontheight($font) ; $im = imagecreatefrompng("image.png"); $x = imagesx($im) - $width ; $y = imagesy($im) - $height; $backgroundColor = imagecolorallocate ($im, 255, 255, 255); $textColor = imagecolorallocate ($im, 255, 255, 255); //imagestring ($im, $font, $x, $y, $string, $textColor); imagestring ($im, $font, 100, 10, $name, $textColor); imagestring ($im, $font, 100, 22, $rank, $textColor); imagepng($im); Everything works UNTIL I added in this part: $im = @imagecreatefrompng("$img_url") or die("Cannot Initialize new GD image stream"); Any idea what I am doing wrong? All that comes up is "Cannot Initialize new GD image stream"; and I know the URL's work. hey guys i have apache installed but im sure my .htaccess file isnt being read...is there something in the config file i have to do please?...thank you Whats is the best way to create a forum using php? Should I use any frameworks? If not is there any guide/tutorial/book that descibe this procedure? Thank you. I am trying to create a basic image with GD library, but my browser says that the image cannot be displayed because it contains errors... I have no idea why. Here's my code: Code: [Select] switch($_GET['case']){ case "progressbar": header('Content-Type: image/jpeg'); $barWidth = 6; $barHeight = 14; $barPadding = 2; $imageWidth = ($barWidth * 10) + (10 * $barPadding); $imageHeight = ($barHeight + ($barPadding * 2)); $img = @imagecreate($imageWidth, $imageHeight); $imgBorder = imagecolorallocate($img, 0, 0, 0); //imagefilledrectangle($img, 1, $imageHeight -1, $imageWidth - 1, $imageHeight - 1, $imgBorder); $output = "Hello, world!"; imagestring($img, 1, 4, 4, $output, $imgBorder); imagejpeg($img); imagedestroy($img); break; } I have a file called image.php that i use to create images and I use the URL image.php?case=progressbar. I am not sure what to look for to even get started. If some one could help point me in the right direction that would be appreciated.
I created a customer system that tracks contracts and invoices ect. Where do I start if I would want a customer to be able to go to the website, sign up, and their own version of the system would be created.
Do I just write a script that creates a new database with the correct credentials? Do all of the users access the same files but just have different database. Do I have to copy the directory of files to a specific folder for each customer?
I know there must be tons of websites that once you sign up for example a calendar app that keeps your data seperate from everyone else.
Any help is appreciated.
Thanks
Jack
Apache https setup!
Okay so i made my own SSL certificate for my localhost using these commands
OpenSSL: ( CMD > c:\xampp\apache\bin\openssl )
req -config c:\xampp\php\extras\ssl\openssl.cnf -new -out jobnow.csr -keyout jobnow.pem rsa -in jobnow.pem -out c:\jobnow.key x509 -in jobnow.csr -out jobnow.crt -req -signkey c:\jobnow.key -days 369when asked for common name type your ip address. Then i install import the certificate to certmgr.msc Restate Apache https//192.168.0.14 - Doesnt work 192.168.0.14 - Works fine Apache error log: [Wed Sep 10 12:05:41.299000 2014] [ssl:warn] [pid 7840:tid 260] AH01909: RSA certificate configured for localhost:80 does NOT include an ID which matches the server name [Wed Sep 10 12:05:41.301000 2014] [ssl:warn] [pid 7840:tid 260] AH01909: RSA certificate configured for 192.168.0.14:443 does NOT include an ID which matches the server name [Wed Sep 10 12:05:41.301000 2014] [ssl:warn] [pid 7840:tid 260] AH01915: Init: (localhost:80) You configured HTTPS(443) on the standard HTTP(80) port! [Wed Sep 10 12:05:41.373000 2014] [co warn] [pid 7840:tid 260] AH00098: pid file C:/xampp/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run? [Wed Sep 10 12:05:41.616000 2014] [ssl:warn] [pid 7840:tid 260] AH01909: RSA certificate configured for localhost:80 does NOT include an ID which matches the server name [Wed Sep 10 12:05:41.617000 2014] [ssl:warn] [pid 7840:tid 260] AH01909: RSA certificate configured for 192.168.0.14:443 does NOT include an ID which matches the server name [Wed Sep 10 12:05:41.617000 2014] [ssl:warn] [pid 7840:tid 260] AH01915: Init: (localhost:80) You configured HTTPS(443) on the standard HTTP(80) port! [Wed Sep 10 12:05:41.659000 2014] [mpm_winnt:notice] [pid 7840:tid 260] AH00455: Apache/2.4.7 (Win32) OpenSSL/1.0.1e PHP/5.5.9 configured -- resuming normal operations [Wed Sep 10 12:05:41.659000 2014] [mpm_winnt:notice] [pid 7840:tid 260] AH00456: Apache Lounge VC11 Server built: Nov 21 2013 20:13:01 [Wed Sep 10 12:05:41.659000 2014] [co notice] [pid 7840:tid 260] AH00094: Command line: 'c:\\xampp\\apache\\bin\\httpd.exe -d C:/xampp/apache' [Wed Sep 10 12:05:41.661000 2014] [mpm_winnt:notice] [pid 7840:tid 260] AH00418: Parent: Created child process 7032 [Wed Sep 10 12:05:42.319000 2014] [ssl:warn] [pid 7032:tid 272] AH01909: RSA certificate configured for localhost:80 does NOT include an ID which matches the server name [Wed Sep 10 12:05:42.321000 2014] [ssl:warn] [pid 7032:tid 272] AH01909: RSA certificate configured for 192.168.0.14:443 does NOT include an ID which matches the server name [Wed Sep 10 12:05:42.321000 2014] [ssl:warn] [pid 7032:tid 272] AH01915: Init: (localhost:80) You configured HTTPS(443) on the standard HTTP(80) port! [Wed Sep 10 12:05:42.645000 2014] [ssl:warn] [pid 7032:tid 272] AH01909: RSA certificate configured for localhost:80 does NOT include an ID which matches the server name [Wed Sep 10 12:05:42.646000 2014] [ssl:warn] [pid 7032:tid 272] AH01909: RSA certificate configured for 192.168.0.14:443 does NOT include an ID which matches the server name [Wed Sep 10 12:05:42.646000 2014] [ssl:warn] [pid 7032:tid 272] AH01915: Init: (localhost:80) You configured HTTPS(443) on the standard HTTP(80) port! [Wed Sep 10 12:05:42.688000 2014] [mpm_winnt:notice] [pid 7032:tid 272] AH00354: Child: Starting 150 worker threads. [Wed Sep 10 12:05:54.589000 2014] [authz_co error] [pid 7032:tid 1652] [client 192.168.0.14:3112] AH01630: client denied by server configuration: C:/xampp/htdocs/ [Wed Sep 10 12:05:54.682000 2014] [authz_co error] [pid 7032:tid 1652] [client 192.168.0.14:3112] AH01630: client denied by server configuration: C:/xampp/htdocs/favicon.icoIt says my server name does not match, So i changed the server name to: ( httpd-ssl.conf ) around line 80 ServerName 192.168.0.14:443 DocumentRoot to my httpd.conf document root My .key is in apache/conf/ssl.key my crt is in apache/conf/ssl.crt I hope this helps someone else! i had to post this after how much trouble it was causing me! Hi, I recently updraded PHP to 5.3.3 and Apache to 2.2.17 on a Linux Centos 5.4 Box using yum. Since then the Web pages running under Apache cannot connect to the database using mysql. If I run a manual PHP script, I am able to. When I run phpinfo() on PHP under Apache I get this (note: --without-mysql): './configure' '--build=x86_64-redhat-linux-gnu' '--host=x86_64-redhat-linux-gnu' '--target=x86_64-redhat-linux-gnu' '--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib64' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/usr/com' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--cache-file=../config.cache' '--with-libdir=lib64' '--with-config-file-path=/etc' '--with-config-file-scan-dir=/etc/php.d' '--disable-debug' '--with-pic' '--disable-rpath' '--without-pear' '--with-bz2' '--with-exec-dir=/usr/bin' '--with-freetype-dir=/usr' '--with-png-dir=/usr' '--with-xpm-dir=/usr' '--enable-gd-native-ttf' '--without-gdbm' '--with-gettext' '--with-gmp' '--with-iconv' '--with-jpeg-dir=/usr' '--with-openssl' '--with-pcre-regex=/usr' '--with-zlib' '--with-layout=GNU' '--enable-exif' '--enable-ftp' '--enable-magic-quotes' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-sysvmsg' '--with-kerberos' '--enable-ucd-snmp-hack' '--enable-shmop' '--enable-calendar' '--without-mime-magic' '--without-sqlite' '--with-libxml-dir=/usr' '--enable-xml' '--with-system-tzdata' '--with-apxs2=/usr/sbin/apxs' '--without-mysql' '--without-gd' '--disable-dom' '--disable-dba' '--without-unixODBC' '--disable-pdo' '--disable-xmlreader' '--disable-xmlwriter' '--without-sqlite3' '--disable-phar' '--disable-fileinfo' '--disable-json' '--without-pspell' '--disable-wddx' '--without-curl' '--disable-posix' '--disable-sysvmsg' '--disable-sysvshm' '--disable-sysvsem' When I run phpinfo() on PHP that I run manually from the shell: ('--with-mysql=shared,/usr' '--with-mysqli=shared,/usr/bin/mysql_config') './configure' '--build=x86_64-redhat-linux-gnu' '--host=x86_64-redhat-linux-gnu' '--target=x86_64-redhat-linux-gnu' '--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib64' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/usr/com' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--cache-file=../config.cache' '--with-libdir=lib64' '--with-config-file-path=/etc' '--with-config-file-scan-dir=/etc/php.d' '--disable-debug' '--with-pic' '--disable-rpath' '--without-pear' '--with-bz2' '--with-exec-dir=/usr/bin' '--with-freetype-dir=/usr' '--with-png-dir=/usr' '--with-xpm-dir=/usr' '--enable-gd-native-ttf' '--without-gdbm' '--with-gettext' '--with-gmp' '--with-iconv' '--with-jpeg-dir=/usr' '--with-openssl' '--with-pcre-regex=/usr' '--with-zlib' '--with-layout=GNU' '--enable-exif' '--enable-ftp' '--enable-magic-quotes' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-sysvmsg' '--with-kerberos' '--enable-ucd-snmp-hack' '--enable-shmop' '--enable-calendar' '--without-mime-magic' '--without-sqlite' '--without-sqlite3' '--with-libxml-dir=/usr' '--enable-xml' '--with-system-tzdata' '--enable-force-cgi-redirect' '--enable-pcntl' '--with-imap=shared' '--with-imap-ssl' '--enable-mbstring=shared' '--enable-mbregex' '--with-gd=shared' '--enable-bcmath=shared' '--enable-dba=shared' '--with-db4=/usr' '--with-xmlrpc=shared' '--with-ldap=shared' '--with-ldap-sasl' '--with-mysql=shared,/usr' '--with-mysqli=shared,/usr/bin/mysql_config' '--enable-dom=shared' '--with-pgsql=shared' '--enable-wddx=shared' '--with-snmp=shared,/usr' '--enable-soap=shared' '--with-xsl=shared,/usr' '--enable-xmlreader=shared' '--enable-xmlwriter=shared' '--with-curl=shared,/usr' '--enable-fastcgi' '--enable-pdo=shared' '--with-pdo-odbc=shared,unixODBC,/usr' '--with-pdo-mysql=shared,/usr' '--with-pdo-pgsql=shared,/usr' '--with-pdo-sqlite=shared,/usr' '--with-pdo-dblib=shared,/usr' '--enable-json=shared' '--enable-zip=shared' '--with-readline' '--with-pspell=shared' '--enable-phar=shared' '--with-mcrypt=shared,/usr' '--with-tidy=shared,/usr' '--with-mssql=shared,/usr' '--enable-sysvmsg=shared' '--enable-sysvshm=shared' '--enable-sysvsem=shared' '--enable-posix=shared' '--with-unixODBC=shared,/usr' '--enable-fileinfo=shared' '--enable-intl=shared' '--with-icu-dir=/usr' '--with-recode=shared,/usr' Both phpinfo() show PHP 5.3.3 how can I configure PHP under Apache? Do I need to rebuild / reintall Apache manually? Thanks very much! Frank Hi, I'm new to PHP and servers and wonder if its possible to send email from a PHP application that I created in Eclipse running on a MAC using MAMP. This would be done while connected on WiFi, lets say in a coffee shop. Thanx |