php-5.3

Joomla 1.5 and PHP 5.3

主宰稳场 提交于 2019-12-13 21:55:20
问题 I have one website which is using Joomla 1.5 and running in php 5.3 . It was running with PHP 5.2 version, but the hosting company now updated to PHP 5.3 .So Joomla is creating issues with it: I cannot access the menus and modules from admin side. I have tried for a migration to Joomla 2.5 But as the site is installed with a number of third party extensions, it is not easy to migrate. So is there any patched or something that will help me to run Joomla 1.5 on PHP 5.3 and do migration on a

PHP extension loading from script using dl()

萝らか妹 提交于 2019-12-13 18:16:42
问题 I'm going to buy a (cheap) hosting space with apache/php 5/mysql. Because it's cheap i have no direct control over php.ini and extension loading. My question is: can i load an extension putting the .dll file into my space and than using dl() php function? Can the host disable this feature thus avoid loading custom extension this way? 回答1: Yes, it can be disabled through the enable_dl and safe_mode php.ini settings (which would almost certainly be the case, as otherwise you could e.g. load

Why $pear->packageExists() returns always false on installed package?

ぃ、小莉子 提交于 2019-12-13 13:27:55
问题 I installed Mail (http://pear.php.net/package/Mail) by pear install Mail everything seems to be ok, but checking for this package programmatically: $pear = new PEAR_Registry(); $enabled = $pear->packageExists('Mail'); always fails for me (false). Could someone give me any advice? If I try to install Mail once again, I am getting: pear/Mail is already installed and is the same as the released version 1.2.0 install failed My include_path settings: include_path = ".;C:\Program Files (x86)\IIS

Remove spaces in string, excluding these in specified between specified characters

☆樱花仙子☆ 提交于 2019-12-13 10:51:27
问题 I have a string: Some string, "it's a nice string". I like it. "some other text" I want remove spaces, excluding there beetween ": Somestring,"it's a nice string".Ilikeit."some other text" How I can goal this? 回答1: You could use regular expressions, or you could cheat and use explode() : $text_before = 'Some string, "it\'s a nice string". I like it. "some other text"'; $text_after = array(); $text_quotes = explode('"', $text_before); for ($i = 0, $max = count($text_quotes); $i < $max; $i++) {

simple html dom parser to return all td`s values?

别说谁变了你拦得住时间么 提交于 2019-12-13 06:29:04
问题 im using simple html dom parser to get scrap some data from html string . i need to return the TD's values from a table with specific css class each TD as array element i tried this cod but it gives fetal error <?php include('classes/simple_html_dom.php'); $html = str_get_html('<table class="pages_navigator"> <tr> <th style="width:50px;">ID </th> <th>Business </th> <th style="width:70px;">Category</th> <th style="width:50px;">Phone </th> <th style="width:70px;">State</th> <th style="width

Export pdf document with php using dompdf

試著忘記壹切 提交于 2019-12-13 05:17:21
问题 I have a question for you, so I tried to export pdf document with php using dompdf,all goes well but when I send php variables to display it's add to the end and the beginning .%27 public function generateTitlePage($number_cadastral='') { $this->load->library('dompdf_gen'); $dompdf = new DOMPDF(); $html = <<<HTML <html> <head> <meta charset="UTF-8"> <link rel="stylesheet" type="text/css" media="screen" href="TitlePage.css" /> </head> <body> <div style="margin-top: 100px; text-align: right;

ORA-24347: Warning of a NULL column in an aggregate function with PHP5.3.3

天大地大妈咪最大 提交于 2019-12-13 00:19:38
问题 Problem Statement: I am getting the below error with php5.3.3. ORA-24347: Warning of a NULL column in an aggregate function. Same coding was working fine with php4. There is no issue with my oracle view but when I started using the same with php5.3.3. It started giving the warning. Query: CREATE OR REPLACE FORCE VIEW "CUSTOMER_OA" ("CUST_ID", "CUSTOMER", "OPEN_CT", "EXPIRE_SOON_CT", "INVALID_EMAIL_CT") AS select c.cust_id, initcap(max(c.name)) AS customer, null AS open_ct, null AS expire_soon

Apache DELETE request

ぃ、小莉子 提交于 2019-12-12 17:35:17
问题 I have a problem. My webserver sinds 403 responses when I send a DELETE request. I don't want to delete the thing in my request, I just need to know that the method used was delete. How do I configure my webserver that it doesn't send those 403 messages anymore? I don't want WebDAV enabled or something like that. I just want to know if the request method was DELETE (in my php file, but it isn't executed because of the 403). 回答1: From what I read it should be something like this: <Limit DELETE

Process socket data with a leading length value

孤街醉人 提交于 2019-12-12 12:12:54
问题 This is a follow-up question about how to process prefixed messages received from a network socket. What I try to do is: Read the first 4 bytes (which is the $prefix and represents the length of the message) Check if $prefix has really the size of 4 bytes and if it's an integer Read the complete $message using the length from $prefix Check if message has really the size of $prefix bytes So far I've the following two lines of code: $prefix = socket_read($socket, 4, PHP_BINARY_READ); //No 1. /

If condition for PHP Version ignore new code

人盡茶涼 提交于 2019-12-12 09:46:17
问题 So I've got a script that needs to run on several sites. I've got one version of the script that is optimised with some new PHP 5.3 functions, however some sites are 5.2 etc. This code: if (version_compare(PHP_VERSION, '5.3.0') >= 0) { Do the optimised 5.3 code (Although 5.2 throws syntax errors for it) } else { do the slower version of code } However, on the 5.2 servers, it will detect the "syntax errors" in the first if condition, even though it technically should skip that content, I'm